Skip to content

Commit

Permalink
Merge pull request #43 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
kbrock authored Feb 5, 2024
2 parents a0a4ea9 + e643c4d commit 5b98886
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ jobs:
strategy:
matrix:
ruby-version:
- '2.5'
- '2.6'
- '2.7'
- '3.0'
- '3.1'
rails-version:
- '6.0'
- '6.1'
- '7.0'
services:
postgres:
image: manageiq/postgresql:13
Expand Down
17 changes: 11 additions & 6 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,14 @@ source 'https://rubygems.org'
# Specify your gem's dependencies in manageiq-postgres_ha_admin.gemspec
gemspec

case ENV['TEST_RAILS_VERSION']
when "6.0"
gem "activesupport", "~>6.0.4"
when "6.1"
gem "activesupport", "~>6.1.4"
end
minimum_version =
case ENV['TEST_RAILS_VERSION']
when "6.0"
"~>6.0.4"
when "7.0"
"~>7.0.8"
else
"~>6.1.4"
end

gem "activesupport", minimum_version
2 changes: 1 addition & 1 deletion manageiq-postgres_ha_admin.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Gem::Specification.new do |spec|

spec.required_ruby_version = ">= 2.5.8"

spec.add_runtime_dependency "activesupport", ">=5.0", "< 7.0"
spec.add_runtime_dependency "activesupport", ">=5.0", "<7.1"
spec.add_runtime_dependency "awesome_spawn", "~> 1.4"
spec.add_runtime_dependency "manageiq-password", "< 2"
spec.add_runtime_dependency "pg"
Expand Down
8 changes: 7 additions & 1 deletion spec/config_handler/rails_config_handler_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

before do
@yml_file = Tempfile.new('database.yml')
yml_data = YAML.load(<<-DOC)
data = <<-DOC
---
base: &base
username: user
Expand All @@ -16,6 +16,12 @@
pool: 3
database: vmdb_test
DOC
yml_data =
if YAML.respond_to?(:safe_load)
YAML.safe_load(data, :aliases => true)
else
YAML.load(data)
end
File.write(@yml_file.path, yml_data.to_yaml)
end

Expand Down

0 comments on commit 5b98886

Please sign in to comment.