Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the broken test matrix and drop old rubies and rails (breaking change) #139

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 5 additions & 10 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,17 @@ jobs:
strategy:
matrix:
ruby-version:
- '2.7'
- '3.0'
- '3.1'
- '3.2'
- '3.3'
rails-version:
# rails 6.1 supports ruby >= 2.5
# rails 7.0 supports ruby >= 2.7
- '6.1'
- '7.0'
- '7.1'
include:
# rails 6.0 (security EOL 6/23?) supports ruby < 2.8 (2.7 EOL 3/23?;)
- ruby-version: '2.6'
rails-version: '6.0'
- ruby-version: '2.7'
rails-version: '6.0'
- '7.2'
exclude:
- ruby-version: '3.0'
rails-version: '7.2'
services:
postgres:
image: manageiq/postgresql:13
Expand Down
19 changes: 11 additions & 8 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,14 @@ require File.join(Bundler::Plugin.index.load_paths("bundler-inject")[0], "bundle
# Specify your gem's dependencies in inventory_refresh.gemspec
gemspec

case ENV['TEST_RAILS_VERSION']
when "5.2"
gem "activerecord", "~>5.2.6"
when "6.0"
gem "activerecord", "~>6.0.4"
when "6.1"
gem "activerecord", "~>6.1.4"
end
minimum_version =
case ENV['TEST_RAILS_VERSION']
when "7.2"
"~>7.2.1"
when "7.1"
"~>7.1.4"
else
"~>7.0.8"
end

gem "activerecord", minimum_version
3 changes: 2 additions & 1 deletion inventory_refresh.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ Gem::Specification.new do |spec|
spec.require_paths = ["lib"]
spec.metadata['rubygems_mfa_required'] = 'true'

spec.add_dependency "activerecord", ">=5.0", "<7.2"
spec.required_ruby_version = '>= 3.0'
spec.add_dependency "activerecord", ">=7.0.8", "<8.0"
spec.add_dependency "more_core_extensions", ">=3.5", "< 5"
spec.add_dependency "pg", "> 0"

Expand Down
3 changes: 2 additions & 1 deletion lib/inventory_refresh/inventory_collection/index/proxy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,8 @@ def lazy_find(manager_uuid = nil, opts = {}, ref: primary_index_ref, key: nil, d

raise ArgumentError, "only one of manager_uuid or manager_uuid_hash must be passed" unless !!manager_uuid ^ !!manager_uuid_hash.present?

ActiveSupport::Deprecation.warn("Passing a hash for options is deprecated and will be removed in an upcoming release.") if opts.present?
# TODO: switch to ActiveSupport.deprecator.warn once 7.1+ is a minimum, see: https://github.com/rails/rails/pull/47354
ActiveSupport::Deprecation.new.warn("Passing a hash for options is deprecated and will be removed in an upcoming release.") if opts.present?

manager_uuid ||= manager_uuid_hash

Expand Down