Skip to content

Commit

Permalink
moved dummy record file and updated file path
Browse files Browse the repository at this point in the history
  • Loading branch information
DevAdm committed Jul 9, 2024
1 parent fd55ddb commit 9c501ab
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 4 deletions.
File renamed without changes.
2 changes: 1 addition & 1 deletion lib/tasks/gem_records_csv.rake
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ namespace :gem_records_csv do
task load: :environment do
GemRecord.delete_all
gem_load = LoadGemRecordsCSV.new
gem_load.load_csv('dummy_gem_records.csv')
gem_load.load_csv('lib/dummy_gem_records.csv')
end
end
2 changes: 0 additions & 2 deletions lib/tasks/load_gem_records_csv.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ class LoadGemRecordsCSV
def load_csv(filename)
count = 0

filename = File.join(File.dirname(__FILE__), filename)

CSV.foreach(filename, headers: true) do |row|
seqgradevent = row['seqgradevent'].strip
unless GemRecord.find_by_seqgradevent(seqgradevent)
Expand Down
2 changes: 1 addition & 1 deletion test/helpers/load_gem_records_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
class LoadGemRecordsTest < ActiveSupport::TestCase
setup do
gem_load = LoadGemRecordsCSV.new
gem_load.load_csv('dummy_gem_records.csv')
gem_load.load_csv('lib/dummy_gem_records.csv')
end

should "parse csv" do
Expand Down

0 comments on commit 9c501ab

Please sign in to comment.