sequel-batches 0.2.1 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0574ea7f800e68b8316c8f03cf5375dd165640ced4cf1a41016f02848fa61954
4
- data.tar.gz: 980b78345324a39f7dc8b45bf79ee0096fe638285d761e768729ac398b11ed18
3
+ metadata.gz: 2ba86551c2e6fa28e3c012fec381ca293267b3c04629f8295114724a2c7ff99a
4
+ data.tar.gz: c36a543672f8d6869e4189ad808ac15c275d0342cc41ec3a258a0299e4225829
5
5
  SHA512:
6
- metadata.gz: bdca5b44da27259b09e24662024f0b10b6d095a85762b98ef4cded1685f0af02daf7cfe62f230d5eafd81fc51d45aec5f13fba9dfbf4d144e56113371d450542
7
- data.tar.gz: d0443e858f6202492cb7a1a67585bdcfffab0f47f630bd9f817937bb10e21dbf9dcfda27417f345b69c92d86855a96f2947d99b50f1c2b775d198ceab0589a7e
6
+ metadata.gz: 655a16e69b97c23fe80c92beef06e5cc80fa242b161955ef3702193385528b67b8575a14c5b75ed0e7cc4af559e1a04e0e0141e8ab4ef60c5cfc350ac5afda9c
7
+ data.tar.gz: c36d801caaf7cefc37520c4db12ce9d47ff62c20eb2c9c8c2c9813775829bd5acbaa0bc8f1d6953b5fc1c6dfbcea34650eec29ca37f8c15731872bd1915f193a
@@ -0,0 +1,51 @@
1
+ name: CI
2
+
3
+ on: [pull_request, push]
4
+
5
+ jobs:
6
+ test:
7
+ runs-on: ubuntu-latest
8
+
9
+ if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != 'umbrellio/sequel-batches'
10
+
11
+ services:
12
+ postgres:
13
+ image: postgres
14
+ env:
15
+ POSTGRES_USER: root
16
+ POSTGRES_HOST_AUTH_METHOD: trust
17
+ options: >-
18
+ --health-cmd pg_isready
19
+ --health-interval 10s
20
+ --health-timeout 5s
21
+ --health-retries 5
22
+ ports:
23
+ - 5432:5432
24
+
25
+ env:
26
+ PGHOST: localhost
27
+ PGUSER: root
28
+
29
+ strategy:
30
+ fail-fast: false
31
+ matrix:
32
+ ruby: [2.6, 2.7, "3.0", jruby-9.3.1.0, ruby-head, jruby-head]
33
+
34
+ name: ${{ matrix.ruby }}
35
+
36
+ steps:
37
+ - uses: actions/checkout@v2
38
+ - uses: ruby/setup-ruby@v1
39
+ with:
40
+ ruby-version: ${{ matrix.ruby }}
41
+ bundler-cache: true
42
+
43
+ - run: psql -c 'CREATE DATABASE batches_test'
44
+ - run: bundle exec rake bundle:audit
45
+ - run: bundle exec rake lint
46
+ - run: bundle exec rspec
47
+ continue-on-error: ${{ matrix.ruby == 'jruby-head' || matrix.ruby == 'ruby-head' }}
48
+
49
+ - uses: coverallsapp/github-action@v1.1.2
50
+ with:
51
+ github-token: ${{ secrets.GITHUB_TOKEN }}
data/.rubocop.yml ADDED
@@ -0,0 +1,18 @@
1
+ inherit_gem:
2
+ rubocop-config-umbrellio: lib/rubocop.yml
3
+
4
+ AllCops:
5
+ DisplayCopNames: true
6
+ TargetRubyVersion: 2.6
7
+ Include:
8
+ - lib/**/*.rb
9
+ - spec/**/*.rb
10
+ - Gemfile
11
+ - Rakefile
12
+ - sequel-batches.gemspec
13
+
14
+ Layout/LineLength:
15
+ Max: 120
16
+
17
+ Naming/MethodParameterName:
18
+ Enabled: false
data/Gemfile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  source "https://rubygems.org"
2
4
 
3
5
  # Specify your gem's dependencies in sequel-batches.gemspec
