Skip to content

Commit

Permalink
Support Rails 7.1 (#1889)
Browse files Browse the repository at this point in the history
* Support Rails 7.1

* Add changelog entry

* Use Ruby 3.2 in more places; give @reeganviljoen credit for the 7.1 upgrade :)

* Fix cache key

* More cache key fixes?

* Ok, let setup-ruby do the caching

* For f*cks sake
  • Loading branch information
camertron authored Oct 30, 2023
1 parent 07e0689 commit 170bf5e
Show file tree
Hide file tree
Showing 9 changed files with 74 additions and 13 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ jobs:
- rails_version: "main"
ruby_version: "3.1"
mode: "capture_patch_enabled"
- rails_version: "7.1.1"
ruby_version: "3.2"
mode: "capture_patch_enabled"
- rails_version: "main"
ruby_version: "3.2"
mode: "capture_patch_enabled"
Expand All @@ -60,6 +63,9 @@ jobs:
- rails_version: "main"
ruby_version: "3.1"
mode: "capture_patch_disabled"
- rails_version: "7.1.1"
ruby_version: "3.2"
mode: "capture_patch_disabled"
- rails_version: "main"
ruby_version: "3.2"
mode: "capture_patch_disabled"
Expand Down Expand Up @@ -105,7 +111,7 @@ jobs:
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.1
ruby-version: 3.2
- uses: actions/setup-node@v4
with:
node-version: 16
Expand All @@ -125,7 +131,7 @@ jobs:
bundle exec rake
env:
VIEW_COMPONENT_PATH: ../view_component
RAILS_VERSION: '7.0.3'
RAILS_VERSION: '7.1.1'
PARALLEL_WORKERS: '1'
coverage:
needs: test
Expand All @@ -148,4 +154,4 @@ jobs:
bundle update
bundle exec rake coverage:report
env:
RAILS_VERSION: '~> 7.0.0'
RAILS_VERSION: '~> 7.1.0'
8 changes: 4 additions & 4 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,16 +70,16 @@ jobs:
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
ruby-version: 3.2
- uses: actions/cache@v3
with:
path: vendor/bundle
key: gems-build-rails-main-ruby-2.7-${{ hashFiles('**/Gemfile.lock') }}
key: gems-build-rails-7.1-ruby-3.2-${{ hashFiles('**/Gemfile.lock') }}
- name: Lint with Rubocop and ERB Lint
run: |
bundle config path vendor/bundle
bundle install
bundle update
bundle exec standardrb -r "rubocop-md"
bundle exec erblint **/*.html.erb
env:
RAILS_VERSION: '~> 7.0.0'
RAILS_VERSION: '~> 7.1.0'
5 changes: 5 additions & 0 deletions Appraisals
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ appraise "rails-7.0" do
gem "tailwindcss-rails", "~> 2.0"
end

appraise "rails-7.1" do
gem "rails", "~> 7.1.0"
gem "tailwindcss-rails", "~> 2.0"
end

appraise "rails-head" do
gem "rails", github: "rails/rails", branch: "main"
gem "tailwindcss-rails", "~> 2.0"
Expand Down
9 changes: 7 additions & 2 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,20 @@ nav_order: 5

## main

* Document the capture compatibility patch on the Known issues page
* Support Rails 7.1 in CI.

*Reegan Viljoen*
*Cameron Dutro*

* Document the capture compatibility patch on the Known issues page.

*Simon Fish*

* Add Simundia to list of companies using ViewComponent.

*Alexandre Ignjatovic*

* Reduce UnboundMethod objects by memoizing initialize_parameters
* Reduce UnboundMethod objects by memoizing initialize_parameters.

*Rainer Borene*

Expand Down
9 changes: 8 additions & 1 deletion gemfiles/rails_6.0.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,14 @@ source "https://rubygems.org"

gem "capybara", "~> 3"
gem "rails", "~> 6.0.0"
gem "rspec-rails", "~> 5.1"
gem "rspec-rails", "~> 5"
gem "debug"
gem "tailwindcss-rails", "~> 2.0"

group :test do
gem "cuprite", "~> 0.8"
gem "puma", "~> 6"
gem "selenium-webdriver", "4.9.0"
end

gemspec path: "../"
9 changes: 8 additions & 1 deletion gemfiles/rails_6.1.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,17 @@ source "https://rubygems.org"

gem "capybara", "~> 3"
gem "rails", "~> 6.1.0"
gem "rspec-rails", "~> 5.1"
gem "rspec-rails", "~> 5"
gem "debug"
gem "tailwindcss-rails", "~> 2.0"
gem "net-smtp", require: false
gem "net-imap", require: false
gem "net-pop", require: false

group :test do
gem "cuprite", "~> 0.8"
gem "puma", "~> 6"
gem "selenium-webdriver", "4.9.0"
end

gemspec path: "../"
9 changes: 8 additions & 1 deletion gemfiles/rails_7.0.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,14 @@ source "https://rubygems.org"

gem "capybara", "~> 3"
gem "rails", "~> 7.0.0"
gem "rspec-rails", "~> 5.1"
gem "rspec-rails", "~> 5"
gem "debug"
gem "tailwindcss-rails", "~> 2.0"

group :test do
gem "cuprite", "~> 0.8"
gem "puma", "~> 6"
gem "selenium-webdriver", "4.9.0"
end

gemspec path: "../"
17 changes: 17 additions & 0 deletions gemfiles/rails_7.1.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# This file was generated by Appraisal

source "https://rubygems.org"

gem "capybara", "~> 3"
gem "rails", "~> 7.1.0"
gem "rspec-rails", "~> 5"
gem "debug"
gem "tailwindcss-rails", "~> 2.0"

group :test do
gem "cuprite", "~> 0.8"
gem "puma", "~> 6"
gem "selenium-webdriver", "4.9.0"
end

gemspec path: "../"
9 changes: 8 additions & 1 deletion gemfiles/rails_head.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,14 @@ source "https://rubygems.org"

gem "capybara", "~> 3"
gem "rails", github: "rails/rails", branch: "main"
gem "rspec-rails", "~> 5.1"
gem "rspec-rails", "~> 5"
gem "debug"
gem "tailwindcss-rails", "~> 2.0"

group :test do
gem "cuprite", "~> 0.8"
gem "puma", "~> 6"
gem "selenium-webdriver", "4.9.0"
end

gemspec path: "../"

0 comments on commit 170bf5e

Please sign in to comment.