Skip to content

Commit

Permalink
Merge pull request #3544 from citizensadvice/update-ruby-rails-support
Browse files Browse the repository at this point in the history
Update supported Ruby and Rails versions
  • Loading branch information
davidrapson authored Nov 28, 2024
2 parents a84ad86 + be60c15 commit a6586fe
Show file tree
Hide file tree
Showing 14 changed files with 49 additions and 61 deletions.
24 changes: 9 additions & 15 deletions .github/workflows/ci-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,14 @@ jobs:
# Active Ruby versions (https://endoflife.date/ruby)
ruby_version: ['3.1', '3.2', '3.3']
# Active Rails versions (https://endoflife.date/rails)
rails_version: ['~> 7.0.0', '~> 7.1.0', '~> 7.2.0']
# Any supported ViewComponent versions
view_component_version: ['~> 3']
# Explicitly test a "legacy" configuration using an older Ruby, Rails,
# and ViewComponent version to represent applications that have not been
# upgraded yet with the expectation that we'll drop Rails 6.1 along with
# ViewComponent 2.x when Rails 6.1 goes end-of-life on October 1st 2024.
include:
rails_version: ['~> 7.0.0', '~> 7.1.0', '~> 7.2.0', '~> 8.0.0']
# Exclude certain ruby and rails combinations
exclude:
# Rails 8 supports ruby 3.2+
- ruby_version: '3.1'
rails_version: '~> 6.1'
view_component_version: '~> 2.82'
rails_version: '~> 8.0.0'
env:
RAILS_VERSION: ${{ matrix.rails_version }}
VIEW_COMPONENT_VERSION: ${{ matrix.view_component_version }}
defaults:
run:
working-directory: engine
Expand All @@ -67,7 +61,7 @@ jobs:
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
ruby-version: '3.3.1'
ruby-version: '3.3.5'
working-directory: engine
- run: bundle exec rubocop --format progress --format github
- run: bundle exec erblint --lint-all
Expand All @@ -93,7 +87,7 @@ jobs:
# Setup demo app
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3.1'
ruby-version: '3.3.5'
bundler-cache: true
working-directory: demo

Expand Down Expand Up @@ -150,7 +144,7 @@ jobs:
# Setup demo app
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3.1'
ruby-version: '3.3.5'
bundler-cache: true
working-directory: demo

Expand Down Expand Up @@ -192,7 +186,7 @@ jobs:
# Setup docs site
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3.1'
ruby-version: '3.3.5'
bundler-cache: true
working-directory: design-system-docs

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs-workflow-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
# Setup docs site
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3.1'
ruby-version: '3.3.5'
bundler-cache: true
working-directory: design-system-docs

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docs-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
# Setup docs site
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3.1'
ruby-version: '3.3.5'
bundler-cache: true
working-directory: design-system-docs

Expand Down Expand Up @@ -81,7 +81,7 @@ jobs:
# Setup docs site
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3.1'
ruby-version: '3.3.5'
bundler-cache: true
working-directory: design-system-docs

Expand Down
1 change: 1 addition & 0 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.3.5
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@

**New**
- Add support for Rails 8
- Drop support for Rails 6.1

## v6.2.0

### 13 November 2024
Expand Down
1 change: 0 additions & 1 deletion demo/.ruby-version

This file was deleted.

2 changes: 0 additions & 2 deletions demo/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

source "https://rubygems.org"

ruby "3.3.1"

# Rails
gem "rails", "~> 7.2.2"

Expand Down
7 changes: 2 additions & 5 deletions demo/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ PATH
remote: ../engine
specs:
citizens_advice_components (0.1.0)
actionpack (>= 6.0.0, < 8.0)
railties (>= 6.0.0, < 8.0)
actionpack (>= 7.0.0, < 9.0)
railties (>= 7.0.0, < 9.0)
view_component (>= 2.0.0, < 4.0)

GEM
Expand Down Expand Up @@ -306,8 +306,5 @@ DEPENDENCIES
tzinfo-data
web-console (>= 3.3.0)

RUBY VERSION
ruby 3.3.1p55

BUNDLED WITH
2.5.9
1 change: 0 additions & 1 deletion design-system-docs/.ruby-version

This file was deleted.

4 changes: 2 additions & 2 deletions design-system-docs/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ PATH
remote: ../engine
specs:
citizens_advice_components (0.1.0)
actionpack (>= 6.0.0, < 8.0)
railties (>= 6.0.0, < 8.0)
actionpack (>= 7.0.0, < 9.0)
railties (>= 7.0.0, < 9.0)
view_component (>= 2.0.0, < 4.0)

GEM
Expand Down
1 change: 0 additions & 1 deletion engine/.ruby-version

This file was deleted.

5 changes: 1 addition & 4 deletions engine/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ source "https://rubygems.org"

gemspec

rails_version = ENV.fetch("RAILS_VERSION", "~> 7.1.0").to_s
view_component_version = ENV.fetch("VIEW_COMPONENT_VERSION", "~> 3").to_s
rails_version = ENV.fetch("RAILS_VERSION", "~> 7.2.0").to_s

