Skip to content

Commit

Permalink
Merge pull request #226 from jrafanie/allow_rails_7
Browse files Browse the repository at this point in the history
Allow rails 7 gems in gemspec
  • Loading branch information
agrare committed Jan 18, 2024
2 parents c243c02 + d88fc40 commit 793a6dd
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 3 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ jobs:
matrix:
ruby-version:
- '3.0'
rails-version:
- '6.1'
- '7.0'
services:
postgres:
image: manageiq/postgresql:13
Expand All @@ -26,6 +29,7 @@ jobs:
env:
PGHOST: localhost
PGPASSWORD: smartvm
TEST_RAILS_VERSION: ${{ matrix.rails-version }}
CC_TEST_REPORTER_ID: "${{ secrets.CC_TEST_REPORTER_ID }}"
steps:
- uses: actions/checkout@v4
Expand All @@ -37,6 +41,6 @@ jobs:
- name: Run tests
run: bundle exec rake
- name: Report code coverage
if: "${{ github.ref == 'refs/heads/master' && matrix.ruby-version == '3.0' }}"
if: "${{ github.ref == 'refs/heads/master' && matrix.ruby-version == '3.0' && matrix.rails-version == '6.1' }}"
continue-on-error: true
uses: paambaati/codeclimate-action@v5
11 changes: 11 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,14 @@ source 'https://rubygems.org'

# Specify your gem's dependencies in manageiq-appliance_console.gemspec
gemspec

minimum_version =
case ENV['TEST_RAILS_VERSION']
when "7.0"
"~>7.0.8"
else
"~>6.1.4"
end

gem "activerecord", minimum_version
gem "activesupport", minimum_version
4 changes: 2 additions & 2 deletions manageiq-appliance_console.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ Gem::Specification.new do |spec|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
spec.require_paths = ["lib"]

spec.add_runtime_dependency "activerecord", "~> 6.1.6", ">= 6.1.6.1"
spec.add_runtime_dependency "activesupport", "~> 6.1.6", ">= 6.1.6.1"
spec.add_runtime_dependency "activerecord", ">=6.1.7.6"
spec.add_runtime_dependency "activesupport", ">=6.1.7.6"
spec.add_runtime_dependency "awesome_spawn", "~> 1.6"
spec.add_runtime_dependency "bcrypt", "~> 3.1.10"
spec.add_runtime_dependency "bcrypt_pbkdf", ">= 1.0", "< 2.0"
Expand Down
6 changes: 6 additions & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,9 @@
config.add_setting :with_postgres_specs, :default => false
end
end

require "active_record"
require "active_support"
puts
puts "\e[93mUsing ActiveRecord #{ActiveRecord.version}\e[0m"
puts "\e[93mUsing ActiveSupport #{ActiveSupport.version}\e[0m"

0 comments on commit 793a6dd

Please sign in to comment.