Skip to content

Commit 922ee56

Browse files
authored
Merge pull request #454 from Shopify/mangara-csv-gemfile
Explicitly require csv for for Ruby head
2 parents cd18c89 + d561d7e commit 922ee56

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

Gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ gem "mocha"
3333
gem "rubocop-shopify", require: false
3434
gem "yard"
3535
gem "rake"
36+
gem "csv" # required for Ruby 3.4+
3637

3738
# for unit testing optional sorbet support
3839
gem "sorbet-runtime"

Gemfile.lock

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ GEM
3030
coderay (1.1.3)
3131
concurrent-ruby (1.2.2)
3232
connection_pool (2.4.1)
33+
csv (3.2.8)
3334
globalid (1.1.0)
3435
activesupport (>= 5.0)
3536
i18n (1.14.1)
@@ -109,6 +110,7 @@ PLATFORMS
109110

110111
DEPENDENCIES
111112
activerecord
113+
csv
112114
globalid
113115
i18n
114116
job-iteration!

lib/job-iteration/csv_enumerator.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class CsvEnumerator
2020
# csv = CSV.open('tmp/files', { converters: :integer, headers: true })
2121
# JobIteration::CsvEnumerator.new(csv).rows(cursor: cursor)
2222
def initialize(csv)
23-
unless csv.instance_of?(CSV)
23+
unless defined?(CSV) && csv.instance_of?(CSV)
2424
raise ArgumentError, "CsvEnumerator.new takes CSV object"
2525
end
2626

0 commit comments

Comments
 (0)