# rubocop:disable Bundler/DuplicatedGem
if rails_version == "main"
Expand All @@ -22,8 +21,6 @@ else
end
# rubocop:enable Bundler/DuplicatedGem

gem "view_component", view_component_version

group :development, :test do
gem "citizens-advice-style",
github: "citizensadvice/citizens-advice-style-ruby",
Expand Down
51 changes: 25 additions & 26 deletions engine/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -13,44 +13,44 @@ PATH
remote: .
specs:
citizens_advice_components (0.1.0)
actionpack (>= 6.0.0, < 8.0)
railties (>= 6.0.0, < 8.0)
actionpack (>= 7.0.0, < 9.0)
railties (>= 7.0.0, < 9.0)
view_component (>= 2.0.0, < 4.0)

GEM
remote: https://rubygems.org/
specs:
actionpack (7.1.5)
actionview (= 7.1.5)
activesupport (= 7.1.5)
actionpack (7.2.2)
actionview (= 7.2.2)
activesupport (= 7.2.2)
nokogiri (>= 1.8.5)
racc
rack (>= 2.2.4)
rack (>= 2.2.4, < 3.2)
rack-session (>= 1.0.1)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
actionview (7.1.5)
activesupport (= 7.1.5)
useragent (~> 0.16)
actionview (7.2.2)
activesupport (= 7.2.2)
builder (~> 3.1)
erubi (~> 1.11)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
activemodel (7.1.5)
activesupport (= 7.1.5)
activesupport (7.1.5)
activemodel (7.2.2)
activesupport (= 7.2.2)
activesupport (7.2.2)
base64
benchmark (>= 0.3)
bigdecimal
concurrent-ruby (~> 1.0, >= 1.0.2)
concurrent-ruby (~> 1.0, >= 1.3.1)
connection_pool (>= 2.2.5)
drb
i18n (>= 1.6, < 2)
logger (>= 1.4.2)
minitest (>= 5.1)
mutex_m
securerandom (>= 0.3)
tzinfo (~> 2.0)
tzinfo (~> 2.0, >= 2.0.5)
addressable (2.8.6)
public_suffix (>= 2.0.2, < 6.0)
ast (2.4.2)
Expand Down Expand Up @@ -115,7 +115,6 @@ GEM
mini_mime (1.1.5)
mini_portile2 (2.8.7)
minitest (5.25.1)
mutex_m (0.2.0)
nokogiri (1.16.7)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
Expand All @@ -132,7 +131,7 @@ GEM
rack (>= 3.0.0)
rack-test (2.1.0)
rack (>= 1.3)
rackup (2.2.0)
rackup (2.2.1)
rack (>= 3)
rails-dom-testing (2.2.0)
activesupport (>= 5.0.0)
Expand All @@ -144,17 +143,17 @@ GEM
rails-i18n (7.0.9)
i18n (>= 0.7, < 2)
railties (>= 6.0.0, < 8)
railties (7.1.5)
actionpack (= 7.1.5)
activesupport (= 7.1.5)
irb
railties (7.2.2)
actionpack (= 7.2.2)
activesupport (= 7.2.2)
irb (~> 1.13)
rackup (>= 1.0.0)
rake (>= 12.2)
thor (~> 1.0, >= 1.2.2)
zeitwerk (~> 2.6)
rainbow (3.1.1)
rake (13.2.1)
rdoc (6.7.0)
rdoc (6.8.1)
psych (>= 4.0.0)
regexp_parser (2.9.2)
reline (0.5.11)
Expand Down Expand Up @@ -221,29 +220,29 @@ GEM
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
unicode-display_width (2.6.0)
useragent (0.16.10)
view_component (3.20.0)
activesupport (>= 5.2.0, < 8.1)
concurrent-ruby (~> 1.0)
method_source (~> 1.0)
xpath (3.2.0)
nokogiri (~> 1.8)
zeitwerk (2.6.18)
zeitwerk (2.7.1)

PLATFORMS
ruby

DEPENDENCIES
actionpack (~> 7.1.0)
activemodel (~> 7.1.0)
actionpack (~> 7.2.0)
activemodel (~> 7.2.0)
capybara
citizens-advice-style!
citizens_advice_components!
erb_lint
i18n-tasks
railties (~> 7.1.0)
railties (~> 7.2.0)
rspec
rspec-rails
view_component (~> 3)

BUNDLED WITH
2.5.9
2 changes: 1 addition & 1 deletion engine/citizens_advice_components.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Gem::Specification.new do |spec|
spec.files = Dir["{app,config,lib}/**/*", "README.md"]

%w[actionpack railties].each do |rails_lib|
spec.add_dependency rails_lib, [">= 6.0.0", "< 8.0"]
spec.add_dependency rails_lib, [">= 7.0.0", "< 9.0"]
end

spec.add_dependency "view_component", [">= 2.0.0", "< 4.0"]
Expand Down

0 comments on commit a6586fe

Please sign in to comment.