Skip to content

Commit e57c1bc

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

File tree

6 files changed

+3
-16
lines changed

6 files changed

+3
-16
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.0
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.0
1717
uses: ruby/setup-ruby@v1
1818
with:
19-
ruby-version: 2.7
19+
ruby-version: 3.0
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

lib/jit_preloader.rb

-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
require 'jit_preloader/preloader'
2323

2424
module JitPreloader
25-
Warning[:deprecated] = true
2625
def self.globally_enabled=(value)
2726
@enabled = value
2827
end

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|

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)