Skip to content

Commit

Permalink
added new rails and drop support for old rails/ruby versions (#279)
Browse files Browse the repository at this point in the history
- prepare to drop CI support for Rails 6.1, Ruby 3.0
- added CI support for Rails 7.2, and Rails 8.0
  • Loading branch information
igorkasyanchuk authored Nov 8, 2024
1 parent fa64570 commit b155a0f
Show file tree
Hide file tree
Showing 9 changed files with 588 additions and 44 deletions.
21 changes: 14 additions & 7 deletions .github/workflows/minitest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,31 @@ jobs:
fail-fast: false
matrix:
ruby:
- '3.0'
- '3.1'
- '3.2'
- '3.3'
gemfile:
- rails_6_1_4
- rails_7_0
- rails_7_1
- rails_7_2
- rails_8_0
- rails_next
image_processor:
- vips
- mini_magick
exclude:
# ruby 3.2 only supports rails 7.0+
- ruby: '3.2'
gemfile: rails_6_1_4
# ruby 3.1 only supports rails 7.0+
- ruby: '3.1'
gemfile: rails_8_0
- gemfile: rails_6_1_4
- ruby: '3.3'
gemfile: rails_7_0
include:
- ruby: '3.0'
gemfile: rails_6_1_4
image_processor: vips
- ruby: '3.0'
gemfile: rails_6_1_4
# ruby 3.0 only supports rails 6.1+
image_processor: mini_magick
runs-on: ubuntu-latest
steps:
- name: Install libvips
Expand All @@ -47,3 +53,4 @@ jobs:

- name: Run tests
run: bundle exec rake test
continue-on-error: ${{ matrix.gemfile == 'rails_next' }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,5 @@ coverage/
test/dummy/db/combustion_test.sqlite3*

/.byebug_history

.tool-versions
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ gemspec

# This Rails version will be the one used when running `bundle exec rake test` locally
# Uncomment the line then run `bundle install`
# gem 'rails', '6.1.4'
# gem 'rails', '7.1.2'
# gem 'sqlite3', '~> 1.7'
# gem 'nokogiri', '~> 1.16', '>= 1.16.7'

Expand Down
165 changes: 132 additions & 33 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11,42 +11,83 @@ PATH
GEM
remote: https://rubygems.org/
specs:
actionpack (6.1.4)
actionview (= 6.1.4)
activesupport (= 6.1.4)
rack (~> 2.0, >= 2.0.9)
actioncable (7.1.2)
actionpack (= 7.1.2)
activesupport (= 7.1.2)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
zeitwerk (~> 2.6)
actionmailbox (7.1.2)
actionpack (= 7.1.2)
activejob (= 7.1.2)
activerecord (= 7.1.2)
activestorage (= 7.1.2)
activesupport (= 7.1.2)
mail (>= 2.7.1)
net-imap
net-pop
net-smtp
actionmailer (7.1.2)
actionpack (= 7.1.2)
actionview (= 7.1.2)
activejob (= 7.1.2)
activesupport (= 7.1.2)
mail (~> 2.5, >= 2.5.4)
net-imap
net-pop
net-smtp
rails-dom-testing (~> 2.2)
actionpack (7.1.2)
actionview (= 7.1.2)
activesupport (= 7.1.2)
nokogiri (>= 1.8.5)
racc
rack (>= 2.2.4)
rack-session (>= 1.0.1)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.2.0)
actionview (6.1.4)
activesupport (= 6.1.4)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
actiontext (7.1.2)
actionpack (= 7.1.2)
activerecord (= 7.1.2)
activestorage (= 7.1.2)
activesupport (= 7.1.2)
globalid (>= 0.6.0)
nokogiri (>= 1.8.5)
actionview (7.1.2)
activesupport (= 7.1.2)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.1, >= 1.2.0)
activejob (6.1.4)
activesupport (= 6.1.4)
erubi (~> 1.11)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
activejob (7.1.2)
activesupport (= 7.1.2)
globalid (>= 0.3.6)
activemodel (6.1.4)
activesupport (= 6.1.4)
activerecord (6.1.4)
activemodel (= 6.1.4)
activesupport (= 6.1.4)
activestorage (6.1.4)
actionpack (= 6.1.4)
activejob (= 6.1.4)
activerecord (= 6.1.4)
activesupport (= 6.1.4)
marcel (~> 1.0.0)
mini_mime (>= 1.1.0)
activesupport (6.1.4)
activemodel (7.1.2)
activesupport (= 7.1.2)
activerecord (7.1.2)
activemodel (= 7.1.2)
activesupport (= 7.1.2)
timeout (>= 0.4.0)
activestorage (7.1.2)
actionpack (= 7.1.2)
activejob (= 7.1.2)
activerecord (= 7.1.2)
activesupport (= 7.1.2)
marcel (~> 1.0)
activesupport (7.1.2)
base64
bigdecimal
concurrent-ruby (~> 1.0, >= 1.0.2)
connection_pool (>= 2.2.5)
drb
i18n (>= 1.6, < 2)
minitest (>= 5.1)
mutex_m
tzinfo (~> 2.0)
zeitwerk (~> 2.3)
addressable (2.8.7)
public_suffix (>= 2.0.2, < 7.0)
base64 (0.2.0)
bigdecimal (3.1.8)
builder (3.3.0)
coderay (1.1.3)
Expand All @@ -55,24 +96,37 @@ GEM
railties (>= 3.0.0)
thor (>= 0.14.6)
concurrent-ruby (1.3.3)
connection_pool (2.4.1)
crack (1.0.0)
bigdecimal
rexml
crass (1.0.6)
date (3.4.0)
docile (1.4.1)
drb (2.2.1)
erubi (1.13.0)
ffi (1.17.0)
ffi (1.17.0-arm64-darwin)
ffi (1.17.0-x86_64-darwin)
ffi (1.17.0-x86_64-linux-gnu)
globalid (1.2.1)
activesupport (>= 6.1)
hashdiff (1.1.1)
i18n (1.14.5)
concurrent-ruby (~> 1.0)
io-console (0.7.2)
irb (1.14.1)
rdoc (>= 4.0.0)
reline (>= 0.4.2)
logger (1.6.0)
loofah (2.22.0)
crass (~> 1.0.2)
nokogiri (>= 1.12.0)
mail (2.8.1)
mini_mime (>= 0.1.1)
net-imap
net-pop
net-smtp
marcel (1.0.4)
method_source (1.1.0)
mini_magick (5.0.1)
Expand All @@ -83,6 +137,17 @@ GEM
minitest (>= 4, < 6)
minitest-mock_expectations (1.2.0)
minitest-stub_any_instance (1.0.3)
mutex_m (0.2.0)
net-imap (0.5.0)
date
net-protocol
net-pop (0.1.2)
net-protocol
net-protocol (0.2.2)
timeout
net-smtp (0.5.0)
net-protocol
nio4r (2.7.4)
nokogiri (1.16.7)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
Expand All @@ -95,25 +160,52 @@ GEM
pry (0.14.2)
coderay (~> 1.1)
method_source (~> 1.0)
psych (5.2.0)
stringio
public_suffix (6.0.1)
racc (1.8.1)
rack (2.2.9)
rack-session (1.0.2)
rack (< 3)
rack-test (2.1.0)
rack (>= 1.3)
rackup (1.0.1)
rack (< 3)
webrick
rails (7.1.2)
actioncable (= 7.1.2)
actionmailbox (= 7.1.2)
actionmailer (= 7.1.2)
actionpack (= 7.1.2)
actiontext (= 7.1.2)
actionview (= 7.1.2)
activejob (= 7.1.2)
activemodel (= 7.1.2)
activerecord (= 7.1.2)
activestorage (= 7.1.2)
activesupport (= 7.1.2)
bundler (>= 1.15.0)
railties (= 7.1.2)
rails-dom-testing (2.2.0)
activesupport (>= 5.0.0)
minitest
nokogiri (>= 1.6)
rails-html-sanitizer (1.6.0)
loofah (~> 2.21)
nokogiri (~> 1.14)
railties (6.1.4)
actionpack (= 6.1.4)
activesupport (= 6.1.4)
method_source
rake (>= 0.13)
thor (~> 1.0)
railties (7.1.2)
actionpack (= 7.1.2)
activesupport (= 7.1.2)
irb
rackup (>= 1.0.0)
rake (>= 12.2)
thor (~> 1.0, >= 1.2.2)
zeitwerk (~> 2.6)
rake (13.2.1)
rdoc (6.7.0)
psych (>= 4.0.0)
reline (0.5.11)
io-console (~> 0.5)
rexml (3.3.7)
ruby-vips (2.2.2)
ffi (~> 1.12)
Expand All @@ -129,13 +221,19 @@ GEM
sqlite3 (1.7.3-arm64-darwin)
sqlite3 (1.7.3-x86_64-darwin)
sqlite3 (1.7.3-x86_64-linux)
stringio (3.1.2)
thor (1.3.1)
timeout (0.4.2)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
webmock (3.23.1)
addressable (>= 2.8.0)
crack (>= 0.3.2)
hashdiff (>= 0.4.0, < 2.0.0)
webrick (1.9.0)
websocket-driver (0.7.6)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
zeitwerk (2.6.16)