data/README.md CHANGED
@@ -1,25 +1,9 @@
1
- # Sequel::Batches [![Build Status](https://travis-ci.org/umbrellio/sequel-batches.svg?branch=master)](https://travis-ci.org/umbrellio/sequel-batches) [![Coverage Status](https://coveralls.io/repos/github/umbrellio/sequel-batches/badge.svg?branch=master)](https://coveralls.io/github/umbrellio/sequel-batches?branch=master)
1
+ # Sequel::Batches    [![Gem Version](https://badge.fury.io/rb/sequel-batches.svg)](https://badge.fury.io/rb/sequel-batches) [![Build Status](https://travis-ci.org/umbrellio/sequel-batches.svg?branch=master)](https://travis-ci.org/umbrellio/sequel-batches) [![Coverage Status](https://coveralls.io/repos/github/umbrellio/sequel-batches/badge.svg?branch=master)](https://coveralls.io/github/umbrellio/sequel-batches?branch=master)
2
2
 
3
- This dataset extension provides the method #in_batches. The method splits dataset in parts and yields it.
3
+ This dataset extension provides the `#in_batches` method. The method splits dataset in parts and yields it.
4
4
 
5
5
  Note: currently only PostgreSQL database is supported.
6
6
 
7
- You can set the following options:
8
-
9
- ### pk
10
- 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`.
11
-
12
- 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.
13
-
14
- ### of
15
- Sets chunk size (1000 by default).
16
-
17
- ### start
18
- 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).
19
-
20
- ### finish
21
- Same as `start` but represents the frame end.
22
-
23
7
  ## Installation
24
8
 
25
9
  Add this line to your application's Gemfile:
@@ -38,13 +22,13 @@ Or install it yourself as:
38
22
 
39
23
  ## Usage
40
24
 
41
- In order to use the feature you should enable the extension
25
+ In order to use the feature you should enable the extension:
42
26
 
43
27
  ```ruby
44
28
  Sequel::DATABASES.first.extension :batches
45
29
  ```
46
30
 
47
- And then the method becomes available on dataset
31
+ After that the `#in_batches` method becomes available on dataset:
48
32
 
49
33
  ```ruby
50
34
  User.where(role: "admin").in_batches(of: 4) do |ds|
@@ -52,28 +36,51 @@ User.where(role: "admin").in_batches(of: 4) do |ds|
52
36
  end
53
37
  ```
54
38
 
55
- Finally, here's an example including all the available options
39
+ Finally, here's an example including all the available options:
56
40
 
57
41
  ```ruby
58
- Event.where(type: "login").in_batches(of: 4, pk: [:project_id, :external_user_id], start: { project_id: 2, external_user_id: 3 }, finish: { project_id: 5, external_user_id: 70 }) do |ds|
42
+ options = {
43
+ of: 4,
44
+ pk: [:project_id, :external_user_id],
45
+ start: { project_id: 2, external_user_id: 3 },
46
+ finish: { project_id: 5, external_user_id: 70 },
47
+ order: :desc,
48
+ }
49
+
50
+ Event.where(type: "login").in_batches(options) do |ds|
59
51
  ds.delete
60
52
  end
61
53
  ```
62
54
 
63
- ## Development
55
+ ## Options
64
56
 
65
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
57
+ You can set the following options:
58
+
59
+ ### pk
60
+ 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
+
62
+ 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
+
64
+ ### of
65
+ Sets chunk size (1000 by default).
66
+
67
+ ### start
68
+ 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).
66
69
 
67
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
70
+ ### finish
71
+ Same as `start` but represents the frame end.
72
+
73
+ ### order
74
+ Specifies the primary key order (can be :asc or :desc). Defaults to :asc.
68
75
 
69
76
  ## Contributing
70
77
 
71
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/sequel-batches. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
78
+ Bug reports and pull requests are welcome on GitHub at https://github.com/umbrellio/sequel-batches.
72
79
 
73
80
  ## License
74
81
 
75
82
  The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
76
83
 
77
- ## Code of Conduct
78
-
79
- Everyone interacting in the Sequel::Batches project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/sequel-batches/blob/master/CODE_OF_CONDUCT.md).
84
+ <a href="https://github.com/umbrellio/">
85
+ <img style="float: left;" src="https://umbrellio.github.io/Umbrellio/supported_by_umbrellio.svg" alt="Supported by Umbrellio" width="439" height="72">
86
+ </a>
data/Rakefile CHANGED
@@ -1,6 +1,18 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "bundler/gem_tasks"
4
+ require "bundler/audit/task"
2
5
  require "rspec/core/rake_task"
