Skip to content

Commit

Permalink
Add support for Rails 8.0 (#179)
Browse files Browse the repository at this point in the history
* Add support for Rails 8.0

* Update `Appraisals`
* Update `.github/workflows/main.yml`
* Create `rails_8.0_vc_2.0.gemfile`
* Create `rails_8.0_vc_3.0.gemfile`
* Update `view_component-form.gemspec`
* Add a new CHANGELOG entry

* Remove Ruby 3.2 for Rails `head` in CI

Rails 8+ requires Ruby 3.3+.
  • Loading branch information
phlipper authored Nov 9, 2024
1 parent 1dea5ea commit ac32584
Show file tree
Hide file tree
Showing 7 changed files with 61 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- { ruby: "3.1", rails: "7.2", rubygems: "default" }
- { ruby: "3.2", rails: "7.2", rubygems: "default" }
- { ruby: "3.3", rails: "7.2", rubygems: "default" }
- { ruby: "3.2", rails: "head", rubygems: "latest" }
- { ruby: "3.3", rails: "8.0", rubygems: "default" }
- { ruby: "3.3", rails: "head", rubygems: "latest" }
action_text: ['with', 'without']
view_component: ['2.0', '3.0']
Expand All @@ -39,7 +39,7 @@ jobs:
- name: Update gemspec to test in head version
if: matrix.versions.rails == 'head'
run: |
sed -i -e 's/, "< 8.0"//g' view_component-form.gemspec
sed -i -e 's/, "< 8.1"//g' view_component-form.gemspec
- name: Set up Ruby
uses: ruby/setup-ruby@v1
Expand Down
11 changes: 11 additions & 0 deletions Appraisals
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,17 @@ appraise "rails-7.2_vc-3.0" do
gem "view_component", ">= 3.0.0", "< 4.0"
end

appraise "rails-8.0_vc-2.0" do
gem "rails", "~> 8.0.0"
gem "sqlite3", "~> 2.1", group: :test
end

appraise "rails-8.0_vc-3.0" do
gem "rails", "~> 8.0.0"
gem "sqlite3", "~> 2.1", group: :test
gem "view_component", ">= 3.0.0", "< 4.0"
end

appraise "rails-head_vc-2.0" do
gem "rails", github: "rails/rails", branch: "main"
gem "sqlite3", "~> 2.1", group: :test
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Added
- Support for Rails 8.0 (#179)

### Fixed
- Fix `object_errors` when `object` is `false` (#173)

Expand Down
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ PATH
remote: .
specs:
view_component-form (0.2.8)
actionview (>= 6.1.0, < 8.0)
activesupport (>= 6.1.0, < 8.0)
actionview (>= 6.1.0, < 8.1)
activesupport (>= 6.1.0, < 8.1)
view_component (>= 2.34.0, < 4.0)
zeitwerk (~> 2.5)

Expand Down
20 changes: 20 additions & 0 deletions gemfiles/rails_8.0_vc_2.0.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# This file was generated by Appraisal

source "https://rubygems.org"

gem "appraisal", require: false
gem "capybara", require: false
gem "combustion", "~> 1.3.7"
gem "generator_spec"
gem "rails", "~> 8.0.0"
gem "rake", "~> 13.0"
gem "rspec", "~> 3.0", require: false
gem "rspec-html-matchers"
gem "rspec-rails", require: false
gem "rubocop", require: false
gem "rubocop-performance", require: false
gem "rubocop-rspec", require: false
gem "simplecov", require: false, group: :test
gem "sqlite3", "~> 2.1", group: :test

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

source "https://rubygems.org"

gem "appraisal", require: false
gem "capybara", require: false
gem "combustion", "~> 1.3.7"
gem "generator_spec"
gem "rails", "~> 8.0.0"
gem "rake", "~> 13.0"
gem "rspec", "~> 3.0", require: false
gem "rspec-html-matchers"
gem "rspec-rails", require: false
gem "rubocop", require: false
gem "rubocop-performance", require: false
gem "rubocop-rspec", require: false
gem "simplecov", require: false, group: :test
gem "sqlite3", "~> 2.1", group: :test
gem "view_component", ">= 3.0.0", "< 4.0"

gemspec path: "../"
4 changes: 2 additions & 2 deletions view_component-form.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ Gem::Specification.new do |spec|

spec.required_ruby_version = Gem::Requirement.new(">= 3.0.0")

spec.add_dependency "actionview", [">= 6.1.0", "< 8.0"]
spec.add_dependency "activesupport", [">= 6.1.0", "< 8.0"]
spec.add_dependency "actionview", [">= 6.1.0", "< 8.1"]
spec.add_dependency "activesupport", [">= 6.1.0", "< 8.1"]
spec.add_dependency "view_component", [">= 2.34.0", "< 4.0"]
spec.add_dependency "zeitwerk", ["~> 2.5"]
end

0 comments on commit ac32584

Please sign in to comment.