PLATFORMS
Expand All @@ -153,6 +251,7 @@ DEPENDENCIES
minitest-mock_expectations (~> 1.2, >= 1.2.0)
minitest-stub_any_instance (~> 1.0, >= 1.0.3)
pry
rails (= 7.1.2)
ruby-vips (>= 2.1.0)
simplecov
sqlite3
Expand Down
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -436,21 +436,24 @@ Then you can use the matchers with the syntax specified in the RSpec section, ju

To run tests in root folder of gem:

* `BUNDLE_GEMFILE=gemfiles/rails_6_1_4.gemfile bundle exec rake test` to run for Rails 6.1.4
* `BUNDLE_GEMFILE=gemfiles/rails_7_0.gemfile bundle exec rake test` to run for Rails 7.0
* `BUNDLE_GEMFILE=gemfiles/rails_7_1.gemfile bundle exec rake test` to run for Rails 7.1
* `BUNDLE_GEMFILE=gemfiles/rails_7_2.gemfile bundle exec rake test` to run for Rails 7.2
* `BUNDLE_GEMFILE=gemfiles/rails_8_0.gemfile bundle exec rake test` to run for Rails 8.0
* `BUNDLE_GEMFILE=gemfiles/rails_next.gemfile bundle exec rake test` to run for Rails main branch

