From 73520272672113c9e87f314f47db491bf5d4ecf4 Mon Sep 17 00:00:00 2001 From: Neil Carvalho Date: Fri, 31 Jan 2025 13:09:14 -0300 Subject: [PATCH] Fix development dependencies Some changes in our dependency tree have led to broken builds. For example, `concurrent-ruby`, which Rails uses, stopped requiring `logger` on version 1.3.5, which was fixed in Rails 7.1. Another change is that Ruby decreased its standard library, removing some preloaded gems, such as `mutex_m`. This commit updates the dependencies to the latest supported version, limits the `concurrent-ruby` version to `< 1.3.4` in Rails versions that don't require `logger`, and adds `mutex_m` to the list of development dependencies. --- .github/workflows/build.yml | 2 +- Appraisals | 2 + Gemfile.lock | 260 +++++++++++++++++++----------------- factory_bot_rails.gemspec | 3 +- gemfiles/rails6.1.gemfile | 1 + gemfiles/rails7.0.gemfile | 1 + spec/fake_app.rb | 2 +- 7 files changed, 143 insertions(+), 128 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ffa565a..a04aa33 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -40,7 +40,7 @@ jobs: - uses: actions/checkout@v4 - uses: ruby/setup-ruby@v1 with: - ruby-version: "3.1" + ruby-version: "3.3" - name: Setup project run: bundle install - name: Run test diff --git a/Appraisals b/Appraisals index f259ffa..aed03b0 100644 --- a/Appraisals +++ b/Appraisals @@ -6,6 +6,7 @@ appraise "rails6.1" do gem "spring", "!= 2.1.1" gem "spring-watcher-listen", "~> 2.0.0" gem "sqlite3", "~> 1.4" + gem "concurrent-ruby", "< 1.3.5" end appraise "rails7.0" do @@ -16,6 +17,7 @@ appraise "rails7.0" do gem "spring", "!= 2.1.1" gem "spring-watcher-listen", "~> 2.0.0" gem "sqlite3", "~> 1.4" + gem "concurrent-ruby", "< 1.3.5" end appraise "rails7.1" do diff --git a/Gemfile.lock b/Gemfile.lock index c1510d5..4efa192 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -8,231 +8,240 @@ PATH GEM remote: https://rubygems.org/ specs: - actionpack (7.1.2) - actionview (= 7.1.2) - activesupport (= 7.1.2) + actionpack (8.0.1) + actionview (= 8.0.1) + activesupport (= 8.0.1) 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) - actionview (7.1.2) - activesupport (= 7.1.2) + useragent (~> 0.16) + actionview (8.0.1) + activesupport (= 8.0.1) builder (~> 3.1) erubi (~> 1.11) rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) - activejob (7.1.2) - activesupport (= 7.1.2) + activejob (8.0.1) + activesupport (= 8.0.1) globalid (>= 0.3.6) - activemodel (7.1.2) - activesupport (= 7.1.2) - activerecord (7.1.2) - activemodel (= 7.1.2) - activesupport (= 7.1.2) + activemodel (8.0.1) + activesupport (= 8.0.1) + activerecord (8.0.1) + activemodel (= 8.0.1) + activesupport (= 8.0.1) timeout (>= 0.4.0) - activestorage (7.1.2) - actionpack (= 7.1.2) - activejob (= 7.1.2) - activerecord (= 7.1.2) - activesupport (= 7.1.2) + activestorage (8.0.1) + actionpack (= 8.0.1) + activejob (= 8.0.1) + activerecord (= 8.0.1) + activesupport (= 8.0.1) marcel (~> 1.0) - activesupport (7.1.2) + activesupport (8.0.1) base64 + benchmark (>= 0.3) bigdecimal - concurrent-ruby (~> 1.0, >= 1.0.2) + concurrent-ruby (~> 1.0, >= 1.3.1) connection_pool (>= 2.2.5) drb i18n (>= 1.6, < 2) + logger (>= 1.4.2) minitest (>= 5.1) - mutex_m - tzinfo (~> 2.0) + securerandom (>= 0.3) + tzinfo (~> 2.0, >= 2.0.5) + uri (>= 0.13.1) appraisal (2.5.0) bundler rake thor (>= 0.14.0) - aruba (2.1.0) + aruba (2.3.0) bundler (>= 1.17, < 3.0) - childprocess (>= 2.0, < 5.0) contracts (>= 0.16.0, < 0.18.0) - cucumber (>= 4.0, < 9.0) + cucumber (>= 8.0, < 10.0) rspec-expectations (~> 3.4) thor (~> 1.0) ast (2.4.2) base64 (0.2.0) - bigdecimal (3.1.8) - bigdecimal (3.1.8-java) + benchmark (0.4.0) + bigdecimal (3.1.9) + bigdecimal (3.1.9-java) builder (3.3.0) - childprocess (4.1.0) - concurrent-ruby (1.3.4) - connection_pool (2.4.1) - contracts (0.17) + concurrent-ruby (1.3.5) + connection_pool (2.5.0) + contracts (0.17.2) crass (1.0.6) - cucumber (8.0.0) - builder (~> 3.2, >= 3.2.4) - cucumber-ci-environment (~> 9.0, >= 9.0.4) - cucumber-core (~> 11.0, >= 11.0.0) - cucumber-cucumber-expressions (~> 15.1, >= 15.1.1) - cucumber-gherkin (~> 23.0, >= 23.0.1) - cucumber-html-formatter (~> 19.1, >= 19.1.0) - cucumber-messages (~> 18.0, >= 18.0.0) - diff-lcs (~> 1.5, >= 1.5.0) - mime-types (~> 3.4, >= 3.4.1) - multi_test (~> 1.1, >= 1.1.0) - sys-uname (~> 1.2, >= 1.2.2) - cucumber-ci-environment (9.1.0) - cucumber-core (11.0.0) - cucumber-gherkin (~> 23.0, >= 23.0.1) - cucumber-messages (~> 18.0, >= 18.0.0) - cucumber-tag-expressions (~> 4.1, >= 4.1.0) - cucumber-cucumber-expressions (15.2.0) - cucumber-gherkin (23.0.1) - cucumber-messages (~> 18.0, >= 18.0.0) - cucumber-html-formatter (19.2.0) - cucumber-messages (~> 18.0, >= 18.0.0) - cucumber-messages (18.0.0) - cucumber-tag-expressions (4.1.0) + cucumber (9.2.1) + builder (~> 3.2) + cucumber-ci-environment (> 9, < 11) + cucumber-core (> 13, < 14) + cucumber-cucumber-expressions (~> 17.0) + cucumber-gherkin (> 24, < 28) + cucumber-html-formatter (> 20.3, < 22) + cucumber-messages (> 19, < 25) + diff-lcs (~> 1.5) + mini_mime (~> 1.1) + multi_test (~> 1.1) + sys-uname (~> 1.2) + cucumber-ci-environment (10.0.1) + cucumber-core (13.0.3) + cucumber-gherkin (>= 27, < 28) + cucumber-messages (>= 20, < 23) + cucumber-tag-expressions (> 5, < 7) + cucumber-cucumber-expressions (17.1.0) + bigdecimal + cucumber-gherkin (27.0.0) + cucumber-messages (>= 19.1.4, < 23) + cucumber-html-formatter (21.8.0) + cucumber-messages (> 19, < 27) + cucumber-messages (22.0.0) + cucumber-tag-expressions (6.1.2) + date (3.4.1) + date (3.4.1-java) diff-lcs (1.5.1) drb (2.2.1) - erubi (1.13.0) - factory_bot (6.5.0) - activesupport (>= 5.0.0) - ffi (1.15.5) - ffi (1.15.5-java) + erubi (1.13.1) + factory_bot (6.5.1) + activesupport (>= 6.1.0) + ffi (1.17.1) + ffi (1.17.1-java) globalid (1.2.1) activesupport (>= 6.1) - i18n (1.14.5) + i18n (1.14.7) concurrent-ruby (~> 1.0) - io-console (0.7.2) - io-console (0.7.2-java) - irb (1.14.0) + io-console (0.8.0) + io-console (0.8.0-java) + irb (1.15.1) + pp (>= 0.6.0) rdoc (>= 4.0.0) reline (>= 0.4.2) - jar-dependencies (0.4.1) - json (2.7.2) - json (2.7.2-java) - language_server-protocol (3.17.0.3) + jar-dependencies (0.5.3) + json (2.9.1) + json (2.9.1-java) + language_server-protocol (3.17.0.4) lint_roller (1.1.0) - loofah (2.22.0) + logger (1.6.5) + loofah (2.24.0) crass (~> 1.0.2) nokogiri (>= 1.12.0) marcel (1.0.4) - mime-types (3.4.1) - mime-types-data (~> 3.2015) - mime-types-data (3.2023.0218.1) - mini_portile2 (2.8.7) - minitest (5.25.1) + mini_mime (1.1.5) + mini_portile2 (2.8.8) + minitest (5.25.4) multi_test (1.1.0) - mutex_m (0.2.0) - nokogiri (1.16.7) + mutex_m (0.3.0) + nokogiri (1.18.2) mini_portile2 (~> 2.8.2) racc (~> 1.4) - nokogiri (1.16.7-java) + nokogiri (1.18.2-java) racc (~> 1.4) parallel (1.26.3) - parser (3.3.4.2) + parser (3.3.7.0) ast (~> 2.4.1) racc - psych (5.1.2) + pp (0.6.2) + prettyprint + prettyprint (0.2.0) + psych (5.2.3) + date stringio - psych (5.1.2-java) + psych (5.2.3-java) + date jar-dependencies (>= 0.1.7) racc (1.8.1) racc (1.8.1-java) - rack (3.1.7) - rack-session (2.0.0) + rack (3.1.9) + rack-session (2.1.0) + base64 (>= 0.1.0) rack (>= 3.0.0) - rack-test (2.1.0) + rack-test (2.2.0) rack (>= 1.3) - rackup (2.1.0) + rackup (2.2.1) rack (>= 3) - webrick (~> 1.8) rails-dom-testing (2.2.0) activesupport (>= 5.0.0) minitest nokogiri (>= 1.6) - rails-html-sanitizer (1.6.0) + rails-html-sanitizer (1.6.2) loofah (~> 2.21) - nokogiri (~> 1.14) - railties (7.1.2) - actionpack (= 7.1.2) - activesupport (= 7.1.2) - irb + 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.0.1) + actionpack (= 8.0.1) + activesupport (= 8.0.1) + irb (~> 1.13) rackup (>= 1.0.0) rake (>= 12.2) thor (~> 1.0, >= 1.2.2) zeitwerk (~> 2.6) rainbow (3.1.1) rake (13.2.1) - rdoc (6.7.0) + rdoc (6.11.0) psych (>= 4.0.0) - regexp_parser (2.9.2) - reline (0.5.9) + regexp_parser (2.10.0) + reline (0.6.0) io-console (~> 0.5) - rexml (3.3.6) - strscan - rspec-core (3.13.0) + rspec-core (3.13.2) rspec-support (~> 3.13.0) - rspec-expectations (3.13.2) + rspec-expectations (3.13.3) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.13.0) - rspec-mocks (3.13.1) + rspec-mocks (3.13.2) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.13.0) - rspec-rails (6.1.4) - actionpack (>= 6.1) - activesupport (>= 6.1) - railties (>= 6.1) + rspec-rails (7.1.0) + actionpack (>= 7.0) + activesupport (>= 7.0) + railties (>= 7.0) rspec-core (~> 3.13) rspec-expectations (~> 3.13) rspec-mocks (~> 3.13) rspec-support (~> 3.13) - rspec-support (3.13.1) - rubocop (1.65.1) + rspec-support (3.13.2) + rubocop (1.70.0) json (~> 2.3) language_server-protocol (>= 3.17.0) parallel (~> 1.10) parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) - regexp_parser (>= 2.4, < 3.0) - rexml (>= 3.2.5, < 4.0) - rubocop-ast (>= 1.31.1, < 2.0) + regexp_parser (>= 2.9.3, < 3.0) + rubocop-ast (>= 1.36.2, < 2.0) ruby-progressbar (~> 1.7) - unicode-display_width (>= 2.4.0, < 3.0) - rubocop-ast (1.32.1) + unicode-display_width (>= 2.4.0, < 4.0) + rubocop-ast (1.38.0) parser (>= 3.3.1.0) - rubocop-performance (1.21.1) + rubocop-performance (1.23.1) rubocop (>= 1.48.1, < 2.0) rubocop-ast (>= 1.31.1, < 2.0) ruby-progressbar (1.13.0) - sqlite3 (1.6.2) + securerandom (0.4.1) + sqlite3 (2.5.0) mini_portile2 (~> 2.8.0) - standard (1.40.0) + standard (1.44.0) language_server-protocol (~> 3.17.0.2) lint_roller (~> 1.0) - rubocop (~> 1.65.0) + rubocop (~> 1.70.0) standard-custom (~> 1.0.0) - standard-performance (~> 1.4) + standard-performance (~> 1.6) standard-custom (1.0.2) lint_roller (~> 1.0) rubocop (~> 1.50) - standard-performance (1.4.0) + standard-performance (1.6.0) lint_roller (~> 1.1) - rubocop-performance (~> 1.21.0) - stringio (3.1.1) - strscan (3.1.0) - strscan (3.1.0-java) - sys-uname (1.2.3) + rubocop-performance (~> 1.23.0) + stringio (3.1.2) + sys-uname (1.3.1) ffi (~> 1.1) thor (1.3.2) - timeout (0.4.1) + timeout (0.4.3) tzinfo (2.0.6) concurrent-ruby (~> 1.0) - unicode-display_width (2.5.0) - webrick (1.8.1) - zeitwerk (2.6.17) + unicode-display_width (3.1.4) + unicode-emoji (~> 4.0, >= 4.0.4) + unicode-emoji (4.0.4) + uri (1.0.2) + useragent (0.16.11) + zeitwerk (2.7.1) PLATFORMS java @@ -245,6 +254,7 @@ DEPENDENCIES aruba cucumber factory_bot_rails! + mutex_m rake rspec-rails sqlite3 diff --git a/factory_bot_rails.gemspec b/factory_bot_rails.gemspec index 3f58232..8acc341 100644 --- a/factory_bot_rails.gemspec +++ b/factory_bot_rails.gemspec @@ -22,7 +22,8 @@ Gem::Specification.new do |s| s.add_runtime_dependency("factory_bot", "~> 6.5") s.add_runtime_dependency("railties", ">= 5.0.0") - s.add_development_dependency("sqlite3") s.add_development_dependency("activerecord", ">= 5.0.0") s.add_development_dependency("activestorage", ">= 5.0.0") + s.add_development_dependency("mutex_m") + s.add_development_dependency("sqlite3") end diff --git a/gemfiles/rails6.1.gemfile b/gemfiles/rails6.1.gemfile index 551080f..5f5d03d 100644 --- a/gemfiles/rails6.1.gemfile +++ b/gemfiles/rails6.1.gemfile @@ -15,5 +15,6 @@ gem "rails", "~> 6.1.0", ">= 6.1.0.0" gem "spring", "!= 2.1.1" gem "spring-watcher-listen", "~> 2.0.0" gem "sqlite3", "~> 1.4" +gem "concurrent-ruby", "< 1.3.5" gemspec name: "factory_bot_rails", path: "../" diff --git a/gemfiles/rails7.0.gemfile b/gemfiles/rails7.0.gemfile index eb6cfd1..ea0f7eb 100644 --- a/gemfiles/rails7.0.gemfile +++ b/gemfiles/rails7.0.gemfile @@ -15,5 +15,6 @@ gem "rails", "~> 7.0.1", ">= 7.0.1" gem "spring", "!= 2.1.1" gem "spring-watcher-listen", "~> 2.0.0" gem "sqlite3", "~> 1.4" +gem "concurrent-ruby", "< 1.3.5" gemspec name: "factory_bot_rails", path: "../" diff --git a/spec/fake_app.rb b/spec/fake_app.rb index 7f32989..70db2c4 100644 --- a/spec/fake_app.rb +++ b/spec/fake_app.rb @@ -24,6 +24,6 @@ class Application < Rails::Application end end -Rails.logger = Logger.new("/dev/null") +Rails.logger = Logger.new(File::NULL) Rails.application.initialize!