diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4f8add1..2e91b79 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,7 +29,7 @@ jobs: strategy: fail-fast: false matrix: - ruby: ["2.7", "3.0", "3.1"] + ruby: ["3.0", "3.1", "3.2", "3.3"] name: ${{ matrix.ruby }} @@ -41,7 +41,6 @@ jobs: bundler-cache: true - run: psql -c 'CREATE DATABASE batches_test' - - run: bundle exec rake bundle:audit - run: bundle exec rake lint - run: bundle exec rspec diff --git a/.rubocop.yml b/.rubocop.yml index cc61dbf..dfb8e50 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -3,7 +3,7 @@ inherit_gem: AllCops: DisplayCopNames: true - TargetRubyVersion: 2.7 + TargetRubyVersion: 3.0 Include: - lib/**/*.rb - spec/**/*.rb diff --git a/Gemfile b/Gemfile index 7a3889d..d24c416 100644 --- a/Gemfile +++ b/Gemfile @@ -4,3 +4,12 @@ source "https://rubygems.org" # Specify your gem's dependencies in sequel-batches.gemspec gemspec + +gem "bundler" +gem "pg" +gem "pry" +gem "rake" +gem "rspec" +gem "rubocop-config-umbrellio" +gem "simplecov" +gem "simplecov-lcov" diff --git a/Gemfile.lock b/Gemfile.lock index 5057ac9..1c385c2 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -7,99 +7,123 @@ PATH GEM remote: https://rubygems.org/ specs: - activesupport (7.0.3.1) + activesupport (7.1.3.4) + base64 + bigdecimal concurrent-ruby (~> 1.0, >= 1.0.2) + connection_pool (>= 2.2.5) + drb i18n (>= 1.6, < 2) minitest (>= 5.1) + mutex_m tzinfo (~> 2.0) ast (2.4.2) - bundler-audit (0.9.1) - bundler (>= 1.2.0, < 3) - thor (~> 1.0) + base64 (0.2.0) + bigdecimal (3.1.8) coderay (1.1.3) - concurrent-ruby (1.1.10) - diff-lcs (1.5.0) + concurrent-ruby (1.3.3) + connection_pool (2.4.1) + diff-lcs (1.5.1) docile (1.4.0) - i18n (1.12.0) + drb (2.2.1) + i18n (1.14.5) concurrent-ruby (~> 1.0) - method_source (1.0.0) - minitest (5.16.2) - parallel (1.22.1) - parser (3.1.2.1) + json (2.7.2) + language_server-protocol (3.17.0.3) + method_source (1.1.0) + minitest (5.24.1) + mutex_m (0.2.0) + parallel (1.25.1) + parser (3.3.3.0) ast (~> 2.4.1) - pg (1.4.2) - pry (0.14.1) + racc + pg (1.5.6) + pry (0.14.2) coderay (~> 1.1) method_source (~> 1.0) - rack (2.2.4) + racc (1.8.0) + rack (3.1.4) rainbow (3.1.1) - rake (13.0.6) - regexp_parser (2.5.0) - rexml (3.2.5) - rspec (3.11.0) - rspec-core (~> 3.11.0) - rspec-expectations (~> 3.11.0) - rspec-mocks (~> 3.11.0) - rspec-core (3.11.0) - rspec-support (~> 3.11.0) - rspec-expectations (3.11.0) + rake (13.2.1) + regexp_parser (2.9.2) + rexml (3.3.1) + strscan + rspec (3.13.0) + rspec-core (~> 3.13.0) + rspec-expectations (~> 3.13.0) + rspec-mocks (~> 3.13.0) + rspec-core (3.13.0) + rspec-support (~> 3.13.0) + rspec-expectations (3.13.1) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.11.0) - rspec-mocks (3.11.1) + rspec-support (~> 3.13.0) + rspec-mocks (3.13.1) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.11.0) - rspec-support (3.11.0) - rubocop (1.30.1) + rspec-support (~> 3.13.0) + rspec-support (3.13.1) + rubocop (1.63.5) + json (~> 2.3) + language_server-protocol (>= 3.17.0) parallel (~> 1.10) - parser (>= 3.1.0.0) + parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 1.8, < 3.0) rexml (>= 3.2.5, < 4.0) - rubocop-ast (>= 1.18.0, < 2.0) + rubocop-ast (>= 1.31.1, < 2.0) ruby-progressbar (~> 1.7) - unicode-display_width (>= 1.4.0, < 3.0) - rubocop-ast (1.21.0) - parser (>= 3.1.1.0) - rubocop-config-umbrellio (1.30.0.65) - rubocop (~> 1.30.0) - rubocop-performance (~> 1.14.0) - rubocop-rails (~> 2.14.2) + unicode-display_width (>= 2.4.0, < 3.0) + rubocop-ast (1.31.3) + parser (>= 3.3.1.0) + rubocop-capybara (2.21.0) + rubocop (~> 1.41) + rubocop-config-umbrellio (1.63.0.93) + rubocop (~> 1.63.0) + rubocop-performance (~> 1.21.0) + rubocop-rails (~> 2.24.0) rubocop-rake (~> 0.6.0) - rubocop-rspec (~> 2.11.1) + rubocop-rspec (~> 2.29.0) rubocop-sequel (~> 0.3.3) - rubocop-performance (1.14.3) - rubocop (>= 1.7.0, < 2.0) - rubocop-ast (>= 0.4.0) - rubocop-rails (2.14.2) + rubocop-factory_bot (2.26.1) + rubocop (~> 1.61) + rubocop-performance (1.21.1) + rubocop (>= 1.48.1, < 2.0) + rubocop-ast (>= 1.31.1, < 2.0) + rubocop-rails (2.24.1) activesupport (>= 4.2.0) rack (>= 1.1) - rubocop (>= 1.7.0, < 2.0) + rubocop (>= 1.33.0, < 2.0) + rubocop-ast (>= 1.31.1, < 2.0) rubocop-rake (0.6.0) rubocop (~> 1.0) - rubocop-rspec (2.11.1) - rubocop (~> 1.19) + rubocop-rspec (2.29.2) + rubocop (~> 1.40) + rubocop-capybara (~> 2.17) + rubocop-factory_bot (~> 2.22) + rubocop-rspec_rails (~> 2.28) + rubocop-rspec_rails (2.29.1) + rubocop (~> 1.61) rubocop-sequel (0.3.4) rubocop (~> 1.0) - ruby-progressbar (1.11.0) - sequel (5.59.0) - simplecov (0.21.2) + ruby-progressbar (1.13.0) + sequel (5.81.0) + bigdecimal + simplecov (0.22.0) docile (~> 1.1) simplecov-html (~> 0.11) simplecov_json_formatter (~> 0.1) simplecov-html (0.12.3) simplecov-lcov (0.8.0) simplecov_json_formatter (0.1.4) - thor (1.2.1) - tzinfo (2.0.5) + strscan (3.1.0) + tzinfo (2.0.6) concurrent-ruby (~> 1.0) - unicode-display_width (2.2.0) + unicode-display_width (2.5.0) PLATFORMS ruby DEPENDENCIES bundler - bundler-audit pg pry rake @@ -110,4 +134,4 @@ DEPENDENCIES simplecov-lcov BUNDLED WITH - 2.3.19 + 2.5.14 diff --git a/Rakefile b/Rakefile index 9c78bf0..9378f54 100644 --- a/Rakefile +++ b/Rakefile @@ -1,7 +1,6 @@ # frozen_string_literal: true require "bundler/gem_tasks" -require "bundler/audit/task" require "rspec/core/rake_task" require "rubocop/rake_task" @@ -13,6 +12,5 @@ RuboCop::RakeTask.new(:lint) do |t| t.requires << "rubocop-rspec" t.requires << "rubocop-performance" end -Bundler::Audit::Task.new task default: %i[lint spec] diff --git a/lib/sequel/extensions/batches.rb b/lib/sequel/extensions/batches.rb index 3e9276e..db4e6d4 100644 --- a/lib/sequel/extensions/batches.rb +++ b/lib/sequel/extensions/batches.rb @@ -14,6 +14,6 @@ def in_batches(**options, &block) end end -::Sequel::Dataset.register_extension(:batches, Sequel::Extensions::Batches) +Sequel::Dataset.register_extension(:batches, Sequel::Extensions::Batches) require_relative "batches/yielder" diff --git a/sequel-batches.gemspec b/sequel-batches.gemspec index 83f3795..3bba60e 100644 --- a/sequel-batches.gemspec +++ b/sequel-batches.gemspec @@ -8,7 +8,7 @@ Gem::Specification.new do |spec| spec.version = "2.0.2" spec.authors = %w[fiscal-cliff umbrellio] spec.email = ["oss@umbrellio.biz"] - spec.required_ruby_version = ">= 2.7" + spec.required_ruby_version = ">= 3.0" spec.summary = "The extension mimics AR5 batches api" spec.description = "Allows you to split your dataset in batches" @@ -19,14 +19,4 @@ Gem::Specification.new do |spec| spec.require_paths = ["lib"] spec.add_runtime_dependency "sequel" - - spec.add_development_dependency "bundler" - spec.add_development_dependency "bundler-audit" - spec.add_development_dependency "pg" - spec.add_development_dependency "pry" - spec.add_development_dependency "rake" - spec.add_development_dependency "rspec" - spec.add_development_dependency "rubocop-config-umbrellio" - spec.add_development_dependency "simplecov" - spec.add_development_dependency "simplecov-lcov" end