6
+ require "rubocop/rake_task"
3
7
 
4
8
  RSpec::Core::RakeTask.new(:spec)
9
+ RuboCop::RakeTask.new(:lint) do |t|
10
+ config_path = File.expand_path(File.join(".rubocop.yml"), __dir__)
11
+
12
+ t.options = ["--config", config_path]
13
+ t.requires << "rubocop-rspec"
14
+ t.requires << "rubocop-performance"
15
+ end
16
+ Bundler::Audit::Task.new
5
17
 
6
- task :default => :spec
18
+ task default: %i[lint spec]
@@ -0,0 +1,107 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sequel::Extensions::Batches
4
+ class Yielder
5
+ attr_accessor :ds, :of, :start, :finish, :order
6
+ attr_writer :pk
7
+
8
+ def initialize(ds:, **options)
9
+ self.ds = ds
10
+ self.pk = options.delete(:pk)
11
+ self.of = options.delete(:of) || 1000
12
+ self.start = options.delete(:start)
13
+ self.finish = options.delete(:finish)
14
+ self.order = options.delete(:order) || :asc
15
+
16
+ raise ArgumentError, ":order must be :asc or :desc, got #{order.inspect}" unless %i[asc desc].include?(order)
17
+ raise ArgumentError, "unknown options: #{options.keys.inspect}" if options.any?
18
+ end
19
+
20
+ def call
21
+ base_ds = setup_base_ds or return
22
+ return enum_for(:call) unless block_given?
23
+
24
+ current_instance = nil
25
+
26
+ loop do
27
+ working_ds =
28
+ if current_instance
29
+ base_ds.where(generate_conditions(current_instance.to_h, sign: sign_from_exclusive))
30
+ else
31
+ base_ds
32
+ end
33
+
34
+ working_ds_pk = working_ds.select(*qualified_pk).order(order_by).limit(of)
35
+ current_instance = db.from(working_ds_pk).select(*pk).order(order_by).last or break
36
+ working_ds = working_ds.where(generate_conditions(current_instance.to_h, sign: sign_to_inclusive))
37
+
38
+ yield working_ds
39
+ end
40
+ end
41
+
42
+ private
43
+
44
+ def db
45
+ ds.db
46
+ end
47
+
48
+ def pk
49
+ @pk ||= begin
50
+ pk = db.schema(ds.first_source).select { |x| x[1][:primary_key] }.map(&:first)
51
+ raise MissingPKError if pk.empty?
52
+ pk
53
+ end
54
+ end
55
+
56
+ def asc_order?
57
+ order == :asc
58
+ end
59
+
60
+ def sign_from_exclusive
61
+ asc_order? ? :> : :<
62
+ end
63
+
64
+ def sign_from_inclusive
65
+ asc_order? ? :>= : :<=
66
+ end
67
+
68
+ def sign_to_inclusive
69
+ asc_order? ? :<= : :>=
70
+ end
71
+
72
+ def order_by(qualified: false)
73
+ columns = qualified ? qualified_pk : pk
74
+ asc_order? ? Sequel.asc(columns) : Sequel.desc(columns)
75
+ end
76
+
77
+ def qualified_pk
78
+ @qualified_pk ||= pk.map { |x| Sequel[ds.first_source][x] }
79
+ end
80
+
81
+ def check_pk(input_pk)
82
+ raise InvalidPKError if input_pk.keys != pk
83
+ input_pk
84
+ end
85
+
86
+ def generate_conditions(input_pk, sign:)
87
+ raise NullPKError if input_pk.values.any?(&:nil?)
88
+ row_expr = Sequel.function(:row, *input_pk.values)
89
+ Sequel.function(:row, *qualified_pk).public_send(sign, row_expr)
90
+ end
91
+
92
+ def setup_base_ds
93
+ base_ds = ds.order(order_by(qualified: true))
94
+ base_ds = base_ds.where(generate_conditions(check_pk(start), sign: sign_from_inclusive)) if start
95
+ base_ds = base_ds.where(generate_conditions(check_pk(finish), sign: sign_to_inclusive)) if finish
96
+
97
+ pk_ds = db.from(base_ds.select(*qualified_pk)).select(*pk).order(order_by)
98
+ actual_start = pk_ds.first
99
+ actual_finish = pk_ds.last
100
+
101
+ return unless actual_start && actual_finish
102
+
103
+ base_ds = base_ds.where(generate_conditions(actual_start, sign: sign_from_inclusive))
104
+ base_ds.where(generate_conditions(actual_finish, sign: sign_to_inclusive))
105
+ end
106
+ end
107
+ end
@@ -1,5 +1,4 @@
1
- require "sequel/extensions/batches/version"
2
- require "sequel/model"
1
+ # frozen_string_literal: true
3
2
 