Snippet to run in console:

```bash
BUNDLE_GEMFILE=gemfiles/rails_6_1_4.gemfile bundle
BUNDLE_GEMFILE=gemfiles/rails_7_0.gemfile bundle
BUNDLE_GEMFILE=gemfiles/rails_7_1.gemfile bundle
BUNDLE_GEMFILE=gemfiles/rails_7_2.gemfile bundle
BUNDLE_GEMFILE=gemfiles/rails_8_0.gemfile bundle
BUNDLE_GEMFILE=gemfiles/rails_next.gemfile bundle
BUNDLE_GEMFILE=gemfiles/rails_6_1_4.gemfile bundle exec rake test
BUNDLE_GEMFILE=gemfiles/rails_7_0.gemfile bundle exec rake test
BUNDLE_GEMFILE=gemfiles/rails_7_1.gemfile bundle exec rake test
BUNDLE_GEMFILE=gemfiles/rails_7_2.gemfile bundle exec rake test
BUNDLE_GEMFILE=gemfiles/rails_8_0.gemfile bundle exec rake test
BUNDLE_GEMFILE=gemfiles/rails_next.gemfile bundle exec rake test
```

Expand Down
7 changes: 7 additions & 0 deletions gemfiles/rails_7_2.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
source 'https://rubygems.org'

%w[activejob activemodel activestorage activesupport].each { |rails_subcomponent| gem rails_subcomponent, '~> 7.2.0' }

gemspec :path => '../'

gem 'nokogiri', '~> 1.16.7'
Loading

0 comments on commit b155a0f

Please sign in to comment.