diff --git a/.rubocop.yml b/.rubocop.yml index f19222c..a781ced 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -2,8 +2,14 @@ inherit_gem: betterlint: - config/default.yml +inherit_mode: + merge: + - Exclude + AllCops: TargetRubyVersion: 3.2 + Exclude: + - gemfiles/*.gemfile Gemspec/DevelopmentDependencies: Enabled: true diff --git a/Appraisals b/Appraisals index 2e65081..87d08ef 100644 --- a/Appraisals +++ b/Appraisals @@ -1,9 +1,11 @@ # frozen_string_literal: true appraise 'rails-7-0' do - gem 'rails', '~> 7.0.0' + gem 'activerecord', '~> 7.0.0' + gem 'railties', '~> 7.0.0' end appraise 'rails-7-1' do - gem 'rails', '~> 7.1.0' + gem 'activerecord', '~> 7.1.0' + gem 'railties', '~> 7.1.0' end diff --git a/Gemfile b/Gemfile index fa75df1..7f4f5e9 100644 --- a/Gemfile +++ b/Gemfile @@ -1,3 +1,5 @@ +# frozen_string_literal: true + source 'https://rubygems.org' gemspec diff --git a/Gemfile.lock b/Gemfile.lock index 9fa0d59..e464f8f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,37 +1,13 @@ PATH remote: . specs: - with_transactional_lock (2.2.0) - rails (>= 7.0, < 7.2) + with_transactional_lock (2.3.0) + activerecord (>= 7.0, < 7.2) + railties (>= 7.0, < 7.2) GEM remote: https://rubygems.org/ specs: - actioncable (7.0.8.5) - actionpack (= 7.0.8.5) - activesupport (= 7.0.8.5) - nio4r (~> 2.0) - websocket-driver (>= 0.6.1) - actionmailbox (7.0.8.5) - actionpack (= 7.0.8.5) - activejob (= 7.0.8.5) - activerecord (= 7.0.8.5) - activestorage (= 7.0.8.5) - activesupport (= 7.0.8.5) - mail (>= 2.7.1) - net-imap - net-pop - net-smtp - actionmailer (7.0.8.5) - actionpack (= 7.0.8.5) - actionview (= 7.0.8.5) - activejob (= 7.0.8.5) - activesupport (= 7.0.8.5) - mail (~> 2.5, >= 2.5.4) - net-imap - net-pop - net-smtp - rails-dom-testing (~> 2.0) actionpack (7.0.8.5) actionview (= 7.0.8.5) activesupport (= 7.0.8.5) @@ -39,34 +15,17 @@ GEM rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (7.0.8.5) - actionpack (= 7.0.8.5) - activerecord (= 7.0.8.5) - activestorage (= 7.0.8.5) - activesupport (= 7.0.8.5) - globalid (>= 0.6.0) - nokogiri (>= 1.8.5) actionview (7.0.8.5) activesupport (= 7.0.8.5) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.1, >= 1.2.0) - activejob (7.0.8.5) - activesupport (= 7.0.8.5) - globalid (>= 0.3.6) activemodel (7.0.8.5) activesupport (= 7.0.8.5) activerecord (7.0.8.5) activemodel (= 7.0.8.5) activesupport (= 7.0.8.5) - activestorage (7.0.8.5) - actionpack (= 7.0.8.5) - activejob (= 7.0.8.5) - activerecord (= 7.0.8.5) - activesupport (= 7.0.8.5) - marcel (~> 1.0) - mini_mime (>= 1.1.0) activesupport (7.0.8.5) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) @@ -77,85 +36,49 @@ GEM rake thor (>= 0.14.0) ast (2.4.2) - betterlint (1.7.0) - rubocop (> 1.0) - rubocop-performance - rubocop-rails - rubocop-rake - rubocop-rspec (>= 2.24) + betterlint (1.16.0) + rubocop (~> 1.62.0) + rubocop-graphql (~> 1.5.0) + rubocop-performance (~> 1.21.0) + rubocop-rails (~> 2.24.0) + rubocop-rake (~> 0.6.0) + rubocop-rspec (~> 2.28.0) builder (3.3.0) concurrent-ruby (1.3.4) crass (1.0.6) - database_cleaner (2.0.2) + database_cleaner (2.1.0) database_cleaner-active_record (>= 2, < 3) database_cleaner-active_record (2.2.0) activerecord (>= 5.a) database_cleaner-core (~> 2.0.0) database_cleaner-core (2.0.1) - date (3.3.4) - diff-lcs (1.5.0) + diff-lcs (1.5.1) erubi (1.13.0) - globalid (1.2.1) - activesupport (>= 6.1) i18n (1.14.6) concurrent-ruby (~> 1.0) - json (2.7.1) + json (2.8.2) language_server-protocol (3.17.0.3) - loofah (2.22.0) + loofah (2.23.1) 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.4) - method_source (1.0.0) - mime-types (3.5.1) - mime-types-data (~> 3.2015) - mime-types-data (3.2023.1205) - mini_mime (1.1.5) + method_source (1.1.0) minitest (5.25.1) - mysql2 (0.5.5) - net-imap (0.4.9) - 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) + mysql2 (0.5.6) nokogiri (1.16.7-arm64-darwin) racc (~> 1.4) nokogiri (1.16.7-x86_64-darwin) racc (~> 1.4) nokogiri (1.16.7-x86_64-linux) racc (~> 1.4) - parallel (1.24.0) - parser (3.2.2.4) + parallel (1.26.3) + parser (3.3.6.0) ast (~> 2.4.1) racc - pg (1.5.4) + pg (1.5.9) racc (1.8.1) rack (2.2.10) rack-test (2.1.0) rack (>= 1.3) - rails (7.0.8.5) - actioncable (= 7.0.8.5) - actionmailbox (= 7.0.8.5) - actionmailer (= 7.0.8.5) - actionpack (= 7.0.8.5) - actiontext (= 7.0.8.5) - actionview (= 7.0.8.5) - activejob (= 7.0.8.5) - activemodel (= 7.0.8.5) - activerecord (= 7.0.8.5) - activestorage (= 7.0.8.5) - activesupport (= 7.0.8.5) - bundler (>= 1.15.0) - railties (= 7.0.8.5) rails-dom-testing (2.2.0) activesupport (>= 5.0.0) minitest @@ -171,74 +94,70 @@ GEM thor (~> 1.0) zeitwerk (~> 2.5) rainbow (3.1.1) - rake (13.1.0) - regexp_parser (2.8.3) - rexml (3.3.6) - strscan - rspec-core (3.9.3) - rspec-support (~> 3.9.3) - rspec-expectations (3.9.4) + rake (13.2.1) + regexp_parser (2.9.2) + rexml (3.3.9) + rspec-core (3.13.2) + rspec-support (~> 3.13.0) + rspec-expectations (3.13.3) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.9.0) - rspec-mocks (3.9.1) + rspec-support (~> 3.13.0) + rspec-mocks (3.13.2) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.9.0) - rspec-rails (3.9.1) - actionpack (>= 3.0) - activesupport (>= 3.0) - railties (>= 3.0) - rspec-core (~> 3.9.0) - rspec-expectations (~> 3.9.0) - rspec-mocks (~> 3.9.0) - rspec-support (~> 3.9.0) + rspec-support (~> 3.13.0) + 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-retry (0.6.2) rspec-core (> 3.3) - rspec-support (3.9.4) - rubocop (1.59.0) + rspec-support (3.13.1) + rubocop (1.62.1) json (~> 2.3) language_server-protocol (>= 3.17.0) parallel (~> 1.10) - parser (>= 3.2.2.4) + parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 1.8, < 3.0) rexml (>= 3.2.5, < 4.0) - rubocop-ast (>= 1.30.0, < 2.0) + rubocop-ast (>= 1.31.1, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 3.0) - rubocop-ast (1.30.0) - parser (>= 3.2.1.0) - rubocop-capybara (2.19.0) + rubocop-ast (1.36.1) + parser (>= 3.3.1.0) + rubocop-capybara (2.21.0) rubocop (~> 1.41) - rubocop-factory_bot (2.24.0) - rubocop (~> 1.33) - rubocop-performance (1.20.1) + rubocop-factory_bot (2.26.1) + rubocop (~> 1.61) + rubocop-graphql (1.5.4) + rubocop (>= 1.50, < 2) + rubocop-performance (1.21.1) rubocop (>= 1.48.1, < 2.0) - rubocop-ast (>= 1.30.0, < 2.0) - rubocop-rails (2.23.1) + rubocop-ast (>= 1.31.1, < 2.0) + rubocop-rails (2.24.1) activesupport (>= 4.2.0) rack (>= 1.1) rubocop (>= 1.33.0, < 2.0) - rubocop-ast (>= 1.30.0, < 2.0) + rubocop-ast (>= 1.31.1, < 2.0) rubocop-rake (0.6.0) rubocop (~> 1.0) - rubocop-rspec (2.25.0) + rubocop-rspec (2.28.0) rubocop (~> 1.40) rubocop-capybara (~> 2.17) rubocop-factory_bot (~> 2.22) + rubocop-rspec_rails (~> 2.28) + rubocop-rspec_rails (2.29.1) + rubocop (~> 1.61) ruby-progressbar (1.13.0) - sprockets (3.7.2) - concurrent-ruby (~> 1.0) - rack (> 1, < 3) - strscan (3.1.0) - thor (1.3.0) - timeout (0.4.1) + thor (1.3.2) tzinfo (2.0.6) concurrent-ruby (~> 1.0) - unicode-display_width (2.5.0) - websocket-driver (0.7.6) - websocket-extensions (>= 0.1.0) - websocket-extensions (0.1.5) - zeitwerk (2.6.12) + unicode-display_width (2.6.0) + zeitwerk (2.7.1) PLATFORMS arm64-darwin-22 @@ -249,12 +168,10 @@ DEPENDENCIES appraisal (~> 2.2.0) betterlint database_cleaner - mime-types mysql2 pg - rspec-rails (~> 3.1) + rspec-rails rspec-retry - sprockets (~> 3.0) with_transactional_lock! BUNDLED WITH diff --git a/bin/rails b/bin/rails index c6245e0..e25a140 100755 --- a/bin/rails +++ b/bin/rails @@ -1,12 +1,12 @@ #!/usr/bin/env ruby -# This command will automatically be run when you run "rails" with Rails 4 gems installed from the root of your application. +# frozen_string_literal: true -ENGINE_ROOT = File.expand_path('../..', __FILE__) -ENGINE_PATH = File.expand_path('../../lib/with_transactional_lock/engine', __FILE__) +# This command will automatically be run when you run "rails" with Rails 4 gems installed from the root of your application. -# Set up gems listed in the Gemfile. -ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) -require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE']) +ENGINE_ROOT = File.expand_path('..', __dir__) +ENGINE_PATH = File.expand_path('../lib/with_transactional_lock/engine', __dir__) +APP_PATH = File.expand_path('../spec/dummy/config/application', __dir__) +require 'bundler/setup' require 'rails/all' require 'rails/engine/commands' diff --git a/gemfiles/rails_7_0.gemfile b/gemfiles/rails_7_0.gemfile index 6a2daed..02e0766 100644 --- a/gemfiles/rails_7_0.gemfile +++ b/gemfiles/rails_7_0.gemfile @@ -1,9 +1,8 @@ -# frozen_string_literal: true - # This file was generated by Appraisal source "https://rubygems.org" -gem "rails", "~> 7.0.0" +gem "activerecord", "~> 7.0.0" +gem "railties", "~> 7.0.0" gemspec path: "../" diff --git a/gemfiles/rails_7_0.gemfile.lock b/gemfiles/rails_7_0.gemfile.lock index bee46ce..1e4d3cc 100644 --- a/gemfiles/rails_7_0.gemfile.lock +++ b/gemfiles/rails_7_0.gemfile.lock @@ -1,37 +1,13 @@ PATH remote: .. specs: - with_transactional_lock (2.2.0) - rails (>= 7.0, < 7.2) + with_transactional_lock (2.3.0) + activerecord (>= 7.0, < 7.2) + railties (>= 7.0, < 7.2) 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) @@ -39,34 +15,17 @@ GEM 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) @@ -77,85 +36,49 @@ GEM rake thor (>= 0.14.0) ast (2.4.2) - betterlint (1.7.0) - rubocop (> 1.0) - rubocop-performance - rubocop-rails - rubocop-rake - rubocop-rspec (>= 2.24) - builder (3.2.4) - concurrent-ruby (1.2.2) + betterlint (1.16.0) + rubocop (~> 1.62.0) + rubocop-graphql (~> 1.5.0) + rubocop-performance (~> 1.21.0) + rubocop-rails (~> 2.24.0) + rubocop-rake (~> 0.6.0) + rubocop-rspec (~> 2.28.0) + builder (3.3.0) + concurrent-ruby (1.3.4) crass (1.0.6) - database_cleaner (2.0.2) + database_cleaner (2.1.0) database_cleaner-active_record (>= 2, < 3) - database_cleaner-active_record (2.1.0) + database_cleaner-active_record (2.2.0) activerecord (>= 5.a) database_cleaner-core (~> 2.0.0) database_cleaner-core (2.0.1) - date (3.3.4) - diff-lcs (1.5.0) - erubi (1.12.0) - globalid (1.2.1) - activesupport (>= 6.1) - i18n (1.14.1) + diff-lcs (1.5.1) + erubi (1.13.0) + i18n (1.14.6) concurrent-ruby (~> 1.0) - json (2.7.1) + json (2.8.2) language_server-protocol (3.17.0.3) - loofah (2.22.0) + loofah (2.23.1) 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) - method_source (1.0.0) - mime-types (3.5.1) - mime-types-data (~> 3.2015) - mime-types-data (3.2023.1205) - mini_mime (1.1.5) - minitest (5.20.0) - mysql2 (0.5.5) - net-imap (0.4.9) - 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.16.0-arm64-darwin) + method_source (1.1.0) + minitest (5.25.1) + mysql2 (0.5.6) + nokogiri (1.16.7-arm64-darwin) racc (~> 1.4) - nokogiri (1.16.0-x86_64-darwin) + nokogiri (1.16.7-x86_64-darwin) racc (~> 1.4) - nokogiri (1.16.0-x86_64-linux) + nokogiri (1.16.7-x86_64-linux) racc (~> 1.4) - parallel (1.24.0) - parser (3.2.2.4) + parallel (1.26.3) + parser (3.3.6.0) ast (~> 2.4.1) racc - pg (1.5.4) - racc (1.7.3) - rack (2.2.8) + pg (1.5.9) + racc (1.8.1) + rack (2.2.10) 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 @@ -171,72 +94,70 @@ GEM thor (~> 1.0) zeitwerk (~> 2.5) rainbow (3.1.1) - rake (13.1.0) - regexp_parser (2.8.3) - rexml (3.2.6) - rspec-core (3.9.3) - rspec-support (~> 3.9.3) - rspec-expectations (3.9.4) + rake (13.2.1) + regexp_parser (2.9.2) + rexml (3.3.9) + rspec-core (3.13.2) + rspec-support (~> 3.13.0) + rspec-expectations (3.13.3) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.9.0) - rspec-mocks (3.9.1) + rspec-support (~> 3.13.0) + rspec-mocks (3.13.2) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.9.0) - rspec-rails (3.9.1) - actionpack (>= 3.0) - activesupport (>= 3.0) - railties (>= 3.0) - rspec-core (~> 3.9.0) - rspec-expectations (~> 3.9.0) - rspec-mocks (~> 3.9.0) - rspec-support (~> 3.9.0) + rspec-support (~> 3.13.0) + 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-retry (0.6.2) rspec-core (> 3.3) - rspec-support (3.9.4) - rubocop (1.59.0) + rspec-support (3.13.1) + rubocop (1.62.1) json (~> 2.3) language_server-protocol (>= 3.17.0) parallel (~> 1.10) - parser (>= 3.2.2.4) + parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 1.8, < 3.0) rexml (>= 3.2.5, < 4.0) - rubocop-ast (>= 1.30.0, < 2.0) + rubocop-ast (>= 1.31.1, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 3.0) - rubocop-ast (1.30.0) - parser (>= 3.2.1.0) - rubocop-capybara (2.19.0) + rubocop-ast (1.36.1) + parser (>= 3.3.1.0) + rubocop-capybara (2.21.0) rubocop (~> 1.41) - rubocop-factory_bot (2.24.0) - rubocop (~> 1.33) - rubocop-performance (1.20.1) + rubocop-factory_bot (2.26.1) + rubocop (~> 1.61) + rubocop-graphql (1.5.4) + rubocop (>= 1.50, < 2) + rubocop-performance (1.21.1) rubocop (>= 1.48.1, < 2.0) - rubocop-ast (>= 1.30.0, < 2.0) - rubocop-rails (2.23.1) + rubocop-ast (>= 1.31.1, < 2.0) + rubocop-rails (2.24.1) activesupport (>= 4.2.0) rack (>= 1.1) rubocop (>= 1.33.0, < 2.0) - rubocop-ast (>= 1.30.0, < 2.0) + rubocop-ast (>= 1.31.1, < 2.0) rubocop-rake (0.6.0) rubocop (~> 1.0) - rubocop-rspec (2.25.0) + rubocop-rspec (2.28.0) rubocop (~> 1.40) rubocop-capybara (~> 2.17) rubocop-factory_bot (~> 2.22) + rubocop-rspec_rails (~> 2.28) + rubocop-rspec_rails (2.29.1) + rubocop (~> 1.61) ruby-progressbar (1.13.0) - sprockets (3.7.2) - concurrent-ruby (~> 1.0) - rack (> 1, < 3) - thor (1.3.0) - timeout (0.4.1) + thor (1.3.2) tzinfo (2.0.6) concurrent-ruby (~> 1.0) - unicode-display_width (2.5.0) - websocket-driver (0.7.6) - websocket-extensions (>= 0.1.0) - websocket-extensions (0.1.5) - zeitwerk (2.6.12) + unicode-display_width (2.6.0) + zeitwerk (2.7.1) PLATFORMS arm64-darwin-22 @@ -244,16 +165,15 @@ PLATFORMS x86_64-linux DEPENDENCIES + activerecord (~> 7.0.0) appraisal (~> 2.2.0) betterlint database_cleaner - mime-types mysql2 pg - rails (~> 7.0.0) - rspec-rails (~> 3.1) + railties (~> 7.0.0) + rspec-rails rspec-retry - sprockets (~> 3.0) with_transactional_lock! BUNDLED WITH diff --git a/gemfiles/rails_7_1.gemfile b/gemfiles/rails_7_1.gemfile index 2470682..ef6a100 100644 --- a/gemfiles/rails_7_1.gemfile +++ b/gemfiles/rails_7_1.gemfile @@ -1,9 +1,8 @@ -# frozen_string_literal: true - # This file was generated by Appraisal source "https://rubygems.org" -gem "rails", "~> 7.1.0" +gem "activerecord", "~> 7.1.0" +gem "railties", "~> 7.1.0" gemspec path: "../" diff --git a/gemfiles/rails_7_1.gemfile.lock b/gemfiles/rails_7_1.gemfile.lock index 5a8cdab..70c954f 100644 --- a/gemfiles/rails_7_1.gemfile.lock +++ b/gemfiles/rails_7_1.gemfile.lock @@ -1,38 +1,13 @@ PATH remote: .. specs: - with_transactional_lock (2.2.0) - rails (>= 7.0, < 7.2) + with_transactional_lock (2.3.0) + activerecord (>= 7.0, < 7.2) + railties (>= 7.0, < 7.2) GEM remote: https://rubygems.org/ specs: - actioncable (7.1.3.2) - actionpack (= 7.1.3.2) - activesupport (= 7.1.3.2) - nio4r (~> 2.0) - websocket-driver (>= 0.6.1) - zeitwerk (~> 2.6) - actionmailbox (7.1.3.2) - actionpack (= 7.1.3.2) - activejob (= 7.1.3.2) - activerecord (= 7.1.3.2) - activestorage (= 7.1.3.2) - activesupport (= 7.1.3.2) - mail (>= 2.7.1) - net-imap - net-pop - net-smtp - actionmailer (7.1.3.2) - actionpack (= 7.1.3.2) - actionview (= 7.1.3.2) - activejob (= 7.1.3.2) - activesupport (= 7.1.3.2) - mail (~> 2.5, >= 2.5.4) - net-imap - net-pop - net-smtp - rails-dom-testing (~> 2.2) actionpack (7.1.3.2) actionview (= 7.1.3.2) activesupport (= 7.1.3.2) @@ -43,34 +18,18 @@ GEM rack-test (>= 0.6.3) rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) - actiontext (7.1.3.2) - actionpack (= 7.1.3.2) - activerecord (= 7.1.3.2) - activestorage (= 7.1.3.2) - activesupport (= 7.1.3.2) - globalid (>= 0.6.0) - nokogiri (>= 1.8.5) actionview (7.1.3.2) activesupport (= 7.1.3.2) builder (~> 3.1) erubi (~> 1.11) rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) - activejob (7.1.3.2) - activesupport (= 7.1.3.2) - globalid (>= 0.3.6) activemodel (7.1.3.2) activesupport (= 7.1.3.2) activerecord (7.1.3.2) activemodel (= 7.1.3.2) activesupport (= 7.1.3.2) timeout (>= 0.4.0) - activestorage (7.1.3.2) - actionpack (= 7.1.3.2) - activejob (= 7.1.3.2) - activerecord (= 7.1.3.2) - activesupport (= 7.1.3.2) - marcel (~> 1.0) activesupport (7.1.3.2) base64 bigdecimal @@ -87,97 +46,60 @@ GEM thor (>= 0.14.0) ast (2.4.2) base64 (0.2.0) - betterlint (1.7.0) - rubocop (> 1.0) - rubocop-performance - rubocop-rails - rubocop-rake - rubocop-rspec (>= 2.24) - bigdecimal (3.1.7) - builder (3.2.4) - concurrent-ruby (1.2.3) + betterlint (1.16.0) + rubocop (~> 1.62.0) + rubocop-graphql (~> 1.5.0) + rubocop-performance (~> 1.21.0) + rubocop-rails (~> 2.24.0) + rubocop-rake (~> 0.6.0) + rubocop-rspec (~> 2.28.0) + bigdecimal (3.1.8) + builder (3.3.0) + concurrent-ruby (1.3.4) connection_pool (2.4.1) crass (1.0.6) - database_cleaner (2.0.2) + database_cleaner (2.1.0) database_cleaner-active_record (>= 2, < 3) - database_cleaner-active_record (2.1.0) + database_cleaner-active_record (2.2.0) activerecord (>= 5.a) database_cleaner-core (~> 2.0.0) database_cleaner-core (2.0.1) - date (3.3.4) diff-lcs (1.5.1) drb (2.2.1) - erubi (1.12.0) - globalid (1.2.1) - activesupport (>= 6.1) - i18n (1.14.4) + erubi (1.13.0) + i18n (1.14.6) concurrent-ruby (~> 1.0) io-console (0.7.2) - irb (1.12.0) - rdoc + irb (1.14.1) + rdoc (>= 4.0.0) reline (>= 0.4.2) - json (2.7.1) + json (2.8.2) language_server-protocol (3.17.0.3) - loofah (2.22.0) + loofah (2.23.1) 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.4) - mime-types (3.5.2) - mime-types-data (~> 3.2015) - mime-types-data (3.2024.0305) - mini_mime (1.1.5) - minitest (5.22.3) - mutex_m (0.2.0) + minitest (5.25.1) + mutex_m (0.3.0) mysql2 (0.5.6) - net-imap (0.4.10) - 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.3-arm64-darwin) + nokogiri (1.16.7-arm64-darwin) racc (~> 1.4) - nokogiri (1.16.3-x86_64-linux) + nokogiri (1.16.7-x86_64-linux) racc (~> 1.4) - parallel (1.24.0) - parser (3.3.0.5) + parallel (1.26.3) + parser (3.3.6.0) ast (~> 2.4.1) racc - pg (1.5.6) - psych (5.1.2) + pg (1.5.9) + psych (5.2.0) stringio - racc (1.7.3) - rack (2.2.8.1) - rack-session (1.0.2) - rack (< 3) + racc (1.8.1) + rack (3.1.8) + rack-session (2.0.0) + rack (>= 3.0.0) rack-test (2.1.0) rack (>= 1.3) - rackup (1.0.0) - rack (< 3) - webrick - rails (7.1.3.2) - actioncable (= 7.1.3.2) - actionmailbox (= 7.1.3.2) - actionmailer (= 7.1.3.2) - actionpack (= 7.1.3.2) - actiontext (= 7.1.3.2) - actionview (= 7.1.3.2) - activejob (= 7.1.3.2) - activemodel (= 7.1.3.2) - activerecord (= 7.1.3.2) - activestorage (= 7.1.3.2) - activesupport (= 7.1.3.2) - bundler (>= 1.15.0) - railties (= 7.1.3.2) + rackup (2.2.1) + rack (>= 3) rails-dom-testing (2.2.0) activesupport (>= 5.0.0) minitest @@ -194,32 +116,32 @@ GEM thor (~> 1.0, >= 1.2.2) zeitwerk (~> 2.6) rainbow (3.1.1) - rake (13.1.0) - rdoc (6.6.2) + rake (13.2.1) + rdoc (6.8.1) psych (>= 4.0.0) - regexp_parser (2.9.0) - reline (0.4.3) + regexp_parser (2.9.2) + reline (0.5.11) io-console (~> 0.5) - rexml (3.2.6) - rspec-core (3.9.3) - rspec-support (~> 3.9.3) - rspec-expectations (3.9.4) + rexml (3.3.9) + rspec-core (3.13.2) + rspec-support (~> 3.13.0) + rspec-expectations (3.13.3) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.9.0) - rspec-mocks (3.9.1) + rspec-support (~> 3.13.0) + rspec-mocks (3.13.2) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.9.0) - rspec-rails (3.9.1) - actionpack (>= 3.0) - activesupport (>= 3.0) - railties (>= 3.0) - rspec-core (~> 3.9.0) - rspec-expectations (~> 3.9.0) - rspec-mocks (~> 3.9.0) - rspec-support (~> 3.9.0) + rspec-support (~> 3.13.0) + 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-retry (0.6.2) rspec-core (> 3.3) - rspec-support (3.9.4) + rspec-support (3.13.1) rubocop (1.62.1) json (~> 2.3) language_server-protocol (>= 3.17.0) @@ -231,57 +153,54 @@ GEM rubocop-ast (>= 1.31.1, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 3.0) - rubocop-ast (1.31.2) - parser (>= 3.3.0.4) - rubocop-capybara (2.20.0) - rubocop (~> 1.41) - rubocop-factory_bot (2.25.1) + rubocop-ast (1.36.1) + parser (>= 3.3.1.0) + rubocop-capybara (2.21.0) rubocop (~> 1.41) - rubocop-performance (1.20.2) + rubocop-factory_bot (2.26.1) + rubocop (~> 1.61) + rubocop-graphql (1.5.4) + rubocop (>= 1.50, < 2) + rubocop-performance (1.21.1) rubocop (>= 1.48.1, < 2.0) - rubocop-ast (>= 1.30.0, < 2.0) - rubocop-rails (2.24.0) + rubocop-ast (>= 1.31.1, < 2.0) + rubocop-rails (2.24.1) activesupport (>= 4.2.0) rack (>= 1.1) rubocop (>= 1.33.0, < 2.0) rubocop-ast (>= 1.31.1, < 2.0) rubocop-rake (0.6.0) rubocop (~> 1.0) - rubocop-rspec (2.27.1) + rubocop-rspec (2.28.0) rubocop (~> 1.40) rubocop-capybara (~> 2.17) rubocop-factory_bot (~> 2.22) + rubocop-rspec_rails (~> 2.28) + rubocop-rspec_rails (2.29.1) + rubocop (~> 1.61) ruby-progressbar (1.13.0) - sprockets (3.7.2) - concurrent-ruby (~> 1.0) - rack (> 1, < 3) - stringio (3.1.0) - thor (1.3.1) - timeout (0.4.1) + stringio (3.1.2) + thor (1.3.2) + timeout (0.4.2) tzinfo (2.0.6) concurrent-ruby (~> 1.0) - unicode-display_width (2.5.0) - webrick (1.8.1) - websocket-driver (0.7.6) - websocket-extensions (>= 0.1.0) - websocket-extensions (0.1.5) - zeitwerk (2.6.13) + unicode-display_width (2.6.0) + zeitwerk (2.7.1) PLATFORMS arm64-darwin-22 x86_64-linux DEPENDENCIES + activerecord (~> 7.1.0) appraisal (~> 2.2.0) betterlint database_cleaner - mime-types mysql2 pg - rails (~> 7.1.0) - rspec-rails (~> 3.1) + railties (~> 7.1.0) + rspec-rails rspec-retry - sprockets (~> 3.0) with_transactional_lock! BUNDLED WITH diff --git a/lib/tasks/with_transactional_lock_tasks.rake b/lib/tasks/with_transactional_lock_tasks.rake deleted file mode 100644 index f3ee757..0000000 --- a/lib/tasks/with_transactional_lock_tasks.rake +++ /dev/null @@ -1,6 +0,0 @@ -# frozen_string_literal: true - -# desc "Explaining what the task does" -# task :with_transactional_lock do -# # Task goes here -# end diff --git a/lib/with_transactional_lock/mixin.rb b/lib/with_transactional_lock/mixin.rb index 849cfd1..c611eb3 100644 --- a/lib/with_transactional_lock/mixin.rb +++ b/lib/with_transactional_lock/mixin.rb @@ -23,12 +23,12 @@ module AdvisoryLockClassLocator def self.locate(connection) adapter = connection.adapter_name.downcase.to_sym case adapter - when :mysql, :mysql2 - MySqlAdvisoryLock - when :postgresql - PostgresAdvisoryLock - else - raise "adapter not supported: #{adapter}" + when :mysql, :mysql2 + MySqlAdvisoryLock + when :postgresql + PostgresAdvisoryLock + else + raise "adapter not supported: #{adapter}" end end end diff --git a/lib/with_transactional_lock/version.rb b/lib/with_transactional_lock/version.rb index a9b7a6b..a311af0 100644 --- a/lib/with_transactional_lock/version.rb +++ b/lib/with_transactional_lock/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module WithTransactionalLock - VERSION = "2.2.0" + VERSION = "2.3.0" end diff --git a/spec/dummy/README.rdoc b/spec/dummy/README.rdoc deleted file mode 100644 index dd4e97e..0000000 --- a/spec/dummy/README.rdoc +++ /dev/null @@ -1,28 +0,0 @@ -== README - -This README would normally document whatever steps are necessary to get the -application up and running. - -Things you may want to cover: - -* Ruby version - -* System dependencies - -* Configuration - -* Database creation - -* Database initialization - -* How to run the test suite - -* Services (job queues, cache servers, search engines, etc.) - -* Deployment instructions - -* ... - - -Please feel free to use a different markup language if you do not plan to run -rake doc:app. diff --git a/spec/dummy/Rakefile b/spec/dummy/Rakefile index e51cf0e..6d1041e 100644 --- a/spec/dummy/Rakefile +++ b/spec/dummy/Rakefile @@ -1,8 +1,5 @@ # frozen_string_literal: true -# Add your own tasks in files placed in lib/tasks ending in .rake, -# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. - -require File.expand_path('config/application', __dir__) +require_relative 'config/application' Rails.application.load_tasks diff --git a/spec/dummy/app/assets/images/.keep b/spec/dummy/app/assets/images/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/spec/dummy/app/assets/javascripts/application.js b/spec/dummy/app/assets/javascripts/application.js deleted file mode 100644 index 8913b40..0000000 --- a/spec/dummy/app/assets/javascripts/application.js +++ /dev/null @@ -1,13 +0,0 @@ -// This is a manifest file that'll be compiled into application.js, which will include all the files -// listed below. -// -// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, -// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path. -// -// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the -// compiled file. -// -// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details -// about supported directives. -// -//= require_tree . diff --git a/spec/dummy/app/assets/stylesheets/application.css b/spec/dummy/app/assets/stylesheets/application.css deleted file mode 100644 index f9cd5b3..0000000 --- a/spec/dummy/app/assets/stylesheets/application.css +++ /dev/null @@ -1,15 +0,0 @@ -/* - * This is a manifest file that'll be compiled into application.css, which will include all the files - * listed below. - * - * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets, - * or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path. - * - * You're free to add application-wide styles to this file and they'll appear at the bottom of the - * compiled file so the styles you add here take precedence over styles defined in any styles - * defined in the other CSS/SCSS files in this directory. It is generally better to create a new - * file per style scope. - * - *= require_tree . - *= require_self - */ diff --git a/spec/dummy/app/controllers/application_controller.rb b/spec/dummy/app/controllers/application_controller.rb deleted file mode 100644 index 1ff0944..0000000 --- a/spec/dummy/app/controllers/application_controller.rb +++ /dev/null @@ -1,7 +0,0 @@ -# frozen_string_literal: true - -class ApplicationController < ActionController::Base - # Prevent CSRF attacks by raising an exception. - # For APIs, you may want to use :null_session instead. - protect_from_forgery with: :exception -end diff --git a/spec/dummy/app/controllers/concerns/.keep b/spec/dummy/app/controllers/concerns/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/spec/dummy/app/helpers/application_helper.rb b/spec/dummy/app/helpers/application_helper.rb deleted file mode 100644 index 15b06f0..0000000 --- a/spec/dummy/app/helpers/application_helper.rb +++ /dev/null @@ -1,4 +0,0 @@ -# frozen_string_literal: true - -module ApplicationHelper -end diff --git a/spec/dummy/app/mailers/.keep b/spec/dummy/app/mailers/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/spec/dummy/app/models/.keep b/spec/dummy/app/models/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/spec/dummy/app/models/concerns/.keep b/spec/dummy/app/models/concerns/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/spec/dummy/app/views/layouts/application.html.erb b/spec/dummy/app/views/layouts/application.html.erb deleted file mode 100644 index 593a778..0000000 --- a/spec/dummy/app/views/layouts/application.html.erb +++ /dev/null @@ -1,14 +0,0 @@ - - - - Dummy - <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %> - <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %> - <%= csrf_meta_tags %> - - - -<%= yield %> - - - diff --git a/spec/dummy/bin/bundle b/spec/dummy/bin/bundle deleted file mode 100755 index 2dbb717..0000000 --- a/spec/dummy/bin/bundle +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env ruby -# frozen_string_literal: true - -ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__) -load Gem.bin_path('bundler', 'bundle') diff --git a/spec/dummy/bin/rails b/spec/dummy/bin/rails deleted file mode 100755 index a31728a..0000000 --- a/spec/dummy/bin/rails +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env ruby -# frozen_string_literal: true - -APP_PATH = File.expand_path('../config/application', __dir__) -require_relative '../config/boot' -require 'rails/commands' diff --git a/spec/dummy/bin/rake b/spec/dummy/bin/rake deleted file mode 100755 index c199955..0000000 --- a/spec/dummy/bin/rake +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env ruby -# frozen_string_literal: true - -require_relative '../config/boot' -require 'rake' -Rake.application.run diff --git a/spec/dummy/bin/setup b/spec/dummy/bin/setup deleted file mode 100755 index 2f2a12f..0000000 --- a/spec/dummy/bin/setup +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/env ruby -# frozen_string_literal: true - -require 'pathname' - -# path to your application root. -APP_ROOT = Pathname.new File.expand_path('..', __dir__) - -Dir.chdir APP_ROOT do - # This script is a starting point to setup your application. - # Add necessary setup steps to this file: - - puts "== Installing dependencies ==" - system "gem install bundler --conservative" - system "bundle check || bundle install" - - # puts "\n== Copying sample files ==" - # unless File.exist?("config/database.yml") - # system "cp config/database.yml.sample config/database.yml" - # end - - puts "\n== Preparing database ==" - system "bin/rake db:setup" - - puts "\n== Removing old logs and tempfiles ==" - system "rm -f log/*" - system "rm -rf tmp/cache" - - puts "\n== Restarting application server ==" - system "touch tmp/restart.txt" -end diff --git a/spec/dummy/config.ru b/spec/dummy/config.ru deleted file mode 100644 index afd13e2..0000000 --- a/spec/dummy/config.ru +++ /dev/null @@ -1,6 +0,0 @@ -# frozen_string_literal: true - -# This file is used by Rack-based servers to start the application. - -require File.expand_path('config/environment', __dir__) -run Rails.application diff --git a/spec/dummy/config/application.rb b/spec/dummy/config/application.rb index 069e21c..b1290cb 100644 --- a/spec/dummy/config/application.rb +++ b/spec/dummy/config/application.rb @@ -1,29 +1,16 @@ # frozen_string_literal: true -require File.expand_path('boot', __dir__) +require 'bundler/setup' +require 'active_record/railtie' -# Pick the frameworks you want: -require "active_record/railtie" -require "action_controller/railtie" -require "action_mailer/railtie" -require "action_view/railtie" -# require "rails/test_unit/railtie" - -Bundler.require(*Rails.groups) -require "with_transactional_lock" +Bundler.require(:default, Rails.env) +require 'with_transactional_lock' module Dummy class Application < Rails::Application - # Settings in config/environments/* take precedence over those specified here. - # Application configuration should go into files in config/initializers - # -- all .rb files in that directory are automatically loaded. - - # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone. - # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC. - # config.time_zone = 'Central Time (US & Canada)' - - # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. - # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s] - # config.i18n.default_locale = :de + config.root = File.expand_path('..', __dir__) + config.load_defaults Rails::VERSION::STRING.to_f + config.eager_load = Rails.env.test? + config.cache_classes = Rails.env.test? end end diff --git a/spec/dummy/config/boot.rb b/spec/dummy/config/boot.rb deleted file mode 100644 index 6d2cba0..0000000 --- a/spec/dummy/config/boot.rb +++ /dev/null @@ -1,7 +0,0 @@ -# frozen_string_literal: true - -# Set up gems listed in the Gemfile. -ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../../Gemfile', __dir__) - -require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE']) -$LOAD_PATH.unshift File.expand_path('../../../lib', __dir__) diff --git a/spec/dummy/config/environment.rb b/spec/dummy/config/environment.rb index 32d57aa..5cacbed 100644 --- a/spec/dummy/config/environment.rb +++ b/spec/dummy/config/environment.rb @@ -1,7 +1,5 @@ # frozen_string_literal: true -# Load the Rails application. -require File.expand_path('application', __dir__) +require_relative 'application' -# Initialize the Rails application. Rails.application.initialize! diff --git a/spec/dummy/config/environments/development.rb b/spec/dummy/config/environments/development.rb deleted file mode 100644 index 761ad2d..0000000 --- a/spec/dummy/config/environments/development.rb +++ /dev/null @@ -1,43 +0,0 @@ -# frozen_string_literal: true - -Rails.application.configure do - # Settings specified here will take precedence over those in config/application.rb. - - # In the development environment your application's code is reloaded on - # every request. This slows down response time but is perfect for development - # since you don't have to restart the web server when you make code changes. - config.cache_classes = false - - # Do not eager load code on boot. - config.eager_load = false - - # Show full error reports and disable caching. - config.consider_all_requests_local = true - config.action_controller.perform_caching = false - - # Don't care if the mailer can't send. - config.action_mailer.raise_delivery_errors = false - - # Print deprecation notices to the Rails logger. - config.active_support.deprecation = :log - - # Raise an error on page load if there are pending migrations. - config.active_record.migration_error = :page_load - - # Debug mode disables concatenation and preprocessing of assets. - # This option may cause significant delays in view rendering with a large - # number of complex assets. - # config.assets.debug = true - - # Asset digests allow you to set far-future HTTP expiration dates on all assets, - # yet still be able to expire them through the digest params. - # config.assets.digest = true - - # Adds additional error checking when serving assets at runtime. - # Checks for improperly declared sprockets dependencies. - # Raises helpful error messages. - # config.assets.raise_runtime_errors = true - - # Raises error for missing translations - # config.action_view.raise_on_missing_translations = true -end diff --git a/spec/dummy/config/environments/production.rb b/spec/dummy/config/environments/production.rb deleted file mode 100644 index f91115a..0000000 --- a/spec/dummy/config/environments/production.rb +++ /dev/null @@ -1,81 +0,0 @@ -# frozen_string_literal: true - -Rails.application.configure do - # Settings specified here will take precedence over those in config/application.rb. - - # Code is not reloaded between requests. - config.cache_classes = true - - # Eager load code on boot. This eager loads most of Rails and - # your application in memory, allowing both threaded web servers - # and those relying on copy on write to perform better. - # Rake tasks automatically ignore this option for performance. - config.eager_load = true - - # Full error reports are disabled and caching is turned on. - config.consider_all_requests_local = false - config.action_controller.perform_caching = true - - # Enable Rack::Cache to put a simple HTTP cache in front of your application - # Add `rack-cache` to your Gemfile before enabling this. - # For large-scale production use, consider using a caching reverse proxy like - # NGINX, varnish or squid. - # config.action_dispatch.rack_cache = true - - # Disable serving static files from the `/public` folder by default since - # Apache or NGINX already handles this. - config.serve_static_files = ENV['RAILS_SERVE_STATIC_FILES'].present? - - # Compress JavaScripts and CSS. - # config.assets.js_compressor = :uglifier - # config.assets.css_compressor = :sass - - # Do not fallback to assets pipeline if a precompiled asset is missed. - # config.assets.compile = false - - # Asset digests allow you to set far-future HTTP expiration dates on all assets, - # yet still be able to expire them through the digest params. - # config.assets.digest = true - - # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb - - # Specifies the header that your server uses for sending files. - # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache - # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX - - # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. - # config.force_ssl = true - - # Use the lowest log level to ensure availability of diagnostic information - # when problems arise. - config.log_level = :debug - - # Prepend all log lines with the following tags. - # config.log_tags = [ :subdomain, :uuid ] - - # Use a different logger for distributed setups. - # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new) - - # Use a different cache store in production. - # config.cache_store = :mem_cache_store - - # Enable serving of images, stylesheets, and JavaScripts from an asset server. - # config.action_controller.asset_host = 'http://assets.example.com' - - # Ignore bad email addresses and do not raise email delivery errors. - # Set this to true and configure the email server for immediate delivery to raise delivery errors. - # config.action_mailer.raise_delivery_errors = false - - # Enable locale fallbacks for I18n (makes lookups for any locale fall back to - # the I18n.default_locale when a translation cannot be found). - config.i18n.fallbacks = true - - # Send deprecation notices to registered listeners. - config.active_support.deprecation = :notify - - # Use default logging formatter so that PID and timestamp are not suppressed. - config.log_formatter = Logger::Formatter.new - - # Do not dump schema after migrations. - config.active_record.dump_schema_after_migration = false -end diff --git a/spec/dummy/config/environments/test.rb b/spec/dummy/config/environments/test.rb deleted file mode 100644 index f29f2e7..0000000 --- a/spec/dummy/config/environments/test.rb +++ /dev/null @@ -1,40 +0,0 @@ -# frozen_string_literal: true - -Rails.application.configure do - # Settings specified here will take precedence over those in config/application.rb. - - # The test environment is used exclusively to run your application's - # test suite. You never need to work with it otherwise. Remember that - # your test database is "scratch space" for the test suite and is wiped - # and recreated between test runs. Don't rely on the data there! - config.cache_classes = true - - # Do not eager load code on boot. This avoids loading your whole application - # just for the purpose of running a single test. If you are using a tool that - # preloads Rails for running tests, you may have to set it to true. - config.eager_load = false - - # Show full error reports and disable caching. - config.consider_all_requests_local = true - config.action_controller.perform_caching = false - - # Raise exceptions instead of rendering exception templates. - config.action_dispatch.show_exceptions = false - - # Disable request forgery protection in test environment. - config.action_controller.allow_forgery_protection = false - - # Tell Action Mailer not to deliver emails to the real world. - # The :test delivery method accumulates sent emails in the - # ActionMailer::Base.deliveries array. - config.action_mailer.delivery_method = :test - - # Randomize the order test cases are executed. - config.active_support.test_order = :random - - # Print deprecation notices to the stderr. - config.active_support.deprecation = :stderr - - # Raises error for missing translations - # config.action_view.raise_on_missing_translations = true -end diff --git a/spec/dummy/config/initializers/backtrace_silencers.rb b/spec/dummy/config/initializers/backtrace_silencers.rb deleted file mode 100644 index 4b63f28..0000000 --- a/spec/dummy/config/initializers/backtrace_silencers.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -# Be sure to restart your server when you modify this file. - -# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces. -# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ } - -# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code. -# Rails.backtrace_cleaner.remove_silencers! diff --git a/spec/dummy/config/initializers/cookies_serializer.rb b/spec/dummy/config/initializers/cookies_serializer.rb deleted file mode 100644 index 0a23b25..0000000 --- a/spec/dummy/config/initializers/cookies_serializer.rb +++ /dev/null @@ -1,5 +0,0 @@ -# frozen_string_literal: true - -# Be sure to restart your server when you modify this file. - -Rails.application.config.action_dispatch.cookies_serializer = :json diff --git a/spec/dummy/config/initializers/filter_parameter_logging.rb b/spec/dummy/config/initializers/filter_parameter_logging.rb deleted file mode 100644 index 7a4f47b..0000000 --- a/spec/dummy/config/initializers/filter_parameter_logging.rb +++ /dev/null @@ -1,6 +0,0 @@ -# frozen_string_literal: true - -# Be sure to restart your server when you modify this file. - -# Configure sensitive parameters which will be filtered from the log file. -Rails.application.config.filter_parameters += [:password] diff --git a/spec/dummy/config/initializers/inflections.rb b/spec/dummy/config/initializers/inflections.rb deleted file mode 100644 index dc84742..0000000 --- a/spec/dummy/config/initializers/inflections.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -# Be sure to restart your server when you modify this file. - -# Add new inflection rules using the following format. Inflections -# are locale specific, and you may define rules for as many different -# locales as you wish. All of these examples are active by default: -# ActiveSupport::Inflector.inflections(:en) do |inflect| -# inflect.plural /^(ox)$/i, '\1en' -# inflect.singular /^(ox)en/i, '\1' -# inflect.irregular 'person', 'people' -# inflect.uncountable %w( fish sheep ) -# end - -# These inflection rules are supported but not enabled by default: -# ActiveSupport::Inflector.inflections(:en) do |inflect| -# inflect.acronym 'RESTful' -# end diff --git a/spec/dummy/config/initializers/mime_types.rb b/spec/dummy/config/initializers/mime_types.rb deleted file mode 100644 index be6fedc..0000000 --- a/spec/dummy/config/initializers/mime_types.rb +++ /dev/null @@ -1,6 +0,0 @@ -# frozen_string_literal: true - -# Be sure to restart your server when you modify this file. - -# Add new mime types for use in respond_to blocks: -# Mime::Type.register "text/richtext", :rtf diff --git a/spec/dummy/config/initializers/session_store.rb b/spec/dummy/config/initializers/session_store.rb deleted file mode 100644 index 969d977..0000000 --- a/spec/dummy/config/initializers/session_store.rb +++ /dev/null @@ -1,5 +0,0 @@ -# frozen_string_literal: true - -# Be sure to restart your server when you modify this file. - -Rails.application.config.session_store :cookie_store, key: '_dummy_session' diff --git a/spec/dummy/config/initializers/wrap_parameters.rb b/spec/dummy/config/initializers/wrap_parameters.rb deleted file mode 100644 index 246168a..0000000 --- a/spec/dummy/config/initializers/wrap_parameters.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -# Be sure to restart your server when you modify this file. - -# This file contains settings for ActionController::ParamsWrapper which -# is enabled by default. - -# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array. -ActiveSupport.on_load(:action_controller) do - wrap_parameters format: [:json] if respond_to?(:wrap_parameters) -end - -# To enable root element in JSON for ActiveRecord objects. -# ActiveSupport.on_load(:active_record) do -# self.include_root_in_json = true -# end diff --git a/spec/dummy/config/locales/en.yml b/spec/dummy/config/locales/en.yml deleted file mode 100644 index 0653957..0000000 --- a/spec/dummy/config/locales/en.yml +++ /dev/null @@ -1,23 +0,0 @@ -# Files in the config/locales directory are used for internationalization -# and are automatically loaded by Rails. If you want to use locales other -# than English, add the necessary files in this directory. -# -# To use the locales, use `I18n.t`: -# -# I18n.t 'hello' -# -# In views, this is aliased to just `t`: -# -# <%= t('hello') %> -# -# To use a different locale, set it with `I18n.locale`: -# -# I18n.locale = :es -# -# This would use the information in config/locales/es.yml. -# -# To learn more, please read the Rails Internationalization guide -# available at http://guides.rubyonrails.org/i18n.html. - -en: - hello: "Hello world" diff --git a/spec/dummy/config/routes.rb b/spec/dummy/config/routes.rb deleted file mode 100644 index 189947f..0000000 --- a/spec/dummy/config/routes.rb +++ /dev/null @@ -1,58 +0,0 @@ -# frozen_string_literal: true - -Rails.application.routes.draw do - # The priority is based upon order of creation: first created -> highest priority. - # See how all your routes lay out with "rake routes". - - # You can have the root of your site routed with "root" - # root 'welcome#index' - - # Example of regular route: - # get 'products/:id' => 'catalog#view' - - # Example of named route that can be invoked with purchase_url(id: product.id) - # get 'products/:id/purchase' => 'catalog#purchase', as: :purchase - - # Example resource route (maps HTTP verbs to controller actions automatically): - # resources :products - - # Example resource route with options: - # resources :products do - # member do - # get 'short' - # post 'toggle' - # end - # - # collection do - # get 'sold' - # end - # end - - # Example resource route with sub-resources: - # resources :products do - # resources :comments, :sales - # resource :seller - # end - - # Example resource route with more complex sub-resources: - # resources :products do - # resources :comments - # resources :sales do - # get 'recent', on: :collection - # end - # end - - # Example resource route with concerns: - # concern :toggleable do - # post 'toggle' - # end - # resources :posts, concerns: :toggleable - # resources :photos, concerns: :toggleable - - # Example resource route within a namespace: - # namespace :admin do - # # Directs /admin/products/* to Admin::ProductsController - # # (app/controllers/admin/products_controller.rb) - # resources :products - # end -end diff --git a/spec/dummy/config/secrets.yml b/spec/dummy/config/secrets.yml deleted file mode 100644 index fbbad2c..0000000 --- a/spec/dummy/config/secrets.yml +++ /dev/null @@ -1,22 +0,0 @@ -# Be sure to restart your server when you modify this file. - -# Your secret key is used for verifying the integrity of signed cookies. -# If you change this key, all old signed cookies will become invalid! - -# Make sure the secret is at least 30 characters and all random, -# no regular words or you'll be exposed to dictionary attacks. -# You can use `rake secret` to generate a secure secret key. - -# Make sure the secrets in this file are kept private -# if you're sharing your code publicly. - -development: - secret_key_base: c00c0963d17e3a8739e04576d69a1437274f0e023dcb84fb4122b63c3232ef22d6c0db83be94df24f86bf10de043d2fb2cc103d2bad0908621eb637f63d39171 - -test: - secret_key_base: 21e08ccda8bb794e1d454fb61879035532c4381aa20663d8406c7ceb849c77c451571596d1540411363f4ba7bbdefe77780f5280bd9885224e5ca3cf60a3ed77 - -# Do not keep production secrets in the repository, -# instead read values from the environment. -production: - secret_key_base: <%= ENV["SECRET_KEY_BASE"] %> diff --git a/spec/dummy/lib/assets/.keep b/spec/dummy/lib/assets/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/spec/dummy/log/.keep b/spec/dummy/log/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/spec/dummy/public/404.html b/spec/dummy/public/404.html deleted file mode 100644 index b612547..0000000 --- a/spec/dummy/public/404.html +++ /dev/null @@ -1,67 +0,0 @@ - - - - The page you were looking for doesn't exist (404) - - - - - - -
-
-