4
3
  module Sequel
5
4
  module Extensions
@@ -8,55 +7,13 @@ module Sequel
8
7
  NullPKError = Class.new(StandardError)
9
8
  InvalidPKError = Class.new(StandardError)
10
9
 
11
- def in_batches(pk: nil, of: 1000, start: nil, finish: nil)
12
- pk ||= db.schema(first_source).select { |x| x[1][:primary_key] }.map(&:first)
13
- raise MissingPKError if pk.empty?
14
-
15
- qualified_pk = pk.map { |x| Sequel[first_source][x] }
16
-
17
- check_pk = lambda do |input_pk|
18
- raise InvalidPKError if input_pk.keys != pk
19
- input_pk
20
- end
21
-
22
- conditions = lambda do |pk, sign:|
23
- raise NullPKError if pk.values.any?(&:nil?)
24
- row_expr = Sequel.function(:row, *pk.values)
25
- Sequel.function(:row, *qualified_pk).public_send(sign, row_expr)
26
- end
27
-
28
- base_ds = order(*qualified_pk)
29
- base_ds = base_ds.where(conditions.call(check_pk.call(start), sign: :>=)) if start
30
- base_ds = base_ds.where(conditions.call(check_pk.call(finish), sign: :<=)) if finish
31
-
32
- pk_ds = db.from(base_ds).select(*pk).order(*pk)
33
- actual_start = pk_ds.first
34
- actual_finish = pk_ds.last
35
-
36
- return unless actual_start && actual_finish
37
-
38
- base_ds = base_ds.where(conditions.call(actual_start, sign: :>=))
39
- base_ds = base_ds.where(conditions.call(actual_finish, sign: :<=))
40
-
41
- current_instance = nil
42
-
43
- loop do
44
- if current_instance
45
- working_ds = base_ds.where(conditions.call(current_instance.to_h, sign: :>))
46
- else
47
- working_ds = base_ds
48
- end
49
-
50
- current_instance = db.from(working_ds.limit(of)).select(*pk).order(*pk).last or break
51
- working_ds = working_ds.where(conditions.call(current_instance.to_h, sign: :<=))
52
-
53
- yield working_ds
54
- end
10
+ def in_batches(**options, &block)
11
+ Sequel::Extensions::Batches::Yielder.new(ds: self, **options).call(&block)
55
12
  end
56
-
57
- private
58
-
59
- ::Sequel::Dataset.register_extension(:batches, Batches)
60
13
  end
61
14
  end
62
15
  end
16
+
17
+ ::Sequel::Dataset.register_extension(:batches, Sequel::Extensions::Batches)
18
+
19
+ require_relative "batches/yielder"
@@ -1,40 +1,34 @@
1
+ # frozen_string_literal: true
1
2
 
2
- lib = File.expand_path("../lib", __FILE__)
3
+ lib = File.expand_path("lib", __dir__)
3
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require "sequel/extensions/batches/version"
5
5
 
6
6
  Gem::Specification.new do |spec|
