job-iteration 1.3.4 → 1.3.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +6 -6
- data/README.md +1 -1
- data/lib/job-iteration/enumerator_builder.rb +5 -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: 2d6eb941d1755c4ddb2e249e5aa50fdef6719ca173ec59643b71b4c1f724ea67
|
4
|
+
data.tar.gz: 3f75f0be9e4023c3a1f2dce9c63f311d85a72fb599b12d6b0196b3546a4db092
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9552d7e14685aa4aa9f69456bbc51e57d685903b2fc0752bfd2bf01f6140aa19d375000ae3c11a2f4cef8a78a5a3e87934cc542c2f719698ab539f00e6cadadd
|
7
|
+
data.tar.gz: 9fc95b241595dd1268981cd8156f8c587b71dad5cbcd7eb931fe3ee0ea723ba23521c38ddcf0658f4b4d413ed46b9c885e2dd45f2155c6477129869575390f1f
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
### Master (unreleased)
|
2
2
|
|
3
|
+
## v.1.3.5 (Feb 10, 2022)
|
4
|
+
|
5
|
+
- [183](https://github.com/Shopify/job-iteration/pull/183) - Add `JobIteration::EnumeratorBuilder#build_csv_enumerator`
|
6
|
+
|
3
7
|
## v.1.3.4 (Jan 18, 2022)
|
4
8
|
|
5
9
|
- [174](https://github.com/Shopify/job-iteration/pull/174) - Fix Ruby 3.2 compatibility
|
data/Gemfile.lock
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
GIT
|
2
2
|
remote: https://github.com/brianmario/mysql2
|
3
|
-
revision:
|
3
|
+
revision: 8193dc412c6a266045b9d13a9da36c16750939a4
|
4
4
|
specs:
|
5
5
|
mysql2 (0.5.3)
|
6
6
|
|
7
7
|
PATH
|
8
8
|
remote: .
|
9
9
|
specs:
|
10
|
-
job-iteration (1.3.
|
10
|
+
job-iteration (1.3.5)
|
11
11
|
activejob (>= 5.2)
|
12
12
|
|
13
13
|
GEM
|
@@ -39,7 +39,7 @@ GEM
|
|
39
39
|
database_cleaner-core (2.0.1)
|
40
40
|
globalid (1.0.0)
|
41
41
|
activesupport (>= 5.0)
|
42
|
-
i18n (1.
|
42
|
+
i18n (1.9.1)
|
43
43
|
concurrent-ruby (~> 1.0)
|
44
44
|
method_source (1.0.0)
|
45
45
|
minitest (5.15.0)
|
@@ -59,7 +59,7 @@ GEM
|
|
59
59
|
rack
|
60
60
|
rainbow (3.1.1)
|
61
61
|
rake (13.0.6)
|
62
|
-
redis (4.
|
62
|
+
redis (4.6.0)
|
63
63
|
redis-namespace (1.8.1)
|
64
64
|
redis (>= 3.0.4)
|
65
65
|
regexp_parser (2.2.0)
|
@@ -85,7 +85,7 @@ GEM
|
|
85
85
|
rubocop (~> 1.24)
|
86
86
|
ruby-progressbar (1.11.0)
|
87
87
|
ruby2_keywords (0.0.5)
|
88
|
-
sidekiq (6.
|
88
|
+
sidekiq (6.4.0)
|
89
89
|
connection_pool (>= 2.2.2)
|
90
90
|
rack (~> 2.0)
|
91
91
|
redis (>= 4.2.0)
|
@@ -94,7 +94,7 @@ GEM
|
|
94
94
|
rack (~> 2.2)
|
95
95
|
rack-protection (= 2.1.0)
|
96
96
|
tilt (~> 2.0)
|
97
|
-
sorbet-runtime (0.5.
|
97
|
+
sorbet-runtime (0.5.9619)
|
98
98
|
tilt (2.0.10)
|
99
99
|
tzinfo (2.0.4)
|
100
100
|
concurrent-ruby (~> 1.0)
|
data/README.md
CHANGED
@@ -123,7 +123,7 @@ class CsvJob < ApplicationJob
|
|
123
123
|
|
124
124
|
def build_enumerator(import_id, cursor:)
|
125
125
|
import = Import.find(import_id)
|
126
|
-
|
126
|
+
enumerator_builder.csv(import.csv, cursor: cursor)
|
127
127
|
end
|
128
128
|
|
129
129
|
def each_iteration(csv_row)
|
@@ -138,6 +138,10 @@ module JobIteration
|
|
138
138
|
).to_enum
|
139
139
|
end
|
140
140
|
|
141
|
+
def build_csv_enumerator(enumerable, cursor:)
|
142
|
+
CsvEnumerator.new(enumerable).rows(cursor: cursor)
|
143
|
+
end
|
144
|
+
|
141
145
|
alias_method :once, :build_once_enumerator
|
142
146
|
alias_method :times, :build_times_enumerator
|
143
147
|
alias_method :array, :build_array_enumerator
|
@@ -145,6 +149,7 @@ module JobIteration
|
|
145
149
|
alias_method :active_record_on_batches, :build_active_record_enumerator_on_batches
|
146
150
|
alias_method :active_record_on_batch_relations, :build_active_record_enumerator_on_batch_relations
|
147
151
|
alias_method :throttle, :build_throttle_enumerator
|
152
|
+
alias_method :csv, :build_csv_enumerator
|
148
153
|
|
149
154
|
private
|
150
155
|
|
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.3.
|
4
|
+
version: 1.3.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shopify
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-02-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|