Skip to content

Commit

Permalink
Merge pull request #454 from Shopify/mangara-csv-gemfile
Browse files Browse the repository at this point in the history
Explicitly require csv for for Ruby head
  • Loading branch information
Mangara authored Jan 26, 2024
2 parents cd18c89 + d561d7e commit 922ee56
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ gem "mocha"
gem "rubocop-shopify", require: false
gem "yard"
gem "rake"
gem "csv" # required for Ruby 3.4+

# for unit testing optional sorbet support
gem "sorbet-runtime"
2 changes: 2 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ GEM
coderay (1.1.3)
concurrent-ruby (1.2.2)
connection_pool (2.4.1)
csv (3.2.8)
globalid (1.1.0)
activesupport (>= 5.0)
i18n (1.14.1)
Expand Down Expand Up @@ -109,6 +110,7 @@ PLATFORMS

DEPENDENCIES
activerecord
csv
globalid
i18n
job-iteration!
Expand Down
2 changes: 1 addition & 1 deletion lib/job-iteration/csv_enumerator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class CsvEnumerator
# csv = CSV.open('tmp/files', { converters: :integer, headers: true })
# JobIteration::CsvEnumerator.new(csv).rows(cursor: cursor)
def initialize(csv)
unless csv.instance_of?(CSV)
unless defined?(CSV) && csv.instance_of?(CSV)
raise ArgumentError, "CsvEnumerator.new takes CSV object"
end

Expand Down

0 comments on commit 922ee56

Please sign in to comment.