diff --git a/app/jobs/monthly_changes_report_job.rb b/app/jobs/monthly_changes_report_job.rb new file mode 100644 index 000000000..6b7ec2686 --- /dev/null +++ b/app/jobs/monthly_changes_report_job.rb @@ -0,0 +1,22 @@ +class MonthlyChangesReportJob < ApplicationJob + + queue_as :default + + def perform(date) + CSV.open("#{date.year}_#{date.month}_changes.csv", 'wb') do |csv| + csv << ['item type', 'item id', 'item changed at'] + PaperTrail::Version.where(created_at: date..).find_each do |item| + csv << [item.item_type, item.item_id, item.created_at, item.event] + end + end + + i = Item.updated_on_or_after(date).count + t = Thesis.updated_on_or_after(date).count + cl = Collection.updated_on_or_after(date).count + cm = Community.updated_on_or_after(date).count + summary = "#{i} items, #{t} theses, #{cl} collections and #{cm} communities were created or modified." + + File.write("#{date.year}_#{date.month}_summary.txt", summary) + end + +end diff --git a/test/fixtures/files/2024_11_changes.csv b/test/fixtures/files/2024_11_changes.csv new file mode 100644 index 000000000..5a2f88030 --- /dev/null +++ b/test/fixtures/files/2024_11_changes.csv @@ -0,0 +1,337 @@ +item type,item id,item destroyed at +Item,2e13a33c-5d0d-4633-a4ff-0d75505ad73d,2024-10-29 21:58:08 UTC,create +Thesis,191e388d-0826-4b67-abca-24b5d8a1aba3,2024-10-29 21:58:08 UTC,create +Item,854c048f-37c5-41bf-852f-3fef5a86c6bf,2024-10-29 21:58:08 UTC,create +Thesis,8e04d625-602b-43bd-b027-59af11004ef7,2024-10-29 21:58:08 UTC,create +Item,879ab601-9ad8-43a8-aa05-b859398519d1,2024-10-29 21:58:08 UTC,create +Thesis,75765964-ae38-46d4-8ded-d5f2cb666c9d,2024-10-29 21:58:08 UTC,create +Item,2107bfb6-2670-4ffc-94a1-aeb4f8c1fd81,2024-10-29 21:58:18 UTC,update +Item,2107bfb6-2670-4ffc-94a1-aeb4f8c1fd81,2024-10-29 21:58:18 UTC,update +Thesis,08da24b1-9411-4fb9-b64c-82bf4e12f095,2024-10-29 21:58:08 UTC,create +Item,e90e2e53-11a3-4170-b4ec-1094b48cd888,2024-10-29 21:58:08 UTC,create +Thesis,72671aed-0885-49ad-af62-52cb67738900,2024-10-29 21:58:08 UTC,create +Item,efffba97-965f-4387-a2a6-c329a4b35a01,2024-10-29 21:58:08 UTC,create +Thesis,e608824d-9ae3-40d2-8bc6-7ccf1959dd71,2024-10-29 21:58:08 UTC,create +Item,b6a4b600-f2b8-4306-8e6e-2297197aefb0,2024-10-29 21:58:08 UTC,create +Item,01523cdc-3d30-4830-8a30-0acdb3bd0396,2024-10-29 21:58:08 UTC,create +Thesis,6e83a5e5-5405-460a-b230-1c4511af3d62,2024-10-29 21:58:08 UTC,create +Item,1b72a4ba-5dca-4e29-a407-ac1570efb4af,2024-10-29 21:58:08 UTC,create +Thesis,8bf93076-277a-4c39-8ced-881a08c6a0da,2024-10-29 21:58:08 UTC,create +Item,69ae93a8-760f-4770-b97b-b984128c7d4d,2024-10-29 21:58:08 UTC,create +Item,69ae93a8-760f-4770-b97b-b984128c7d4d,2024-10-29 21:58:08 UTC,update +Item,69ae93a8-760f-4770-b97b-b984128c7d4d,2024-10-29 21:58:08 UTC,update +Item,69ae93a8-760f-4770-b97b-b984128c7d4d,2024-10-29 21:58:08 UTC,update +Item,69ae93a8-760f-4770-b97b-b984128c7d4d,2024-10-29 21:58:08 UTC,update +Item,2107bfb6-2670-4ffc-94a1-aeb4f8c1fd81,2024-10-29 21:58:18 UTC,update +Item,2107bfb6-2670-4ffc-94a1-aeb4f8c1fd81,2024-10-29 21:58:18 UTC,update +Item,2107bfb6-2670-4ffc-94a1-aeb4f8c1fd81,2024-10-29 21:58:18 UTC,update +Item,93126aae-4b9d-4db2-98f1-4e04b40778cf,2024-10-29 21:58:18 UTC,create +Item,93126aae-4b9d-4db2-98f1-4e04b40778cf,2024-10-29 21:58:18 UTC,update +Item,93126aae-4b9d-4db2-98f1-4e04b40778cf,2024-10-29 21:58:18 UTC,update +Item,93126aae-4b9d-4db2-98f1-4e04b40778cf,2024-10-29 21:58:18 UTC,update +Item,93126aae-4b9d-4db2-98f1-4e04b40778cf,2024-10-29 21:58:18 UTC,update +Thesis,a11adbec-a55c-44cb-8b31-6d8827c88034,2024-10-29 21:58:08 UTC,create +Thesis,a11adbec-a55c-44cb-8b31-6d8827c88034,2024-10-29 21:58:09 UTC,update +Thesis,a11adbec-a55c-44cb-8b31-6d8827c88034,2024-10-29 21:58:09 UTC,update +Thesis,a11adbec-a55c-44cb-8b31-6d8827c88034,2024-10-29 21:58:09 UTC,update +Thesis,a11adbec-a55c-44cb-8b31-6d8827c88034,2024-10-29 21:58:09 UTC,update +Thesis,a11adbec-a55c-44cb-8b31-6d8827c88034,2024-10-29 21:58:09 UTC,update +Item,5af5df57-e72a-4c45-abc6-027c72d56b57,2024-10-29 21:58:09 UTC,create +Thesis,5adb336d-0964-4385-88d9-9b16e0d1d453,2024-10-29 21:58:09 UTC,create +Item,a9abcdab-8f64-4549-ab28-1e9da8343468,2024-10-29 21:58:09 UTC,create +Item,93126aae-4b9d-4db2-98f1-4e04b40778cf,2024-10-29 21:58:18 UTC,update +Thesis,8e18f37c-dc60-41bb-9459-990586176730,2024-10-29 21:58:18 UTC,create +Thesis,8e18f37c-dc60-41bb-9459-990586176730,2024-10-29 21:58:18 UTC,update +Thesis,8e18f37c-dc60-41bb-9459-990586176730,2024-10-29 21:58:18 UTC,update +Thesis,8e18f37c-dc60-41bb-9459-990586176730,2024-10-29 21:58:18 UTC,update +Thesis,8e18f37c-dc60-41bb-9459-990586176730,2024-10-29 21:58:18 UTC,update +Thesis,8e18f37c-dc60-41bb-9459-990586176730,2024-10-29 21:58:18 UTC,update +Thesis,b3cc2224-9303-47be-8b54-e6556a486be8,2024-10-29 21:58:19 UTC,create +Thesis,02fc4784-b01e-480b-8fcc-1add87a57df7,2024-10-29 21:58:09 UTC,create +Item,e2508070-bb56-466b-8b88-158353c6a5f9,2024-10-29 21:58:09 UTC,create +Thesis,8f0af4e7-1c6f-473d-a8fa-ca5d10583de2,2024-10-29 21:58:09 UTC,create +Item,ca602c75-a477-405e-bc87-84ec04b7c480,2024-10-29 21:58:09 UTC,create +Thesis,672144e7-fd3d-429f-aafb-d0d5f2accc4d,2024-10-29 21:58:09 UTC,create +Thesis,b3cc2224-9303-47be-8b54-e6556a486be8,2024-10-29 21:58:19 UTC,update +Item,d7d9c781-e4d4-4037-bf58-716b61656813,2024-10-29 21:58:09 UTC,create +Thesis,ccaac249-5e8a-46d3-b97f-32bb98dea718,2024-10-29 21:58:09 UTC,create +Item,952db0b2-d21a-40d3-a180-164084c6b8b0,2024-10-29 21:58:09 UTC,create +Thesis,abefbfa6-5a10-4b66-97d9-a24ca0425700,2024-10-29 21:58:09 UTC,create +Thesis,ea355360-de51-4ab5-8a75-c04dc55a9730,2024-10-29 21:58:09 UTC,create +Thesis,b3cc2224-9303-47be-8b54-e6556a486be8,2024-10-29 21:58:19 UTC,update +Item,36d68cd7-e21c-42f9-866a-21731e353bb2,2024-10-29 21:58:09 UTC,create +Thesis,766a8918-6b4f-4c40-b458-355052a4c004,2024-10-29 21:58:09 UTC,create +Item,ec5939df-548c-4df6-b78f-d523b5afeb72,2024-10-29 21:58:09 UTC,create +Thesis,237e174e-55d9-4c75-acc6-28fd8fe5496a,2024-10-29 21:58:09 UTC,create +Item,b95a07f0-7c6e-4d55-8822-885ba89a234a,2024-10-29 21:58:09 UTC,create +Thesis,b3cc2224-9303-47be-8b54-e6556a486be8,2024-10-29 21:58:19 UTC,update +Thesis,b3cc2224-9303-47be-8b54-e6556a486be8,2024-10-29 21:58:19 UTC,update +Thesis,b3cc2224-9303-47be-8b54-e6556a486be8,2024-10-29 21:58:19 UTC,update +Thesis,9d7c12f0-b396-4511-ba0e-c012ec028e8a,2024-10-29 21:58:19 UTC,create +Thesis,9d7c12f0-b396-4511-ba0e-c012ec028e8a,2024-10-29 21:58:19 UTC,update +Thesis,9d7c12f0-b396-4511-ba0e-c012ec028e8a,2024-10-29 21:58:19 UTC,update +Thesis,9d7c12f0-b396-4511-ba0e-c012ec028e8a,2024-10-29 21:58:19 UTC,update +Thesis,9d7c12f0-b396-4511-ba0e-c012ec028e8a,2024-10-29 21:58:19 UTC,update +Thesis,9d7c12f0-b396-4511-ba0e-c012ec028e8a,2024-10-29 21:58:19 UTC,update +Item,5ccc2b56-d9b7-4aef-8509-cb8512a55b05,2024-10-29 21:58:09 UTC,create +Thesis,2e4fd284-1d12-4864-a793-a2ce7359e36d,2024-10-29 21:58:09 UTC,create +Item,87df4387-cc62-4eb2-84be-1c80d2147b84,2024-10-29 21:58:09 UTC,create +Thesis,fb9892f1-639e-4478-a610-d76271c4b63f,2024-10-29 21:58:09 UTC,create +Item,c6ec3f48-e371-457f-b74d-b6d5b3fe1bf1,2024-10-29 21:58:09 UTC,create +Item,6a4d86f5-85eb-4680-9dce-1de43df7fa9a,2024-10-29 21:58:09 UTC,create +Item,a1ed70bf-8830-40b2-823c-9fe9f80987f3,2024-10-29 21:58:09 UTC,create +Item,2dd35741-cd3e-47e9-b7a6-f466f02ad818,2024-10-29 21:58:09 UTC,create +Item,d87323dc-f997-4448-ba88-5f8504e9eeda,2024-10-29 21:58:09 UTC,create +Item,ab9779e9-0ddb-43a7-a109-858879fc928a,2024-10-29 21:58:09 UTC,create +Item,e71b0c02-8e39-4c3d-b744-21e7ee4b7a08,2024-10-29 21:58:09 UTC,create +Thesis,95976534-d76b-487a-9e02-8df50b074439,2024-10-29 21:58:10 UTC,create +Item,0c43d130-98b7-48b1-9845-28692654862b,2024-10-29 21:58:10 UTC,create +Thesis,93a5809f-0f96-462d-83c3-b210ee5e6d7e,2024-10-29 21:58:10 UTC,create +Item,35eae4c5-1e80-4872-a481-7ca2451b159b,2024-10-29 21:58:11 UTC,create +Item,9c09d691-165c-4194-badb-93e7d30129a7,2024-10-29 21:58:10 UTC,create +Thesis,c9ff7476-1263-4c58-8256-5335fad38bb1,2024-10-29 21:58:10 UTC,create +Item,91034ddf-def0-46cb-9cd6-e08e49566028,2024-10-29 21:58:10 UTC,create +Thesis,d3bced06-2fab-48a8-98e0-c6b5850a5c81,2024-10-29 21:58:10 UTC,create +Item,43a934e0-437e-4b20-b19d-e051a0687ff6,2024-10-29 21:58:10 UTC,create +Thesis,0730dc81-6083-472b-85d3-9caa041d98ac,2024-10-29 21:58:10 UTC,create +Item,520d67a4-d161-4340-9c5b-01db0ae6ee0f,2024-10-29 21:58:10 UTC,create +Thesis,8c6d855d-6e7d-4b93-b356-1a0a773c5f10,2024-10-29 21:58:10 UTC,create +Item,4920b897-c060-4d1a-87d7-c99f3e0c1824,2024-10-29 21:58:10 UTC,create +Thesis,bfab1f20-f4b2-453c-98ad-5e5d489225e2,2024-10-29 21:58:10 UTC,create +Item,3c3ec07f-5b6d-4379-b2dc-aab45638b164,2024-10-29 21:58:10 UTC,create +Item,9ec2b4c4-8874-4d1d-8491-bb25c4c80c31,2024-10-29 21:58:11 UTC,create +Thesis,69afa367-4eab-47dd-af93-5b00c75e2957,2024-10-29 21:58:10 UTC,create +Item,163231be-7e38-409c-b252-5f589dfdb4a6,2024-10-29 21:58:10 UTC,create +Item,163231be-7e38-409c-b252-5f589dfdb4a6,2024-10-29 21:58:10 UTC,update +Item,163231be-7e38-409c-b252-5f589dfdb4a6,2024-10-29 21:58:10 UTC,update +Item,163231be-7e38-409c-b252-5f589dfdb4a6,2024-10-29 21:58:10 UTC,update +Item,163231be-7e38-409c-b252-5f589dfdb4a6,2024-10-29 21:58:10 UTC,update +Thesis,2e8f17c4-0391-45fb-b5c6-719553697c24,2024-10-29 21:58:10 UTC,create +Thesis,2e8f17c4-0391-45fb-b5c6-719553697c24,2024-10-29 21:58:10 UTC,update +Thesis,2e8f17c4-0391-45fb-b5c6-719553697c24,2024-10-29 21:58:10 UTC,update +Thesis,2e8f17c4-0391-45fb-b5c6-719553697c24,2024-10-29 21:58:10 UTC,update +Thesis,2e8f17c4-0391-45fb-b5c6-719553697c24,2024-10-29 21:58:10 UTC,update +Thesis,2e8f17c4-0391-45fb-b5c6-719553697c24,2024-10-29 21:58:10 UTC,update +Item,4348903a-f060-431d-9cd3-c73cb002b1aa,2024-10-29 21:58:10 UTC,create +Thesis,8ca5f65d-96ef-47e2-a7d0-4c2903696b1d,2024-10-29 21:58:10 UTC,create +Item,0a18aedd-d356-4c57-bf90-e83b17552e13,2024-10-29 21:58:10 UTC,create +Thesis,0f57ecfd-10e7-4476-b990-076a363c905b,2024-10-29 21:58:10 UTC,create +Item,dfc086e5-9d48-4361-a3fc-8e5f05490095,2024-10-29 21:58:10 UTC,create +Thesis,11636a86-61dd-42a3-ad7a-ed2e147241f6,2024-10-29 21:58:10 UTC,create +Item,f2e20219-6823-43ae-8a3a-f42e07e36ed5,2024-10-29 21:58:10 UTC,create +Thesis,7c6dbdfa-d88a-43d0-8f94-c72a2f11cd52,2024-10-29 21:58:10 UTC,create +Item,a836aa22-ac4e-429d-a465-abfa6b414ff3,2024-10-29 21:58:10 UTC,create +Thesis,3688b49d-8cbc-4c24-9a30-7bf75beae983,2024-10-29 21:58:10 UTC,create +Item,6b59c6e8-6b58-4118-bcd3-0820fe55e630,2024-10-29 21:58:10 UTC,create +Thesis,6d07a117-4883-498b-8380-3a367e9226b8,2024-10-29 21:58:11 UTC,create +Item,48f9a5e2-645d-483c-a41f-67748ce018cb,2024-10-29 21:58:11 UTC,create +Thesis,b66ae53c-edb7-4d35-8648-ea044f73699c,2024-10-29 21:58:11 UTC,create +Item,949800e3-7ad9-4ef9-9750-ccd48d6c462d,2024-10-29 21:58:11 UTC,create +Thesis,b1d4705f-2b40-4eb2-95ce-f770031e5dd2,2024-10-29 21:58:11 UTC,create +Item,c4e1b007-ec4c-4d4b-8fda-df0662a487e3,2024-10-29 21:58:11 UTC,create +Item,5e0a83a0-4641-4aa1-a22b-d30d9bd403fe,2024-10-29 21:58:11 UTC,create +Thesis,7eadd0a3-ace5-4ef2-9407-e6691384cb89,2024-10-29 21:58:11 UTC,create +Item,3096fdf7-afa6-42a9-b67c-9af4883a5ca5,2024-10-29 21:58:11 UTC,create +Thesis,31e504eb-6712-4b13-aa44-1fe9745c2592,2024-10-29 21:58:11 UTC,create +Item,bd667ebe-543b-43de-9ea4-9b0df1eb7eac,2024-10-29 21:58:11 UTC,create +Thesis,67d79121-eca1-4078-8eba-e05b009f8057,2024-10-29 21:58:11 UTC,create +Item,ddd46b73-64f4-491d-a499-361e3a87fe0f,2024-10-29 21:58:11 UTC,create +Item,641a42b8-8692-4c29-8126-ab1005a70a71,2024-10-29 21:58:11 UTC,create +Item,c69fc53c-411c-46dd-afd1-50fc1589d7b7,2024-10-29 21:58:11 UTC,create +Item,c940941c-0fc8-45ca-b451-0683bb1e3df1,2024-10-29 21:58:11 UTC,create +Item,06d9ba29-e899-4d80-aa55-8f9dc1234322,2024-10-29 21:58:11 UTC,create +Thesis,79f93045-3c73-4efc-903b-79cd2fda1062,2024-10-29 21:58:11 UTC,create +Item,be92e680-b68a-433a-9a67-dfb9c83d1908,2024-10-29 21:58:11 UTC,create +Thesis,81dc0280-3901-45c8-8f2e-5ae4bed21706,2024-10-29 21:58:11 UTC,create +Item,1cf9c139-9ffe-4757-a725-f6ebbddea2a5,2024-10-29 21:58:11 UTC,create +Thesis,358ebbb9-1365-40b1-bccf-8091f3ea9f18,2024-10-29 21:58:11 UTC,create +Thesis,ada198b1-9ff0-4959-b2e5-8b1affcf04ac,2024-10-29 21:58:11 UTC,create +Item,197aaf49-b9ba-4d49-bd07-9bbd51bfcd3f,2024-10-29 21:58:11 UTC,create +Thesis,bd4dd259-1d1e-4431-af01-78686f5a27d5,2024-10-29 21:58:11 UTC,create +Item,cff5ac0a-c81b-4b52-9185-581da3ce86a9,2024-10-29 21:58:12 UTC,create +Thesis,fbcced87-aaa6-4d01-b3bd-e6aa6638c6d7,2024-10-29 21:58:12 UTC,create +Item,368a958d-d634-475b-8284-8d2f1f259d1e,2024-10-29 21:58:12 UTC,create +Thesis,554f4569-f9c0-40ad-912b-0e1191b704b4,2024-10-29 21:58:12 UTC,create +Item,25c10c8e-7da1-409a-9e95-ad3e743ae72a,2024-10-29 21:58:12 UTC,create +Thesis,c000d1d1-4427-422d-93a6-a0dfcdb8cc55,2024-10-29 21:58:12 UTC,create +Item,c19a4f1b-f8c7-471a-8047-52afa0a92fdb,2024-10-29 21:58:12 UTC,create +Item,c19a4f1b-f8c7-471a-8047-52afa0a92fdb,2024-10-29 21:58:12 UTC,update +Item,c19a4f1b-f8c7-471a-8047-52afa0a92fdb,2024-10-29 21:58:12 UTC,update +Item,c19a4f1b-f8c7-471a-8047-52afa0a92fdb,2024-10-29 21:58:12 UTC,update +Item,c19a4f1b-f8c7-471a-8047-52afa0a92fdb,2024-10-29 21:58:12 UTC,update +Thesis,796b14ba-5b52-4e13-9248-9f32cb26900d,2024-10-29 21:58:12 UTC,create +Thesis,796b14ba-5b52-4e13-9248-9f32cb26900d,2024-10-29 21:58:12 UTC,update +Thesis,796b14ba-5b52-4e13-9248-9f32cb26900d,2024-10-29 21:58:12 UTC,update +Thesis,796b14ba-5b52-4e13-9248-9f32cb26900d,2024-10-29 21:58:12 UTC,update +Thesis,796b14ba-5b52-4e13-9248-9f32cb26900d,2024-10-29 21:58:12 UTC,update +Thesis,796b14ba-5b52-4e13-9248-9f32cb26900d,2024-10-29 21:58:12 UTC,update +Item,c778f6cc-a50a-4873-a951-d446ed64b517,2024-10-29 21:58:12 UTC,create +Thesis,f0befceb-fafc-4439-8b35-a1a6c69b9025,2024-10-29 21:58:12 UTC,create +Item,0b6f4afb-a8f3-45d9-9c09-6116ed925f55,2024-10-29 21:58:12 UTC,create +Thesis,c93bbadf-fe73-4610-ae1b-8d2f7338eadc,2024-10-29 21:58:12 UTC,create +Item,c576a70b-97a5-4c2d-a57f-7d7c5cacf15e,2024-10-29 21:58:12 UTC,create +Thesis,bd2ed5cf-3638-400f-bd2d-a165f836698b,2024-10-29 21:58:12 UTC,create +Item,7e9e1a74-a145-468a-a7c5-770a859fe054,2024-10-29 21:58:12 UTC,create +Thesis,b255ccb2-dbe2-4c7c-94ba-17f7f91e258a,2024-10-29 21:58:12 UTC,create +Item,c501be12-268d-4b38-ae5f-851ab1bb48e7,2024-10-29 21:58:12 UTC,create +Thesis,fd8040bc-99af-4213-8c08-f5c2f1b69216,2024-10-29 21:58:12 UTC,create +Item,bbc450e8-69db-4dd0-ad8c-999f5f40d4e2,2024-10-29 21:58:12 UTC,create +Thesis,65f7f58f-a9c1-4a2c-aed5-5621cc75377b,2024-10-29 21:58:12 UTC,create +Thesis,9abb16ab-e550-4f42-b4fc-b85dd18eb136,2024-10-29 21:58:13 UTC,create +Item,62101eee-ac5a-41ec-baf6-bebfc0c2030c,2024-10-29 21:58:12 UTC,create +Thesis,6b532c22-467d-4b23-86d8-37139de2e1fc,2024-10-29 21:58:12 UTC,create +Item,5c66c6ee-a8fd-4cf0-b839-01126149166b,2024-10-29 21:58:12 UTC,create +Thesis,e680580b-f16d-4d07-b800-9733bdc90b90,2024-10-29 21:58:13 UTC,create +Item,514afa0f-ebb4-4ad8-9b75-978b9e335517,2024-10-29 21:58:13 UTC,create +Item,5a4ba685-201c-44ef-bc43-8e8c3e0c3d9f,2024-10-29 21:58:13 UTC,create +Thesis,472f72cc-018b-4b2a-9667-764bb69665f1,2024-10-29 21:58:13 UTC,create +Item,4ce5755a-f0bd-4502-9d23-f02ed7baa4e5,2024-10-29 21:58:13 UTC,create +Thesis,3f6a333c-980c-4ecf-9447-1ef7a3d2fe84,2024-10-29 21:58:13 UTC,create +Item,75930492-9cac-48fe-b28b-ba3019731b19,2024-10-29 21:58:13 UTC,create +Item,042be92a-5eed-47bd-a1fe-506a9017cefd,2024-10-29 21:58:13 UTC,create +Item,ffe6d450-2ab2-4b7f-b96a-0f77fe226d54,2024-10-29 21:58:13 UTC,create +Item,9f9b28ad-b509-4656-814a-ae357f2f5f6d,2024-10-29 21:58:13 UTC,create +Item,06bbc7c4-fa25-4a91-a13e-3b2844d2ffee,2024-10-29 21:58:13 UTC,create +Item,293b7d32-ce41-4fd8-804d-271851758688,2024-10-29 21:58:13 UTC,create +Item,55dd9a67-d6e2-4a41-8e62-f7d00cfdc276,2024-10-29 21:58:13 UTC,create +Thesis,35833347-bb92-4953-addb-c74734f82fe8,2024-10-29 21:58:13 UTC,create +Item,f18631d9-f683-45ef-a178-d1f4a5965ed6,2024-10-29 21:58:13 UTC,create +Thesis,8807767e-7264-483a-bab6-8ab68cd2d323,2024-10-29 21:58:13 UTC,create +Item,a47ed6ee-e8ba-49ba-a6f5-af8cf57f67f6,2024-10-29 21:58:13 UTC,create +Thesis,ce4c3e2b-c64e-472e-8c5c-4ff0ab0be022,2024-10-29 21:58:13 UTC,create +Item,70ee107b-df51-47d9-a671-cf20829fc6b0,2024-10-29 21:58:13 UTC,create +Thesis,71c5aee0-8fcd-4f42-985e-880e6072db9c,2024-10-29 21:58:13 UTC,create +Item,522ec4a9-4aa5-4f44-91be-fb95247b962d,2024-10-29 21:58:13 UTC,create +Thesis,999ad6c8-f5e3-46bc-a219-3bb23b8eba53,2024-10-29 21:58:13 UTC,create +Thesis,3d9f222c-ca11-4cd1-83a7-c9ef8473da40,2024-10-29 21:58:13 UTC,create +Item,61cac4c0-103b-4f29-98f8-e9ed8196cd31,2024-10-29 21:58:13 UTC,create +Thesis,b468db08-797b-4f9e-912d-fa484d9fb6d1,2024-10-29 21:58:13 UTC,create +Item,1b0258c2-e9ff-4eb9-8d46-34e86b9327be,2024-10-29 21:58:13 UTC,create +Thesis,f9d2fb85-2877-48f0-a800-c7be8dfb2e52,2024-10-29 21:58:13 UTC,create +Item,3549f0db-f2e5-4e7e-a082-e766da38140f,2024-10-29 21:58:13 UTC,create +Item,44d9249a-e0d3-4f7b-b412-1d9742f3f092,2024-10-29 21:58:14 UTC,create +Item,44d9249a-e0d3-4f7b-b412-1d9742f3f092,2024-10-29 21:58:14 UTC,update +Item,44d9249a-e0d3-4f7b-b412-1d9742f3f092,2024-10-29 21:58:14 UTC,update +Item,44d9249a-e0d3-4f7b-b412-1d9742f3f092,2024-10-29 21:58:14 UTC,update +Item,44d9249a-e0d3-4f7b-b412-1d9742f3f092,2024-10-29 21:58:14 UTC,update +Thesis,68120925-88e2-41cc-9d30-9e6d4d7ff40e,2024-10-29 21:58:14 UTC,create +Thesis,68120925-88e2-41cc-9d30-9e6d4d7ff40e,2024-10-29 21:58:14 UTC,update +Thesis,68120925-88e2-41cc-9d30-9e6d4d7ff40e,2024-10-29 21:58:14 UTC,update +Thesis,68120925-88e2-41cc-9d30-9e6d4d7ff40e,2024-10-29 21:58:14 UTC,update +Thesis,68120925-88e2-41cc-9d30-9e6d4d7ff40e,2024-10-29 21:58:14 UTC,update +Thesis,68120925-88e2-41cc-9d30-9e6d4d7ff40e,2024-10-29 21:58:14 UTC,update +Item,7e5ab322-26ac-4e46-905a-edc87c74bad6,2024-10-29 21:58:14 UTC,create +Thesis,e11d0a6a-7ce2-4bbf-9cdb-f5d431a75913,2024-10-29 21:58:14 UTC,create +Item,bfa6e977-d2fb-4bc7-b03e-ebb63ef6b684,2024-10-29 21:58:14 UTC,create +Thesis,503cca29-8d80-473b-9156-c5125f0bf47b,2024-10-29 21:58:14 UTC,create +Item,8d69aa82-bafa-429b-a5ca-1f14784b67a3,2024-10-29 21:58:14 UTC,create +Thesis,8718f3f6-ce75-4e33-a5c6-2eea712fe61c,2024-10-29 21:58:14 UTC,create +Item,1058b558-c292-44d8-9a42-edd8783c748a,2024-10-29 21:58:14 UTC,create +Thesis,163af154-39c9-45ec-827b-0f58872582ea,2024-10-29 21:58:14 UTC,create +Item,2b23f936-95df-45ed-af6b-1262763db434,2024-10-29 21:58:14 UTC,create +Thesis,36acd110-d111-449f-8e58-bbc29cbe33a9,2024-10-29 21:58:14 UTC,create +Item,e06bc3d3-3d04-46ec-8842-cf2d7aa72ea9,2024-10-29 21:58:14 UTC,create +Item,ad739e45-d945-4b5c-8028-9ea2c4c07a50,2024-10-29 21:58:14 UTC,create +Thesis,4a541c26-6048-4a99-9697-0898fc028694,2024-10-29 21:58:14 UTC,create +Item,0365d5e5-0d55-46a3-8660-33cd1d0722d4,2024-10-29 21:58:14 UTC,create +Thesis,159e8a48-0d9a-4084-84ed-a2a93381f578,2024-10-29 21:58:14 UTC,create +Item,c289d6c4-f421-4c51-9d0b-b4ac7709469f,2024-10-29 21:58:14 UTC,create +Thesis,0bddabc1-e437-4893-8400-79c2e0a837aa,2024-10-29 21:58:14 UTC,create +Thesis,abd52587-345e-4abf-ab68-81f950653c8e,2024-10-29 21:58:14 UTC,create +Item,fca92181-94ae-4f32-8350-6d9288683334,2024-10-29 21:58:14 UTC,create +Thesis,b2236462-41ef-4d04-b6ab-fa5978ca52f6,2024-10-29 21:58:14 UTC,create +Item,446f3f0f-2165-4dea-8735-b954e1898e9d,2024-10-29 21:58:14 UTC,create +Thesis,e4042aff-1af1-4257-88fd-0272c3767887,2024-10-29 21:58:14 UTC,create +Item,16195bec-5e5c-40a7-a79e-551a928c409f,2024-10-29 21:58:14 UTC,create +Item,c84acf45-49a8-4521-bacd-90e8cc4a8c26,2024-10-29 21:58:15 UTC,create +Item,2d5d5226-ca72-4e17-84de-64267c72dc3b,2024-10-29 21:58:15 UTC,create +Item,dc4e60a5-4ee1-420f-abe7-43313cd832be,2024-10-29 21:58:15 UTC,create +Item,ac86f5e9-3ea6-40ce-b798-198efd4aa595,2024-10-29 21:58:15 UTC,create +Item,849ae409-a0b6-4948-ab4c-5074c378cc99,2024-10-29 21:58:15 UTC,create +Item,7fae9806-99a4-49e1-9215-572d8aa65ce1,2024-10-29 21:58:15 UTC,create +Thesis,69026263-7ae9-481f-b258-511a49fb6c91,2024-10-29 21:58:15 UTC,create +Item,dd82cbd8-ad98-4c6e-9cfa-defbf19c75e3,2024-10-29 21:58:15 UTC,create +Thesis,9da4bfd7-a5fe-468a-b8c2-3898fe9a931e,2024-10-29 21:58:15 UTC,create +Item,1e2bee3b-747b-4855-a8f2-2a99372a9a8e,2024-10-29 21:58:15 UTC,create +Thesis,5dcda568-6bfb-401f-a16f-a7af3e03304a,2024-10-29 21:58:15 UTC,create +Item,bf75c2b2-b492-4426-afe6-31b21bae8fc2,2024-10-29 21:58:15 UTC,create +Thesis,40d306d3-d4eb-4df0-bf7d-5b36cf8d6b3d,2024-10-29 21:58:15 UTC,create +Item,d1eaf8a7-94f9-48c8-95d5-cada704b04a4,2024-10-29 21:58:15 UTC,create +Thesis,4e67e813-eeb6-4dd5-a864-a9e62269e6e0,2024-10-29 21:58:15 UTC,create +Item,e13bcedc-1a2e-420e-9808-f7552b2c8b02,2024-10-29 21:58:15 UTC,create +Thesis,51fd38eb-1961-41bc-abec-315c6538252a,2024-10-29 21:58:15 UTC,create +Item,58a1c91e-847e-4edd-980c-b79edd3ea07c,2024-10-29 21:58:15 UTC,create +Thesis,953da373-a8b0-4722-b661-6c02c648f2f8,2024-10-29 21:58:15 UTC,create +Item,55330b21-b2fb-460d-b74e-9cd0f45fcbe7,2024-10-29 21:58:15 UTC,create +Item,36960fa8-85ac-4baa-8690-b6a4c3411f5f,2024-10-29 21:58:16 UTC,create +Thesis,29a2c099-78d0-4d91-aa06-93975f8ae3d1,2024-10-29 21:58:15 UTC,create +Item,15f811c5-7a80-45d9-a195-eb784e80b476,2024-10-29 21:58:15 UTC,create +Item,15f811c5-7a80-45d9-a195-eb784e80b476,2024-10-29 21:58:15 UTC,update +Item,15f811c5-7a80-45d9-a195-eb784e80b476,2024-10-29 21:58:15 UTC,update +Item,15f811c5-7a80-45d9-a195-eb784e80b476,2024-10-29 21:58:15 UTC,update +Item,15f811c5-7a80-45d9-a195-eb784e80b476,2024-10-29 21:58:15 UTC,update +Thesis,3f2efaae-b5d1-40f8-aca5-b5a64bccb0f6,2024-10-29 21:58:15 UTC,create +Thesis,3f2efaae-b5d1-40f8-aca5-b5a64bccb0f6,2024-10-29 21:58:16 UTC,update +Thesis,3f2efaae-b5d1-40f8-aca5-b5a64bccb0f6,2024-10-29 21:58:16 UTC,update +Thesis,3f2efaae-b5d1-40f8-aca5-b5a64bccb0f6,2024-10-29 21:58:16 UTC,update +Thesis,3f2efaae-b5d1-40f8-aca5-b5a64bccb0f6,2024-10-29 21:58:16 UTC,update +Thesis,3f2efaae-b5d1-40f8-aca5-b5a64bccb0f6,2024-10-29 21:58:16 UTC,update +Item,ae3349d7-4835-4ad6-95f8-5765d7f92c10,2024-10-29 21:58:16 UTC,create +Item,e2ec88e3-3266-4e95-8575-8b04fac2a679,2024-10-29 21:58:18 UTC,update +Item,c795337f-075f-429a-bb18-16b56d9b750f,2024-10-29 21:58:18 UTC,create +Thesis,26c990d2-aba8-472e-ad88-d32737e477fc,2024-10-29 21:58:16 UTC,create +Item,bb09bee3-f685-4b47-9558-909f0e46c4bc,2024-10-29 21:58:16 UTC,create +Thesis,d4191839-c8b8-4e1b-8a1a-40c34319e134,2024-10-29 21:58:16 UTC,create +Item,7f028144-9ff5-4cfb-ad54-f723acfb7b0a,2024-10-29 21:58:16 UTC,create +Thesis,16210e4a-a835-4177-8265-ca14782e83e2,2024-10-29 21:58:16 UTC,create +Item,ac7d9fe1-1e15-403d-8c53-b3d8036be33b,2024-10-29 21:58:16 UTC,create +Thesis,d7fba0bb-7ab3-412c-9ae2-62b777a664e8,2024-10-29 21:58:16 UTC,create +Item,bd24eee9-7103-40a8-9486-f90cd31d5fc6,2024-10-29 21:58:16 UTC,create +Thesis,a2ef38a4-3b41-4954-bd81-2fbfa5b77d9d,2024-10-29 21:58:16 UTC,create +Item,fb103ce1-37f5-47de-919a-9f7e157cfb2e,2024-10-29 21:58:16 UTC,create +Item,c795337f-075f-429a-bb18-16b56d9b750f,2024-10-29 21:58:18 UTC,update +Thesis,d5866b55-b184-444b-a9ce-e337a91e9b7c,2024-10-29 21:58:16 UTC,create +Item,96fee409-c47f-4110-9c0e-590dfe1ce190,2024-10-29 21:58:16 UTC,create +Thesis,4400b0d9-09ad-44b7-8c0c-697ffa1db31a,2024-10-29 21:58:16 UTC,create +Item,880edd3b-dadb-4ed0-a214-6720e7178229,2024-10-29 21:58:16 UTC,create +Thesis,8365a097-f23f-42d6-95db-6090b47d5693,2024-10-29 21:58:16 UTC,create +Item,b7bdc686-1094-4847-9dc5-550ef80d0d9d,2024-10-29 21:58:16 UTC,create +Item,c795337f-075f-429a-bb18-16b56d9b750f,2024-10-29 21:58:18 UTC,update +Item,c795337f-075f-429a-bb18-16b56d9b750f,2024-10-29 21:58:18 UTC,update +Item,c795337f-075f-429a-bb18-16b56d9b750f,2024-10-29 21:58:18 UTC,update +Item,c795337f-075f-429a-bb18-16b56d9b750f,2024-10-29 21:58:18 UTC,update +Item,3bb26070-0d25-4f0e-b44f-e9879da333ec,2024-10-29 21:58:18 UTC,create +Item,3bb26070-0d25-4f0e-b44f-e9879da333ec,2024-10-29 21:58:18 UTC,update +Item,3bb26070-0d25-4f0e-b44f-e9879da333ec,2024-10-29 21:58:18 UTC,update +Item,3bb26070-0d25-4f0e-b44f-e9879da333ec,2024-10-29 21:58:18 UTC,update +Item,3bb26070-0d25-4f0e-b44f-e9879da333ec,2024-10-29 21:58:18 UTC,update +Item,3bb26070-0d25-4f0e-b44f-e9879da333ec,2024-10-29 21:58:18 UTC,update +Thesis,e35f8934-11e4-44db-ab07-b1284c8ccfd5,2024-10-29 21:58:16 UTC,create +Item,cc659f1e-3f5c-4e51-95a0-af139b2dd429,2024-10-29 21:58:16 UTC,create +Thesis,89f737c2-0db7-4e57-93de-266e5ec6471c,2024-10-29 21:58:16 UTC,create +Item,204e9335-2423-4d1e-8443-723d05655c55,2024-10-29 21:58:16 UTC,create +Thesis,49345c17-d3e3-4107-b5d8-35d40063bf8b,2024-10-29 21:58:16 UTC,create +Item,a042cc7c-5a60-41d4-be7b-8cc282e867c3,2024-10-29 21:58:16 UTC,create +Item,235115d4-050f-4d39-b3a7-b4eef3ac1568,2024-10-29 21:58:16 UTC,create +Item,300b4511-3604-4ffc-8f28-594c1de54b0e,2024-10-29 21:58:16 UTC,create +Item,fbbfdfb0-59a0-4645-bacf-5c7dbef3259e,2024-10-29 21:58:17 UTC,create +Item,9d0e7175-1d98-45bd-9d51-a5545a2e3a4d,2024-10-29 21:58:17 UTC,create +Item,e2ec88e3-3266-4e95-8575-8b04fac2a679,2024-10-29 21:58:17 UTC,create +Item,e2ec88e3-3266-4e95-8575-8b04fac2a679,2024-10-29 21:58:18 UTC,update +Item,e2ec88e3-3266-4e95-8575-8b04fac2a679,2024-10-29 21:58:18 UTC,update +Item,e2ec88e3-3266-4e95-8575-8b04fac2a679,2024-10-29 21:58:18 UTC,update +Item,e2ec88e3-3266-4e95-8575-8b04fac2a679,2024-10-29 21:58:18 UTC,update +Item,2107bfb6-2670-4ffc-94a1-aeb4f8c1fd81,2024-10-29 21:58:18 UTC,create +Digitization::Book,22ba9f5a-3ebf-4468-a838-2f0597446626,2024-10-29 21:58:19 UTC,create +Digitization::Book,92b94029-152c-406d-b681-1360c585a0c7,2024-10-29 21:58:19 UTC,create +Digitization::Book,0d8980fe-ca6a-45d7-9cf6-9200dce64596,2024-10-29 21:58:19 UTC,create +Digitization::Book,f81b0093-5ab9-4151-b984-20a50b317d7a,2024-10-29 21:58:19 UTC,create +Digitization::Book,d6d696cc-d215-466c-9a71-a64d229cd28f,2024-10-29 21:58:19 UTC,create +Digitization::Book,822681c0-b970-4de9-89bc-0c3757c51bc0,2024-10-29 21:58:19 UTC,create +Digitization::Book,0fa9bd6b-bb71-4d30-80a7-4acbf5800a31,2024-10-29 21:58:19 UTC,create +Digitization::Book,5453a1f3-2182-4a6c-8055-f3205cac8f8e,2024-10-29 21:58:19 UTC,create +Digitization::Book,dfbb0e48-d309-4dee-96b8-e949bafe8ae6,2024-10-29 21:58:19 UTC,create +Digitization::Book,48aebaff-92d0-4801-a161-e7927b2213a3,2024-10-29 21:58:19 UTC,create +Digitization::Book,db21a78a-9f47-4574-a909-212149c6215b,2024-10-29 21:58:19 UTC,create +Item,01523cdc-3d30-4830-8a30-0acdb3bd0396,2024-11-04 22:05:55 UTC,update +Item,01523cdc-3d30-4830-8a30-0acdb3bd0396,2024-11-04 22:05:55 UTC,destroy diff --git a/test/jobs/monthly_changes_report_job_test.rb b/test/jobs/monthly_changes_report_job_test.rb new file mode 100644 index 000000000..2943b8ec0 --- /dev/null +++ b/test/jobs/monthly_changes_report_job_test.rb @@ -0,0 +1,19 @@ +require 'test_helper' + +class MonthlyChangesReportJobTest < ActiveSupport::TestCase + + test 'should produce a report of changes in the last month' do + refute_path_exists('2024_11_changes.csv') + + MonthlyChangesReportJob.perform_now + + assert_path_exists('2024_11_changes.csv') + + assert FileUtils.compare_file(file_fixture('2024_11_changes.csv'), '2024_11_changes.csv') + end + + def teardown + # File.delete('2024_11_changes.csv') + end + +end