Skip to content

Commit

Permalink
remove warning and test; update github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
wendy-clio committed Jun 7, 2024
1 parent 4487727 commit 44d2727
Show file tree
Hide file tree
Showing 7 changed files with 4 additions and 16 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ jobs:
matrix:
gemfile:
- Gemfile
- Gemfile.5.2
- Gemfile.6.0
- Gemfile.6.1
env:
BUNDLE_GEMFILE: ${{ matrix.gemfile }}
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/gem-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
1 change: 0 additions & 1 deletion .rspec
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
--color
--warning
--require spec_helper
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -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
1 change: 0 additions & 1 deletion lib/jit_preloader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
require 'jit_preloader/preloader'

module JitPreloader
Warning[:deprecated] = true
def self.globally_enabled=(value)
@enabled = value
end
Expand Down
4 changes: 0 additions & 4 deletions lib/jit_preloader/preloader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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|
Expand Down
5 changes: 0 additions & 5 deletions spec/lib/jit_preloader/preloader_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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") }
Expand Down

0 comments on commit 44d2727

Please sign in to comment.