sequel-batches 1.1.0 → 2.0.0
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 +4 -4
- data/.github/workflows/ci.yml +1 -2
- data/.gitignore +0 -1
- data/.rubocop.yml +1 -1
- data/Gemfile +0 -10
- data/Gemfile.lock +113 -0
- data/README.md +6 -9
- data/sequel-batches.gemspec +4 -6
- metadata +19 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6ffd198d92d022335e38e2422ca6f31f790f3501ebc463b15f8f9cde318faea6
|
4
|
+
data.tar.gz: 14d9cdbf89a5099136a586d2a468360524df0142b653c4908a86ba3c183fd1f9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cc23bb340fec3c041afdda7c1cb21d4dd9af5717d66149a9494f419b169e292c24074aa378dbfadc24a8d827a43aa52dcbafff3a2fc70c287c80d688d088769e
|
7
|
+
data.tar.gz: faba27222e6b8d0a7a3efcfd7eedbf9d423c2f87aa837bd4173bb22cb58b9084369c0ae5de054461a64d8e419258d9f1ed04c3b97dd26294c0d271608b730dad
|
data/.github/workflows/ci.yml
CHANGED
@@ -29,7 +29,7 @@ jobs:
|
|
29
29
|
strategy:
|
30
30
|
fail-fast: false
|
31
31
|
matrix:
|
32
|
-
ruby: [2.
|
32
|
+
ruby: ["2.7", "3.0", "3.1"]
|
33
33
|
|
34
34
|
name: ${{ matrix.ruby }}
|
35
35
|
|
@@ -44,7 +44,6 @@ jobs:
|
|
44
44
|
- run: bundle exec rake bundle:audit
|
45
45
|
- run: bundle exec rake lint
|
46
46
|
- run: bundle exec rspec
|
47
|
-
continue-on-error: ${{ matrix.ruby == 'jruby-head' || matrix.ruby == 'ruby-head' }}
|
48
47
|
|
49
48
|
- uses: coverallsapp/github-action@v1.1.2
|
50
49
|
with:
|
data/.gitignore
CHANGED
data/.rubocop.yml
CHANGED
data/Gemfile
CHANGED
@@ -4,13 +4,3 @@ source "https://rubygems.org"
|
|
4
4
|
|
5
5
|
# Specify your gem's dependencies in sequel-batches.gemspec
|
6
6
|
gemspec
|
7
|
-
|
8
|
-
# MRI/Rubinius Adapter Dependencies
|
9
|
-
platforms :ruby do
|
10
|
-
gem "pg"
|
11
|
-
end
|
12
|
-
|
13
|
-
# JRuby Adapter Dependencies
|
14
|
-
platforms :jruby do
|
15
|
-
gem "jdbc-postgres"
|
16
|
-
end
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,113 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
sequel-batches (2.0.0)
|
5
|
+
sequel
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: https://rubygems.org/
|
9
|
+
specs:
|
10
|
+
activesupport (7.0.3.1)
|
11
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
12
|
+
i18n (>= 1.6, < 2)
|
13
|
+
minitest (>= 5.1)
|
14
|
+
tzinfo (~> 2.0)
|
15
|
+
ast (2.4.2)
|
16
|
+
bundler-audit (0.9.1)
|
17
|
+
bundler (>= 1.2.0, < 3)
|
18
|
+
thor (~> 1.0)
|
19
|
+
coderay (1.1.3)
|
20
|
+
concurrent-ruby (1.1.10)
|
21
|
+
diff-lcs (1.5.0)
|
22
|
+
docile (1.4.0)
|
23
|
+
i18n (1.12.0)
|
24
|
+
concurrent-ruby (~> 1.0)
|
25
|
+
method_source (1.0.0)
|
26
|
+
minitest (5.16.2)
|
27
|
+
parallel (1.22.1)
|
28
|
+
parser (3.1.2.0)
|
29
|
+
ast (~> 2.4.1)
|
30
|
+
pg (1.4.2)
|
31
|
+
pry (0.14.1)
|
32
|
+
coderay (~> 1.1)
|
33
|
+
method_source (~> 1.0)
|
34
|
+
rack (2.2.4)
|
35
|
+
rainbow (3.1.1)
|
36
|
+
rake (13.0.6)
|
37
|
+
regexp_parser (2.5.0)
|
38
|
+
rexml (3.2.5)
|
39
|
+
rspec (3.11.0)
|
40
|
+
rspec-core (~> 3.11.0)
|
41
|
+
rspec-expectations (~> 3.11.0)
|
42
|
+
rspec-mocks (~> 3.11.0)
|
43
|
+
rspec-core (3.11.0)
|
44
|
+
rspec-support (~> 3.11.0)
|
45
|
+
rspec-expectations (3.11.0)
|
46
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
47
|
+
rspec-support (~> 3.11.0)
|
48
|
+
rspec-mocks (3.11.1)
|
49
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
50
|
+
rspec-support (~> 3.11.0)
|
51
|
+
rspec-support (3.11.0)
|
52
|
+
rubocop (1.30.1)
|
53
|
+
parallel (~> 1.10)
|
54
|
+
parser (>= 3.1.0.0)
|
55
|
+
rainbow (>= 2.2.2, < 4.0)
|
56
|
+
regexp_parser (>= 1.8, < 3.0)
|
57
|
+
rexml (>= 3.2.5, < 4.0)
|
58
|
+
rubocop-ast (>= 1.18.0, < 2.0)
|
59
|
+
ruby-progressbar (~> 1.7)
|
60
|
+
unicode-display_width (>= 1.4.0, < 3.0)
|
61
|
+
rubocop-ast (1.19.1)
|
62
|
+
parser (>= 3.1.1.0)
|
63
|
+
rubocop-config-umbrellio (1.30.0.65)
|
64
|
+
rubocop (~> 1.30.0)
|
65
|
+
rubocop-performance (~> 1.14.0)
|
66
|
+
rubocop-rails (~> 2.14.2)
|
67
|
+
rubocop-rake (~> 0.6.0)
|
68
|
+
rubocop-rspec (~> 2.11.1)
|
69
|
+
rubocop-sequel (~> 0.3.3)
|
70
|
+
rubocop-performance (1.14.3)
|
71
|
+
rubocop (>= 1.7.0, < 2.0)
|
72
|
+
rubocop-ast (>= 0.4.0)
|
73
|
+
rubocop-rails (2.14.2)
|
74
|
+
activesupport (>= 4.2.0)
|
75
|
+
rack (>= 1.1)
|
76
|
+
rubocop (>= 1.7.0, < 2.0)
|
77
|
+
rubocop-rake (0.6.0)
|
78
|
+
rubocop (~> 1.0)
|
79
|
+
rubocop-rspec (2.11.1)
|
80
|
+
rubocop (~> 1.19)
|
81
|
+
rubocop-sequel (0.3.4)
|
82
|
+
rubocop (~> 1.0)
|
83
|
+
ruby-progressbar (1.11.0)
|
84
|
+
sequel (5.59.0)
|
85
|
+
simplecov (0.21.2)
|
86
|
+
docile (~> 1.1)
|
87
|
+
simplecov-html (~> 0.11)
|
88
|
+
simplecov_json_formatter (~> 0.1)
|
89
|
+
simplecov-html (0.12.3)
|
90
|
+
simplecov-lcov (0.8.0)
|
91
|
+
simplecov_json_formatter (0.1.4)
|
92
|
+
thor (1.2.1)
|
93
|
+
tzinfo (2.0.5)
|
94
|
+
concurrent-ruby (~> 1.0)
|
95
|
+
unicode-display_width (2.2.0)
|
96
|
+
|
97
|
+
PLATFORMS
|
98
|
+
ruby
|
99
|
+
|
100
|
+
DEPENDENCIES
|
101
|
+
bundler
|
102
|
+
bundler-audit
|
103
|
+
pg
|
104
|
+
pry
|
105
|
+
rake
|
106
|
+
rspec
|
107
|
+
rubocop-config-umbrellio
|
108
|
+
sequel-batches!
|
109
|
+
simplecov
|
110
|
+
simplecov-lcov
|
111
|
+
|
112
|
+
BUNDLED WITH
|
113
|
+
2.3.19
|
data/README.md
CHANGED
@@ -12,14 +12,6 @@ Add this line to your application's Gemfile:
|
|
12
12
|
gem 'sequel-batches'
|
13
13
|
```
|
14
14
|
|
15
|
-
And then execute:
|
16
|
-
|
17
|
-
$ bundle
|
18
|
-
|
19
|
-
Or install it yourself as:
|
20
|
-
|
21
|
-
$ gem install sequel-batches
|
22
|
-
|
23
15
|
## Usage
|
24
16
|
|
25
17
|
In order to use the feature you should enable the extension:
|
@@ -57,21 +49,26 @@ end
|
|
57
49
|
You can set the following options:
|
58
50
|
|
59
51
|
### pk
|
52
|
+
|
60
53
|
Overrides primary key of your dataset. This option is required in case your table doesn't have a real PK, otherwise you will get `Sequel::Extensions::Batches::MissingPKError`.
|
61
54
|
|
62
55
|
Note that you have to provide columns that don't contain NULL values, otherwise this may not work as intended. You will receive `Sequel::Extensions::Batches::NullPKError` in case batch processing detects a NULL value on it's way, but it's not guaranteed since it doesn't check all the rows for performance reasons.
|
63
56
|
|
64
57
|
### of
|
58
|
+
|
65
59
|
Sets chunk size (1000 by default).
|
66
60
|
|
67
61
|
### start
|
62
|
+
|
68
63
|
A hash `{ [column]: <start_value> }` that represents frame start for batch processing. Note that you will get `Sequel::Extensions::Batches::InvalidPKError` in case you provide a hash with wrong keys (ordering matters as well).
|
69
64
|
|
70
65
|
### finish
|
66
|
+
|
71
67
|
Same as `start` but represents the frame end.
|
72
68
|
|
73
69
|
### order
|
74
|
-
|
70
|
+
|
71
|
+
Specifies the primary key order (can be `:asc` or `:desc`). Defaults to `:asc`.
|
75
72
|
|
76
73
|
## Contributing
|
77
74
|
|
data/sequel-batches.gemspec
CHANGED
@@ -5,10 +5,10 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
7
|
spec.name = "sequel-batches"
|
8
|
-
spec.version = "
|
8
|
+
spec.version = "2.0.0"
|
9
9
|
spec.authors = %w[fiscal-cliff umbrellio]
|
10
10
|
spec.email = ["oss@umbrellio.biz"]
|
11
|
-
spec.required_ruby_version = ">= 2.
|
11
|
+
spec.required_ruby_version = ">= 2.7"
|
12
12
|
|
13
13
|
spec.summary = "The extension mimics AR5 batches api"
|
14
14
|
spec.description = "Allows you to split your dataset in batches"
|
@@ -22,13 +22,11 @@ Gem::Specification.new do |spec|
|
|
22
22
|
|
23
23
|
spec.add_development_dependency "bundler"
|
24
24
|
spec.add_development_dependency "bundler-audit"
|
25
|
-
|
25
|
+
spec.add_development_dependency "pg"
|
26
26
|
spec.add_development_dependency "pry"
|
27
27
|
spec.add_development_dependency "rake"
|
28
|
-
|
29
|
-
spec.add_development_dependency "rubocop-config-umbrellio"
|
30
|
-
|
31
28
|
spec.add_development_dependency "rspec"
|
29
|
+
spec.add_development_dependency "rubocop-config-umbrellio"
|
32
30
|
spec.add_development_dependency "simplecov"
|
33
31
|
spec.add_development_dependency "simplecov-lcov"
|
34
32
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sequel-batches
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- fiscal-cliff
|
@@ -53,6 +53,20 @@ dependencies:
|
|
53
53
|
- - ">="
|
54
54
|
- !ruby/object:Gem::Version
|
55
55
|
version: '0'
|
56
|
+
- !ruby/object:Gem::Dependency
|
57
|
+
name: pg
|
58
|
+
requirement: !ruby/object:Gem::Requirement
|
59
|
+
requirements:
|
60
|
+
- - ">="
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '0'
|
63
|
+
type: :development
|
64
|
+
prerelease: false
|
65
|
+
version_requirements: !ruby/object:Gem::Requirement
|
66
|
+
requirements:
|
67
|
+
- - ">="
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '0'
|
56
70
|
- !ruby/object:Gem::Dependency
|
57
71
|
name: pry
|
58
72
|
requirement: !ruby/object:Gem::Requirement
|
@@ -82,7 +96,7 @@ dependencies:
|
|
82
96
|
- !ruby/object:Gem::Version
|
83
97
|
version: '0'
|
84
98
|
- !ruby/object:Gem::Dependency
|
85
|
-
name:
|
99
|
+
name: rspec
|
86
100
|
requirement: !ruby/object:Gem::Requirement
|
87
101
|
requirements:
|
88
102
|
- - ">="
|
@@ -96,7 +110,7 @@ dependencies:
|
|
96
110
|
- !ruby/object:Gem::Version
|
97
111
|
version: '0'
|
98
112
|
- !ruby/object:Gem::Dependency
|
99
|
-
name:
|
113
|
+
name: rubocop-config-umbrellio
|
100
114
|
requirement: !ruby/object:Gem::Requirement
|
101
115
|
requirements:
|
102
116
|
- - ">="
|
@@ -150,6 +164,7 @@ files:
|
|
150
164
|
- ".rubocop.yml"
|
151
165
|
- CODE_OF_CONDUCT.md
|
152
166
|
- Gemfile
|
167
|
+
- Gemfile.lock
|
153
168
|
- LICENSE.txt
|
154
169
|
- README.md
|
155
170
|
- Rakefile
|
@@ -169,7 +184,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
169
184
|
requirements:
|
170
185
|
- - ">="
|
171
186
|
- !ruby/object:Gem::Version
|
172
|
-
version: '2.
|
187
|
+
version: '2.7'
|
173
188
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
174
189
|
requirements:
|
175
190
|
- - ">="
|