Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ jobs:
rails_version: "7.2"
- ruby_version: "3.4"
rails_version: "8.0"
- ruby_version: "3.4"
rails_version: "8.1"
- ruby_version: "head"
rails_version: "main"
env:
Expand Down
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ruby 3.4.3
ruby 3.4.7
11 changes: 11 additions & 0 deletions Appraisals
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,17 @@ appraise "rails-8.0" do
end
end

appraise "rails-8.1" do
ruby "~> 3.4.0"

gem "rails", "~> 8.1.0"

group :development, :test do
gem "turbo-rails", "~> 2"
gem "rspec-rails", "~> 8"
end
end

appraise "rails-main" do
gem "rack", git: "https://github.com/rack/rack", ref: "8a4475a9f416a72e5b02bd7817e4a8ed684f29b0"
gem "rails", github: "rails/rails", branch: "main"
Expand Down
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ ruby ruby_version
group :development, :test do
gem "allocation_stats"
gem "appraisal", "~> 2"
gem "appraisal-run", "~> 1.0"
gem "benchmark-ips", "~> 2"
gem "better_html"
gem "bundler", "~> 2"
Expand Down
4 changes: 3 additions & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ PATH
remote: .
specs:
view_component (4.0.2)
activesupport (>= 7.1.0, < 8.1)
activesupport (>= 7.1.0, < 8.2)
concurrent-ruby (~> 1)

GEM
Expand Down Expand Up @@ -87,6 +87,7 @@ GEM
bundler
rake
thor (>= 0.14.0)
appraisal-run (1.0.0)
ast (2.4.3)
base64 (0.3.0)
benchmark (0.4.1)
Expand Down Expand Up @@ -404,6 +405,7 @@ PLATFORMS
DEPENDENCIES
allocation_stats
appraisal (~> 2)
appraisal-run (~> 1.0)
benchmark-ips (~> 2)
better_html
bundler (~> 2)
Expand Down
4 changes: 4 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ nav_order: 6

## main

* Add Rails 8.1 support.

*Hans Lemuet*

* Add Carwow to list of companies using ViewComponent.

*Tom Lord*
Expand Down
19 changes: 17 additions & 2 deletions docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,26 @@ The codespace environment includes a minimal Rails app with ViewComponent instal
2. Expose the port when prompted by the Visual Studio Code Web Editor.
3. Add the external URL to the config block in `config/application.rb` as prompted by the error.

## Running tests with Appraisal

This project uses [appraisal](https://github.com/thoughtbot/appraisal) to run tests for various versions of Ruby and Rails, and [appraisal-run](https://github.com/camertron/appraisal-run) to run them in Docker containers.

1. Install the dependencies: `bundle`
2. Make sure the tests pass: `appraisal-run gemfiles/*.gemfile -- bundle exec rake`

When a new version of Rails is released:

1. Add a new `appraise` block in `Appraisals`.
2. Run `bundle exec appraisal generate`
3. Update the gemfiles locks `appraisal-run gemfiles/*.gemfile -- bundle lock`
4. Make sure the tests pass: `appraisal-run gemfiles/*.gemfile -- bundle exec rake`
5. Commit and push the changes.
6. Release a new version.

## Submitting a pull request

1. [Fork](https://github.com/viewcomponent/view_component/fork) and clone the repository.
1. Configure and install the dependencies: `bundle exec appraisal install`.
2. Make sure the tests pass: `bundle exec appraisal rake` (see below for specific cases).
2. Make sure the tests pass: `appraisal-run gemfiles/*.gemfile -- bundle exec rake`.
3. Create a new branch: `git checkout -b my-branch-name`.
4. Add tests, make the change, and make sure the tests still pass.
5. Add an entry to the top of `docs/CHANGELOG.md` for the changes, no matter how small.
Expand Down
3 changes: 2 additions & 1 deletion gemfiles/rails_7.1.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ gem "rails", "~> 7.1.0"
group :development, :test do
gem "allocation_stats"
gem "appraisal", "~> 2"
gem "appraisal-run", "~> 1.0"
gem "benchmark-ips", "~> 2"
gem "better_html"
gem "bundler", "~> 2"
Expand All @@ -34,7 +35,7 @@ group :development, :test do
gem "slim", "~> 5"
gem "sprockets-rails", "~> 3"
gem "standard", "~> 1"
gem "tailwindcss-rails", "~> 2"
gem "tailwindcss-rails", "~> 4"
gem "turbo-rails", "~> 1"
gem "warning"
gem "yard-activesupport-concern", "< 1"
Expand Down
24 changes: 13 additions & 11 deletions gemfiles/rails_7.1.gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ PATH
remote: ..
specs:
view_component (4.0.2)
activesupport (>= 7.1.0, < 8.1)
activesupport (>= 7.1.0, < 8.2)
concurrent-ruby (~> 1)

GEM
Expand Down Expand Up @@ -93,6 +93,7 @@ GEM
bundler
rake
thor (>= 0.14.0)
appraisal-run (1.0.0)
ast (2.4.3)
base64 (0.3.0)
benchmark (0.4.1)
Expand Down Expand Up @@ -355,16 +356,16 @@ GEM
lint_roller (~> 1.1)
rubocop-performance (~> 1.25.0)
stringio (3.1.7)
tailwindcss-rails (2.7.9-aarch64-linux)
railties (>= 7.0.0)
tailwindcss-rails (2.7.9-arm-linux)
railties (>= 7.0.0)
tailwindcss-rails (2.7.9-arm64-darwin)
railties (>= 7.0.0)
tailwindcss-rails (2.7.9-x86_64-darwin)
railties (>= 7.0.0)
tailwindcss-rails (2.7.9-x86_64-linux)
tailwindcss-rails (4.3.0)
railties (>= 7.0.0)
tailwindcss-ruby (~> 4.0)
tailwindcss-ruby (4.1.13)
tailwindcss-ruby (4.1.13-aarch64-linux-gnu)
tailwindcss-ruby (4.1.13-aarch64-linux-musl)
tailwindcss-ruby (4.1.13-arm64-darwin)
tailwindcss-ruby (4.1.13-x86_64-darwin)
tailwindcss-ruby (4.1.13-x86_64-linux-gnu)
tailwindcss-ruby (4.1.13-x86_64-linux-musl)
temple (0.10.4)
terminal-table (4.0.0)
unicode-display_width (>= 1.1.1, < 4)
Expand Down Expand Up @@ -410,6 +411,7 @@ PLATFORMS
DEPENDENCIES
allocation_stats
appraisal (~> 2)
appraisal-run (~> 1.0)
benchmark-ips (~> 2)
better_html
bundler (~> 2)
Expand All @@ -436,7 +438,7 @@ DEPENDENCIES
slim (~> 5)
sprockets-rails (~> 3)
standard (~> 1)
tailwindcss-rails (~> 2)
tailwindcss-rails (~> 4)
turbo-rails (~> 1)
view_component!
warning
Expand Down
3 changes: 2 additions & 1 deletion gemfiles/rails_7.2.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ gem "rails", "~> 7.2.0"
group :development, :test do
gem "allocation_stats"
gem "appraisal", "~> 2"
gem "appraisal-run", "~> 1.0"
gem "benchmark-ips", "~> 2"
gem "better_html"
gem "bundler", "~> 2"
Expand All @@ -34,7 +35,7 @@ group :development, :test do
gem "slim", "~> 5"
gem "sprockets-rails", "~> 3"
gem "standard", "~> 1"
gem "tailwindcss-rails", "~> 2"
gem "tailwindcss-rails", "~> 4"
gem "turbo-rails", "~> 2"
gem "warning"
gem "yard-activesupport-concern", "< 1"
Expand Down
24 changes: 13 additions & 11 deletions gemfiles/rails_7.2.gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ PATH
remote: ..
specs:
view_component (4.0.2)
activesupport (>= 7.1.0, < 8.1)
activesupport (>= 7.1.0, < 8.2)
concurrent-ruby (~> 1)

GEM
Expand Down Expand Up @@ -87,6 +87,7 @@ GEM
bundler
rake
thor (>= 0.14.0)
appraisal-run (1.0.0)
ast (2.4.3)
base64 (0.3.0)
benchmark (0.4.1)
Expand Down Expand Up @@ -348,16 +349,16 @@ GEM
lint_roller (~> 1.1)
rubocop-performance (~> 1.25.0)
stringio (3.1.7)
tailwindcss-rails (2.7.9-aarch64-linux)
railties (>= 7.0.0)
tailwindcss-rails (2.7.9-arm-linux)
railties (>= 7.0.0)
tailwindcss-rails (2.7.9-arm64-darwin)
railties (>= 7.0.0)
tailwindcss-rails (2.7.9-x86_64-darwin)
railties (>= 7.0.0)
tailwindcss-rails (2.7.9-x86_64-linux)
tailwindcss-rails (4.3.0)
railties (>= 7.0.0)
tailwindcss-ruby (~> 4.0)
tailwindcss-ruby (4.1.13)
tailwindcss-ruby (4.1.13-aarch64-linux-gnu)
tailwindcss-ruby (4.1.13-aarch64-linux-musl)
tailwindcss-ruby (4.1.13-arm64-darwin)
tailwindcss-ruby (4.1.13-x86_64-darwin)
tailwindcss-ruby (4.1.13-x86_64-linux-gnu)
tailwindcss-ruby (4.1.13-x86_64-linux-musl)
temple (0.10.4)
terminal-table (4.0.0)
unicode-display_width (>= 1.1.1, < 4)
Expand Down Expand Up @@ -403,6 +404,7 @@ PLATFORMS
DEPENDENCIES
allocation_stats
appraisal (~> 2)
appraisal-run (~> 1.0)
benchmark-ips (~> 2)
better_html
bundler (~> 2)
Expand All @@ -429,7 +431,7 @@ DEPENDENCIES
slim (~> 5)
sprockets-rails (~> 3)
standard (~> 1)
tailwindcss-rails (~> 2)
tailwindcss-rails (~> 4)
turbo-rails (~> 2)
view_component!
warning
Expand Down
3 changes: 2 additions & 1 deletion gemfiles/rails_8.0.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ gem "rails", "~> 8.0.0"
group :development, :test do
gem "allocation_stats"
gem "appraisal", "~> 2"
gem "appraisal-run", "~> 1.0"
gem "benchmark-ips", "~> 2"
gem "better_html"
gem "bundler", "~> 2"
Expand All @@ -34,7 +35,7 @@ group :development, :test do
gem "slim", "~> 5"
gem "sprockets-rails", "~> 3"
gem "standard", "~> 1"
gem "tailwindcss-rails", "~> 2"
gem "tailwindcss-rails", "~> 4"
gem "turbo-rails", "~> 2"
gem "warning"
gem "yard-activesupport-concern", "< 1"
Expand Down
24 changes: 13 additions & 11 deletions gemfiles/rails_8.0.gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ PATH
remote: ..
specs:
view_component (4.0.2)
activesupport (>= 7.1.0, < 8.1)
activesupport (>= 7.1.0, < 8.2)
concurrent-ruby (~> 1)

GEM
Expand Down Expand Up @@ -87,6 +87,7 @@ GEM
bundler
rake
thor (>= 0.14.0)
appraisal-run (1.0.0)
ast (2.4.3)
base64 (0.3.0)
benchmark (0.4.1)
Expand Down Expand Up @@ -348,16 +349,16 @@ GEM
lint_roller (~> 1.1)
rubocop-performance (~> 1.25.0)
stringio (3.1.7)
tailwindcss-rails (2.7.9-aarch64-linux)
railties (>= 7.0.0)
tailwindcss-rails (2.7.9-arm-linux)
railties (>= 7.0.0)
tailwindcss-rails (2.7.9-arm64-darwin)
railties (>= 7.0.0)
tailwindcss-rails (2.7.9-x86_64-darwin)
railties (>= 7.0.0)
tailwindcss-rails (2.7.9-x86_64-linux)
tailwindcss-rails (4.3.0)
railties (>= 7.0.0)
tailwindcss-ruby (~> 4.0)
tailwindcss-ruby (4.1.13)
tailwindcss-ruby (4.1.13-aarch64-linux-gnu)
tailwindcss-ruby (4.1.13-aarch64-linux-musl)
tailwindcss-ruby (4.1.13-arm64-darwin)
tailwindcss-ruby (4.1.13-x86_64-darwin)
tailwindcss-ruby (4.1.13-x86_64-linux-gnu)
tailwindcss-ruby (4.1.13-x86_64-linux-musl)
temple (0.10.4)
terminal-table (4.0.0)
unicode-display_width (>= 1.1.1, < 4)
Expand Down Expand Up @@ -404,6 +405,7 @@ PLATFORMS
DEPENDENCIES
allocation_stats
appraisal (~> 2)
appraisal-run (~> 1.0)
benchmark-ips (~> 2)
better_html
bundler (~> 2)
Expand All @@ -430,7 +432,7 @@ DEPENDENCIES
slim (~> 5)
sprockets-rails (~> 3)
standard (~> 1)
tailwindcss-rails (~> 2)
tailwindcss-rails (~> 4)
turbo-rails (~> 2)
view_component!
warning
Expand Down
45 changes: 45 additions & 0 deletions gemfiles/rails_8.1.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# This file was generated by Appraisal

source "https://rubygems.org"

ruby "~> 3.4.0"

gem "rails", "~> 8.1.0"

group :development, :test do
gem "allocation_stats"
gem "appraisal", "~> 2"
gem "appraisal-run", "~> 1.0"
gem "benchmark-ips", "~> 2"
gem "better_html"
gem "bundler", "~> 2"
gem "capybara", "~> 3"
gem "cuprite"
gem "dry-initializer", require: true
gem "erb_lint"
gem "haml", "~> 6"
gem "jbuilder", "~> 2"
gem "m", "~> 1"
gem "method_source", "~> 1"
gem "minitest", "~> 5"
gem "propshaft", "~> 1"
gem "puma", "~> 6"
gem "rake", "~> 13"
gem "rails-dom-testing", "~> 2.3.0"
gem "redis"
gem "rspec-rails", "~> 8"
gem "rubocop-md", "~> 2"
gem "selenium-webdriver", "~> 4"
gem "simplecov-console", "< 1"
gem "simplecov", "< 1"
gem "slim", "~> 5"
gem "sprockets-rails", "~> 3"
gem "standard", "~> 1"
gem "tailwindcss-rails", "~> 4"
gem "turbo-rails", "~> 2"
gem "warning"
gem "yard-activesupport-concern", "< 1"
gem "yard", "< 1"
end

gemspec path: "../"
Loading
Loading