job-iteration 1.1.1 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/job-iteration/csv_enumerator.rb +4 -0
- data/lib/job-iteration/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ed3c36b4baee211958c860af1d81af1868c66a3b8b012854c50ff3cb6b5b812d
|
4
|
+
data.tar.gz: 05ae48eecde73a903af39391f9ae93398827d5d3f15df67f839994b7ec0ff5a4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 68af8108e06f96cf7a0c42fbbfbae0b9126315fe952745e153aab2d9bf8b41ece207306e112f9477ca4a9b99be6592846bc0594025dc5eec4e774a914a6ed25a
|
7
|
+
data.tar.gz: 85933112beafa4451ac0b93dcce3d033043a3bd3a173e4ac0ddb768f656670a867f7d517e83ff715e1720cce8d4cf706e342f32b11794614032f7402325d9d00
|
@@ -49,12 +49,16 @@ module JobIteration
|
|
49
49
|
private
|
50
50
|
|
51
51
|
def count_rows_in_file
|
52
|
+
# TODO: Remove rescue for NoMethodError when Ruby 2.6 is no longer supported.
|
52
53
|
begin
|
53
54
|
filepath = @csv.path
|
54
55
|
rescue NoMethodError
|
55
56
|
return
|
56
57
|
end
|
57
58
|
|
59
|
+
# Behaviour of CSV#path changed in Ruby 2.6.3 (returns nil instead of raising NoMethodError)
|
60
|
+
return unless filepath
|
61
|
+
|
58
62
|
count = %x(wc -l < #{filepath}).strip.to_i
|
59
63
|
count -= 1 if @csv.headers
|
60
64
|
count
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: job-iteration
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shopify
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-07-
|
11
|
+
date: 2019-07-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|