Skip to content

Commit b01c62a

Browse files
committed
remove warning and test; update github workflow
1 parent 4487727 commit b01c62a

File tree

11 files changed

+6
-164
lines changed

11 files changed

+6
-164
lines changed

.github/workflows/ci.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ jobs:
1414
matrix:
1515
gemfile:
1616
- Gemfile
17-
- Gemfile.5.2
18-
- Gemfile.6.0
1917
- Gemfile.6.1
2018
env:
2119
BUNDLE_GEMFILE: ${{ matrix.gemfile }}
@@ -24,7 +22,7 @@ jobs:
2422
- name: Set up Ruby ${{ matrix.ruby-version }}
2523
uses: ruby/setup-ruby@v1
2624
with:
27-
ruby-version: 2.7
25+
ruby-version: 3.1
2826
- name: Install dependencies
2927
run: bundle install
3028
- name: Run tests

.github/workflows/gem-push.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ jobs:
1313

1414
steps:
1515
- uses: actions/checkout@v4
16-
- name: Set up Ruby 2.7
16+
- name: Set up Ruby 3.1
1717
uses: ruby/setup-ruby@v1
1818
with:
19-
ruby-version: 2.7
19+
ruby-version: 3.1
2020

2121
- name: Publish to RubyGems
2222
env:

.rspec

-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
--color
2-
--warning
32
--require spec_helper

Gemfile

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
source 'https://rubygems.org'
22

33
gem "activerecord", ">=7"
4+
gem "sqlite3", "~> 1.4"
45
# Specify your gem's dependencies in jit_preloader.gemspec
56
gemspec

Gemfile.5.2

-6
This file was deleted.

Gemfile.5.2.lock

-72
This file was deleted.

lib/jit_preloader.rb

+1-4
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,15 @@
1111
if Gem::Version.new(ActiveRecord::VERSION::STRING) >= Gem::Version.new("7.0.0")
1212
require 'jit_preloader/active_record/associations/preloader/ar7_association'
1313
require 'jit_preloader/active_record/associations/preloader/ar7_branch'
14-
elsif Gem::Version.new(ActiveRecord::VERSION::STRING) >= Gem::Version.new("6.0.0")
14+
elsif Gem::Version.new(ActiveRecord::VERSION::STRING) >= Gem::Version.new("6.1.0")
1515
require 'jit_preloader/active_record/associations/preloader/ar6_association'
16-
elsif Gem::Version.new(ActiveRecord::VERSION::STRING) >= Gem::Version.new("5.2.2")
17-
require 'jit_preloader/active_record/associations/preloader/ar5_association'
1816
else
1917
require 'jit_preloader/active_record/associations/preloader/collection_association'
2018
require 'jit_preloader/active_record/associations/preloader/singular_association'
2119
end
2220
require 'jit_preloader/preloader'
2321

2422
module JitPreloader
25-
Warning[:deprecated] = true
2623
def self.globally_enabled=(value)
2724
@enabled = value
2825
end

lib/jit_preloader/active_record/associations/preloader/ar5_association.rb

-66
This file was deleted.

lib/jit_preloader/preloader.rb

-4
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@ class Preloader < ActiveRecord::Associations::Preloader
33

44
attr_accessor :records
55

6-
def foo(**kwargs)
7-
kwargs
8-
end
9-
106
if Gem::Version.new(ActiveRecord::VERSION::STRING) >= Gem::Version.new("7.0.0")
117
def self.attach(records)
128
new(records: records.dup, associations: nil).tap do |loader|

lib/jit_preloader/version.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module JitPreloader
2-
VERSION = "2.1.0"
2+
VERSION = "3.0.0"
33
end

spec/lib/jit_preloader/preloader_spec.rb

-5
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,6 @@
4949
->(event, data){ source_map[data[:source]] << data[:association] }
5050
end
5151

52-
53-
it "should warn about keyword arguments" do
54-
expect(described_class.new(records: nil, associations: nil).foo({a: 1})).to eq({a: 1})
55-
end
56-
5752
context "for single table inheritance" do
5853
context "when preloading an aggregate for a child model" do
5954
let!(:contact_book) { ContactBook.create(name: "The Yellow Pages") }

0 commit comments

Comments
 (0)