diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 61a1125d1..554dcfb24 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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: diff --git a/.tool-versions b/.tool-versions index a72ead61f..3f03c7a73 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1 +1 @@ -ruby 3.4.3 +ruby 3.4.7 diff --git a/Appraisals b/Appraisals index f7cf718ed..b61b4a4bb 100644 --- a/Appraisals +++ b/Appraisals @@ -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" diff --git a/Gemfile b/Gemfile index 08590f018..e06e0be0b 100644 --- a/Gemfile +++ b/Gemfile @@ -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" diff --git a/Gemfile.lock b/Gemfile.lock index 7c3d1c48a..d40ce81d3 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -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 @@ -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) @@ -404,6 +405,7 @@ PLATFORMS DEPENDENCIES allocation_stats appraisal (~> 2) + appraisal-run (~> 1.0) benchmark-ips (~> 2) better_html bundler (~> 2) diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index f63af3faf..252505a1a 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -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* diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index 461d090a3..459be70f2 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -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. diff --git a/gemfiles/rails_7.1.gemfile b/gemfiles/rails_7.1.gemfile index c273e5765..0532c2b3a 100644 --- a/gemfiles/rails_7.1.gemfile +++ b/gemfiles/rails_7.1.gemfile @@ -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" @@ -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" diff --git a/gemfiles/rails_7.1.gemfile.lock b/gemfiles/rails_7.1.gemfile.lock index 348b8a156..7caec070a 100644 --- a/gemfiles/rails_7.1.gemfile.lock +++ b/gemfiles/rails_7.1.gemfile.lock @@ -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 @@ -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) @@ -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) @@ -410,6 +411,7 @@ PLATFORMS DEPENDENCIES allocation_stats appraisal (~> 2) + appraisal-run (~> 1.0) benchmark-ips (~> 2) better_html bundler (~> 2) @@ -436,7 +438,7 @@ DEPENDENCIES slim (~> 5) sprockets-rails (~> 3) standard (~> 1) - tailwindcss-rails (~> 2) + tailwindcss-rails (~> 4) turbo-rails (~> 1) view_component! warning diff --git a/gemfiles/rails_7.2.gemfile b/gemfiles/rails_7.2.gemfile index f63096814..88573b980 100644 --- a/gemfiles/rails_7.2.gemfile +++ b/gemfiles/rails_7.2.gemfile @@ -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" @@ -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" diff --git a/gemfiles/rails_7.2.gemfile.lock b/gemfiles/rails_7.2.gemfile.lock index 335dea94e..769a5a594 100644 --- a/gemfiles/rails_7.2.gemfile.lock +++ b/gemfiles/rails_7.2.gemfile.lock @@ -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 @@ -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) @@ -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) @@ -403,6 +404,7 @@ PLATFORMS DEPENDENCIES allocation_stats appraisal (~> 2) + appraisal-run (~> 1.0) benchmark-ips (~> 2) better_html bundler (~> 2) @@ -429,7 +431,7 @@ DEPENDENCIES slim (~> 5) sprockets-rails (~> 3) standard (~> 1) - tailwindcss-rails (~> 2) + tailwindcss-rails (~> 4) turbo-rails (~> 2) view_component! warning diff --git a/gemfiles/rails_8.0.gemfile b/gemfiles/rails_8.0.gemfile index b9537b1be..630ba6b7e 100644 --- a/gemfiles/rails_8.0.gemfile +++ b/gemfiles/rails_8.0.gemfile @@ -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" @@ -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" diff --git a/gemfiles/rails_8.0.gemfile.lock b/gemfiles/rails_8.0.gemfile.lock index fc2c7e111..0e25a00fc 100644 --- a/gemfiles/rails_8.0.gemfile.lock +++ b/gemfiles/rails_8.0.gemfile.lock @@ -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 @@ -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) @@ -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) @@ -404,6 +405,7 @@ PLATFORMS DEPENDENCIES allocation_stats appraisal (~> 2) + appraisal-run (~> 1.0) benchmark-ips (~> 2) better_html bundler (~> 2) @@ -430,7 +432,7 @@ DEPENDENCIES slim (~> 5) sprockets-rails (~> 3) standard (~> 1) - tailwindcss-rails (~> 2) + tailwindcss-rails (~> 4) turbo-rails (~> 2) view_component! warning diff --git a/gemfiles/rails_8.1.gemfile b/gemfiles/rails_8.1.gemfile new file mode 100644 index 000000000..ba0b075ae --- /dev/null +++ b/gemfiles/rails_8.1.gemfile @@ -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: "../" diff --git a/gemfiles/rails_8.1.gemfile.lock b/gemfiles/rails_8.1.gemfile.lock new file mode 100644 index 000000000..b8b95a54e --- /dev/null +++ b/gemfiles/rails_8.1.gemfile.lock @@ -0,0 +1,449 @@ +PATH + remote: .. + specs: + view_component (4.0.2) + activesupport (>= 7.1.0, < 8.2) + concurrent-ruby (~> 1) + +GEM + remote: https://rubygems.org/ + specs: + action_text-trix (2.1.15) + railties + actioncable (8.1.0) + actionpack (= 8.1.0) + activesupport (= 8.1.0) + nio4r (~> 2.0) + websocket-driver (>= 0.6.1) + zeitwerk (~> 2.6) + actionmailbox (8.1.0) + actionpack (= 8.1.0) + activejob (= 8.1.0) + activerecord (= 8.1.0) + activestorage (= 8.1.0) + activesupport (= 8.1.0) + mail (>= 2.8.0) + actionmailer (8.1.0) + actionpack (= 8.1.0) + actionview (= 8.1.0) + activejob (= 8.1.0) + activesupport (= 8.1.0) + mail (>= 2.8.0) + rails-dom-testing (~> 2.2) + actionpack (8.1.0) + actionview (= 8.1.0) + activesupport (= 8.1.0) + nokogiri (>= 1.8.5) + rack (>= 2.2.4) + rack-session (>= 1.0.1) + rack-test (>= 0.6.3) + rails-dom-testing (~> 2.2) + rails-html-sanitizer (~> 1.6) + useragent (~> 0.16) + actiontext (8.1.0) + action_text-trix (~> 2.1.15) + actionpack (= 8.1.0) + activerecord (= 8.1.0) + activestorage (= 8.1.0) + activesupport (= 8.1.0) + globalid (>= 0.6.0) + nokogiri (>= 1.8.5) + actionview (8.1.0) + activesupport (= 8.1.0) + builder (~> 3.1) + erubi (~> 1.11) + rails-dom-testing (~> 2.2) + rails-html-sanitizer (~> 1.6) + activejob (8.1.0) + activesupport (= 8.1.0) + globalid (>= 0.3.6) + activemodel (8.1.0) + activesupport (= 8.1.0) + activerecord (8.1.0) + activemodel (= 8.1.0) + activesupport (= 8.1.0) + timeout (>= 0.4.0) + activestorage (8.1.0) + actionpack (= 8.1.0) + activejob (= 8.1.0) + activerecord (= 8.1.0) + activesupport (= 8.1.0) + marcel (~> 1.0) + activesupport (8.1.0) + base64 + bigdecimal + concurrent-ruby (~> 1.0, >= 1.3.1) + connection_pool (>= 2.2.5) + drb + i18n (>= 1.6, < 2) + json + logger (>= 1.4.2) + minitest (>= 5.1) + securerandom (>= 0.3) + tzinfo (~> 2.0, >= 2.0.5) + uri (>= 0.13.1) + addressable (2.8.7) + public_suffix (>= 2.0.2, < 7.0) + allocation_stats (0.1.5) + ansi (1.5.0) + appraisal (2.5.0) + bundler + rake + thor (>= 0.14.0) + appraisal-run (1.0.0) + ast (2.4.3) + base64 (0.3.0) + benchmark-ips (2.14.0) + better_html (2.2.0) + actionview (>= 7.0) + activesupport (>= 7.0) + ast (~> 2.0) + erubi (~> 1.4) + parser (>= 2.4) + smart_properties + bigdecimal (3.3.1) + builder (3.3.0) + capybara (3.40.0) + addressable + matrix + mini_mime (>= 0.1.3) + nokogiri (~> 1.11) + rack (>= 1.6.0) + rack-test (>= 0.6.3) + regexp_parser (>= 1.5, < 3.0) + xpath (~> 3.2) + concurrent-ruby (1.3.5) + connection_pool (2.5.4) + crass (1.0.6) + cuprite (0.17) + capybara (~> 3.0) + ferrum (~> 0.17.0) + date (3.4.1) + diff-lcs (1.6.2) + docile (1.4.1) + drb (2.2.3) + dry-initializer (3.2.0) + erb (5.1.1) + erb_lint (0.9.0) + activesupport + better_html (>= 2.0.1) + parser (>= 2.7.1.4) + rainbow + rubocop (>= 1) + smart_properties + erubi (1.13.1) + ferrum (0.17.1) + addressable (~> 2.5) + base64 (~> 0.2) + concurrent-ruby (~> 1.1) + webrick (~> 1.7) + websocket-driver (~> 0.7) + globalid (1.3.0) + activesupport (>= 6.1) + haml (6.3.0) + temple (>= 0.8.2) + thor + tilt + i18n (1.14.7) + concurrent-ruby (~> 1.0) + io-console (0.8.1) + irb (1.15.2) + pp (>= 0.6.0) + rdoc (>= 4.0.0) + reline (>= 0.4.2) + jbuilder (2.14.1) + actionview (>= 7.0.0) + activesupport (>= 7.0.0) + json (2.15.1) + language_server-protocol (3.17.0.5) + lint_roller (1.1.0) + logger (1.7.0) + loofah (2.24.1) + crass (~> 1.0.2) + nokogiri (>= 1.12.0) + m (1.6.2) + method_source (>= 0.6.7) + rake (>= 0.9.2.2) + mail (2.9.0) + logger + mini_mime (>= 0.1.1) + net-imap + net-pop + net-smtp + marcel (1.1.0) + matrix (0.4.3) + method_source (1.1.0) + mini_mime (1.1.5) + minitest (5.26.0) + net-imap (0.5.12) + date + net-protocol + net-pop (0.1.2) + net-protocol + net-protocol (0.2.2) + timeout + net-smtp (0.5.1) + net-protocol + nio4r (2.7.4) + nokogiri (1.18.10-aarch64-linux-gnu) + racc (~> 1.4) + nokogiri (1.18.10-aarch64-linux-musl) + racc (~> 1.4) + nokogiri (1.18.10-arm-linux-gnu) + racc (~> 1.4) + nokogiri (1.18.10-arm-linux-musl) + racc (~> 1.4) + nokogiri (1.18.10-arm64-darwin) + racc (~> 1.4) + nokogiri (1.18.10-x86_64-darwin) + racc (~> 1.4) + nokogiri (1.18.10-x86_64-linux-gnu) + racc (~> 1.4) + nokogiri (1.18.10-x86_64-linux-musl) + racc (~> 1.4) + parallel (1.27.0) + parser (3.3.9.0) + ast (~> 2.4.1) + racc + pp (0.6.3) + prettyprint + prettyprint (0.2.0) + prism (1.6.0) + propshaft (1.3.1) + actionpack (>= 7.0.0) + activesupport (>= 7.0.0) + rack + psych (5.2.6) + date + stringio + public_suffix (6.0.2) + puma (6.6.1) + nio4r (~> 2.0) + racc (1.8.1) + rack (3.2.3) + rack-session (2.1.1) + base64 (>= 0.1.0) + rack (>= 3.0.0) + rack-test (2.2.0) + rack (>= 1.3) + rackup (2.2.1) + rack (>= 3) + rails (8.1.0) + actioncable (= 8.1.0) + actionmailbox (= 8.1.0) + actionmailer (= 8.1.0) + actionpack (= 8.1.0) + actiontext (= 8.1.0) + actionview (= 8.1.0) + activejob (= 8.1.0) + activemodel (= 8.1.0) + activerecord (= 8.1.0) + activestorage (= 8.1.0) + activesupport (= 8.1.0) + bundler (>= 1.15.0) + railties (= 8.1.0) + rails-dom-testing (2.3.0) + activesupport (>= 5.0.0) + minitest + nokogiri (>= 1.6) + rails-html-sanitizer (1.6.2) + loofah (~> 2.21) + nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0) + railties (8.1.0) + actionpack (= 8.1.0) + activesupport (= 8.1.0) + irb (~> 1.13) + rackup (>= 1.0.0) + rake (>= 12.2) + thor (~> 1.0, >= 1.2.2) + tsort (>= 0.2) + zeitwerk (~> 2.6) + rainbow (3.1.1) + rake (13.3.0) + rdoc (6.15.0) + erb + psych (>= 4.0.0) + tsort + redis (5.4.1) + redis-client (>= 0.22.0) + redis-client (0.26.1) + connection_pool + regexp_parser (2.11.3) + reline (0.6.2) + io-console (~> 0.5) + rexml (3.4.4) + rspec-core (3.13.6) + rspec-support (~> 3.13.0) + rspec-expectations (3.13.5) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.13.0) + rspec-mocks (3.13.6) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.13.0) + rspec-rails (8.0.2) + actionpack (>= 7.2) + activesupport (>= 7.2) + railties (>= 7.2) + rspec-core (~> 3.13) + rspec-expectations (~> 3.13) + rspec-mocks (~> 3.13) + rspec-support (~> 3.13) + rspec-support (3.13.6) + rubocop (1.80.2) + json (~> 2.3) + language_server-protocol (~> 3.17.0.2) + lint_roller (~> 1.1.0) + parallel (~> 1.10) + parser (>= 3.3.0.2) + rainbow (>= 2.2.2, < 4.0) + regexp_parser (>= 2.9.3, < 3.0) + rubocop-ast (>= 1.46.0, < 2.0) + ruby-progressbar (~> 1.7) + unicode-display_width (>= 2.4.0, < 4.0) + rubocop-ast (1.47.1) + parser (>= 3.3.7.2) + prism (~> 1.4) + rubocop-md (2.0.3) + lint_roller (~> 1.1) + rubocop (>= 1.72.1) + rubocop-performance (1.25.0) + lint_roller (~> 1.1) + rubocop (>= 1.75.0, < 2.0) + rubocop-ast (>= 1.38.0, < 2.0) + ruby-progressbar (1.13.0) + rubyzip (3.2.0) + securerandom (0.4.1) + selenium-webdriver (4.37.0) + base64 (~> 0.2) + logger (~> 1.4) + rexml (~> 3.2, >= 3.2.5) + rubyzip (>= 1.2.2, < 4.0) + websocket (~> 1.0) + simplecov (0.22.0) + docile (~> 1.1) + simplecov-html (~> 0.11) + simplecov_json_formatter (~> 0.1) + simplecov-console (0.9.4) + ansi + simplecov + terminal-table + simplecov-html (0.13.2) + simplecov_json_formatter (0.1.4) + slim (5.2.1) + temple (~> 0.10.0) + tilt (>= 2.1.0) + smart_properties (1.17.0) + sprockets (4.2.2) + concurrent-ruby (~> 1.0) + logger + rack (>= 2.2.4, < 4) + sprockets-rails (3.5.2) + actionpack (>= 6.1) + activesupport (>= 6.1) + sprockets (>= 3.0.0) + standard (1.51.1) + language_server-protocol (~> 3.17.0.2) + lint_roller (~> 1.0) + rubocop (~> 1.80.2) + standard-custom (~> 1.0.0) + standard-performance (~> 1.8) + standard-custom (1.0.2) + lint_roller (~> 1.0) + rubocop (~> 1.50) + standard-performance (1.8.0) + lint_roller (~> 1.1) + rubocop-performance (~> 1.25.0) + stringio (3.1.7) + 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) + thor (1.4.0) + tilt (2.6.1) + timeout (0.4.3) + tsort (0.2.0) + turbo-rails (2.0.17) + actionpack (>= 7.1.0) + railties (>= 7.1.0) + tzinfo (2.0.6) + concurrent-ruby (~> 1.0) + unicode-display_width (3.2.0) + unicode-emoji (~> 4.1) + unicode-emoji (4.1.0) + uri (1.0.4) + useragent (0.16.11) + warning (1.5.0) + webrick (1.9.1) + websocket (1.2.11) + websocket-driver (0.8.0) + base64 + websocket-extensions (>= 0.1.0) + websocket-extensions (0.1.5) + xpath (3.2.0) + nokogiri (~> 1.8) + yard (0.9.37) + yard-activesupport-concern (0.0.1) + yard (>= 0.8) + zeitwerk (2.7.3) + +PLATFORMS + aarch64-linux-gnu + aarch64-linux-musl + arm-linux-gnu + arm-linux-musl + arm64-darwin + x86_64-darwin + x86_64-linux-gnu + x86_64-linux-musl + +DEPENDENCIES + allocation_stats + appraisal (~> 2) + appraisal-run (~> 1.0) + benchmark-ips (~> 2) + better_html + bundler (~> 2) + capybara (~> 3) + cuprite + dry-initializer + erb_lint + haml (~> 6) + jbuilder (~> 2) + m (~> 1) + method_source (~> 1) + minitest (~> 5) + propshaft (~> 1) + puma (~> 6) + rails (~> 8.1.0) + rails-dom-testing (~> 2.3.0) + rake (~> 13) + redis + rspec-rails (~> 8) + rubocop-md (~> 2) + selenium-webdriver (~> 4) + simplecov (< 1) + simplecov-console (< 1) + slim (~> 5) + sprockets-rails (~> 3) + standard (~> 1) + tailwindcss-rails (~> 4) + turbo-rails (~> 2) + view_component! + warning + yard (< 1) + yard-activesupport-concern (< 1) + +RUBY VERSION + ruby 3.4.7p58 + +BUNDLED WITH + 2.6.2 diff --git a/gemfiles/rails_main.gemfile b/gemfiles/rails_main.gemfile index 20df3c264..7a301df8c 100644 --- a/gemfiles/rails_main.gemfile +++ b/gemfiles/rails_main.gemfile @@ -10,6 +10,7 @@ gem "rack", git: "https://github.com/rack/rack", ref: "8a4475a9f416a72e5b02bd781 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" @@ -35,7 +36,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" diff --git a/gemfiles/rails_main.gemfile.lock b/gemfiles/rails_main.gemfile.lock new file mode 100644 index 000000000..6dc7a3f39 --- /dev/null +++ b/gemfiles/rails_main.gemfile.lock @@ -0,0 +1,461 @@ +GIT + remote: https://github.com/rack/rack + revision: 8a4475a9f416a72e5b02bd7817e4a8ed684f29b0 + ref: 8a4475a9f416a72e5b02bd7817e4a8ed684f29b0 + specs: + rack (3.1.1) + +GIT + remote: https://github.com/rails/rails.git + revision: e66cd375ff553578533a6d2232c3f4ecb154933f + branch: main + specs: + actioncable (8.2.0.alpha) + actionpack (= 8.2.0.alpha) + activesupport (= 8.2.0.alpha) + nio4r (~> 2.0) + websocket-driver (>= 0.6.1) + zeitwerk (~> 2.6) + actionmailbox (8.2.0.alpha) + actionpack (= 8.2.0.alpha) + activejob (= 8.2.0.alpha) + activerecord (= 8.2.0.alpha) + activestorage (= 8.2.0.alpha) + activesupport (= 8.2.0.alpha) + mail (>= 2.8.0) + actionmailer (8.2.0.alpha) + actionpack (= 8.2.0.alpha) + actionview (= 8.2.0.alpha) + activejob (= 8.2.0.alpha) + activesupport (= 8.2.0.alpha) + mail (>= 2.8.0) + rails-dom-testing (~> 2.2) + actionpack (8.2.0.alpha) + actionview (= 8.2.0.alpha) + activesupport (= 8.2.0.alpha) + nokogiri (>= 1.8.5) + rack (>= 2.2.4) + rack-session (>= 1.0.1) + rack-test (>= 0.6.3) + rails-dom-testing (~> 2.2) + rails-html-sanitizer (~> 1.6) + useragent (~> 0.16) + actiontext (8.2.0.alpha) + action_text-trix (~> 2.1.15) + actionpack (= 8.2.0.alpha) + activerecord (= 8.2.0.alpha) + activestorage (= 8.2.0.alpha) + activesupport (= 8.2.0.alpha) + globalid (>= 0.6.0) + nokogiri (>= 1.8.5) + actionview (8.2.0.alpha) + activesupport (= 8.2.0.alpha) + builder (~> 3.1) + erubi (~> 1.11) + rails-dom-testing (~> 2.2) + rails-html-sanitizer (~> 1.6) + activejob (8.2.0.alpha) + activesupport (= 8.2.0.alpha) + globalid (>= 0.3.6) + activemodel (8.2.0.alpha) + activesupport (= 8.2.0.alpha) + activerecord (8.2.0.alpha) + activemodel (= 8.2.0.alpha) + activesupport (= 8.2.0.alpha) + timeout (>= 0.4.0) + activestorage (8.2.0.alpha) + actionpack (= 8.2.0.alpha) + activejob (= 8.2.0.alpha) + activerecord (= 8.2.0.alpha) + activesupport (= 8.2.0.alpha) + marcel (~> 1.0) + activesupport (8.2.0.alpha) + base64 + bigdecimal + concurrent-ruby (~> 1.0, >= 1.3.1) + connection_pool (>= 2.2.5) + drb + i18n (>= 1.6, < 2) + json + logger (>= 1.4.2) + minitest (>= 5.1) + securerandom (>= 0.3) + tzinfo (~> 2.0, >= 2.0.5) + uri (>= 0.13.1) + rails (8.2.0.alpha) + actioncable (= 8.2.0.alpha) + actionmailbox (= 8.2.0.alpha) + actionmailer (= 8.2.0.alpha) + actionpack (= 8.2.0.alpha) + actiontext (= 8.2.0.alpha) + actionview (= 8.2.0.alpha) + activejob (= 8.2.0.alpha) + activemodel (= 8.2.0.alpha) + activerecord (= 8.2.0.alpha) + activestorage (= 8.2.0.alpha) + activesupport (= 8.2.0.alpha) + bundler (>= 1.15.0) + railties (= 8.2.0.alpha) + railties (8.2.0.alpha) + actionpack (= 8.2.0.alpha) + activesupport (= 8.2.0.alpha) + irb (~> 1.13) + rackup (>= 1.0.0) + rake (>= 12.2) + thor (~> 1.0, >= 1.2.2) + tsort (>= 0.2) + zeitwerk (~> 2.6) + +PATH + remote: .. + specs: + view_component (4.0.2) + activesupport (>= 7.1.0, < 8.2) + concurrent-ruby (~> 1) + +GEM + remote: https://rubygems.org/ + specs: + action_text-trix (2.1.15) + railties + addressable (2.8.7) + public_suffix (>= 2.0.2, < 7.0) + allocation_stats (0.1.5) + ansi (1.5.0) + appraisal (2.5.0) + bundler + rake + thor (>= 0.14.0) + appraisal-run (1.0.0) + ast (2.4.3) + base64 (0.3.0) + benchmark-ips (2.14.0) + better_html (2.2.0) + actionview (>= 7.0) + activesupport (>= 7.0) + ast (~> 2.0) + erubi (~> 1.4) + parser (>= 2.4) + smart_properties + bigdecimal (3.3.1) + builder (3.3.0) + capybara (3.40.0) + addressable + matrix + mini_mime (>= 0.1.3) + nokogiri (~> 1.11) + rack (>= 1.6.0) + rack-test (>= 0.6.3) + regexp_parser (>= 1.5, < 3.0) + xpath (~> 3.2) + concurrent-ruby (1.3.5) + connection_pool (2.5.4) + crass (1.0.6) + cuprite (0.17) + capybara (~> 3.0) + ferrum (~> 0.17.0) + date (3.4.1) + diff-lcs (1.6.2) + docile (1.4.1) + drb (2.2.3) + dry-initializer (3.2.0) + erb (5.1.1) + erb_lint (0.9.0) + activesupport + better_html (>= 2.0.1) + parser (>= 2.7.1.4) + rainbow + rubocop (>= 1) + smart_properties + erubi (1.13.1) + ferrum (0.17.1) + addressable (~> 2.5) + base64 (~> 0.2) + concurrent-ruby (~> 1.1) + webrick (~> 1.7) + websocket-driver (~> 0.7) + globalid (1.3.0) + activesupport (>= 6.1) + haml (6.3.0) + temple (>= 0.8.2) + thor + tilt + i18n (1.14.7) + concurrent-ruby (~> 1.0) + io-console (0.8.1) + irb (1.15.2) + pp (>= 0.6.0) + rdoc (>= 4.0.0) + reline (>= 0.4.2) + jbuilder (2.14.1) + actionview (>= 7.0.0) + activesupport (>= 7.0.0) + json (2.15.1) + language_server-protocol (3.17.0.5) + lint_roller (1.1.0) + logger (1.7.0) + loofah (2.24.1) + crass (~> 1.0.2) + nokogiri (>= 1.12.0) + m (1.6.2) + method_source (>= 0.6.7) + rake (>= 0.9.2.2) + mail (2.8.1) + mini_mime (>= 0.1.1) + net-imap + net-pop + net-smtp + marcel (1.1.0) + matrix (0.4.3) + method_source (1.1.0) + mini_mime (1.1.5) + minitest (5.26.0) + net-imap (0.5.12) + date + net-protocol + net-pop (0.1.2) + net-protocol + net-protocol (0.2.2) + timeout + net-smtp (0.5.1) + net-protocol + nio4r (2.7.4) + nokogiri (1.18.10-aarch64-linux-gnu) + racc (~> 1.4) + nokogiri (1.18.10-aarch64-linux-musl) + racc (~> 1.4) + nokogiri (1.18.10-arm-linux-gnu) + racc (~> 1.4) + nokogiri (1.18.10-arm-linux-musl) + racc (~> 1.4) + nokogiri (1.18.10-arm64-darwin) + racc (~> 1.4) + nokogiri (1.18.10-x86_64-darwin) + racc (~> 1.4) + nokogiri (1.18.10-x86_64-linux-gnu) + racc (~> 1.4) + nokogiri (1.18.10-x86_64-linux-musl) + racc (~> 1.4) + parallel (1.27.0) + parser (3.3.9.0) + ast (~> 2.4.1) + racc + pp (0.6.3) + prettyprint + prettyprint (0.2.0) + prism (1.6.0) + propshaft (1.3.1) + actionpack (>= 7.0.0) + activesupport (>= 7.0.0) + rack + psych (5.2.6) + date + stringio + public_suffix (6.0.2) + puma (6.6.1) + nio4r (~> 2.0) + racc (1.8.1) + rack-session (2.1.1) + base64 (>= 0.1.0) + rack (>= 3.0.0) + rack-test (2.2.0) + rack (>= 1.3) + rackup (2.2.1) + rack (>= 3) + rails-dom-testing (2.3.0) + activesupport (>= 5.0.0) + minitest + nokogiri (>= 1.6) + rails-html-sanitizer (1.6.2) + loofah (~> 2.21) + nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0) + rainbow (3.1.1) + rake (13.3.0) + rdoc (6.15.0) + erb + psych (>= 4.0.0) + tsort + redis (5.4.1) + redis-client (>= 0.22.0) + redis-client (0.26.1) + connection_pool + regexp_parser (2.11.3) + reline (0.6.2) + io-console (~> 0.5) + rexml (3.4.4) + rspec-core (3.13.6) + rspec-support (~> 3.13.0) + rspec-expectations (3.13.5) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.13.0) + rspec-mocks (3.13.6) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.13.0) + rspec-rails (8.0.2) + actionpack (>= 7.2) + activesupport (>= 7.2) + railties (>= 7.2) + rspec-core (~> 3.13) + rspec-expectations (~> 3.13) + rspec-mocks (~> 3.13) + rspec-support (~> 3.13) + rspec-support (3.13.6) + rubocop (1.80.2) + json (~> 2.3) + language_server-protocol (~> 3.17.0.2) + lint_roller (~> 1.1.0) + parallel (~> 1.10) + parser (>= 3.3.0.2) + rainbow (>= 2.2.2, < 4.0) + regexp_parser (>= 2.9.3, < 3.0) + rubocop-ast (>= 1.46.0, < 2.0) + ruby-progressbar (~> 1.7) + unicode-display_width (>= 2.4.0, < 4.0) + rubocop-ast (1.47.1) + parser (>= 3.3.7.2) + prism (~> 1.4) + rubocop-md (2.0.3) + lint_roller (~> 1.1) + rubocop (>= 1.72.1) + rubocop-performance (1.25.0) + lint_roller (~> 1.1) + rubocop (>= 1.75.0, < 2.0) + rubocop-ast (>= 1.38.0, < 2.0) + ruby-progressbar (1.13.0) + rubyzip (3.2.0) + securerandom (0.4.1) + selenium-webdriver (4.37.0) + base64 (~> 0.2) + logger (~> 1.4) + rexml (~> 3.2, >= 3.2.5) + rubyzip (>= 1.2.2, < 4.0) + websocket (~> 1.0) + simplecov (0.22.0) + docile (~> 1.1) + simplecov-html (~> 0.11) + simplecov_json_formatter (~> 0.1) + simplecov-console (0.9.4) + ansi + simplecov + terminal-table + simplecov-html (0.13.2) + simplecov_json_formatter (0.1.4) + slim (5.2.1) + temple (~> 0.10.0) + tilt (>= 2.1.0) + smart_properties (1.17.0) + sprockets (4.2.2) + concurrent-ruby (~> 1.0) + logger + rack (>= 2.2.4, < 4) + sprockets-rails (3.5.2) + actionpack (>= 6.1) + activesupport (>= 6.1) + sprockets (>= 3.0.0) + standard (1.51.1) + language_server-protocol (~> 3.17.0.2) + lint_roller (~> 1.0) + rubocop (~> 1.80.2) + standard-custom (~> 1.0.0) + standard-performance (~> 1.8) + standard-custom (1.0.2) + lint_roller (~> 1.0) + rubocop (~> 1.50) + standard-performance (1.8.0) + lint_roller (~> 1.1) + rubocop-performance (~> 1.25.0) + stringio (3.1.7) + 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) + thor (1.4.0) + tilt (2.6.1) + timeout (0.4.3) + tsort (0.2.0) + turbo-rails (2.0.17) + actionpack (>= 7.1.0) + railties (>= 7.1.0) + tzinfo (2.0.6) + concurrent-ruby (~> 1.0) + unicode-display_width (3.2.0) + unicode-emoji (~> 4.1) + unicode-emoji (4.1.0) + uri (1.0.4) + useragent (0.16.11) + warning (1.5.0) + webrick (1.9.1) + websocket (1.2.11) + websocket-driver (0.8.0) + base64 + websocket-extensions (>= 0.1.0) + websocket-extensions (0.1.5) + xpath (3.2.0) + nokogiri (~> 1.8) + yard (0.9.37) + yard-activesupport-concern (0.0.1) + yard (>= 0.8) + zeitwerk (2.7.3) + +PLATFORMS + aarch64-linux-gnu + aarch64-linux-musl + arm-linux-gnu + arm-linux-musl + arm64-darwin + x86_64-darwin + x86_64-linux-gnu + x86_64-linux-musl + +DEPENDENCIES + allocation_stats + appraisal (~> 2) + appraisal-run (~> 1.0) + benchmark-ips (~> 2) + better_html + bundler (~> 2) + capybara (~> 3) + cuprite + dry-initializer + erb_lint + haml (~> 6) + jbuilder (~> 2) + m (~> 1) + method_source (~> 1) + minitest (~> 5) + propshaft (~> 1) + puma (~> 6) + rack! + rails! + rails-dom-testing (~> 2.3.0) + rake (~> 13) + redis + rspec-rails (~> 8) + rubocop-md (~> 2) + selenium-webdriver (~> 4) + simplecov (< 1) + simplecov-console (< 1) + slim (~> 5) + sprockets-rails (~> 3) + standard (~> 1) + tailwindcss-rails (~> 4) + turbo-rails (~> 2) + view_component! + warning + yard (< 1) + yard-activesupport-concern (< 1) + +RUBY VERSION + ruby 3.4.7p58 + +BUNDLED WITH + 2.6.9 diff --git a/test/sandbox/test/rendering_test.rb b/test/sandbox/test/rendering_test.rb index b37bbffe4..4bcfe1dfc 100644 --- a/test/sandbox/test/rendering_test.rb +++ b/test/sandbox/test/rendering_test.rb @@ -20,7 +20,7 @@ def test_render_inline_allocations MyComponent.__vc_ensure_compiled with_instrumentation_enabled_option(false) do - assert_allocations({"3.5" => 67, "3.4" => 74, "3.3" => 72, "3.2" => 75..76}) do + assert_allocations({"3.5" => 67, "3.4" => 72..74, "3.3" => 72, "3.2" => 75..76}) do render_inline(MyComponent.new) end end @@ -34,7 +34,7 @@ def test_render_collection_inline_allocations ViewComponent::CompileCache.cache.delete(ProductComponent) ProductComponent.__vc_ensure_compiled - allocations = {"3.5" => 66, "3.4" => 82, "3.3" => 86, "3.2" => 89..90} + allocations = {"3.5" => 66, "3.4" => 70..82, "3.3" => 86, "3.2" => 89..90} products = [Product.new(name: "Radio clock"), Product.new(name: "Mints")] notice = "On sale" diff --git a/view_component.gemspec b/view_component.gemspec index 006d27187..2daf692cd 100644 --- a/view_component.gemspec +++ b/view_component.gemspec @@ -32,6 +32,6 @@ Gem::Specification.new do |spec| spec.required_ruby_version = ">= 3.2.0" - spec.add_runtime_dependency "activesupport", [">= 7.1.0", "< 8.1"] + spec.add_runtime_dependency "activesupport", [">= 7.1.0", "< 8.2"] spec.add_runtime_dependency "concurrent-ruby", "~> 1" end