diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7882d6c..a57f005 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,8 +14,6 @@ jobs: matrix: gemfile: - Gemfile - - Gemfile.5.2 - - Gemfile.6.0 - Gemfile.6.1 env: BUNDLE_GEMFILE: ${{ matrix.gemfile }} @@ -24,7 +22,7 @@ jobs: - name: Set up Ruby ${{ matrix.ruby-version }} uses: ruby/setup-ruby@v1 with: - ruby-version: 2.7 + ruby-version: 3.0 - name: Install dependencies run: bundle install - name: Run tests diff --git a/.github/workflows/gem-push.yml b/.github/workflows/gem-push.yml index 44ea83e..b09cfd1 100644 --- a/.github/workflows/gem-push.yml +++ b/.github/workflows/gem-push.yml @@ -13,10 +13,10 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Set up Ruby 2.7 + - name: Set up Ruby 3.0 uses: ruby/setup-ruby@v1 with: - ruby-version: 2.7 + ruby-version: 3.0 - name: Publish to RubyGems env: diff --git a/.rspec b/.rspec index 4f8a7dd..83e16f8 100644 --- a/.rspec +++ b/.rspec @@ -1,3 +1,2 @@ --color ---warning --require spec_helper diff --git a/Gemfile b/Gemfile index 6aad51b..d8f73d7 100644 --- a/Gemfile +++ b/Gemfile @@ -1,5 +1,6 @@ source 'https://rubygems.org' gem "activerecord", ">=7" +gem "sqlite3", "~> 1.4" # Specify your gem's dependencies in jit_preloader.gemspec gemspec diff --git a/lib/jit_preloader.rb b/lib/jit_preloader.rb index 637201c..5301378 100644 --- a/lib/jit_preloader.rb +++ b/lib/jit_preloader.rb @@ -22,7 +22,6 @@ require 'jit_preloader/preloader' module JitPreloader - Warning[:deprecated] = true def self.globally_enabled=(value) @enabled = value end diff --git a/lib/jit_preloader/preloader.rb b/lib/jit_preloader/preloader.rb index e9b8035..d8c9c5d 100644 --- a/lib/jit_preloader/preloader.rb +++ b/lib/jit_preloader/preloader.rb @@ -3,10 +3,6 @@ class Preloader < ActiveRecord::Associations::Preloader attr_accessor :records - def foo(**kwargs) - kwargs - end - if Gem::Version.new(ActiveRecord::VERSION::STRING) >= Gem::Version.new("7.0.0") def self.attach(records) new(records: records.dup, associations: nil).tap do |loader| diff --git a/spec/lib/jit_preloader/preloader_spec.rb b/spec/lib/jit_preloader/preloader_spec.rb index 8b2ce55..69f7038 100644 --- a/spec/lib/jit_preloader/preloader_spec.rb +++ b/spec/lib/jit_preloader/preloader_spec.rb @@ -49,11 +49,6 @@ ->(event, data){ source_map[data[:source]] << data[:association] } end - - it "should warn about keyword arguments" do - expect(described_class.new(records: nil, associations: nil).foo({a: 1})).to eq({a: 1}) - end - context "for single table inheritance" do context "when preloading an aggregate for a child model" do let!(:contact_book) { ContactBook.create(name: "The Yellow Pages") }