The page you were looking for doesn't exist.

-

You may have mistyped the address or the page may have moved.

-
-

If you are the application owner check the logs for more information.

-
- - diff --git a/spec/dummy/public/422.html b/spec/dummy/public/422.html deleted file mode 100644 index a21f82b..0000000 --- a/spec/dummy/public/422.html +++ /dev/null @@ -1,67 +0,0 @@ - - - - The change you wanted was rejected (422) - - - - - - -
-
-

The change you wanted was rejected.

-

Maybe you tried to change something you didn't have access to.

-
-

If you are the application owner check the logs for more information.

-
- - diff --git a/spec/dummy/public/500.html b/spec/dummy/public/500.html deleted file mode 100644 index 061abc5..0000000 --- a/spec/dummy/public/500.html +++ /dev/null @@ -1,66 +0,0 @@ - - - - We're sorry, but something went wrong (500) - - - - - - -
-
-

We're sorry, but something went wrong.

-
-

If you are the application owner check the logs for more information.

-
- - diff --git a/spec/dummy/public/favicon.ico b/spec/dummy/public/favicon.ico deleted file mode 100644 index e69de29..0000000 diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 0f8bb87..8ec4518 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -2,7 +2,7 @@ rails_env = ENV['RAILS_ENV'] ||= 'test' db_adapter = ENV['DB_ADAPTER'] ||= 'postgresql' -require File.expand_path("dummy/config/environment.rb", __dir__) +require_relative 'dummy/config/environment' Rails.configuration.database_configuration[db_adapter][rails_env].tap do |c| ActiveRecord::Base.establish_connection(c) @@ -13,7 +13,6 @@ require 'rspec/rails' require 'rspec/retry' -require 'mime-types' require 'database_cleaner' class Widget < ActiveRecord::Base diff --git a/with_transactional_lock.gemspec b/with_transactional_lock.gemspec index 7f63b77..b49b8cb 100644 --- a/with_transactional_lock.gemspec +++ b/with_transactional_lock.gemspec @@ -20,17 +20,16 @@ Gem::Specification.new do |s| s.files = Dir["lib/**/*", "LICENSE", "Rakefile", "README.md"] - s.add_dependency "rails", ">= 7.0", "< 7.2" + s.add_dependency 'activerecord', '>= 7.0', '< 7.2' + s.add_dependency 'railties', '>= 7.0', '< 7.2' s.add_development_dependency 'appraisal', '~> 2.2.0' s.add_development_dependency 'betterlint' s.add_development_dependency 'database_cleaner' - s.add_development_dependency 'mime-types' s.add_development_dependency 'mysql2' s.add_development_dependency 'pg' - s.add_development_dependency 'rspec-rails', '~> 3.1' + s.add_development_dependency 'rspec-rails' s.add_development_dependency 'rspec-retry' - s.add_development_dependency 'sprockets', '~> 3.0' s.required_ruby_version = '>= 3.2' end