Skip to content

Commit

Permalink
fix Gemfile
Browse files Browse the repository at this point in the history
* ensure it works with github actions
* ensure it picks the highest version in each major release
  • Loading branch information
yads committed Feb 14, 2024
1 parent 3445a24 commit 6cb7ac4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
1 change: 0 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ jobs:
fail-fast: false
matrix:
entry:
- { ruby: 'jruby-9.4.5.0', mongo: 'mongo:4.4', mongoid: '5' }
- { ruby: '2.7.1', mongo: 'mongo:4.4', mongoid: '6' }
- { ruby: '3.0.5', mongo: 'mongo:4.4', mongoid: '6' }
- { ruby: '3.1.3', mongo: 'mongo:4.4', mongoid: '6' }
Expand Down
14 changes: 5 additions & 9 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,15 @@ source 'http://rubygems.org'

gemspec

case version = ENV['MONGOID_VERSION'] || '7.0'
case version = ENV['MONGOID_VERSION'] || '8'
when 'HEAD'
gem 'mongoid', github: 'mongodb/mongoid'
when /^8/
gem 'mongoid', '~> 8'
when /^7/
gem 'mongoid', '~> 7.0'
gem 'mongoid', '~> 7'
when /^6/
gem 'mongoid', '~> 6.0'
when /^5/
gem 'mongoid', '~> 5.0'
when /^4/
gem 'mongoid', '~> 4.0'
when /^3/
gem 'mongoid', '~> 3.1'
gem 'mongoid', '~> 6'
else
gem 'mongoid', version
end
Expand Down

0 comments on commit 6cb7ac4

Please sign in to comment.