job-iteration 1.1.1 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f7cb48c63a89e5d3b28eb4159e872cae228fe78ff39904724fb1800c00640a5d
4
- data.tar.gz: cd9f59d4aa4a7cecb2c8c02ff40364c9f4ec13c07462bf5be3a86f0e1ef9d785
3
+ metadata.gz: ed3c36b4baee211958c860af1d81af1868c66a3b8b012854c50ff3cb6b5b812d
4
+ data.tar.gz: 05ae48eecde73a903af39391f9ae93398827d5d3f15df67f839994b7ec0ff5a4
5
5
  SHA512:
6
- metadata.gz: 360a81bee9d410c0e3e2330b5888288595c8dd08fefa2d3a936592e97f38ed263c896ce5fea57ae2fa3614795b00ceb6aa5cd3bf3c7cc95a1cf73abba0c1d342
7
- data.tar.gz: 88e757b2decc24f7b6682599fdc8e542eb3bb54ad4544e3942798198418103792292c55b0c7cd6163a894ebfe37c64b08a770360a4481c9f5af5c12a0f6a6d52
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module JobIteration
4
- VERSION = "1.1.1"
4
+ VERSION = "1.1.2"
5
5
  end
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.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-22 00:00:00.000000000 Z
11
+ date: 2019-07-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord