Skip to content

Commit 72ccca7

Browse files
committed
Use appraisal-run to update all gemfiles, improve docs
1 parent 0820095 commit 72ccca7

File tree

12 files changed

+568
-28
lines changed

12 files changed

+568
-28
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ jobs:
2424
bundler-cache: true
2525
- name: Run benchmarks
2626
run: |
27-
bundle exec appraisal rails-8.0 rake partial_benchmark
28-
bundle exec appraisal rails-8.0 rake translatable_benchmark
27+
bundle exec appraisal rails-8.1 rake partial_benchmark
28+
bundle exec appraisal rails-8.1 rake translatable_benchmark
2929
test:
3030
name: test (Rails ${{ matrix.rails_version }}, Ruby ${{ matrix.ruby_version }})
3131
runs-on: ubuntu-latest
@@ -39,6 +39,8 @@ jobs:
3939
rails_version: "7.2"
4040
- ruby_version: "3.4"
4141
rails_version: "8.0"
42+
- ruby_version: "3.4"
43+
rails_version: "8.1"
4244
- ruby_version: "head"
4345
rails_version: "main"
4446
env:

Appraisals

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,17 @@ appraise "rails-8.0" do
3333
end
3434
end
3535

36+
appraise "rails-8.1" do
37+
ruby "~> 3.4.0"
38+
39+
gem "rails", "~> 8.1.0"
40+
41+
group :development, :test do
42+
gem "turbo-rails", "~> 2"
43+
gem "rspec-rails", "~> 8"
44+
end
45+
end
46+
3647
appraise "rails-main" do
3748
gem "rack", git: "https://github.com/rack/rack", ref: "8a4475a9f416a72e5b02bd7817e4a8ed684f29b0"
3849
gem "rails", github: "rails/rails", branch: "main"

Gemfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ ruby ruby_version
1313
group :development, :test do
1414
gem "allocation_stats"
1515
gem "appraisal", "~> 2"
16+
gem "appraisal-run", "~> 1.0"
1617
gem "benchmark-ips", "~> 2"
1718
gem "better_html"
1819
gem "bundler", "~> 2"
@@ -44,5 +45,3 @@ group :development, :test do
4445
gem "yard-activesupport-concern", "< 1"
4546
gem "yard", "< 1"
4647
end
47-
48-
gem "appraisal-run", "~> 1.0"

docs/CONTRIBUTING.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,25 @@ The codespace environment includes a minimal Rails app with ViewComponent instal
4545
2. Expose the port when prompted by the Visual Studio Code Web Editor.
4646
3. Add the external URL to the config block in `config/application.rb` as prompted by the error.
4747

48+
## Running tests with Appraisal
49+
50+
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.
51+
52+
1. Configure and install the dependencies: `bundle exec appraisal install`
53+
2. Make sure the tests pass: `appraisal-run gemfiles/*.gemfile -- bundle exec rake`
54+
55+
When a new version of Rails is released:
56+
57+
1. Add a new `appraise` block in `Appraisals`.
58+
2. Run `bundle exec appraisal generate`
59+
3. Make sure the tests pass: `appraisal-run gemfiles/*.gemfile -- bundle exec rake`
60+
4. Commit and push the changes.
61+
5. Release a new version.
62+
4863
## Submitting a pull request
4964