7
- spec.name = "sequel-batches"
8
- spec.version = Sequel::Extensions::Batches::VERSION
9
- spec.authors = ["fiscal-cliff", "umbrellio"]
10
- spec.email = ["oss@umbrellio.biz"]
11
-
12
- spec.summary = %q{The extension mimics AR5 batches api}
13
- spec.description = %q{Allows you to split your dataset in batches}
14
- spec.homepage = "https://github.com/umbrellio/sequel-batches"
15
- spec.license = "MIT"
16
-
17
- # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
18
- # to allow pushing to a single host or delete this section to allow pushing to any host.
19
- if spec.respond_to?(:metadata)
20
- spec.metadata["allowed_push_host"] = "https://rubygems.org"
21
- else
22
- raise "RubyGems 2.0 or newer is required to protect against " \
23
- "public gem pushes."
24
- end
25
-
26
- spec.files = `git ls-files -z`.split("\x0").reject do |f|
27
- f.match(%r{^(test|spec|features)/})
28
- end
29
- spec.bindir = "exe"
30
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
7
+ spec.name = "sequel-batches"
8
+ spec.version = "1.1.0"
9
+ spec.authors = %w[fiscal-cliff umbrellio]
10
+ spec.email = ["oss@umbrellio.biz"]
11
+ spec.required_ruby_version = ">= 2.6"
12
+
13
+ spec.summary = "The extension mimics AR5 batches api"
14
+ spec.description = "Allows you to split your dataset in batches"
15
+ spec.homepage = "https://github.com/umbrellio/sequel-batches"
16
+ spec.license = "MIT"
17
+
18
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
31
19
  spec.require_paths = ["lib"]
32
20
 
21
+ spec.add_runtime_dependency "sequel"
22
+
33
23
  spec.add_development_dependency "bundler"
34
- spec.add_development_dependency "coveralls"
24
+ spec.add_development_dependency "bundler-audit"
25
+
35
26
  spec.add_development_dependency "pry"
36
27
  spec.add_development_dependency "rake"
37
- spec.add_development_dependency "rspec"
38
28
 
39
- spec.add_runtime_dependency "sequel"
29
+ spec.add_development_dependency "rubocop-config-umbrellio"
30
+
31
+ spec.add_development_dependency "rspec"
32
+ spec.add_development_dependency "simplecov"
33
+ spec.add_development_dependency "simplecov-lcov"
40
34
  end
metadata CHANGED
@@ -1,16 +1,30 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sequel-batches
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - fiscal-cliff
8
8
  - umbrellio
9
- autorequire:
10
- bindir: exe
9
+ autorequire:
10
+ bindir: bin
11
11
  cert_chain: []
12
- date: 2019-08-19 00:00:00.000000000 Z
12
+ date: 2022-08-05 00:00:00.000000000 Z
13
13
  dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: sequel
16
+ requirement: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - ">="
19
+ - !ruby/object:Gem::Version
20
+ version: '0'
21
+ type: :runtime
22
+ prerelease: false
23
+ version_requirements: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - ">="
26
+ - !ruby/object:Gem::Version
27
+ version: '0'
14
28
  - !ruby/object:Gem::Dependency
15
29
  name: bundler
16
30
  requirement: !ruby/object:Gem::Requirement
@@ -26,7 +40,7 @@ dependencies:
26
40
  - !ruby/object:Gem::Version
27
41
  version: '0'
28
42
  - !ruby/object:Gem::Dependency
29
- name: coveralls
43
+ name: bundler-audit
30
44
  requirement: !ruby/object:Gem::Requirement
31
45
  requirements:
32
46
  - - ">="
@@ -67,6 +81,20 @@ dependencies:
67
81
  - - ">="
68
82
  - !ruby/object:Gem::Version
69
83
  version: '0'
84
+ - !ruby/object:Gem::Dependency
85
+ name: rubocop-config-umbrellio
86
+ requirement: !ruby/object:Gem::Requirement
87
+ requirements:
88
+ - - ">="
89
+ - !ruby/object:Gem::Version
90
+ version: '0'
91
+ type: :development
92
+ prerelease: false
93
+ version_requirements: !ruby/object:Gem::Requirement
94
+ requirements:
95
+ - - ">="
96
+ - !ruby/object:Gem::Version
97
+ version: '0'
70
98
  - !ruby/object:Gem::Dependency
71
99
  name: rspec
72
100
  requirement: !ruby/object:Gem::Requirement
@@ -82,13 +110,27 @@ dependencies:
82
110
  - !ruby/object:Gem::Version
83
111
  version: '0'
84
112
  - !ruby/object:Gem::Dependency
85
- name: sequel
113
+ name: simplecov
86
114
  requirement: !ruby/object:Gem::Requirement
87
115
  requirements:
88
116
  - - ">="
89
117
  - !ruby/object:Gem::Version
90
118
  version: '0'
