From 997d74cfa3fcef42e67616495b5e7836962ad976 Mon Sep 17 00:00:00 2001 From: Larry Reid Date: Wed, 19 Nov 2025 01:16:51 +0000 Subject: [PATCH 1/8] Remove Gemfile from demo/ --- .github/workflows/ruby.yml | 6 +- demo/Gemfile | 32 ---- demo/Gemfile.lock | 313 ------------------------------------- demo/Procfile.dev | 2 +- gemfiles/common.gemfile | 9 +- 5 files changed, 10 insertions(+), 352 deletions(-) delete mode 100644 demo/Gemfile delete mode 100644 demo/Gemfile.lock diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index f967ff7e..d032dc3f 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -26,7 +26,7 @@ jobs: # run: | # bundle exec danger - name: Rubocop - run: bundle exec rubocop --autocorrect + run: rubocop --autocorrect Test: runs-on: ubuntu-latest strategy: @@ -44,7 +44,7 @@ jobs: ruby-version: ${{ matrix.ruby-version }} bundler-cache: true - name: Run tests - run: bundle exec rake test + run: rake test Demo: runs-on: ubuntu-latest steps: @@ -57,7 +57,7 @@ jobs: ruby-version: 3.4.2 - name: Run tests working-directory: demo - run: bundle exec rake test:all + run: rake test:all # - name: Commit changed screenshots and other files # if: failure() # working-directory: demo diff --git a/demo/Gemfile b/demo/Gemfile deleted file mode 100644 index cbf8dcfe..00000000 --- a/demo/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -source "https://rubygems.org" - -gem "bootstrap_form", path: ".." - -gem "bootsnap", require: false -gem "cssbundling-rails" -gem "htmlbeautifier" -gem "jbuilder" -gem "jsbundling-rails" -gem "propshaft" -gem "puma" -gem "rails", "~> 8.1.0" -gem "sqlite3", ">= 2.1" -gem "stimulus-rails" -gem "thruster", require: false -gem "turbo-rails" -gem "tzinfo-data", platforms: %i[windows jruby] - -group :development, :test do - gem "brakeman", require: false - gem "debug", platforms: %i[mri windows] -end - -group :development do - gem "web-console" -end - -group :test do - gem "capybara-screenshot-diff", require: false - gem "chunky_png", "~> 1.4" - gem "selenium-webdriver" -end diff --git a/demo/Gemfile.lock b/demo/Gemfile.lock deleted file mode 100644 index 9f737c0f..00000000 --- a/demo/Gemfile.lock +++ /dev/null @@ -1,313 +0,0 @@ -PATH - remote: .. - specs: - bootstrap_form (5.5.0) - actionpack (>= 7.2) - activemodel (>= 7.2) - -GEM - remote: https://rubygems.org/ - specs: - action_text-trix (2.1.15) - railties - actioncable (8.1.1) - actionpack (= 8.1.1) - activesupport (= 8.1.1) - nio4r (~> 2.0) - websocket-driver (>= 0.6.1) - zeitwerk (~> 2.6) - actionmailbox (8.1.1) - actionpack (= 8.1.1) - activejob (= 8.1.1) - activerecord (= 8.1.1) - activestorage (= 8.1.1) - activesupport (= 8.1.1) - mail (>= 2.8.0) - actionmailer (8.1.1) - actionpack (= 8.1.1) - actionview (= 8.1.1) - activejob (= 8.1.1) - activesupport (= 8.1.1) - mail (>= 2.8.0) - rails-dom-testing (~> 2.2) - actionpack (8.1.1) - actionview (= 8.1.1) - activesupport (= 8.1.1) - 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.1) - action_text-trix (~> 2.1.15) - actionpack (= 8.1.1) - activerecord (= 8.1.1) - activestorage (= 8.1.1) - activesupport (= 8.1.1) - globalid (>= 0.6.0) - nokogiri (>= 1.8.5) - actionview (8.1.1) - activesupport (= 8.1.1) - builder (~> 3.1) - erubi (~> 1.11) - rails-dom-testing (~> 2.2) - rails-html-sanitizer (~> 1.6) - activejob (8.1.1) - activesupport (= 8.1.1) - globalid (>= 0.3.6) - activemodel (8.1.1) - activesupport (= 8.1.1) - activerecord (8.1.1) - activemodel (= 8.1.1) - activesupport (= 8.1.1) - timeout (>= 0.4.0) - activestorage (8.1.1) - actionpack (= 8.1.1) - activejob (= 8.1.1) - activerecord (= 8.1.1) - activesupport (= 8.1.1) - marcel (~> 1.0) - activesupport (8.1.1) - 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) - base64 (0.3.0) - bigdecimal (3.3.1) - bindex (0.8.1) - bootsnap (1.18.6) - msgpack (~> 1.2) - brakeman (7.1.0) - racc - 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) - capybara-screenshot-diff (1.10.3.1) - actionpack (>= 7.0, < 9) - capybara (>= 2, < 4) - chunky_png (1.4.0) - concurrent-ruby (1.3.5) - connection_pool (2.5.4) - crass (1.0.6) - cssbundling-rails (1.4.3) - railties (>= 6.0.0) - date (3.5.0) - debug (1.11.0) - irb (~> 1.10) - reline (>= 0.3.8) - drb (2.2.3) - erb (5.1.3) - erubi (1.13.1) - globalid (1.3.0) - activesupport (>= 6.1) - htmlbeautifier (1.4.3) - 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) - jsbundling-rails (1.3.1) - railties (>= 6.0.0) - json (2.15.2) - logger (1.7.0) - loofah (2.24.1) - crass (~> 1.0.2) - nokogiri (>= 1.12.0) - mail (2.9.0) - logger - mini_mime (>= 0.1.1) - net-imap - net-pop - net-smtp - marcel (1.1.0) - matrix (0.4.3) - mini_mime (1.1.5) - mini_portile2 (2.8.9) - minitest (5.26.0) - msgpack (1.8.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) - mini_portile2 (~> 2.8.2) - racc (~> 1.4) - nokogiri (1.18.10-aarch64-linux-gnu) - racc (~> 1.4) - nokogiri (1.18.10-arm-linux-gnu) - 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) - pp (0.6.3) - prettyprint - prettyprint (0.2.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 (7.1.0) - 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.1) - actioncable (= 8.1.1) - actionmailbox (= 8.1.1) - actionmailer (= 8.1.1) - actionpack (= 8.1.1) - actiontext (= 8.1.1) - actionview (= 8.1.1) - activejob (= 8.1.1) - activemodel (= 8.1.1) - activerecord (= 8.1.1) - activestorage (= 8.1.1) - activesupport (= 8.1.1) - bundler (>= 1.15.0) - railties (= 8.1.1) - 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.1) - actionpack (= 8.1.1) - activesupport (= 8.1.1) - irb (~> 1.13) - rackup (>= 1.0.0) - rake (>= 12.2) - thor (~> 1.0, >= 1.2.2) - tsort (>= 0.2) - zeitwerk (~> 2.6) - rake (13.3.1) - rdoc (6.15.0) - erb - psych (>= 4.0.0) - tsort - regexp_parser (2.11.3) - reline (0.6.2) - io-console (~> 0.5) - rexml (3.4.4) - rubyzip (3.2.1) - securerandom (0.4.1) - selenium-webdriver (4.38.0) - base64 (~> 0.2) - logger (~> 1.4) - rexml (~> 3.2, >= 3.2.5) - rubyzip (>= 1.2.2, < 4.0) - websocket (~> 1.0) - sqlite3 (2.7.4-aarch64-linux-gnu) - sqlite3 (2.7.4-arm-linux-gnu) - sqlite3 (2.7.4-arm64-darwin) - sqlite3 (2.7.4-x86-linux-gnu) - sqlite3 (2.7.4-x86_64-darwin) - sqlite3 (2.7.4-x86_64-linux-gnu) - stimulus-rails (1.3.4) - railties (>= 6.0.0) - stringio (3.1.7) - thor (1.4.0) - thruster (0.1.16) - thruster (0.1.16-aarch64-linux) - thruster (0.1.16-arm64-darwin) - thruster (0.1.16-x86_64-darwin) - thruster (0.1.16-x86_64-linux) - timeout (0.4.4) - tsort (0.2.0) - turbo-rails (2.0.20) - actionpack (>= 7.1.0) - railties (>= 7.1.0) - tzinfo (2.0.6) - concurrent-ruby (~> 1.0) - uri (1.0.4) - useragent (0.16.11) - web-console (4.2.1) - actionview (>= 6.0.0) - activemodel (>= 6.0.0) - bindex (>= 0.4.0) - railties (>= 6.0.0) - 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) - zeitwerk (2.7.3) - -PLATFORMS - aarch64-linux - arm-linux - arm64-darwin - x86-linux - x86_64-darwin - x86_64-linux - -DEPENDENCIES - bootsnap - bootstrap_form! - brakeman - capybara-screenshot-diff - chunky_png (~> 1.4) - cssbundling-rails - debug - htmlbeautifier - jbuilder - jsbundling-rails - propshaft - puma - rails (~> 8.1.0) - selenium-webdriver - sqlite3 (>= 2.1) - stimulus-rails - thruster - turbo-rails - tzinfo-data - web-console - -BUNDLED WITH - 2.7.2 diff --git a/demo/Procfile.dev b/demo/Procfile.dev index 958dae76..42e9c257 100644 --- a/demo/Procfile.dev +++ b/demo/Procfile.dev @@ -1,3 +1,3 @@ -web: bundle exec bin/rails server -b 0.0.0.0 +web: bin/rails server -b 0.0.0.0 js: yarn build --watch css: yarn build:css --watch diff --git a/gemfiles/common.gemfile b/gemfiles/common.gemfile index b47fe3ec..98e80972 100644 --- a/gemfiles/common.gemfile +++ b/gemfiles/common.gemfile @@ -5,21 +5,24 @@ gemspec path: File.dirname(__dir__) # To test with different Rails versions, use the files in `./gemfiles` group :development do - gem "htmlbeautifier" gem "puma" - gem "rubocop-performance", require: false - gem "rubocop-rails", require: false end group :test do + gem "capybara-screenshot-diff", require: false + gem "chunky_png", "~> 1.4" gem "diffy" gem "equivalent-xml" gem "mocha" + gem "selenium-webdriver" end group :development, :test do gem "debug" + gem "htmlbeautifier" gem "ostruct" if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("3.5.0") + gem "rubocop-performance", require: false + gem "rubocop-rails", require: false gem "warning" end From 777853fdf2cd4843b42fd78746d6b41eb21f6ee8 Mon Sep 17 00:00:00 2001 From: Larry Reid Date: Wed, 19 Nov 2025 02:14:09 +0000 Subject: [PATCH 2/8] Randomly trying github actions fixes --- .github/workflows/ruby.yml | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index d032dc3f..ab0585f9 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -16,7 +16,7 @@ jobs: fetch-depth: 0 - uses: ruby/setup-ruby@v1 with: - ruby-version: 3.2.9 + ruby-version: 3.2 bundler-cache: true # Disabled since it requires access not granted by GitHub Actions for PRs # - name: Danger @@ -26,7 +26,9 @@ jobs: # run: | # bundle exec danger - name: Rubocop - run: rubocop --autocorrect + run: | + bundle install + rubocop --autocorrect Test: runs-on: ubuntu-latest strategy: @@ -44,7 +46,9 @@ jobs: ruby-version: ${{ matrix.ruby-version }} bundler-cache: true - name: Run tests - run: rake test + run: | + bundle install + rake test Demo: runs-on: ubuntu-latest steps: @@ -54,10 +58,12 @@ jobs: with: working-directory: demo bundler-cache: true - ruby-version: 3.4.2 + ruby-version: 3.4 - name: Run tests working-directory: demo - run: rake test:all + run: | + bundle install + rake test:all # - name: Commit changed screenshots and other files # if: failure() # working-directory: demo From 0f197a1fdfbbd02e3ed6b5159ce3081d8e3b1cb0 Mon Sep 17 00:00:00 2001 From: Larry Reid Date: Wed, 19 Nov 2025 16:55:32 +0000 Subject: [PATCH 3/8] Upgrade to checkout@v5 --- .github/workflows/ruby.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index ab0585f9..10a7d186 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -11,7 +11,7 @@ jobs: env: BUNDLE_GEMFILE: gemfiles/7.2.gemfile steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v5 with: fetch-depth: 0 - uses: ruby/setup-ruby@v1 @@ -39,7 +39,7 @@ jobs: env: BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v5 - name: Set up Ruby uses: ruby/setup-ruby@v1 with: @@ -52,7 +52,7 @@ jobs: Demo: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v5 - name: Set up Ruby uses: ruby/setup-ruby@v1 with: From 739bd911dae4f9174b4c0b718722415633fd23fb Mon Sep 17 00:00:00 2001 From: Larry Reid Date: Wed, 19 Nov 2025 17:03:11 +0000 Subject: [PATCH 4/8] Fix rubocop:disable in test_helper --- test/test_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_helper.rb b/test/test_helper.rb index 7755ada5..fbece5c1 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -1,6 +1,6 @@ ENV["RAILS_ENV"] ||= "test" -puts "BUNDLE_GEMFILE: #{ENV.fetch('BUNDLE_GEMFILE', nil)}" # rubocop/ignore Rails/Output +puts "BUNDLE_GEMFILE: #{ENV.fetch('BUNDLE_GEMFILE', nil)}" # rubocop:disable Rails/Output require "warning" mail_gem_path = Gem::Specification.find_by_name("mail").full_gem_path From 70fe51a6aeb2b892698c22d10397c6fb3873c9c5 Mon Sep 17 00:00:00 2001 From: Larry Reid Date: Wed, 19 Nov 2025 17:05:04 +0000 Subject: [PATCH 5/8] Go back to bundle exec in CI --- .github/workflows/ruby.yml | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 10a7d186..46cf174d 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -26,9 +26,7 @@ jobs: # run: | # bundle exec danger - name: Rubocop - run: | - bundle install - rubocop --autocorrect + run: bundle exec rubocop --autocorrect Test: runs-on: ubuntu-latest strategy: @@ -46,9 +44,7 @@ jobs: ruby-version: ${{ matrix.ruby-version }} bundler-cache: true - name: Run tests - run: | - bundle install - rake test + run: bundle exec rake test Demo: runs-on: ubuntu-latest steps: @@ -61,9 +57,7 @@ jobs: ruby-version: 3.4 - name: Run tests working-directory: demo - run: | - bundle install - rake test:all + run: bundle exec rake test:all # - name: Commit changed screenshots and other files # if: failure() # working-directory: demo From 44bd7d29160eac0642be818a7c52ff655dd92d10 Mon Sep 17 00:00:00 2001 From: Larry Reid Date: Wed, 19 Nov 2025 17:11:00 +0000 Subject: [PATCH 6/8] Add puma to test group --- gemfiles/common.gemfile | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/gemfiles/common.gemfile b/gemfiles/common.gemfile index 98e80972..40bcf014 100644 --- a/gemfiles/common.gemfile +++ b/gemfiles/common.gemfile @@ -4,10 +4,6 @@ gemspec path: File.dirname(__dir__) # To test with different Rails versions, use the files in `./gemfiles` -group :development do - gem "puma" -end - group :test do gem "capybara-screenshot-diff", require: false gem "chunky_png", "~> 1.4" @@ -21,6 +17,7 @@ group :development, :test do gem "debug" gem "htmlbeautifier" gem "ostruct" if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("3.5.0") + gem "puma" gem "rubocop-performance", require: false gem "rubocop-rails", require: false gem "warning" From 8e6cf0e753af8227b2b4a28249f3aa848354200c Mon Sep 17 00:00:00 2001 From: Larry Reid Date: Wed, 19 Nov 2025 17:25:02 +0000 Subject: [PATCH 7/8] Set Gemfile for bundle install in demo --- .github/workflows/ruby.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 46cf174d..dafe1fad 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -55,6 +55,8 @@ jobs: working-directory: demo bundler-cache: true ruby-version: 3.4 + env: + BUNDLE_GEMFILE: '../Gemfile' - name: Run tests working-directory: demo run: bundle exec rake test:all From b67139a024361e98c8a7212ce5b8e6ceb52c7374 Mon Sep 17 00:00:00 2001 From: Larry Reid Date: Wed, 19 Nov 2025 17:39:21 +0000 Subject: [PATCH 8/8] Add cssbundling and jsbundling --- Gemfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Gemfile b/Gemfile index d5e98d22..fdc8f1ae 100644 --- a/Gemfile +++ b/Gemfile @@ -4,7 +4,9 @@ eval File.read(gems), binding, gems # rubocop: disable Security/Eval require "#{__dir__}/lib/bootstrap_form/version" gem "bigdecimal" if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("3.4.0") +gem "cssbundling-rails" gem "drb" if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("3.4.0") +gem "jsbundling-rails" gem "mutex_m" if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("3.4.0") gem "rails", BootstrapForm::REQUIRED_RAILS_VERSION gem "propshaft"