Skip to content

Commit

Permalink
Changes necessary to get simple CSV import to run
Browse files Browse the repository at this point in the history
Refs #1164
  • Loading branch information
mjgiarlo committed Aug 8, 2017
1 parent 24bbbd2 commit 6e4ccf3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions bin/import_from_csv
Expand Up @@ -38,6 +38,10 @@ def main(hostname, csv_file, files_directory)
puts "Imported #{size} records."
end

def logger
Rails.logger
end

def usage
$stderr.puts "Usage: #{$PROGRAM_NAME} <hostname> <csv file> <files directory>"
end
Expand Down
1 change: 1 addition & 0 deletions lib/importer/factory/with_associated_collection.rb
Expand Up @@ -6,6 +6,7 @@ module WithAssociatedCollection
# Strip out the :collection key, and add the member_of_collection_ids,
# which is used by Hyrax::Actors::AddAsMemberOfCollectionsActor
def create_attributes
return super if attributes[:collection].nil?
super.except(:collection).merge(member_of_collection_ids: [collection.id])
end

Expand Down
2 changes: 2 additions & 0 deletions spec/fixtures/csv/simple.csv
@@ -0,0 +1,2 @@
id,type,title,description,subject,subject,subject,subject,subject,subject,resource_type,contributor,contributor,contributor,contributor,contributor,contributor,contributor,contributor,contributor,contributor,contributor,date_created,file
wg827ks1643,Image,Work in Progress - A Framework for Building Interactive Learning Modules,"The development of good quality educational software is expensive, time-consuming and faces some underlying issues. In order to deal with such issues, many attempts were made, mainly on code reuse. Following a similar approach, the development of an application framework for implementing a family of interactivity-intense educational software called Interactive Learning Modules – iLM is presented. The framework main goal is to reduce development efforts while being part of a Software Product Line – SPL, an innovative technique regarding interactivity-intense educational software. The framework specification is presented by analyzing the common features of existing iLM. Therefore, the resulting component architecture is outlined. Currently, the design phase is finished and the implementation ongoing. Also, its instantiation is planned for an existing iLM, as a proof of concept.", -- educational software, -- software product line, -- application framework,,,,text,"Dalmon, Danilo","Brandao, Leonidas","Brandao, Anarosa","Isotani, Seiji",,,,,,,,2011,4-20.png

0 comments on commit 6e4ccf3

Please sign in to comment.