91
- type: :runtime
119
+ type: :development
120
+ prerelease: false
121
+ version_requirements: !ruby/object:Gem::Requirement
122
+ requirements:
123
+ - - ">="
124
+ - !ruby/object:Gem::Version
125
+ version: '0'
126
+ - !ruby/object:Gem::Dependency
127
+ name: simplecov-lcov
128
+ requirement: !ruby/object:Gem::Requirement
129
+ requirements:
130
+ - - ">="
131
+ - !ruby/object:Gem::Version
132
+ version: '0'
133
+ type: :development
92
134
  prerelease: false
93
135
  version_requirements: !ruby/object:Gem::Requirement
94
136
  requirements:
@@ -102,26 +144,24 @@ executables: []
102
144
  extensions: []
103
145
  extra_rdoc_files: []
104
146
  files:
147
+ - ".github/workflows/ci.yml"
105
148
  - ".gitignore"
106
149
  - ".rspec"
107
- - ".travis.yml"
150
+ - ".rubocop.yml"
108
151
  - CODE_OF_CONDUCT.md
109
152
  - Gemfile
110
153
  - LICENSE.txt
111
154
  - README.md
112
155
  - Rakefile
113
- - gemfiles/ci.gemfile
114
- - lib/sequel.rb
115
156
  - lib/sequel/extensions/batches.rb
116
- - lib/sequel/extensions/batches/version.rb
157
+ - lib/sequel/extensions/batches/yielder.rb
117
158
  - log/.keep
118
159
  - sequel-batches.gemspec
119
160
  homepage: https://github.com/umbrellio/sequel-batches
120
161
  licenses:
121
162
  - MIT
122
- metadata:
123
- allowed_push_host: https://rubygems.org
124
- post_install_message:
163
+ metadata: {}
164
+ post_install_message:
125
165
  rdoc_options: []
126
166
  require_paths:
127
167
  - lib
@@ -129,15 +169,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
129
169
  requirements:
130
170
  - - ">="
131
171
  - !ruby/object:Gem::Version
132
- version: '0'
172
+ version: '2.6'
133
173
  required_rubygems_version: !ruby/object:Gem::Requirement
134
174
  requirements:
135
175
  - - ">="
136
176
  - !ruby/object:Gem::Version
137
177
  version: '0'
138
178
  requirements: []
139
- rubygems_version: 3.0.3
140
- signing_key:
179
+ rubygems_version: 3.3.19
180
+ signing_key:
141
181
  specification_version: 4
142
182
  summary: The extension mimics AR5 batches api
143
183
  test_files: []
data/.travis.yml DELETED
@@ -1,34 +0,0 @@
1
- sudo: false
2
-
3
- language: ruby
4
-
5
- rvm:
6
- - 2.3
7
- - 2.4
8
- - 2.5
9
- - 2.6
10
- - jruby-9.2.8.0
11
- - ruby-head
12
- - jruby-head
13
-
14
- before_install: gem install bundler
15
-
16
- env: SEQUEL_VERSION="~> 5.0"
17
-
18
- gemfile: gemfiles/ci.gemfile
19
-
20
- addons:
21
- postgresql: "9.6"
22
-
23
- services:
24
- - postgresql
25
-
26
- matrix:
27
- include:
28
- - rvm: 2.6
29
- env: SEQUEL_VERSION="~> 4.0"
30
- allow_failures:
31
- - rvm: ruby-head
32
- env: SEQUEL_VERSION="~> 5.0"
33
- - rvm: jruby-head
34
- env: SEQUEL_VERSION="~> 5.0"
data/gemfiles/ci.gemfile DELETED
@@ -1,15 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gemspec :path => '../'
4
-
5
- # MRI/Rubinius Adapter Dependencies
6
- platforms :ruby do
7
- gem "pg", "~>0.20.0"
8
- end
9
-
10
- # JRuby Adapter Dependencies
11
- platforms :jruby do
12
- gem 'jdbc-postgres', '~> 9.4'
13
- end
14
-
15
- gem "sequel", "#{ENV['SEQUEL_VERSION']}"
@@ -1,7 +0,0 @@
1
- module Sequel
2
- module Extensions
3
- module Batches
4
- VERSION = "0.2.1"
5
- end
6
- end
7
- end
data/lib/sequel.rb DELETED
@@ -1 +0,0 @@
1
- require "sequel/extensions/batches"