5065
1. [Fork](https://github.com/viewcomponent/view_component/fork) and clone the repository.
51-
1. Configure and install the dependencies: `bundle exec appraisal install`.
52-
2. Make sure the tests pass: `bundle exec appraisal rake` (see below for specific cases).
66+
2. Make sure the tests pass: `appraisal-run gemfiles/*.gemfile -- bundle exec rake`.
5367
3. Create a new branch: `git checkout -b my-branch-name`.
5468
4. Add tests, make the change, and make sure the tests still pass.
5569
5. Add an entry to the top of `docs/CHANGELOG.md` for the changes, no matter how small.

gemfiles/rails_7.1.gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ gem "rails", "~> 7.1.0"
99
group :development, :test do
1010
gem "allocation_stats"
1111
gem "appraisal", "~> 2"
12+
gem "appraisal-run", "~> 1.0"
1213
gem "benchmark-ips", "~> 2"
1314
gem "better_html"
1415
gem "bundler", "~> 2"

gemfiles/rails_7.1.gemfile.lock

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ PATH
22
remote: ..
33
specs:
44
view_component (4.0.2)
5-
activesupport (>= 7.1.0, < 8.1)
5+
activesupport (>= 7.1.0, < 8.2)
66
concurrent-ruby (~> 1)
77

88
GEM
@@ -93,6 +93,7 @@ GEM
9393
bundler
9494
rake
9595
thor (>= 0.14.0)
96+
appraisal-run (1.0.0)
9697
ast (2.4.3)
9798
base64 (0.3.0)
9899
benchmark (0.4.1)
@@ -355,16 +356,16 @@ GEM
355356
lint_roller (~> 1.1)
356357
rubocop-performance (~> 1.25.0)
357358
stringio (3.1.7)
358-
tailwindcss-rails (2.7.9-aarch64-linux)
359-
railties (>= 7.0.0)
360-
tailwindcss-rails (2.7.9-arm-linux)
361-
railties (>= 7.0.0)
362-
tailwindcss-rails (2.7.9-arm64-darwin)
363-
railties (>= 7.0.0)
364-
tailwindcss-rails (2.7.9-x86_64-darwin)
365-
railties (>= 7.0.0)
366-
tailwindcss-rails (2.7.9-x86_64-linux)
359+
tailwindcss-rails (4.3.0)
367360
railties (>= 7.0.0)
361+
tailwindcss-ruby (~> 4.0)
362+
tailwindcss-ruby (4.1.13)
363+
tailwindcss-ruby (4.1.13-aarch64-linux-gnu)
364+
tailwindcss-ruby (4.1.13-aarch64-linux-musl)
365+
tailwindcss-ruby (4.1.13-arm64-darwin)
366+
tailwindcss-ruby (4.1.13-x86_64-darwin)
367+
tailwindcss-ruby (4.1.13-x86_64-linux-gnu)
368+
tailwindcss-ruby (4.1.13-x86_64-linux-musl)
368369
temple (0.10.4)
369370
terminal-table (4.0.0)
370371
unicode-display_width (>= 1.1.1, < 4)
@@ -410,6 +411,7 @@ PLATFORMS
410411
DEPENDENCIES
411412
allocation_stats
412413
appraisal (~> 2)
414+
appraisal-run (~> 1.0)
413415
benchmark-ips (~> 2)
414416
better_html
415417
bundler (~> 2)
@@ -436,7 +438,7 @@ DEPENDENCIES
436438
slim (~> 5)
437439
sprockets-rails (~> 3)
438440
standard (~> 1)
439-
tailwindcss-rails (~> 2)
441+
tailwindcss-rails (~> 4)
440442
turbo-rails (~> 1)
441443
view_component!
442444
warning

gemfiles/rails_7.2.gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ gem "rails", "~> 7.2.0"
99
group :development, :test do
1010
gem "allocation_stats"
1111
gem "appraisal", "~> 2"
12+
gem "appraisal-run", "~> 1.0"
1213
gem "benchmark-ips", "~> 2"
1314
gem "better_html"
1415
gem "bundler", "~> 2"

gemfiles/rails_7.2.gemfile.lock

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ PATH
22
remote: ..
33
specs:
44
view_component (4.0.2)
5-
activesupport (>= 7.1.0, < 8.1)
5+
activesupport (>= 7.1.0, < 8.2)
66
concurrent-ruby (~> 1)
77

88
GEM
@@ -87,6 +87,7 @@ GEM
8787
bundler
8888
rake
8989
thor (>= 0.14.0)
90+
appraisal-run (1.0.0)
9091
ast (2.4.3)
9192
base64 (0.3.0)
9293
benchmark (0.4.1)
@@ -348,16 +349,16 @@ GEM
348349
lint_roller (~> 1.1)
349350
rubocop-performance (~> 1.25.0)
350351
stringio (3.1.7)
351-
tailwindcss-rails (2.7.9-aarch64-linux)
352-
railties (>= 7.0.0)
353-
tailwindcss-rails (2.7.9-arm-linux)
354-
railties (>= 7.0.0)
355-
tailwindcss-rails (2.7.9-arm64-darwin)
356-
railties (>= 7.0.0)
357-
tailwindcss-rails (2.7.9-x86_64-darwin)
358-
railties (>= 7.0.0)
359-
tailwindcss-rails (2.7.9-x86_64-linux)
352+
tailwindcss-rails (4.3.0)
360353
railties (>= 7.0.0)
354+
tailwindcss-ruby (~> 4.0)
355+
tailwindcss-ruby (4.1.13)
356+
tailwindcss-ruby (4.1.13-aarch64-linux-gnu)
357+
tailwindcss-ruby (4.1.13-aarch64-linux-musl)
358+
tailwindcss-ruby (4.1.13-arm64-darwin)
359+
tailwindcss-ruby (4.1.13-x86_64-darwin)
360+
tailwindcss-ruby (4.1.13-x86_64-linux-gnu)
361+
tailwindcss-ruby (4.1.13-x86_64-linux-musl)
361362
temple (0.10.4)
362363
terminal-table (4.0.0)
363364
unicode-display_width (>= 1.1.1, < 4)
@@ -403,6 +404,7 @@ PLATFORMS
403404
DEPENDENCIES
404405
allocation_stats
405406
appraisal (~> 2)
407+
appraisal-run (~> 1.0)
406408
benchmark-ips (~> 2)
407409
better_html
408410
bundler (~> 2)
@@ -429,7 +431,7 @@ DEPENDENCIES
429431
slim (~> 5)
430432
sprockets-rails (~> 3)
431433
standard (~> 1)
432-
tailwindcss-rails (~> 2)
434+
tailwindcss-rails (~> 4)
433435
turbo-rails (~> 2)
434436
view_component!
435437
warning

gemfiles/rails_8.0.gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ gem "rails", "~> 8.0.0"
99
group :development, :test do
1010
gem "allocation_stats"
1111
gem "appraisal", "~> 2"
12+
gem "appraisal-run", "~> 1.0"
1213
gem "benchmark-ips", "~> 2"
1314
gem "better_html"
1415
gem "bundler", "~> 2"

gemfiles/rails_8.1.gemfile

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# This file was generated by Appraisal
2+
3+
source "https://rubygems.org"
4+
5+
ruby "~> 3.4.0"
6+
7+
gem "rails", "~> 8.1.0"
8+
9+
group :development, :test do
10+
gem "allocation_stats"
11+
gem "appraisal", "~> 2"
12+
gem "appraisal-run", "~> 1.0"
13+
gem "benchmark-ips", "~> 2"
14+
gem "better_html"
15+
gem "bundler", "~> 2"
16+
gem "capybara", "~> 3"
17+
gem "cuprite"
18+
gem "dry-initializer", require: true
19+
gem "erb_lint"
20+
gem "haml", "~> 6"
21+
gem "jbuilder", "~> 2"
22+
gem "m", "~> 1"
23+
gem "method_source", "~> 1"
24+
gem "minitest", "~> 5"
25+
gem "propshaft", "~> 1"
26+
gem "puma", "~> 6"
27+
gem "rake", "~> 13"
28+
gem "rails-dom-testing", "~> 2.3.0"
29+
gem "redis"
30+
gem "rspec-rails", "~> 8"
31+
gem "rubocop-md", "~> 2"
32+
gem "selenium-webdriver", "~> 4"
33+
gem "simplecov-console", "< 1"
34+
gem "simplecov", "< 1"
35+
gem "slim", "~> 5"
36+
gem "sprockets-rails", "~> 3"
37+
gem "standard", "~> 1"
38+
gem "tailwindcss-rails", "~> 4"
39+
gem "turbo-rails", "~> 2"
40+
gem "warning"
41+
gem "yard-activesupport-concern", "< 1"
42+
gem "yard", "< 1"
43+
end
44+
45+
gemspec path: "../"

0 commit comments

Comments
 (0)