From 70cdaa2e508b8bf38a60a6462d340a2b68532bad Mon Sep 17 00:00:00 2001 From: John Coote Date: Thu, 8 Aug 2024 15:32:24 +1000 Subject: [PATCH] moved css file to vendor folder --- app/services/file_ingestor.rb | 2 -- lib/tasks/add_records.rake | 23 ++++++++++++------- .../stylesheets/active_admin.scss | 0 3 files changed, 15 insertions(+), 10 deletions(-) rename {app/assets => vendor}/stylesheets/active_admin.scss (100%) diff --git a/app/services/file_ingestor.rb b/app/services/file_ingestor.rb index 11687a2..18b5510 100644 --- a/app/services/file_ingestor.rb +++ b/app/services/file_ingestor.rb @@ -9,7 +9,6 @@ def annual_donor_ingest(file) giver = RecordPersonOrGroup.call(row["Donor Name"]) taker = RecordPersonOrGroup.call(row["Donation Made To"]) - # TODO: Transfer.taker can be a group or a person. Use RecordGroup.call transfer = Transfer.find_or_create_by( giver_id: giver.id, giver_type: giver.class.name, @@ -23,7 +22,6 @@ def annual_donor_ingest(file) transfer.data ||= {} transfer.donations ||= [] - # TODO: Transfer.taker can be a group or a person. Use RecordGroup.call # this is for the JSON data field, recording each individual donation transfer.donations << { giver: giver.name, diff --git a/lib/tasks/add_records.rake b/lib/tasks/add_records.rake index 3ad1a00..94f71c5 100644 --- a/lib/tasks/add_records.rake +++ b/lib/tasks/add_records.rake @@ -36,10 +36,6 @@ namespace :lester do 'csv_data/Annual_Donations_Made_2023.csv', ] - donation_files.each do |file| - FileIngestor.annual_donor_ingest(file) - end - federal_parliamentarians = [ 'csv_data/wiki_feds_current_mps_cleaned.csv', 'csv_data/wiki_feds_current_senators_cleaned.csv', @@ -49,22 +45,33 @@ namespace :lester do 'csv_data/wiki_feds_senators_ending_2022_cleaned.csv' ] - federal_parliamentarians.each do |file| - FileIngestor.federal_parliamentarians_upload(file) - end - federal_ministries = [ 'csv_data/ministries_morrison.csv', 'csv_data/ministries_turnbull.csv', ] + # using data sourced from the AEC + donation_files.each do |file| + FileIngestor.annual_donor_ingest(file) + end + + # using data sourced from wikipedia + federal_parliamentarians.each do |file| + FileIngestor.federal_parliamentarians_upload(file) + end + + # using data sourced from wikipedia federal_ministries.each do |file| FileIngestor.ministries_upload(file) end + # From a file created and maintained by me, whenever noteworthy people or groups appear in the news FileIngestor.general_upload('csv_data/other_people_groups_positions.csv') + # From a file created and maintained by me, linking groups to groups, whenever information comes to light FileIngestor.affiliations_upload('csv_data/affiliations.csv') + + # From a file created and maintained by me, whenever noteworthy money transfers appear in the news FileIngestor.transfers_upload('csv_data/other_transfers.csv') diff --git a/app/assets/stylesheets/active_admin.scss b/vendor/stylesheets/active_admin.scss similarity index 100% rename from app/assets/stylesheets/active_admin.scss rename to vendor/stylesheets/active_admin.scss