From b091fff8962c40d7f0516e62b014b4db011b5fe6 Mon Sep 17 00:00:00 2001 From: zzak Date: Fri, 12 Jan 2024 15:55:04 +0900 Subject: [PATCH 01/13] wip: test harness for installer tests based on dartsass-rails Co-authored-by: Jonathan Hefner --- .github/workflows/ci.yml | 58 +++++ .gitignore | 1 + Appraisals | 29 +++ Gemfile | 4 +- Gemfile.lock | 277 +++++++++++++--------- Rakefile | 14 ++ gemfiles/rails_7_0_propshaft.gemfile | 21 ++ gemfiles/rails_7_0_propshaft.gemfile.lock | 230 ++++++++++++++++++ gemfiles/rails_7_0_sprockets.gemfile | 21 ++ gemfiles/rails_7_0_sprockets.gemfile.lock | 232 ++++++++++++++++++ gemfiles/rails_7_1_propshaft.gemfile | 21 ++ gemfiles/rails_7_1_propshaft.gemfile.lock | 252 ++++++++++++++++++++ gemfiles/rails_7_1_sprockets.gemfile | 21 ++ gemfiles/rails_7_1_sprockets.gemfile.lock | 254 ++++++++++++++++++++ gemfiles/rails_main_propshaft.gemfile | 21 ++ gemfiles/rails_main_sprockets.gemfile | 21 ++ test/installer_test.rb | 59 +++++ test/test_helper.rb | 69 ++++++ 18 files changed, 1492 insertions(+), 113 deletions(-) create mode 100644 .github/workflows/ci.yml create mode 100644 Appraisals create mode 100644 Rakefile create mode 100644 gemfiles/rails_7_0_propshaft.gemfile create mode 100644 gemfiles/rails_7_0_propshaft.gemfile.lock create mode 100644 gemfiles/rails_7_0_sprockets.gemfile create mode 100644 gemfiles/rails_7_0_sprockets.gemfile.lock create mode 100644 gemfiles/rails_7_1_propshaft.gemfile create mode 100644 gemfiles/rails_7_1_propshaft.gemfile.lock create mode 100644 gemfiles/rails_7_1_sprockets.gemfile create mode 100644 gemfiles/rails_7_1_sprockets.gemfile.lock create mode 100644 gemfiles/rails_main_propshaft.gemfile create mode 100644 gemfiles/rails_main_sprockets.gemfile create mode 100644 test/installer_test.rb create mode 100644 test/test_helper.rb diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..b219055 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,58 @@ +name: CI +on: [push, pull_request] +jobs: + tests: + strategy: + fail-fast: false + matrix: + ruby-version: + - "3.0" + - "3.1" + - "3.2" + - "3.3" + gemfile: + - Gemfile + - gemfiles/rails_7_0_propshaft.gemfile + - gemfiles/rails_7_1_propshaft.gemfile + - gemfiles/rails_main_propshaft.gemfile + - gemfiles/rails_7_0_sprockets.gemfile + - gemfiles/rails_7_1_sprockets.gemfile + - gemfiles/rails_main_sprockets.gemfile + exclude: + - ruby-version: "3.0" + gemfile: gemfiles/rails_main_propshaft.gemfile + - ruby-version: "3.0" + gemfile: gemfiles/rails_main_sprockets.gemfile + continue-on-error: [ false ] + + name: ${{ format('Tests (Ruby {0}, {1})', matrix.ruby-version, matrix.gemfile) }} + runs-on: ubuntu-latest + continue-on-error: ${{ matrix.continue-on-error }} + + env: + BUNDLE_GEMFILE: ${{ matrix.gemfile }} + + steps: + - uses: actions/checkout@v4 + + - name: Remove Gemfile lock + run: | + rm -f $BUNDLE_GEMFILE.lock + + - name: Install Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby-version }} + bundler-cache: true + + # This prevents a "Failed to build gem native extension" error when + # running `bundle install` inside a Rails app that is generated for + # testing. The error occurs only in CI, and only when using Ruby 3.0 and + # Rails >= 7.1. + - name: Install sass-embedded gem + if: ${{ matrix.ruby-version == '3.0' }} + run: gem install sass-embedded + + - name: Run tests + run: | + bundle exec rake diff --git a/.gitignore b/.gitignore index 7e1052c..af7afc7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ .byebug_history *.gem +/gemfiles/rails_main*.gemfile.lock diff --git a/Appraisals b/Appraisals new file mode 100644 index 0000000..dd6b0c7 --- /dev/null +++ b/Appraisals @@ -0,0 +1,29 @@ +appraise "rails_7_0_sprockets" do + gem "rails", "~> 7.0.0" + gem "sprockets-rails" +end + +appraise "rails_7_0_propshaft" do + gem "rails", "~> 7.0.0" + gem "propshaft" +end + +appraise "rails_7_1_sprockets" do + gem "rails", "~> 7.1.0" + gem "sprockets-rails" +end + +appraise "rails_7_1_propshaft" do + gem "rails", "~> 7.1.0" + gem "propshaft" +end + +appraise "rails_main_sprockets" do + gem "rails", github: "rails/rails", branch: "main" + gem "sprockets-rails" +end + +appraise "rails_main_propshaft" do + gem "rails", github: "rails/rails", branch: "main" + gem "propshaft" +end diff --git a/Gemfile b/Gemfile index 1487b97..5ad412d 100644 --- a/Gemfile +++ b/Gemfile @@ -1,11 +1,13 @@ source 'https://rubygems.org' git_source(:github) { |repo| "https://github.com/#{repo}.git" } -# Specify your gem's dependencies in importmap-rails.gemspec. +# Specify your gem's dependencies in jsbundling-rails.gemspec. gemspec rails_version = ENV["RAILS_VERSION"] || "6.1.0" gem "rails", "~> #{rails_version}" +gem "appraisal" +gem "debug", ">= 1.0.0" gem "sqlite3" diff --git a/Gemfile.lock b/Gemfile.lock index a29614a..06d2b01 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -7,175 +7,228 @@ PATH GEM remote: https://rubygems.org/ specs: - actioncable (6.1.3.1) - actionpack (= 6.1.3.1) - activesupport (= 6.1.3.1) + actioncable (6.1.7.6) + actionpack (= 6.1.7.6) + activesupport (= 6.1.7.6) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (6.1.3.1) - actionpack (= 6.1.3.1) - activejob (= 6.1.3.1) - activerecord (= 6.1.3.1) - activestorage (= 6.1.3.1) - activesupport (= 6.1.3.1) + actionmailbox (6.1.7.6) + actionpack (= 6.1.7.6) + activejob (= 6.1.7.6) + activerecord (= 6.1.7.6) + activestorage (= 6.1.7.6) + activesupport (= 6.1.7.6) mail (>= 2.7.1) - actionmailer (6.1.3.1) - actionpack (= 6.1.3.1) - actionview (= 6.1.3.1) - activejob (= 6.1.3.1) - activesupport (= 6.1.3.1) + actionmailer (6.1.7.6) + actionpack (= 6.1.7.6) + actionview (= 6.1.7.6) + activejob (= 6.1.7.6) + activesupport (= 6.1.7.6) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 2.0) - actionpack (6.1.3.1) - actionview (= 6.1.3.1) - activesupport (= 6.1.3.1) + actionpack (6.1.7.6) + actionview (= 6.1.7.6) + activesupport (= 6.1.7.6) rack (~> 2.0, >= 2.0.9) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (6.1.3.1) - actionpack (= 6.1.3.1) - activerecord (= 6.1.3.1) - activestorage (= 6.1.3.1) - activesupport (= 6.1.3.1) + actiontext (6.1.7.6) + actionpack (= 6.1.7.6) + activerecord (= 6.1.7.6) + activestorage (= 6.1.7.6) + activesupport (= 6.1.7.6) nokogiri (>= 1.8.5) - actionview (6.1.3.1) - activesupport (= 6.1.3.1) + actionview (6.1.7.6) + activesupport (= 6.1.7.6) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.1, >= 1.2.0) - activejob (6.1.3.1) - activesupport (= 6.1.3.1) + activejob (6.1.7.6) + activesupport (= 6.1.7.6) globalid (>= 0.3.6) - activemodel (6.1.3.1) - activesupport (= 6.1.3.1) - activerecord (6.1.3.1) - activemodel (= 6.1.3.1) - activesupport (= 6.1.3.1) - activestorage (6.1.3.1) - actionpack (= 6.1.3.1) - activejob (= 6.1.3.1) - activerecord (= 6.1.3.1) - activesupport (= 6.1.3.1) - marcel (~> 1.0.0) - mini_mime (~> 1.0.2) - activesupport (6.1.3.1) + activemodel (6.1.7.6) + activesupport (= 6.1.7.6) + activerecord (6.1.7.6) + activemodel (= 6.1.7.6) + activesupport (= 6.1.7.6) + activestorage (6.1.7.6) + actionpack (= 6.1.7.6) + activejob (= 6.1.7.6) + activerecord (= 6.1.7.6) + activesupport (= 6.1.7.6) + marcel (~> 1.0) + mini_mime (>= 1.1.0) + activesupport (6.1.7.6) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) tzinfo (~> 2.0) zeitwerk (~> 2.3) - addressable (2.8.0) - public_suffix (>= 2.0.2, < 5.0) + addressable (2.8.6) + public_suffix (>= 2.0.2, < 6.0) + appraisal (2.5.0) + bundler + rake + thor (>= 0.14.0) builder (3.2.4) byebug (11.1.3) - capybara (3.35.3) + capybara (3.39.2) addressable + matrix mini_mime (>= 0.1.3) nokogiri (~> 1.8) rack (>= 1.6.0) rack-test (>= 0.6.3) regexp_parser (>= 1.5, < 3.0) xpath (~> 3.2) - childprocess (3.0.0) - concurrent-ruby (1.1.9) + concurrent-ruby (1.2.2) crass (1.0.6) - erubi (1.10.0) - globalid (0.5.1) - activesupport (>= 5.0) - i18n (1.8.10) + date (3.3.4) + debug (1.9.1) + irb (~> 1.10) + reline (>= 0.3.8) + erubi (1.12.0) + globalid (1.2.1) + activesupport (>= 6.1) + i18n (1.14.1) concurrent-ruby (~> 1.0) - loofah (2.10.0) + io-console (0.7.1) + irb (1.11.1) + rdoc + reline (>= 0.4.2) + loofah (2.22.0) crass (~> 1.0.2) - nokogiri (>= 1.5.9) - mail (2.7.1) + nokogiri (>= 1.12.0) + mail (2.8.1) mini_mime (>= 0.1.1) - marcel (1.0.1) + net-imap + net-pop + net-smtp + marcel (1.0.2) + matrix (0.4.2) method_source (1.0.0) - mini_mime (1.0.3) - mini_portile2 (2.8.2) - minitest (5.14.4) - nio4r (2.5.7) - nokogiri (1.13.6) - mini_portile2 (~> 2.8.0) + mini_mime (1.1.5) + minitest (5.21.1) + net-imap (0.4.9.1) + date + net-protocol + net-pop (0.1.2) + net-protocol + net-protocol (0.2.2) + timeout + net-smtp (0.4.0.1) + net-protocol + nio4r (2.7.0) + nokogiri (1.16.0-aarch64-linux) racc (~> 1.4) - public_suffix (4.0.6) - racc (1.5.2) - rack (2.2.3) - rack-test (1.1.0) - rack (>= 1.0, < 3) - rails (6.1.3.1) - actioncable (= 6.1.3.1) - actionmailbox (= 6.1.3.1) - actionmailer (= 6.1.3.1) - actionpack (= 6.1.3.1) - actiontext (= 6.1.3.1) - actionview (= 6.1.3.1) - activejob (= 6.1.3.1) - activemodel (= 6.1.3.1) - activerecord (= 6.1.3.1) - activestorage (= 6.1.3.1) - activesupport (= 6.1.3.1) + nokogiri (1.16.0-arm-linux) + racc (~> 1.4) + nokogiri (1.16.0-arm64-darwin) + racc (~> 1.4) + nokogiri (1.16.0-x86-linux) + racc (~> 1.4) + nokogiri (1.16.0-x86_64-darwin) + racc (~> 1.4) + nokogiri (1.16.0-x86_64-linux) + racc (~> 1.4) + psych (5.1.2) + stringio + public_suffix (5.0.4) + racc (1.7.3) + rack (2.2.8) + rack-test (2.1.0) + rack (>= 1.3) + rails (6.1.7.6) + actioncable (= 6.1.7.6) + actionmailbox (= 6.1.7.6) + actionmailer (= 6.1.7.6) + actionpack (= 6.1.7.6) + actiontext (= 6.1.7.6) + actionview (= 6.1.7.6) + activejob (= 6.1.7.6) + activemodel (= 6.1.7.6) + activerecord (= 6.1.7.6) + activestorage (= 6.1.7.6) + activesupport (= 6.1.7.6) bundler (>= 1.15.0) - railties (= 6.1.3.1) + railties (= 6.1.7.6) sprockets-rails (>= 2.0.0) - rails-dom-testing (2.0.3) - activesupport (>= 4.2.0) + rails-dom-testing (2.2.0) + activesupport (>= 5.0.0) + minitest nokogiri (>= 1.6) - rails-html-sanitizer (1.3.0) - loofah (~> 2.3) - railties (6.1.3.1) - actionpack (= 6.1.3.1) - activesupport (= 6.1.3.1) + rails-html-sanitizer (1.6.0) + loofah (~> 2.21) + nokogiri (~> 1.14) + railties (6.1.7.6) + actionpack (= 6.1.7.6) + activesupport (= 6.1.7.6) method_source - rake (>= 0.8.7) + rake (>= 12.2) thor (~> 1.0) - rake (13.0.6) - regexp_parser (2.1.1) - rexml (3.2.5) + rake (13.1.0) + rdoc (6.6.2) + psych (>= 4.0.0) + regexp_parser (2.9.0) + reline (0.4.2) + io-console (~> 0.5) + rexml (3.2.6) rubyzip (2.3.2) - selenium-webdriver (3.142.7) - childprocess (>= 0.5, < 4.0) - rubyzip (>= 1.2.2) - sprockets (4.0.2) + selenium-webdriver (4.10.0) + rexml (~> 3.2, >= 3.2.5) + rubyzip (>= 1.2.2, < 3.0) + websocket (~> 1.0) + sprockets (4.2.1) concurrent-ruby (~> 1.0) - rack (> 1, < 3) - sprockets-rails (3.2.2) - actionpack (>= 4.0) - activesupport (>= 4.0) + rack (>= 2.2.4, < 4) + sprockets-rails (3.4.2) + actionpack (>= 5.2) + activesupport (>= 5.2) sprockets (>= 3.0.0) - sqlite3 (1.4.2) - stimulus-rails (0.3.8) - rails (>= 6.0.0) - thor (1.1.0) - turbo-rails (0.7.4) - rails (>= 6.0.0) - tzinfo (2.0.4) + sqlite3 (1.7.0-aarch64-linux) + sqlite3 (1.7.0-arm-linux) + sqlite3 (1.7.0-arm64-darwin) + sqlite3 (1.7.0-x86-linux) + sqlite3 (1.7.0-x86_64-darwin) + sqlite3 (1.7.0-x86_64-linux) + stimulus-rails (1.3.3) + railties (>= 6.0.0) + stringio (3.1.0) + thor (1.3.0) + timeout (0.4.1) + turbo-rails (1.5.0) + actionpack (>= 6.0.0) + activejob (>= 6.0.0) + railties (>= 6.0.0) + tzinfo (2.0.6) concurrent-ruby (~> 1.0) - webdrivers (4.6.0) + webdrivers (5.3.1) nokogiri (~> 1.6) rubyzip (>= 1.3.0) - selenium-webdriver (>= 3.0, < 4.0) - websocket-driver (0.7.5) + selenium-webdriver (~> 4.0, < 4.11) + websocket (1.2.10) + websocket-driver (0.7.6) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) xpath (3.2.0) nokogiri (~> 1.8) - zeitwerk (2.4.2) + zeitwerk (2.6.12) PLATFORMS aarch64-linux - arm64-darwin-20 - arm64-darwin-21 - arm64-darwin-22 - x86_64-darwin-20 - x86_64-darwin-21 + arm-linux + arm64-darwin + x86-linux + x86_64-darwin x86_64-linux DEPENDENCIES + appraisal byebug capybara + debug (>= 1.0.0) jsbundling-rails! rails (~> 6.1.0) rexml @@ -186,4 +239,4 @@ DEPENDENCIES webdrivers BUNDLED WITH - 2.3.8 + 2.5.4 diff --git a/Rakefile b/Rakefile new file mode 100644 index 0000000..83a3a2f --- /dev/null +++ b/Rakefile @@ -0,0 +1,14 @@ +require "bundler/setup" + +require "bundler/gem_tasks" + +require "rake/testtask" + +Rake::TestTask.new(:test) do |t| + t.libs << 'test' + t.pattern = 'test/**/*_test.rb' + t.verbose = false + t.warning = true +end + +task default: :test diff --git a/gemfiles/rails_7_0_propshaft.gemfile b/gemfiles/rails_7_0_propshaft.gemfile new file mode 100644 index 0000000..c3518c9 --- /dev/null +++ b/gemfiles/rails_7_0_propshaft.gemfile @@ -0,0 +1,21 @@ +# This file was generated by Appraisal + +source "https://rubygems.org" + +gem "rails", "~> 7.0.0" +gem "appraisal" +gem "debug", ">= 1.0.0" +gem "sqlite3" +gem "propshaft" + +group :test do + gem "turbo-rails" + gem "stimulus-rails" + gem "byebug" + gem "rexml" + gem "capybara" + gem "selenium-webdriver" + gem "webdrivers" +end + +gemspec path: "../" diff --git a/gemfiles/rails_7_0_propshaft.gemfile.lock b/gemfiles/rails_7_0_propshaft.gemfile.lock new file mode 100644 index 0000000..2358f59 --- /dev/null +++ b/gemfiles/rails_7_0_propshaft.gemfile.lock @@ -0,0 +1,230 @@ +PATH + remote: .. + specs: + jsbundling-rails (1.2.2) + railties (>= 6.0.0) + +GEM + remote: https://rubygems.org/ + specs: + actioncable (7.0.8) + actionpack (= 7.0.8) + activesupport (= 7.0.8) + nio4r (~> 2.0) + websocket-driver (>= 0.6.1) + actionmailbox (7.0.8) + actionpack (= 7.0.8) + activejob (= 7.0.8) + activerecord (= 7.0.8) + activestorage (= 7.0.8) + activesupport (= 7.0.8) + mail (>= 2.7.1) + net-imap + net-pop + net-smtp + actionmailer (7.0.8) + actionpack (= 7.0.8) + actionview (= 7.0.8) + activejob (= 7.0.8) + activesupport (= 7.0.8) + mail (~> 2.5, >= 2.5.4) + net-imap + net-pop + net-smtp + rails-dom-testing (~> 2.0) + actionpack (7.0.8) + actionview (= 7.0.8) + activesupport (= 7.0.8) + rack (~> 2.0, >= 2.2.4) + rack-test (>= 0.6.3) + rails-dom-testing (~> 2.0) + rails-html-sanitizer (~> 1.0, >= 1.2.0) + actiontext (7.0.8) + actionpack (= 7.0.8) + activerecord (= 7.0.8) + activestorage (= 7.0.8) + activesupport (= 7.0.8) + globalid (>= 0.6.0) + nokogiri (>= 1.8.5) + actionview (7.0.8) + activesupport (= 7.0.8) + builder (~> 3.1) + erubi (~> 1.4) + rails-dom-testing (~> 2.0) + rails-html-sanitizer (~> 1.1, >= 1.2.0) + activejob (7.0.8) + activesupport (= 7.0.8) + globalid (>= 0.3.6) + activemodel (7.0.8) + activesupport (= 7.0.8) + activerecord (7.0.8) + activemodel (= 7.0.8) + activesupport (= 7.0.8) + activestorage (7.0.8) + actionpack (= 7.0.8) + activejob (= 7.0.8) + activerecord (= 7.0.8) + activesupport (= 7.0.8) + marcel (~> 1.0) + mini_mime (>= 1.1.0) + activesupport (7.0.8) + concurrent-ruby (~> 1.0, >= 1.0.2) + i18n (>= 1.6, < 2) + minitest (>= 5.1) + tzinfo (~> 2.0) + addressable (2.8.6) + public_suffix (>= 2.0.2, < 6.0) + appraisal (2.5.0) + bundler + rake + thor (>= 0.14.0) + builder (3.2.4) + byebug (11.1.3) + capybara (3.39.2) + addressable + matrix + mini_mime (>= 0.1.3) + nokogiri (~> 1.8) + rack (>= 1.6.0) + rack-test (>= 0.6.3) + regexp_parser (>= 1.5, < 3.0) + xpath (~> 3.2) + concurrent-ruby (1.2.2) + crass (1.0.6) + date (3.3.4) + debug (1.8.0) + irb (>= 1.5.0) + reline (>= 0.3.1) + erubi (1.12.0) + globalid (1.2.1) + activesupport (>= 6.1) + i18n (1.14.1) + concurrent-ruby (~> 1.0) + io-console (0.6.0) + irb (1.9.1) + rdoc + reline (>= 0.3.8) + loofah (2.22.0) + crass (~> 1.0.2) + nokogiri (>= 1.12.0) + mail (2.8.1) + mini_mime (>= 0.1.1) + net-imap + net-pop + net-smtp + marcel (1.0.2) + matrix (0.4.2) + method_source (1.0.0) + mini_mime (1.1.5) + mini_portile2 (2.8.5) + minitest (5.20.0) + net-imap (0.4.7) + date + net-protocol + net-pop (0.1.2) + net-protocol + net-protocol (0.2.2) + timeout + net-smtp (0.4.0) + net-protocol + nio4r (2.7.0) + nokogiri (1.15.5) + mini_portile2 (~> 2.8.2) + racc (~> 1.4) + propshaft (0.8.0) + actionpack (>= 7.0.0) + activesupport (>= 7.0.0) + rack + railties (>= 7.0.0) + psych (5.1.1.1) + stringio + public_suffix (5.0.4) + racc (1.7.3) + rack (2.2.8) + rack-test (2.1.0) + rack (>= 1.3) + rails (7.0.8) + actioncable (= 7.0.8) + actionmailbox (= 7.0.8) + actionmailer (= 7.0.8) + actionpack (= 7.0.8) + actiontext (= 7.0.8) + actionview (= 7.0.8) + activejob (= 7.0.8) + activemodel (= 7.0.8) + activerecord (= 7.0.8) + activestorage (= 7.0.8) + activesupport (= 7.0.8) + bundler (>= 1.15.0) + railties (= 7.0.8) + rails-dom-testing (2.2.0) + activesupport (>= 5.0.0) + minitest + nokogiri (>= 1.6) + rails-html-sanitizer (1.6.0) + loofah (~> 2.21) + nokogiri (~> 1.14) + railties (7.0.8) + actionpack (= 7.0.8) + activesupport (= 7.0.8) + method_source + rake (>= 12.2) + thor (~> 1.0) + zeitwerk (~> 2.5) + rake (13.1.0) + rdoc (6.6.0) + psych (>= 4.0.0) + regexp_parser (2.9.0) + reline (0.4.1) + io-console (~> 0.5) + rexml (3.2.6) + rubyzip (2.3.2) + selenium-webdriver (4.10.0) + rexml (~> 3.2, >= 3.2.5) + rubyzip (>= 1.2.2, < 3.0) + websocket (~> 1.0) + sqlite3 (1.6.9-x86_64-linux) + stimulus-rails (1.3.3) + railties (>= 6.0.0) + stringio (3.1.0) + thor (1.3.0) + timeout (0.4.1) + turbo-rails (1.5.0) + actionpack (>= 6.0.0) + activejob (>= 6.0.0) + railties (>= 6.0.0) + tzinfo (2.0.6) + concurrent-ruby (~> 1.0) + webdrivers (5.3.1) + nokogiri (~> 1.6) + rubyzip (>= 1.3.0) + selenium-webdriver (~> 4.0, < 4.11) + websocket (1.2.10) + websocket-driver (0.7.6) + websocket-extensions (>= 0.1.0) + websocket-extensions (0.1.5) + xpath (3.2.0) + nokogiri (~> 1.8) + zeitwerk (2.6.12) + +PLATFORMS + x86_64-darwin-23 + x86_64-linux + +DEPENDENCIES + appraisal + byebug + capybara + debug (>= 1.0.0) + jsbundling-rails! + propshaft + rails (~> 7.0.0) + rexml + selenium-webdriver + sqlite3 + stimulus-rails + turbo-rails + webdrivers + +BUNDLED WITH + 2.2.32 diff --git a/gemfiles/rails_7_0_sprockets.gemfile b/gemfiles/rails_7_0_sprockets.gemfile new file mode 100644 index 0000000..01d1ad2 --- /dev/null +++ b/gemfiles/rails_7_0_sprockets.gemfile @@ -0,0 +1,21 @@ +# This file was generated by Appraisal + +source "https://rubygems.org" + +gem "rails", "~> 7.0.0" +gem "appraisal" +gem "debug", ">= 1.0.0" +gem "sqlite3" +gem "sprockets-rails" + +group :test do + gem "turbo-rails" + gem "stimulus-rails" + gem "byebug" + gem "rexml" + gem "capybara" + gem "selenium-webdriver" + gem "webdrivers" +end + +gemspec path: "../" diff --git a/gemfiles/rails_7_0_sprockets.gemfile.lock b/gemfiles/rails_7_0_sprockets.gemfile.lock new file mode 100644 index 0000000..5d0f2c6 --- /dev/null +++ b/gemfiles/rails_7_0_sprockets.gemfile.lock @@ -0,0 +1,232 @@ +PATH + remote: .. + specs: + jsbundling-rails (1.2.2) + railties (>= 6.0.0) + +GEM + remote: https://rubygems.org/ + specs: + actioncable (7.0.8) + actionpack (= 7.0.8) + activesupport (= 7.0.8) + nio4r (~> 2.0) + websocket-driver (>= 0.6.1) + actionmailbox (7.0.8) + actionpack (= 7.0.8) + activejob (= 7.0.8) + activerecord (= 7.0.8) + activestorage (= 7.0.8) + activesupport (= 7.0.8) + mail (>= 2.7.1) + net-imap + net-pop + net-smtp + actionmailer (7.0.8) + actionpack (= 7.0.8) + actionview (= 7.0.8) + activejob (= 7.0.8) + activesupport (= 7.0.8) + mail (~> 2.5, >= 2.5.4) + net-imap + net-pop + net-smtp + rails-dom-testing (~> 2.0) + actionpack (7.0.8) + actionview (= 7.0.8) + activesupport (= 7.0.8) + rack (~> 2.0, >= 2.2.4) + rack-test (>= 0.6.3) + rails-dom-testing (~> 2.0) + rails-html-sanitizer (~> 1.0, >= 1.2.0) + actiontext (7.0.8) + actionpack (= 7.0.8) + activerecord (= 7.0.8) + activestorage (= 7.0.8) + activesupport (= 7.0.8) + globalid (>= 0.6.0) + nokogiri (>= 1.8.5) + actionview (7.0.8) + activesupport (= 7.0.8) + builder (~> 3.1) + erubi (~> 1.4) + rails-dom-testing (~> 2.0) + rails-html-sanitizer (~> 1.1, >= 1.2.0) + activejob (7.0.8) + activesupport (= 7.0.8) + globalid (>= 0.3.6) + activemodel (7.0.8) + activesupport (= 7.0.8) + activerecord (7.0.8) + activemodel (= 7.0.8) + activesupport (= 7.0.8) + activestorage (7.0.8) + actionpack (= 7.0.8) + activejob (= 7.0.8) + activerecord (= 7.0.8) + activesupport (= 7.0.8) + marcel (~> 1.0) + mini_mime (>= 1.1.0) + activesupport (7.0.8) + concurrent-ruby (~> 1.0, >= 1.0.2) + i18n (>= 1.6, < 2) + minitest (>= 5.1) + tzinfo (~> 2.0) + addressable (2.8.6) + public_suffix (>= 2.0.2, < 6.0) + appraisal (2.5.0) + bundler + rake + thor (>= 0.14.0) + builder (3.2.4) + byebug (11.1.3) + capybara (3.39.2) + addressable + matrix + mini_mime (>= 0.1.3) + nokogiri (~> 1.8) + rack (>= 1.6.0) + rack-test (>= 0.6.3) + regexp_parser (>= 1.5, < 3.0) + xpath (~> 3.2) + concurrent-ruby (1.2.2) + crass (1.0.6) + date (3.3.4) + debug (1.8.0) + irb (>= 1.5.0) + reline (>= 0.3.1) + erubi (1.12.0) + globalid (1.2.1) + activesupport (>= 6.1) + i18n (1.14.1) + concurrent-ruby (~> 1.0) + io-console (0.6.0) + irb (1.9.1) + rdoc + reline (>= 0.3.8) + loofah (2.22.0) + crass (~> 1.0.2) + nokogiri (>= 1.12.0) + mail (2.8.1) + mini_mime (>= 0.1.1) + net-imap + net-pop + net-smtp + marcel (1.0.2) + matrix (0.4.2) + method_source (1.0.0) + mini_mime (1.1.5) + mini_portile2 (2.8.5) + minitest (5.20.0) + net-imap (0.4.7) + date + net-protocol + net-pop (0.1.2) + net-protocol + net-protocol (0.2.2) + timeout + net-smtp (0.4.0) + net-protocol + nio4r (2.7.0) + nokogiri (1.15.5) + mini_portile2 (~> 2.8.2) + racc (~> 1.4) + psych (5.1.1.1) + stringio + public_suffix (5.0.4) + racc (1.7.3) + rack (2.2.8) + rack-test (2.1.0) + rack (>= 1.3) + rails (7.0.8) + actioncable (= 7.0.8) + actionmailbox (= 7.0.8) + actionmailer (= 7.0.8) + actionpack (= 7.0.8) + actiontext (= 7.0.8) + actionview (= 7.0.8) + activejob (= 7.0.8) + activemodel (= 7.0.8) + activerecord (= 7.0.8) + activestorage (= 7.0.8) + activesupport (= 7.0.8) + bundler (>= 1.15.0) + railties (= 7.0.8) + rails-dom-testing (2.2.0) + activesupport (>= 5.0.0) + minitest + nokogiri (>= 1.6) + rails-html-sanitizer (1.6.0) + loofah (~> 2.21) + nokogiri (~> 1.14) + railties (7.0.8) + actionpack (= 7.0.8) + activesupport (= 7.0.8) + method_source + rake (>= 12.2) + thor (~> 1.0) + zeitwerk (~> 2.5) + rake (13.1.0) + rdoc (6.6.0) + psych (>= 4.0.0) + regexp_parser (2.9.0) + reline (0.4.1) + io-console (~> 0.5) + rexml (3.2.6) + rubyzip (2.3.2) + selenium-webdriver (4.10.0) + rexml (~> 3.2, >= 3.2.5) + rubyzip (>= 1.2.2, < 3.0) + websocket (~> 1.0) + sprockets (4.2.1) + concurrent-ruby (~> 1.0) + rack (>= 2.2.4, < 4) + sprockets-rails (3.4.2) + actionpack (>= 5.2) + activesupport (>= 5.2) + sprockets (>= 3.0.0) + sqlite3 (1.6.9-x86_64-linux) + stimulus-rails (1.3.3) + railties (>= 6.0.0) + stringio (3.1.0) + thor (1.3.0) + timeout (0.4.1) + turbo-rails (1.5.0) + actionpack (>= 6.0.0) + activejob (>= 6.0.0) + railties (>= 6.0.0) + tzinfo (2.0.6) + concurrent-ruby (~> 1.0) + webdrivers (5.3.1) + nokogiri (~> 1.6) + rubyzip (>= 1.3.0) + selenium-webdriver (~> 4.0, < 4.11) + websocket (1.2.10) + websocket-driver (0.7.6) + websocket-extensions (>= 0.1.0) + websocket-extensions (0.1.5) + xpath (3.2.0) + nokogiri (~> 1.8) + zeitwerk (2.6.12) + +PLATFORMS + x86_64-darwin-23 + x86_64-linux + +DEPENDENCIES + appraisal + byebug + capybara + debug (>= 1.0.0) + jsbundling-rails! + rails (~> 7.0.0) + rexml + selenium-webdriver + sprockets-rails + sqlite3 + stimulus-rails + turbo-rails + webdrivers + +BUNDLED WITH + 2.2.32 diff --git a/gemfiles/rails_7_1_propshaft.gemfile b/gemfiles/rails_7_1_propshaft.gemfile new file mode 100644 index 0000000..79f9311 --- /dev/null +++ b/gemfiles/rails_7_1_propshaft.gemfile @@ -0,0 +1,21 @@ +# This file was generated by Appraisal + +source "https://rubygems.org" + +gem "rails", "~> 7.1.0" +gem "appraisal" +gem "debug", ">= 1.0.0" +gem "sqlite3" +gem "propshaft" + +group :test do + gem "turbo-rails" + gem "stimulus-rails" + gem "byebug" + gem "rexml" + gem "capybara" + gem "selenium-webdriver" + gem "webdrivers" +end + +gemspec path: "../" diff --git a/gemfiles/rails_7_1_propshaft.gemfile.lock b/gemfiles/rails_7_1_propshaft.gemfile.lock new file mode 100644 index 0000000..c2f0bb6 --- /dev/null +++ b/gemfiles/rails_7_1_propshaft.gemfile.lock @@ -0,0 +1,252 @@ +PATH + remote: .. + specs: + jsbundling-rails (1.2.2) + railties (>= 6.0.0) + +GEM + remote: https://rubygems.org/ + specs: + actioncable (7.1.2) + actionpack (= 7.1.2) + activesupport (= 7.1.2) + nio4r (~> 2.0) + websocket-driver (>= 0.6.1) + zeitwerk (~> 2.6) + actionmailbox (7.1.2) + actionpack (= 7.1.2) + activejob (= 7.1.2) + activerecord (= 7.1.2) + activestorage (= 7.1.2) + activesupport (= 7.1.2) + mail (>= 2.7.1) + net-imap + net-pop + net-smtp + actionmailer (7.1.2) + actionpack (= 7.1.2) + actionview (= 7.1.2) + activejob (= 7.1.2) + activesupport (= 7.1.2) + mail (~> 2.5, >= 2.5.4) + net-imap + net-pop + net-smtp + rails-dom-testing (~> 2.2) + actionpack (7.1.2) + actionview (= 7.1.2) + activesupport (= 7.1.2) + nokogiri (>= 1.8.5) + racc + rack (>= 2.2.4) + rack-session (>= 1.0.1) + rack-test (>= 0.6.3) + rails-dom-testing (~> 2.2) + rails-html-sanitizer (~> 1.6) + actiontext (7.1.2) + actionpack (= 7.1.2) + activerecord (= 7.1.2) + activestorage (= 7.1.2) + activesupport (= 7.1.2) + globalid (>= 0.6.0) + nokogiri (>= 1.8.5) + actionview (7.1.2) + activesupport (= 7.1.2) + builder (~> 3.1) + erubi (~> 1.11) + rails-dom-testing (~> 2.2) + rails-html-sanitizer (~> 1.6) + activejob (7.1.2) + activesupport (= 7.1.2) + globalid (>= 0.3.6) + activemodel (7.1.2) + activesupport (= 7.1.2) + activerecord (7.1.2) + activemodel (= 7.1.2) + activesupport (= 7.1.2) + timeout (>= 0.4.0) + activestorage (7.1.2) + actionpack (= 7.1.2) + activejob (= 7.1.2) + activerecord (= 7.1.2) + activesupport (= 7.1.2) + marcel (~> 1.0) + activesupport (7.1.2) + base64 + bigdecimal + concurrent-ruby (~> 1.0, >= 1.0.2) + connection_pool (>= 2.2.5) + drb + i18n (>= 1.6, < 2) + minitest (>= 5.1) + mutex_m + tzinfo (~> 2.0) + addressable (2.8.6) + public_suffix (>= 2.0.2, < 6.0) + appraisal (2.5.0) + bundler + rake + thor (>= 0.14.0) + base64 (0.2.0) + bigdecimal (3.1.4) + builder (3.2.4) + byebug (11.1.3) + capybara (3.39.2) + addressable + matrix + mini_mime (>= 0.1.3) + nokogiri (~> 1.8) + rack (>= 1.6.0) + rack-test (>= 0.6.3) + regexp_parser (>= 1.5, < 3.0) + xpath (~> 3.2) + concurrent-ruby (1.2.2) + connection_pool (2.4.1) + crass (1.0.6) + date (3.3.4) + debug (1.8.0) + irb (>= 1.5.0) + reline (>= 0.3.1) + drb (2.2.0) + ruby2_keywords + erubi (1.12.0) + globalid (1.2.1) + activesupport (>= 6.1) + i18n (1.14.1) + concurrent-ruby (~> 1.0) + io-console (0.6.0) + irb (1.9.1) + rdoc + reline (>= 0.3.8) + loofah (2.22.0) + crass (~> 1.0.2) + nokogiri (>= 1.12.0) + mail (2.8.1) + mini_mime (>= 0.1.1) + net-imap + net-pop + net-smtp + marcel (1.0.2) + matrix (0.4.2) + mini_mime (1.1.5) + mini_portile2 (2.8.5) + minitest (5.20.0) + mutex_m (0.2.0) + net-imap (0.4.7) + date + net-protocol + net-pop (0.1.2) + net-protocol + net-protocol (0.2.2) + timeout + net-smtp (0.4.0) + net-protocol + nio4r (2.7.0) + nokogiri (1.15.5) + mini_portile2 (~> 2.8.2) + racc (~> 1.4) + propshaft (0.8.0) + actionpack (>= 7.0.0) + activesupport (>= 7.0.0) + rack + railties (>= 7.0.0) + psych (5.1.1.1) + stringio + public_suffix (5.0.4) + racc (1.7.3) + rack (3.0.8) + rack-session (2.0.0) + rack (>= 3.0.0) + rack-test (2.1.0) + rack (>= 1.3) + rackup (2.1.0) + rack (>= 3) + webrick (~> 1.8) + rails (7.1.2) + actioncable (= 7.1.2) + actionmailbox (= 7.1.2) + actionmailer (= 7.1.2) + actionpack (= 7.1.2) + actiontext (= 7.1.2) + actionview (= 7.1.2) + activejob (= 7.1.2) + activemodel (= 7.1.2) + activerecord (= 7.1.2) + activestorage (= 7.1.2) + activesupport (= 7.1.2) + bundler (>= 1.15.0) + railties (= 7.1.2) + rails-dom-testing (2.2.0) + activesupport (>= 5.0.0) + minitest + nokogiri (>= 1.6) + rails-html-sanitizer (1.6.0) + loofah (~> 2.21) + nokogiri (~> 1.14) + railties (7.1.2) + actionpack (= 7.1.2) + activesupport (= 7.1.2) + irb + rackup (>= 1.0.0) + rake (>= 12.2) + thor (~> 1.0, >= 1.2.2) + zeitwerk (~> 2.6) + rake (13.1.0) + rdoc (6.6.0) + psych (>= 4.0.0) + regexp_parser (2.9.0) + reline (0.4.1) + io-console (~> 0.5) + rexml (3.2.6) + ruby2_keywords (0.0.5) + rubyzip (2.3.2) + selenium-webdriver (4.10.0) + rexml (~> 3.2, >= 3.2.5) + rubyzip (>= 1.2.2, < 3.0) + websocket (~> 1.0) + sqlite3 (1.6.9-x86_64-linux) + stimulus-rails (1.3.3) + railties (>= 6.0.0) + stringio (3.1.0) + thor (1.3.0) + timeout (0.4.1) + turbo-rails (1.5.0) + actionpack (>= 6.0.0) + activejob (>= 6.0.0) + railties (>= 6.0.0) + tzinfo (2.0.6) + concurrent-ruby (~> 1.0) + webdrivers (5.3.1) + nokogiri (~> 1.6) + rubyzip (>= 1.3.0) + selenium-webdriver (~> 4.0, < 4.11) + webrick (1.8.1) + websocket (1.2.10) + websocket-driver (0.7.6) + websocket-extensions (>= 0.1.0) + websocket-extensions (0.1.5) + xpath (3.2.0) + nokogiri (~> 1.8) + zeitwerk (2.6.12) + +PLATFORMS + x86_64-darwin-23 + x86_64-linux + +DEPENDENCIES + appraisal + byebug + capybara + debug (>= 1.0.0) + jsbundling-rails! + propshaft + rails (~> 7.1.0) + rexml + selenium-webdriver + sqlite3 + stimulus-rails + turbo-rails + webdrivers + +BUNDLED WITH + 2.2.32 diff --git a/gemfiles/rails_7_1_sprockets.gemfile b/gemfiles/rails_7_1_sprockets.gemfile new file mode 100644 index 0000000..a344f30 --- /dev/null +++ b/gemfiles/rails_7_1_sprockets.gemfile @@ -0,0 +1,21 @@ +# This file was generated by Appraisal + +source "https://rubygems.org" + +gem "rails", "~> 7.1.0" +gem "appraisal" +gem "debug", ">= 1.0.0" +gem "sqlite3" +gem "sprockets-rails" + +group :test do + gem "turbo-rails" + gem "stimulus-rails" + gem "byebug" + gem "rexml" + gem "capybara" + gem "selenium-webdriver" + gem "webdrivers" +end + +gemspec path: "../" diff --git a/gemfiles/rails_7_1_sprockets.gemfile.lock b/gemfiles/rails_7_1_sprockets.gemfile.lock new file mode 100644 index 0000000..f28f5d3 --- /dev/null +++ b/gemfiles/rails_7_1_sprockets.gemfile.lock @@ -0,0 +1,254 @@ +PATH + remote: .. + specs: + jsbundling-rails (1.2.2) + railties (>= 6.0.0) + +GEM + remote: https://rubygems.org/ + specs: + actioncable (7.1.2) + actionpack (= 7.1.2) + activesupport (= 7.1.2) + nio4r (~> 2.0) + websocket-driver (>= 0.6.1) + zeitwerk (~> 2.6) + actionmailbox (7.1.2) + actionpack (= 7.1.2) + activejob (= 7.1.2) + activerecord (= 7.1.2) + activestorage (= 7.1.2) + activesupport (= 7.1.2) + mail (>= 2.7.1) + net-imap + net-pop + net-smtp + actionmailer (7.1.2) + actionpack (= 7.1.2) + actionview (= 7.1.2) + activejob (= 7.1.2) + activesupport (= 7.1.2) + mail (~> 2.5, >= 2.5.4) + net-imap + net-pop + net-smtp + rails-dom-testing (~> 2.2) + actionpack (7.1.2) + actionview (= 7.1.2) + activesupport (= 7.1.2) + nokogiri (>= 1.8.5) + racc + rack (>= 2.2.4) + rack-session (>= 1.0.1) + rack-test (>= 0.6.3) + rails-dom-testing (~> 2.2) + rails-html-sanitizer (~> 1.6) + actiontext (7.1.2) + actionpack (= 7.1.2) + activerecord (= 7.1.2) + activestorage (= 7.1.2) + activesupport (= 7.1.2) + globalid (>= 0.6.0) + nokogiri (>= 1.8.5) + actionview (7.1.2) + activesupport (= 7.1.2) + builder (~> 3.1) + erubi (~> 1.11) + rails-dom-testing (~> 2.2) + rails-html-sanitizer (~> 1.6) + activejob (7.1.2) + activesupport (= 7.1.2) + globalid (>= 0.3.6) + activemodel (7.1.2) + activesupport (= 7.1.2) + activerecord (7.1.2) + activemodel (= 7.1.2) + activesupport (= 7.1.2) + timeout (>= 0.4.0) + activestorage (7.1.2) + actionpack (= 7.1.2) + activejob (= 7.1.2) + activerecord (= 7.1.2) + activesupport (= 7.1.2) + marcel (~> 1.0) + activesupport (7.1.2) + base64 + bigdecimal + concurrent-ruby (~> 1.0, >= 1.0.2) + connection_pool (>= 2.2.5) + drb + i18n (>= 1.6, < 2) + minitest (>= 5.1) + mutex_m + tzinfo (~> 2.0) + addressable (2.8.6) + public_suffix (>= 2.0.2, < 6.0) + appraisal (2.5.0) + bundler + rake + thor (>= 0.14.0) + base64 (0.2.0) + bigdecimal (3.1.4) + builder (3.2.4) + byebug (11.1.3) + capybara (3.39.2) + addressable + matrix + mini_mime (>= 0.1.3) + nokogiri (~> 1.8) + rack (>= 1.6.0) + rack-test (>= 0.6.3) + regexp_parser (>= 1.5, < 3.0) + xpath (~> 3.2) + concurrent-ruby (1.2.2) + connection_pool (2.4.1) + crass (1.0.6) + date (3.3.4) + debug (1.8.0) + irb (>= 1.5.0) + reline (>= 0.3.1) + drb (2.2.0) + ruby2_keywords + erubi (1.12.0) + globalid (1.2.1) + activesupport (>= 6.1) + i18n (1.14.1) + concurrent-ruby (~> 1.0) + io-console (0.6.0) + irb (1.9.1) + rdoc + reline (>= 0.3.8) + loofah (2.22.0) + crass (~> 1.0.2) + nokogiri (>= 1.12.0) + mail (2.8.1) + mini_mime (>= 0.1.1) + net-imap + net-pop + net-smtp + marcel (1.0.2) + matrix (0.4.2) + mini_mime (1.1.5) + mini_portile2 (2.8.5) + minitest (5.20.0) + mutex_m (0.2.0) + net-imap (0.4.7) + date + net-protocol + net-pop (0.1.2) + net-protocol + net-protocol (0.2.2) + timeout + net-smtp (0.4.0) + net-protocol + nio4r (2.7.0) + nokogiri (1.15.5) + mini_portile2 (~> 2.8.2) + racc (~> 1.4) + psych (5.1.1.1) + stringio + public_suffix (5.0.4) + racc (1.7.3) + rack (3.0.8) + rack-session (2.0.0) + rack (>= 3.0.0) + rack-test (2.1.0) + rack (>= 1.3) + rackup (2.1.0) + rack (>= 3) + webrick (~> 1.8) + rails (7.1.2) + actioncable (= 7.1.2) + actionmailbox (= 7.1.2) + actionmailer (= 7.1.2) + actionpack (= 7.1.2) + actiontext (= 7.1.2) + actionview (= 7.1.2) + activejob (= 7.1.2) + activemodel (= 7.1.2) + activerecord (= 7.1.2) + activestorage (= 7.1.2) + activesupport (= 7.1.2) + bundler (>= 1.15.0) + railties (= 7.1.2) + rails-dom-testing (2.2.0) + activesupport (>= 5.0.0) + minitest + nokogiri (>= 1.6) + rails-html-sanitizer (1.6.0) + loofah (~> 2.21) + nokogiri (~> 1.14) + railties (7.1.2) + actionpack (= 7.1.2) + activesupport (= 7.1.2) + irb + rackup (>= 1.0.0) + rake (>= 12.2) + thor (~> 1.0, >= 1.2.2) + zeitwerk (~> 2.6) + rake (13.1.0) + rdoc (6.6.0) + psych (>= 4.0.0) + regexp_parser (2.9.0) + reline (0.4.1) + io-console (~> 0.5) + rexml (3.2.6) + ruby2_keywords (0.0.5) + rubyzip (2.3.2) + selenium-webdriver (4.10.0) + rexml (~> 3.2, >= 3.2.5) + rubyzip (>= 1.2.2, < 3.0) + websocket (~> 1.0) + sprockets (4.2.1) + concurrent-ruby (~> 1.0) + rack (>= 2.2.4, < 4) + sprockets-rails (3.4.2) + actionpack (>= 5.2) + activesupport (>= 5.2) + sprockets (>= 3.0.0) + sqlite3 (1.6.9-x86_64-linux) + stimulus-rails (1.3.3) + railties (>= 6.0.0) + stringio (3.1.0) + thor (1.3.0) + timeout (0.4.1) + turbo-rails (1.5.0) + actionpack (>= 6.0.0) + activejob (>= 6.0.0) + railties (>= 6.0.0) + tzinfo (2.0.6) + concurrent-ruby (~> 1.0) + webdrivers (5.3.1) + nokogiri (~> 1.6) + rubyzip (>= 1.3.0) + selenium-webdriver (~> 4.0, < 4.11) + webrick (1.8.1) + websocket (1.2.10) + websocket-driver (0.7.6) + websocket-extensions (>= 0.1.0) + websocket-extensions (0.1.5) + xpath (3.2.0) + nokogiri (~> 1.8) + zeitwerk (2.6.12) + +PLATFORMS + x86_64-darwin-23 + x86_64-linux + +DEPENDENCIES + appraisal + byebug + capybara + debug (>= 1.0.0) + jsbundling-rails! + rails (~> 7.1.0) + rexml + selenium-webdriver + sprockets-rails + sqlite3 + stimulus-rails + turbo-rails + webdrivers + +BUNDLED WITH + 2.2.32 diff --git a/gemfiles/rails_main_propshaft.gemfile b/gemfiles/rails_main_propshaft.gemfile new file mode 100644 index 0000000..e4df6f0 --- /dev/null +++ b/gemfiles/rails_main_propshaft.gemfile @@ -0,0 +1,21 @@ +# This file was generated by Appraisal + +source "https://rubygems.org" + +gem "rails", branch: "main", git: "https://github.com/rails/rails.git" +gem "appraisal" +gem "debug", ">= 1.0.0" +gem "sqlite3" +gem "propshaft" + +group :test do + gem "turbo-rails" + gem "stimulus-rails" + gem "byebug" + gem "rexml" + gem "capybara" + gem "selenium-webdriver" + gem "webdrivers" +end + +gemspec path: "../" diff --git a/gemfiles/rails_main_sprockets.gemfile b/gemfiles/rails_main_sprockets.gemfile new file mode 100644 index 0000000..3b57d1d --- /dev/null +++ b/gemfiles/rails_main_sprockets.gemfile @@ -0,0 +1,21 @@ +# This file was generated by Appraisal + +source "https://rubygems.org" + +gem "rails", branch: "main", git: "https://github.com/rails/rails.git" +gem "appraisal" +gem "debug", ">= 1.0.0" +gem "sqlite3" +gem "sprockets-rails" + +group :test do + gem "turbo-rails" + gem "stimulus-rails" + gem "byebug" + gem "rexml" + gem "capybara" + gem "selenium-webdriver" + gem "webdrivers" +end + +gemspec path: "../" diff --git a/test/installer_test.rb b/test/installer_test.rb new file mode 100644 index 0000000..a3a7108 --- /dev/null +++ b/test/installer_test.rb @@ -0,0 +1,59 @@ +require "test_helper" + +class InstallerTest < ActiveSupport::TestCase + include RailsAppHelpers + + test "installer" do + with_new_rails_app do + out, _err = run_command("bin/rails", "javascript:install:webpack") + + assert_equal 0, File.size("app/assets/builds/.keep") + assert_match "/app/assets/builds/*\n!/app/assets/builds/.keep", File.read(".gitignore") + assert_equal File.read("#{__dir__}/../lib/install/webpack/webpack.config.js"), File.read("webpack.config.js") + assert_equal File.read("#{__dir__}/../lib/install/Procfile.dev"), File.read("Procfile.dev") + assert_equal File.read("#{__dir__}/../lib/install/dev"), File.read("bin/dev") + assert_equal 0700, File.stat("bin/dev").mode & 0700 + + if sprockets? + assert_match "//= link_tree ../images", File.read("app/assets/config/manifest.js") + assert_match "//= link_directory ../stylesheets .css", File.read("app/assets/config/manifest.js") + assert_match "//= link_tree ../builds", File.read("app/assets/config/manifest.js") + end + end + end + + test "installer with missing .gitignore" do + with_new_rails_app do + FileUtils.rm(".gitignore") + out, _err = run_command("bin/rails", "javascript:install:webpack") + + assert_not File.exist?(".gitignore") + end + end + + test "installer with pre-existing application.scss" do + with_new_rails_app do + File.write("app/assets/stylesheets/application.scss", "// pre-existing") + out, _err = run_command("bin/rails", "javascript:install:webpack") + + assert_equal "// pre-existing", File.read("app/assets/stylesheets/application.scss") + end + end + + test "installer with pre-existing Procfile" do + with_new_rails_app do + File.write("Procfile.dev", "pre: existing\n") + out, _err = run_command("bin/rails", "javascript:install:webpack") + + assert_equal "pre: existing\njs: yarn build --watch\n", File.read("Procfile.dev") + end + end + + private + def with_new_rails_app(&block) + super do + # We can hook into here, for example to override default Rake behavior to stub out lengthy processes + block.call + end + end +end \ No newline at end of file diff --git a/test/test_helper.rb b/test/test_helper.rb new file mode 100644 index 0000000..a6e18cb --- /dev/null +++ b/test/test_helper.rb @@ -0,0 +1,69 @@ +# Configure Rails Environment +ENV["RAILS_ENV"] = "test" + +require "fileutils" +require "rails" +require "rails/test_help" + +module RailsAppHelpers + def self.included(base) + base.include ActiveSupport::Testing::Isolation + end + + private + def sprockets? + Gem.loaded_specs.key?("sprockets-rails") + end + + def propshaft? + Gem.loaded_specs.key?("propshaft") + end + + def asset_pipeline_option + if Rails::VERSION::MAJOR >= 7 + if propshaft? + "--asset-pipeline=propshaft" + elsif sprockets? + "--asset-pipeline=sprockets" + end + end + end + + def create_new_rails_app(app_dir) + require "rails/generators/rails/app/app_generator" + Rails::Generators::AppGenerator.start([app_dir, *asset_pipeline_option, "--skip-bundle", "--skip-bootsnap", "--quiet"]) + + Dir.chdir(app_dir) do + gemfile = File.read("Gemfile") + + gemfile.gsub!(/^gem ["']jsbundling-rails["'].*/, "") + gemfile << %(gem "jsbundling-rails", path: #{File.expand_path("..", __dir__).inspect}\n) + + if Rails::VERSION::PRE == "alpha" + gemfile.gsub!(/^gem ["']rails["'].*/, "") + gemfile << %(gem "rails", path: #{Gem.loaded_specs["rails"].full_gem_path.inspect}\n) + end + + File.write("Gemfile", gemfile) + + run_command("bundle", "install") + end + end + + def with_new_rails_app(&block) + require "digest/sha1" + variant = [RUBY_VERSION, Gem.loaded_specs["rails"].full_gem_path, asset_pipeline_option] + app_name = "app_#{Digest::SHA1.hexdigest(variant.to_s)}" + + Dir.mktmpdir do |tmpdir| + create_new_rails_app("#{tmpdir}/#{app_name}") + Dir.chdir("#{tmpdir}/#{app_name}", &block) + end + end + + def run_command(*command) + Bundler.with_unbundled_env do + capture_subprocess_io { system(*command, exception: true) } + end + end +end \ No newline at end of file From f139eef97feb09b31201f03117ff3fa9d0a530a6 Mon Sep 17 00:00:00 2001 From: zzak Date: Fri, 12 Jan 2024 16:55:02 +0900 Subject: [PATCH 02/13] Add tests for webpack, other parts of shared installer stuff --- test/installer_test.rb | 45 ++++++++++++++++++++++++++++++++++++------ 1 file changed, 39 insertions(+), 6 deletions(-) diff --git a/test/installer_test.rb b/test/installer_test.rb index a3a7108..c8e8b43 100644 --- a/test/installer_test.rb +++ b/test/installer_test.rb @@ -5,12 +5,12 @@ class InstallerTest < ActiveSupport::TestCase test "installer" do with_new_rails_app do - out, _err = run_command("bin/rails", "javascript:install:webpack") + out, _err = run_command("bin/rails", "javascript:install:shared") assert_equal 0, File.size("app/assets/builds/.keep") assert_match "/app/assets/builds/*\n!/app/assets/builds/.keep", File.read(".gitignore") - assert_equal File.read("#{__dir__}/../lib/install/webpack/webpack.config.js"), File.read("webpack.config.js") - assert_equal File.read("#{__dir__}/../lib/install/Procfile.dev"), File.read("Procfile.dev") + assert_equal File.read("#{__dir__}/../lib/install/application.js"), File.read("app/javascript/application.js") + assert_equal File.read("#{__dir__}/../lib/install/package.json"), File.read("package.json") assert_equal File.read("#{__dir__}/../lib/install/dev"), File.read("bin/dev") assert_equal 0700, File.stat("bin/dev").mode & 0700 @@ -22,6 +22,29 @@ class InstallerTest < ActiveSupport::TestCase end end + test "installer for webpack" do + with_new_rails_app do + out, _err = run_command("bin/rails", "javascript:install:webpack") + + assert_equal File.read("#{__dir__}/../lib/install/Procfile.dev"), File.read("Procfile.dev") + assert_equal File.read("#{__dir__}/../lib/install/webpack/webpack.config.js"), File.read("webpack.config.js") + + if sprockets? + assert_match "//= link_tree ../images", File.read("app/assets/config/manifest.js") + assert_match "//= link_directory ../stylesheets .css", File.read("app/assets/config/manifest.js") + assert_match "//= link_tree ../builds", File.read("app/assets/config/manifest.js") + end + end + end + + test "installer with .gitignore" do + with_new_rails_app do + out, _err = run_command("bin/rails", "javascript:install:webpack") + + assert_match %(/app/assets/builds/*\n!/app/assets/builds/.keep), File.read(".gitignore") + end + end + test "installer with missing .gitignore" do with_new_rails_app do FileUtils.rm(".gitignore") @@ -31,12 +54,22 @@ class InstallerTest < ActiveSupport::TestCase end end - test "installer with pre-existing application.scss" do + test "installer with pre-existing layouts/application.html.erb" do + with_new_rails_app do + out, _err = run_command("bin/rails", "javascript:install:webpack") + + assert_match %(Add JavaScript include tag in application layout), out + assert_match %(<%= javascript_include_tag "application", "data-turbo-track": "reload", type: "module" %>), File.read("app/views/layouts/application.html.erb") + end + end + + test "installer with missing layouts/application.html.erb" do with_new_rails_app do - File.write("app/assets/stylesheets/application.scss", "// pre-existing") + FileUtils.rm("app/views/layouts/application.html.erb") out, _err = run_command("bin/rails", "javascript:install:webpack") - assert_equal "// pre-existing", File.read("app/assets/stylesheets/application.scss") + assert_match %(Default application.html.erb is missing!), out + assert_match %(Add <%= javascript_include_tag "application", "data-turbo-track": "reload", type: "module" %> within the tag in your custom layout.), out end end From 24e88caa9a929c207fbbcf662906d2c692a48b54 Mon Sep 17 00:00:00 2001 From: zzak Date: Fri, 12 Jan 2024 17:27:01 +0900 Subject: [PATCH 03/13] Move webpack tests to a subdirectory --- test/installer/webpack_test.rb | 35 ++++++++++++++++++++++++++++++++++ test/installer_test.rb | 34 +++++---------------------------- 2 files changed, 40 insertions(+), 29 deletions(-) create mode 100644 test/installer/webpack_test.rb diff --git a/test/installer/webpack_test.rb b/test/installer/webpack_test.rb new file mode 100644 index 0000000..9ec3437 --- /dev/null +++ b/test/installer/webpack_test.rb @@ -0,0 +1,35 @@ +require "test_helper" + +class WebpackInstallerTest < ActiveSupport::TestCase + include RailsAppHelpers + + test "installer for webpack" do + with_new_rails_app do + _out, _err = run_command("bin/rails", "javascript:install:webpack") + + assert_equal File.read("#{__dir__}/../../lib/install/Procfile.dev"), File.read("Procfile.dev") + assert_equal File.read("#{__dir__}/../../lib/install/webpack/webpack.config.js"), File.read("webpack.config.js") + + JSON.parse(File.read("package.json")).tap do |package| + assert_not_nil package["dependencies"]["webpack"] + assert_not_nil package["dependencies"]["webpack-cli"] + assert_equal "webpack --config webpack.config.js", package["scripts"]["build"] + end + + if sprockets? + assert_match "//= link_tree ../images", File.read("app/assets/config/manifest.js") + assert_match "//= link_directory ../stylesheets .css", File.read("app/assets/config/manifest.js") + assert_match "//= link_tree ../builds", File.read("app/assets/config/manifest.js") + end + end + end + + test "installer with pre-existing Procfile" do + with_new_rails_app do + File.write("Procfile.dev", "pre: existing\n") + _out, _err = run_command("bin/rails", "javascript:install:webpack") + + assert_equal "pre: existing\njs: yarn build --watch\n", File.read("Procfile.dev") + end + end +end diff --git a/test/installer_test.rb b/test/installer_test.rb index c8e8b43..5873fae 100644 --- a/test/installer_test.rb +++ b/test/installer_test.rb @@ -5,7 +5,7 @@ class InstallerTest < ActiveSupport::TestCase test "installer" do with_new_rails_app do - out, _err = run_command("bin/rails", "javascript:install:shared") + _out, _err = run_command("bin/rails", "javascript:install:shared") assert_equal 0, File.size("app/assets/builds/.keep") assert_match "/app/assets/builds/*\n!/app/assets/builds/.keep", File.read(".gitignore") @@ -22,24 +22,9 @@ class InstallerTest < ActiveSupport::TestCase end end - test "installer for webpack" do - with_new_rails_app do - out, _err = run_command("bin/rails", "javascript:install:webpack") - - assert_equal File.read("#{__dir__}/../lib/install/Procfile.dev"), File.read("Procfile.dev") - assert_equal File.read("#{__dir__}/../lib/install/webpack/webpack.config.js"), File.read("webpack.config.js") - - if sprockets? - assert_match "//= link_tree ../images", File.read("app/assets/config/manifest.js") - assert_match "//= link_directory ../stylesheets .css", File.read("app/assets/config/manifest.js") - assert_match "//= link_tree ../builds", File.read("app/assets/config/manifest.js") - end - end - end - test "installer with .gitignore" do with_new_rails_app do - out, _err = run_command("bin/rails", "javascript:install:webpack") + _out, _err = run_command("bin/rails", "javascript:install:shared") assert_match %(/app/assets/builds/*\n!/app/assets/builds/.keep), File.read(".gitignore") end @@ -48,7 +33,7 @@ class InstallerTest < ActiveSupport::TestCase test "installer with missing .gitignore" do with_new_rails_app do FileUtils.rm(".gitignore") - out, _err = run_command("bin/rails", "javascript:install:webpack") + _out, _err = run_command("bin/rails", "javascript:install:shared") assert_not File.exist?(".gitignore") end @@ -56,7 +41,7 @@ class InstallerTest < ActiveSupport::TestCase test "installer with pre-existing layouts/application.html.erb" do with_new_rails_app do - out, _err = run_command("bin/rails", "javascript:install:webpack") + out, _err = run_command("bin/rails", "javascript:install:shared") assert_match %(Add JavaScript include tag in application layout), out assert_match %(<%= javascript_include_tag "application", "data-turbo-track": "reload", type: "module" %>), File.read("app/views/layouts/application.html.erb") @@ -66,22 +51,13 @@ class InstallerTest < ActiveSupport::TestCase test "installer with missing layouts/application.html.erb" do with_new_rails_app do FileUtils.rm("app/views/layouts/application.html.erb") - out, _err = run_command("bin/rails", "javascript:install:webpack") + out, _err = run_command("bin/rails", "javascript:install:shared") assert_match %(Default application.html.erb is missing!), out assert_match %(Add <%= javascript_include_tag "application", "data-turbo-track": "reload", type: "module" %> within the tag in your custom layout.), out end end - test "installer with pre-existing Procfile" do - with_new_rails_app do - File.write("Procfile.dev", "pre: existing\n") - out, _err = run_command("bin/rails", "javascript:install:webpack") - - assert_equal "pre: existing\njs: yarn build --watch\n", File.read("Procfile.dev") - end - end - private def with_new_rails_app(&block) super do From a1e93e8337b2649221332d3fcc579389d77e5f47 Mon Sep 17 00:00:00 2001 From: Kevin Sylvestre Date: Fri, 12 Jan 2024 01:04:54 -0800 Subject: [PATCH 04/13] Tests for esbuild Ensures: 1. The esbuild NPM package is installed as a dependency 2. The esbuild command is used as a build script 3. The Procfile.dev is copied / modified --- test/installer/esbuild_test.rb | 35 ++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 test/installer/esbuild_test.rb diff --git a/test/installer/esbuild_test.rb b/test/installer/esbuild_test.rb new file mode 100644 index 0000000..e09f371 --- /dev/null +++ b/test/installer/esbuild_test.rb @@ -0,0 +1,35 @@ +require "json" +require "test_helper" + +class EsbuildInstallerTest < ActiveSupport::TestCase + include RailsAppHelpers + + test "installer for esbuild" do + with_new_rails_app do + _out, _err = run_command("bin/rails", "javascript:install:esbuild") + + assert_equal File.read("#{__dir__}/../../lib/install/Procfile.dev"), File.read("Procfile.dev") + + JSON.parse(File.read("package.json")).tap do |package| + assert_not_nil package["dependencies"]["esbuild"] + assert_match "esbuild", package["scripts"]["build"] + end + + if sprockets? + assert_match "//= link_tree ../builds", File.read("app/assets/config/manifest.js") + end + end + end + + test "installer with pre-existing Procfile" do + with_new_rails_app do + File.write("Procfile.dev", "pre: existing\n") + _out, _err = run_command("bin/rails", "javascript:install:esbuild") + + assert_equal <<~YAML, File.read("Procfile.dev") + pre: existing + js: yarn build --watch + YAML + end + end +end From 0adcb7be7c8a0aa59724426212ce818d2a17b5f2 Mon Sep 17 00:00:00 2001 From: Kevin Sylvestre Date: Fri, 12 Jan 2024 01:11:15 -0800 Subject: [PATCH 05/13] Tests for rollup Ensures: 1. The rollup NPM packages are installed as dependencies 2. The rollup command is used as a build script 3. The Procfile.dev is copied / modified --- test/installer/rollup_test.rb | 37 +++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 test/installer/rollup_test.rb diff --git a/test/installer/rollup_test.rb b/test/installer/rollup_test.rb new file mode 100644 index 0000000..8b01c7a --- /dev/null +++ b/test/installer/rollup_test.rb @@ -0,0 +1,37 @@ +require "json" +require "test_helper" + +class RollupInstallerTest < ActiveSupport::TestCase + include RailsAppHelpers + + test "installer for rollup" do + with_new_rails_app do + _out, _err = run_command("bin/rails", "javascript:install:rollup") + + assert_equal File.read("#{__dir__}/../../lib/install/Procfile.dev"), File.read("Procfile.dev") + assert_equal File.read("#{__dir__}/../../lib/install/rollup/rollup.config.js"), File.read("rollup.config.js") + + JSON.parse(File.read("package.json")).tap do |package| + assert_not_nil package["dependencies"]["rollup"] + assert_not_nil package["dependencies"]["@rollup/plugin-node-resolve"] + assert_equal "rollup -c --bundleConfigAsCjs rollup.config.js", package["scripts"]["build"] + end + + if sprockets? + assert_match "//= link_tree ../builds", File.read("app/assets/config/manifest.js") + end + end + end + + test "installer with pre-existing Procfile" do + with_new_rails_app do + File.write("Procfile.dev", "pre: existing\n") + _out, _err = run_command("bin/rails", "javascript:install:rollup") + + assert_equal <<~YAML, File.read("Procfile.dev") + pre: existing + js: yarn build --watch + YAML + end + end +end From 71d69118c9a78513ac2b4678870f4bfd4c654f92 Mon Sep 17 00:00:00 2001 From: Kevin Sylvestre Date: Fri, 12 Jan 2024 01:23:17 -0800 Subject: [PATCH 06/13] Tests for bun Ensures: 1. The bun config file is copied 2. The bun command is used as a build script 3. The Procfile.dev is copied / modified --- test/installer/bun_test.rb | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 test/installer/bun_test.rb diff --git a/test/installer/bun_test.rb b/test/installer/bun_test.rb new file mode 100644 index 0000000..5a5bae6 --- /dev/null +++ b/test/installer/bun_test.rb @@ -0,0 +1,36 @@ +require "json" +require "test_helper" + +class BunInstallerTest < ActiveSupport::TestCase + include RailsAppHelpers + + test "installer for bun" do + with_new_rails_app do + _out, _err = run_command("bin/rails", "javascript:install:bun") + + assert_match "js: bun run build --watch", File.read("Procfile.dev") + + assert_equal File.read("#{__dir__}/../../lib/install/bun/bun.config.js"), File.read("bun.config.js") + + JSON.parse(File.read("package.json")).tap do |package| + assert_equal("bun bun.config.js", package["scripts"]["build"]) + end + + if sprockets? + assert_match "//= link_tree ../builds", File.read("app/assets/config/manifest.js") + end + end + end + + test "installer with pre-existing Procfile" do + with_new_rails_app do + File.write("Procfile.dev", "pre: existing\n") + _out, _err = run_command("bin/rails", "javascript:install:bun") + + assert_equal <<~YAML, File.read("Procfile.dev") + pre: existing + js: bun run build --watch + YAML + end + end +end From 6e7eb832659ebb31109a5d0b8dc9634cf3f09141 Mon Sep 17 00:00:00 2001 From: zzak Date: Fri, 12 Jan 2024 19:06:31 +0900 Subject: [PATCH 07/13] :broom: cleaning some things up --- .github/workflows/ci.yml | 8 +------- Gemfile | 2 -- Gemfile.lock | 7 ------- gemfiles/rails_7_0_propshaft.gemfile | 1 - gemfiles/rails_7_0_propshaft.gemfile.lock | 3 +-- gemfiles/rails_7_0_sprockets.gemfile | 1 - gemfiles/rails_7_0_sprockets.gemfile.lock | 3 +-- gemfiles/rails_7_1_propshaft.gemfile | 1 - gemfiles/rails_7_1_propshaft.gemfile.lock | 3 +-- gemfiles/rails_7_1_sprockets.gemfile | 1 - gemfiles/rails_7_1_sprockets.gemfile.lock | 3 +-- gemfiles/rails_main_propshaft.gemfile | 1 - gemfiles/rails_main_sprockets.gemfile | 1 - 13 files changed, 5 insertions(+), 30 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b219055..52c4ea0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,13 +45,7 @@ jobs: ruby-version: ${{ matrix.ruby-version }} bundler-cache: true - # This prevents a "Failed to build gem native extension" error when - # running `bundle install` inside a Rails app that is generated for - # testing. The error occurs only in CI, and only when using Ruby 3.0 and - # Rails >= 7.1. - - name: Install sass-embedded gem - if: ${{ matrix.ruby-version == '3.0' }} - run: gem install sass-embedded + - uses: oven-sh/setup-bun@v1 - name: Run tests run: | diff --git a/Gemfile b/Gemfile index 5ad412d..835e274 100644 --- a/Gemfile +++ b/Gemfile @@ -9,8 +9,6 @@ gem "rails", "~> #{rails_version}" gem "appraisal" gem "debug", ">= 1.0.0" -gem "sqlite3" - group :test do gem "turbo-rails" gem "stimulus-rails" diff --git a/Gemfile.lock b/Gemfile.lock index 06d2b01..365b044 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -187,12 +187,6 @@ GEM actionpack (>= 5.2) activesupport (>= 5.2) sprockets (>= 3.0.0) - sqlite3 (1.7.0-aarch64-linux) - sqlite3 (1.7.0-arm-linux) - sqlite3 (1.7.0-arm64-darwin) - sqlite3 (1.7.0-x86-linux) - sqlite3 (1.7.0-x86_64-darwin) - sqlite3 (1.7.0-x86_64-linux) stimulus-rails (1.3.3) railties (>= 6.0.0) stringio (3.1.0) @@ -233,7 +227,6 @@ DEPENDENCIES rails (~> 6.1.0) rexml selenium-webdriver - sqlite3 stimulus-rails turbo-rails webdrivers diff --git a/gemfiles/rails_7_0_propshaft.gemfile b/gemfiles/rails_7_0_propshaft.gemfile index c3518c9..fb41c1c 100644 --- a/gemfiles/rails_7_0_propshaft.gemfile +++ b/gemfiles/rails_7_0_propshaft.gemfile @@ -5,7 +5,6 @@ source "https://rubygems.org" gem "rails", "~> 7.0.0" gem "appraisal" gem "debug", ">= 1.0.0" -gem "sqlite3" gem "propshaft" group :test do diff --git a/gemfiles/rails_7_0_propshaft.gemfile.lock b/gemfiles/rails_7_0_propshaft.gemfile.lock index 2358f59..679ca6f 100644 --- a/gemfiles/rails_7_0_propshaft.gemfile.lock +++ b/gemfiles/rails_7_0_propshaft.gemfile.lock @@ -183,7 +183,6 @@ GEM rexml (~> 3.2, >= 3.2.5) rubyzip (>= 1.2.2, < 3.0) websocket (~> 1.0) - sqlite3 (1.6.9-x86_64-linux) stimulus-rails (1.3.3) railties (>= 6.0.0) stringio (3.1.0) @@ -208,6 +207,7 @@ GEM zeitwerk (2.6.12) PLATFORMS + arm64-darwin-23 x86_64-darwin-23 x86_64-linux @@ -221,7 +221,6 @@ DEPENDENCIES rails (~> 7.0.0) rexml selenium-webdriver - sqlite3 stimulus-rails turbo-rails webdrivers diff --git a/gemfiles/rails_7_0_sprockets.gemfile b/gemfiles/rails_7_0_sprockets.gemfile index 01d1ad2..9117170 100644 --- a/gemfiles/rails_7_0_sprockets.gemfile +++ b/gemfiles/rails_7_0_sprockets.gemfile @@ -5,7 +5,6 @@ source "https://rubygems.org" gem "rails", "~> 7.0.0" gem "appraisal" gem "debug", ">= 1.0.0" -gem "sqlite3" gem "sprockets-rails" group :test do diff --git a/gemfiles/rails_7_0_sprockets.gemfile.lock b/gemfiles/rails_7_0_sprockets.gemfile.lock index 5d0f2c6..5afe741 100644 --- a/gemfiles/rails_7_0_sprockets.gemfile.lock +++ b/gemfiles/rails_7_0_sprockets.gemfile.lock @@ -185,7 +185,6 @@ GEM actionpack (>= 5.2) activesupport (>= 5.2) sprockets (>= 3.0.0) - sqlite3 (1.6.9-x86_64-linux) stimulus-rails (1.3.3) railties (>= 6.0.0) stringio (3.1.0) @@ -210,6 +209,7 @@ GEM zeitwerk (2.6.12) PLATFORMS + arm64-darwin-23 x86_64-darwin-23 x86_64-linux @@ -223,7 +223,6 @@ DEPENDENCIES rexml selenium-webdriver sprockets-rails - sqlite3 stimulus-rails turbo-rails webdrivers diff --git a/gemfiles/rails_7_1_propshaft.gemfile b/gemfiles/rails_7_1_propshaft.gemfile index 79f9311..c1a5da2 100644 --- a/gemfiles/rails_7_1_propshaft.gemfile +++ b/gemfiles/rails_7_1_propshaft.gemfile @@ -5,7 +5,6 @@ source "https://rubygems.org" gem "rails", "~> 7.1.0" gem "appraisal" gem "debug", ">= 1.0.0" -gem "sqlite3" gem "propshaft" group :test do diff --git a/gemfiles/rails_7_1_propshaft.gemfile.lock b/gemfiles/rails_7_1_propshaft.gemfile.lock index c2f0bb6..0a8a5b8 100644 --- a/gemfiles/rails_7_1_propshaft.gemfile.lock +++ b/gemfiles/rails_7_1_propshaft.gemfile.lock @@ -204,7 +204,6 @@ GEM rexml (~> 3.2, >= 3.2.5) rubyzip (>= 1.2.2, < 3.0) websocket (~> 1.0) - sqlite3 (1.6.9-x86_64-linux) stimulus-rails (1.3.3) railties (>= 6.0.0) stringio (3.1.0) @@ -230,6 +229,7 @@ GEM zeitwerk (2.6.12) PLATFORMS + arm64-darwin-23 x86_64-darwin-23 x86_64-linux @@ -243,7 +243,6 @@ DEPENDENCIES rails (~> 7.1.0) rexml selenium-webdriver - sqlite3 stimulus-rails turbo-rails webdrivers diff --git a/gemfiles/rails_7_1_sprockets.gemfile b/gemfiles/rails_7_1_sprockets.gemfile index a344f30..7398036 100644 --- a/gemfiles/rails_7_1_sprockets.gemfile +++ b/gemfiles/rails_7_1_sprockets.gemfile @@ -5,7 +5,6 @@ source "https://rubygems.org" gem "rails", "~> 7.1.0" gem "appraisal" gem "debug", ">= 1.0.0" -gem "sqlite3" gem "sprockets-rails" group :test do diff --git a/gemfiles/rails_7_1_sprockets.gemfile.lock b/gemfiles/rails_7_1_sprockets.gemfile.lock index f28f5d3..866cb63 100644 --- a/gemfiles/rails_7_1_sprockets.gemfile.lock +++ b/gemfiles/rails_7_1_sprockets.gemfile.lock @@ -206,7 +206,6 @@ GEM actionpack (>= 5.2) activesupport (>= 5.2) sprockets (>= 3.0.0) - sqlite3 (1.6.9-x86_64-linux) stimulus-rails (1.3.3) railties (>= 6.0.0) stringio (3.1.0) @@ -232,6 +231,7 @@ GEM zeitwerk (2.6.12) PLATFORMS + arm64-darwin-23 x86_64-darwin-23 x86_64-linux @@ -245,7 +245,6 @@ DEPENDENCIES rexml selenium-webdriver sprockets-rails - sqlite3 stimulus-rails turbo-rails webdrivers diff --git a/gemfiles/rails_main_propshaft.gemfile b/gemfiles/rails_main_propshaft.gemfile index e4df6f0..78fc8cb 100644 --- a/gemfiles/rails_main_propshaft.gemfile +++ b/gemfiles/rails_main_propshaft.gemfile @@ -5,7 +5,6 @@ source "https://rubygems.org" gem "rails", branch: "main", git: "https://github.com/rails/rails.git" gem "appraisal" gem "debug", ">= 1.0.0" -gem "sqlite3" gem "propshaft" group :test do diff --git a/gemfiles/rails_main_sprockets.gemfile b/gemfiles/rails_main_sprockets.gemfile index 3b57d1d..17d2284 100644 --- a/gemfiles/rails_main_sprockets.gemfile +++ b/gemfiles/rails_main_sprockets.gemfile @@ -5,7 +5,6 @@ source "https://rubygems.org" gem "rails", branch: "main", git: "https://github.com/rails/rails.git" gem "appraisal" gem "debug", ">= 1.0.0" -gem "sqlite3" gem "sprockets-rails" group :test do From 6f281a422f7cfdcc924dd01b385b8b3b6e1c30d5 Mon Sep 17 00:00:00 2001 From: Kevin Sylvestre Date: Fri, 12 Jan 2024 02:21:08 -0800 Subject: [PATCH 08/13] fixup! Move webpack tests to a subdirectory --- test/installer/webpack_test.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/test/installer/webpack_test.rb b/test/installer/webpack_test.rb index 9ec3437..6ef30db 100644 --- a/test/installer/webpack_test.rb +++ b/test/installer/webpack_test.rb @@ -1,3 +1,4 @@ +require "json" require "test_helper" class WebpackInstallerTest < ActiveSupport::TestCase From 9821573b5932d657e414ef8020d19384aa2de0a6 Mon Sep 17 00:00:00 2001 From: zzak Date: Fri, 12 Jan 2024 19:46:20 +0900 Subject: [PATCH 09/13] puts debugging :see_no_evil: --- test/test_helper.rb | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/test/test_helper.rb b/test/test_helper.rb index a6e18cb..5dbedaa 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -63,7 +63,15 @@ def with_new_rails_app(&block) def run_command(*command) Bundler.with_unbundled_env do - capture_subprocess_io { system(*command, exception: true) } + out, err = capture_subprocess_io { system(*command, exception: true) } + puts "Output:" + puts out + puts nil; + if err + puts "Error:" + puts err + end + [out, err] end end end \ No newline at end of file From ca0bf95f52250dd865bce69e2c1ca718d58b6f41 Mon Sep 17 00:00:00 2001 From: zzak Date: Fri, 12 Jan 2024 19:59:45 +0900 Subject: [PATCH 10/13] Turn off bundler cache --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 52c4ea0..64c22db 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -43,7 +43,7 @@ jobs: uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby-version }} - bundler-cache: true + bundler-cache: false - uses: oven-sh/setup-bun@v1 From 74a4e4057a7620da6f234d48cf1fe14c480c9913 Mon Sep 17 00:00:00 2001 From: zzak Date: Fri, 12 Jan 2024 20:09:02 +0900 Subject: [PATCH 11/13] need to bundle install with cache off --- .github/workflows/ci.yml | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 64c22db..15c265d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,11 +5,7 @@ jobs: strategy: fail-fast: false matrix: - ruby-version: - - "3.0" - - "3.1" - - "3.2" - - "3.3" + ruby: [ "3.0", "3.1", "3.2", "3.3" ] gemfile: - Gemfile - gemfiles/rails_7_0_propshaft.gemfile @@ -19,18 +15,20 @@ jobs: - gemfiles/rails_7_1_sprockets.gemfile - gemfiles/rails_main_sprockets.gemfile exclude: - - ruby-version: "3.0" + - ruby: "3.0" gemfile: gemfiles/rails_main_propshaft.gemfile - - ruby-version: "3.0" + - ruby: "3.0" gemfile: gemfiles/rails_main_sprockets.gemfile + continue-on-error: [ false ] - name: ${{ format('Tests (Ruby {0}, {1})', matrix.ruby-version, matrix.gemfile) }} + name: ${{ format('Tests (Ruby {0}, {1})', matrix.ruby, matrix.gemfile) }} runs-on: ubuntu-latest continue-on-error: ${{ matrix.continue-on-error }} env: BUNDLE_GEMFILE: ${{ matrix.gemfile }} + BUNDLE_PATH: "vendor/bundle-${{ matrix.gemfile }}" steps: - uses: actions/checkout@v4 @@ -42,9 +40,13 @@ jobs: - name: Install Ruby uses: ruby/setup-ruby@v1 with: - ruby-version: ${{ matrix.ruby-version }} + ruby-version: ${{ matrix.ruby }} bundler-cache: false + - name: Install dependencies + run: | + bundle install --jobs 4 --retry 3 + - uses: oven-sh/setup-bun@v1 - name: Run tests From 5467677f886a3c39db40691b4d677a51ed75a97e Mon Sep 17 00:00:00 2001 From: zzak Date: Fri, 12 Jan 2024 20:26:28 +0900 Subject: [PATCH 12/13] maybe install node --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 15c265d..20a2c57 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -47,6 +47,7 @@ jobs: run: | bundle install --jobs 4 --retry 3 + - uses: actions/setup-node@v4 - uses: oven-sh/setup-bun@v1 - name: Run tests From 0aec31ea83c7713fce93464105904b91db9c5307 Mon Sep 17 00:00:00 2001 From: zzak Date: Fri, 12 Jan 2024 20:41:04 +0900 Subject: [PATCH 13/13] add back install cache --- .gitignore | 6 ++++++ test/test_helper.rb | 10 +++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index af7afc7..f9cdf48 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,9 @@ +/.bundle/ .byebug_history *.gem +/tmp/ +/node_modules +**/tmp/ + +# Ignore Gemfile.lock files for Rails main branch. /gemfiles/rails_main*.gemfile.lock diff --git a/test/test_helper.rb b/test/test_helper.rb index 5dbedaa..0a441ce 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -54,9 +54,17 @@ def with_new_rails_app(&block) require "digest/sha1" variant = [RUBY_VERSION, Gem.loaded_specs["rails"].full_gem_path, asset_pipeline_option] app_name = "app_#{Digest::SHA1.hexdigest(variant.to_s)}" + cache_dir = "#{__dir__}/../tmp" + FileUtils.mkdir_p(cache_dir) Dir.mktmpdir do |tmpdir| - create_new_rails_app("#{tmpdir}/#{app_name}") + if Dir.exist?("#{cache_dir}/#{app_name}") + FileUtils.cp_r("#{cache_dir}/#{app_name}", tmpdir) + else + create_new_rails_app("#{tmpdir}/#{app_name}") + FileUtils.cp_r("#{tmpdir}/#{app_name}", cache_dir) # Cache app for future runs. + end + Dir.chdir("#{tmpdir}/#{app_name}", &block) end end