From 109bcb09282476b891622ce9ad59ceb58af31981 Mon Sep 17 00:00:00 2001 From: Ricardo Vela <97992712+argvniyx-enroute@users.noreply.github.com> Date: Fri, 24 Jan 2025 09:37:17 -0600 Subject: [PATCH] feat: Add Rails 7.1 - 8 support (#141) * bundle update --bundler * drop rails 6.1 support * drop pre ruby 3.2 support - remove it from the ci matrix - bump required_ruby_version in the gemspec - remove call to `ruby` in Gemfile, regen appraisals - bump TargetRubyVersion in rubocop.yml - and rubocop -a, since all of these are HashSyntax changes * swap rubocop deps for betterlint * add Rails 7.1 appraisal - We also rm secrets.yml from the dummy app to deal with a deprecation warning - And updated the dummy application.rb to `config.load_defaults` for Rails 7 and 7.1 (whilst dropping previous versions) * add Rails 7.2 appraisal and update `her` code to address a deprecation warning; https://github.com/rails/rails/blob/v7.2.2.1/activesupport/lib/active_support/proxy_object.rb * add Rails 8 appraisal and update the dummy app config, as well as the ci matrix * have the Rails version range be closed * bundle update * bump version.rb * don't pin concurrent-ruby for 7.1 * re-intro support for ruby 3.1 * exclude ruby 3.1 + Rails 8 combo Rails 8 requires 3.2 * add missed constraints on railties * constrain zeitwerk `railties`'s constraint on zeitwerk is '~> 2.6' (or 2.5 for older Rails), which means that bundle updating can put us on 2.7, which requires Ruby 3.2. This will break CI tests for Ruby 3.1. When we drop support for 3.1, we can unpin this dep (i.e. not even list it at all, as before). * make zeitwerk a dev dependency * use Rails::VERSION::STRING.to_f as arg to config.load_defaults instead of `rails_version_between` --- .github/workflows/ci.yml | 9 +- .rubocop.yml | 3 +- Appraisals | 17 +- Gemfile | 1 - Gemfile.lock | 263 ++++++++------- app/jobs/test_track/assignment_event_job.rb | 4 +- .../test_track/identifier_creation_job.rb | 6 +- app/models/test_track/assignment.rb | 2 +- app/models/test_track/config_updater.rb | 4 +- app/models/test_track/fake/split_detail.rb | 4 +- app/models/test_track/fake/visitor.rb | 2 +- .../test_track/notify_assignment_job.rb | 2 +- app/models/test_track/remote/fake_server.rb | 2 +- app/models/test_track/remote/split_detail.rb | 2 +- .../unsynced_assignments_notifier.rb | 2 +- app/models/test_track/visitor.rb | 8 +- app/models/test_track/web_session.rb | 6 +- gemfiles/rails_6_1.gemfile.lock | 236 ------------- gemfiles/rails_7_0.gemfile | 3 +- gemfiles/rails_7_0.gemfile.lock | 240 ++++++++------ .../{rails_6_1.gemfile => rails_7_1.gemfile} | 4 +- gemfiles/rails_7_1.gemfile.lock | 312 +++++++++++++++++ gemfiles/rails_7_2.gemfile | 8 + gemfiles/rails_7_2.gemfile.lock | 312 +++++++++++++++++ gemfiles/rails_8_0.gemfile | 8 + gemfiles/rails_8_0.gemfile.lock | 313 ++++++++++++++++++ lib/test_track.rb | 2 +- .../assignment_helper.rb | 4 +- lib/test_track_rails_client/version.rb | 2 +- spec/dummy/config/application.rb | 12 +- spec/dummy/config/secrets.yml | 22 -- .../test_track/application_helper_spec.rb | 2 +- .../test_track/assignment_event_job_spec.rb | 2 +- .../test_track/ab_configuration_spec.rb | 2 +- spec/models/test_track/assignment_spec.rb | 10 +- spec/models/test_track/config_updater_spec.rb | 4 +- .../test_track/notify_assignment_job_spec.rb | 2 +- .../test_track/variant_calculator_spec.rb | 4 +- spec/models/test_track/vary_dsl_spec.rb | 18 +- spec/models/test_track/visitor_spec.rb | 4 +- spec/models/test_track/web_session_spec.rb | 6 +- .../web_session_visitor_repository_spec.rb | 4 +- .../rails_compatibility_spec_helper.rb | 2 +- test_track_rails_client.gemspec | 15 +- .../model/associations/association_proxy.rb | 9 +- 45 files changed, 1335 insertions(+), 564 deletions(-) delete mode 100644 gemfiles/rails_6_1.gemfile.lock rename gemfiles/{rails_6_1.gemfile => rails_7_1.gemfile} (70%) create mode 100644 gemfiles/rails_7_1.gemfile.lock create mode 100644 gemfiles/rails_7_2.gemfile create mode 100644 gemfiles/rails_7_2.gemfile.lock create mode 100644 gemfiles/rails_8_0.gemfile create mode 100644 gemfiles/rails_8_0.gemfile.lock delete mode 100644 spec/dummy/config/secrets.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c4854b3a..635e2122 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,10 +11,15 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - ruby: [3.0, 3.1, 3.2] + ruby: ["3.1", "3.2"] gemfile: - - gemfiles/rails_6_1.gemfile - gemfiles/rails_7_0.gemfile + - gemfiles/rails_7_1.gemfile + - gemfiles/rails_7_2.gemfile + - gemfiles/rails_8_0.gemfile + exclude: + - ruby: "3.1" + gemfile: gemfiles/rails_8_0.gemfile name: Ruby ${{ matrix.ruby }}, ${{ matrix.gemfile }} steps: - uses: technote-space/auto-cancel-redundant-job@v1 diff --git a/.rubocop.yml b/.rubocop.yml index 52cbb3d9..59bdab68 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -12,9 +12,10 @@ AllCops: - 'vendor/**/*' - 'spec/dummy/**/*' - 'Gemfile' + - 'gemfiles/*.gemfile' DisplayStyleGuide: true DisplayCopNames: true - TargetRubyVersion: 3.0 + TargetRubyVersion: 3.1 Layout/ParameterAlignment: Enabled: false diff --git a/Appraisals b/Appraisals index a8d3f0de..c38e9371 100644 --- a/Appraisals +++ b/Appraisals @@ -1,7 +1,16 @@ -appraise 'rails-6-1' do - gem 'railties', '~> 6.1.0' -end - appraise 'rails-7-0' do + gem 'concurrent-ruby', '1.3.4' gem 'railties', '~> 7.0.0' end + +appraise 'rails-7-1' do + gem 'railties', '~> 7.1.0' +end + +appraise 'rails-7-2' do + gem 'railties', '~> 7.2.0' +end + +appraise 'rails-8-0' do + gem 'railties', '~> 8.0.0' +end diff --git a/Gemfile b/Gemfile index f88e933d..3923c457 100644 --- a/Gemfile +++ b/Gemfile @@ -1,5 +1,4 @@ source "https://rubygems.org" -ruby '>= 2.7.0' # Required for, e.g., show.json.jbuilder to work # see: https://github.com/rails/jbuilder/issues/346 diff --git a/Gemfile.lock b/Gemfile.lock index 11515304..599f5bd9 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,73 +1,86 @@ PATH remote: . specs: - test_track_rails_client (7.1.2) - activejob (>= 6.0) - activemodel (>= 6.0) + test_track_rails_client (8.0.0) + activejob (>= 7.0, < 8.1) + activemodel (>= 7.0, < 8.1) faraday (>= 0.8) faraday_middleware mixpanel-ruby (~> 1.4) multi_json (~> 1.7) public_suffix (>= 2.0.0) - railties (>= 5.1) + railties (>= 7.0, < 8.1) request_store (~> 1.3) sprockets-rails GEM remote: https://rubygems.org/ specs: - actionpack (7.1.4.1) - actionview (= 7.1.4.1) - activesupport (= 7.1.4.1) + 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.4.1) - activesupport (= 7.1.4.1) + 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.4.1) - activesupport (= 7.1.4.1) + activejob (8.0.1) + activesupport (= 8.0.1) globalid (>= 0.3.6) - activemodel (7.1.4.1) - activesupport (= 7.1.4.1) - activesupport (7.1.4.1) + activemodel (8.0.1) + activesupport (= 8.0.1) + 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) - addressable (2.8.6) - public_suffix (>= 2.0.2, < 6.0) + securerandom (>= 0.3) + tzinfo (~> 2.0, >= 2.0.5) + uri (>= 0.13.1) + addressable (2.8.7) + public_suffix (>= 2.0.2, < 7.0) appraisal (2.5.0) bundler rake thor (>= 0.14.0) ast (2.4.2) base64 (0.2.0) - bigdecimal (3.1.8) + benchmark (0.4.0) + 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.9) builder (3.3.0) coderay (1.1.3) - concurrent-ruby (1.3.4) - connection_pool (2.4.1) - crack (0.4.5) + concurrent-ruby (1.3.5) + connection_pool (2.5.0) + crack (1.0.0) + bigdecimal rexml crass (1.0.6) - diff-lcs (1.5.0) - docile (1.4.0) + date (3.4.1) + diff-lcs (1.5.1) + docile (1.4.1) drb (2.2.1) - erubi (1.13.0) - faraday (1.10.3) + erubi (1.13.1) + faraday (1.10.4) faraday-em_http (~> 1.0) faraday-em_synchrony (~> 1.0) faraday-excon (~> 1.1) @@ -83,64 +96,70 @@ GEM faraday-em_synchrony (1.0.0) faraday-excon (1.1.0) faraday-httpclient (1.0.1) - faraday-multipart (1.0.4) - multipart-post (~> 2) - faraday-net_http (1.0.1) + faraday-multipart (1.1.0) + multipart-post (~> 2.0) + faraday-net_http (1.0.2) faraday-net_http_persistent (1.2.0) faraday-patron (1.0.0) faraday-rack (1.0.0) faraday-retry (1.0.3) - faraday_middleware (1.2.0) + faraday_middleware (1.2.1) faraday (~> 1.0) globalid (1.2.1) activesupport (>= 6.1) - hashdiff (1.1.0) - i18n (1.14.6) + hashdiff (1.1.2) + i18n (1.14.7) concurrent-ruby (~> 1.0) - io-console (0.7.1) - irb (1.11.0) - rdoc - reline (>= 0.3.8) - jbuilder (2.11.5) + io-console (0.8.0) + irb (1.15.1) + pp (>= 0.6.0) + rdoc (>= 4.0.0) + reline (>= 0.4.2) + jbuilder (2.13.0) actionview (>= 5.0.0) activesupport (>= 5.0.0) - json (2.7.1) - loofah (2.22.0) + json (2.9.1) + language_server-protocol (3.17.0.3) + logger (1.6.5) + loofah (2.24.0) crass (~> 1.0.2) nokogiri (>= 1.12.0) - method_source (1.0.0) - minitest (5.25.1) + method_source (1.1.0) + minitest (5.25.4) mixpanel-ruby (1.7.0) multi_json (1.15.0) - multipart-post (2.3.0) - mutex_m (0.2.0) - nokogiri (1.16.7-arm64-darwin) + multipart-post (2.4.1) + nokogiri (1.18.2-arm64-darwin) racc (~> 1.4) - nokogiri (1.16.7-x86_64-darwin) + nokogiri (1.18.2-x86_64-darwin) racc (~> 1.4) - nokogiri (1.16.7-x86_64-linux) + nokogiri (1.18.2-x86_64-linux-gnu) racc (~> 1.4) - parallel (1.24.0) - parser (3.3.0.0) + parallel (1.26.3) + parser (3.3.7.0) ast (~> 2.4.1) racc - pry (0.14.2) + pp (0.6.2) + prettyprint + prettyprint (0.2.0) + pry (0.15.2) coderay (~> 1.1) method_source (~> 1.0) - pry-rails (0.3.9) - pry (>= 0.10.4) - psych (5.1.2) + pry-rails (0.3.11) + pry (>= 0.13.0) + psych (5.2.3) + date stringio - public_suffix (5.0.4) + public_suffix (6.0.1) racc (1.8.1) rack (3.1.8) - rack-session (2.0.0) + 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-controller-testing (1.0.5) actionpack (>= 5.0.1.rc1) actionview (>= 5.0.1.rc1) @@ -149,95 +168,111 @@ GEM 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.4.1) - actionpack (= 7.1.4.1) - activesupport (= 7.1.4.1) - 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.1.0) - rdoc (6.6.3.1) + rake (13.2.1) + rdoc (6.11.0) psych (>= 4.0.0) - regexp_parser (2.8.3) - reline (0.4.2) + regexp_parser (2.10.0) + reline (0.6.0) io-console (~> 0.5) - request_store (1.5.1) + request_store (1.7.0) rack (>= 1.4) - rexml (3.3.6) - strscan - rspec-core (3.12.2) - rspec-support (~> 3.12.0) - rspec-expectations (3.12.3) + rexml (3.4.0) + 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.12.0) - rspec-mocks (3.12.6) + rspec-support (~> 3.13.0) + rspec-mocks (3.13.2) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.12.0) - rspec-rails (6.1.0) - actionpack (>= 6.1) - activesupport (>= 6.1) - railties (>= 6.1) - rspec-core (~> 3.12) - rspec-expectations (~> 3.12) - rspec-mocks (~> 3.12) - rspec-support (~> 3.12) - rspec-support (3.12.1) - rubocop (1.48.1) + 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-support (3.13.2) + rubocop (1.62.1) json (~> 2.3) + language_server-protocol (>= 3.17.0) parallel (~> 1.10) - parser (>= 3.2.0.0) + 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.26.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-performance (1.20.1) + rubocop-ast (1.37.0) + parser (>= 3.3.1.0) + rubocop-capybara (2.21.0) + rubocop (~> 1.41) + 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.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) ruby2_keywords (0.0.5) - shoulda-matchers (6.0.0) + securerandom (0.4.1) + shoulda-matchers (6.4.0) activesupport (>= 5.2.0) simplecov (0.22.0) docile (~> 1.1) simplecov-html (~> 0.11) simplecov_json_formatter (~> 0.1) - simplecov-html (0.12.3) + simplecov-html (0.13.1) simplecov_json_formatter (0.1.4) 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-rails (3.5.2) + actionpack (>= 6.1) + activesupport (>= 6.1) sprockets (>= 3.0.0) - stringio (3.1.0) - strscan (3.1.0) - thor (1.3.0) - timecop (0.9.8) + stringio (3.1.2) + thor (1.3.2) + timecop (0.9.10) tzinfo (2.0.6) concurrent-ruby (~> 1.0) - unicode-display_width (2.5.0) - webmock (3.19.1) + unicode-display_width (2.6.0) + uri (1.0.2) + useragent (0.16.11) + webmock (3.24.0) addressable (>= 2.8.0) crack (>= 0.3.2) hashdiff (>= 0.4.0, < 2.0.0) - webrick (1.8.2) - zeitwerk (2.6.12) + zeitwerk (2.6.18) PLATFORMS arm64-darwin-22 @@ -248,21 +283,17 @@ PLATFORMS DEPENDENCIES appraisal + betterlint jbuilder pry-rails rails-controller-testing rspec-rails - rubocop (~> 1.48.0) - rubocop-performance - rubocop-rails shoulda-matchers (>= 2.8) simplecov test_track_rails_client! timecop webmock - -RUBY VERSION - ruby 3.0.5p211 + zeitwerk (< 2.7) BUNDLED WITH - 2.4.12 + 2.6.3 diff --git a/app/jobs/test_track/assignment_event_job.rb b/app/jobs/test_track/assignment_event_job.rb index e58bf3ae..dbbf2e25 100644 --- a/app/jobs/test_track/assignment_event_job.rb +++ b/app/jobs/test_track/assignment_event_job.rb @@ -17,7 +17,7 @@ def perform(visitor_id:, split_name:, variant:, context:) def build_assignment(visitor_id, split_name, variant, context) assignment = Assignment.new( visitor: Visitor.new(id: visitor_id), - split_name: split_name + split_name: ) assignment.variant = variant assignment.context = context @@ -28,7 +28,7 @@ def create_assignment_event! tracking_result = maybe_track unless assignment.feature_gate? Remote::AssignmentEvent.create!( - visitor_id: visitor_id, + visitor_id:, split_name: assignment.split_name, context: assignment.context, mixpanel_result: tracking_result diff --git a/app/jobs/test_track/identifier_creation_job.rb b/app/jobs/test_track/identifier_creation_job.rb index da2867e5..a493ed05 100644 --- a/app/jobs/test_track/identifier_creation_job.rb +++ b/app/jobs/test_track/identifier_creation_job.rb @@ -2,9 +2,9 @@ module TestTrack class IdentifierCreationJob < ApplicationJob def perform(identifier_type:, visitor_id:, value:) Remote::Identifier.create!( - identifier_type: identifier_type, - visitor_id: visitor_id, - value: value + identifier_type:, + visitor_id:, + value: ) end end diff --git a/app/models/test_track/assignment.rb b/app/models/test_track/assignment.rb index b61e81f0..9c4fef2b 100644 --- a/app/models/test_track/assignment.rb +++ b/app/models/test_track/assignment.rb @@ -28,7 +28,7 @@ def feature_gate? def _variant return if visitor.offline? - variant = TestTrack::VariantCalculator.new(visitor: visitor, split_name: split_name).variant + variant = TestTrack::VariantCalculator.new(visitor:, split_name:).variant variant&.to_s end end diff --git a/app/models/test_track/config_updater.rb b/app/models/test_track/config_updater.rb index f059862d..39950fd1 100644 --- a/app/models/test_track/config_updater.rb +++ b/app/models/test_track/config_updater.rb @@ -45,13 +45,13 @@ def load_schema attr_reader :schema_file_path def create_split(name, weighting_registry) - TestTrack::Remote::SplitConfig.new(name: name, weighting_registry: weighting_registry).tap do |split_config| + TestTrack::Remote::SplitConfig.new(name:, weighting_registry:).tap do |split_config| raise split_config.errors.full_messages.join("\n") unless split_config.save end end def create_identifier_type(name) - TestTrack::Remote::IdentifierType.new(name: name).tap do |identifier_type| + TestTrack::Remote::IdentifierType.new(name:).tap do |identifier_type| raise identifier_type.errors.full_messages.join("\n") unless identifier_type.save end end diff --git a/app/models/test_track/fake/split_detail.rb b/app/models/test_track/fake/split_detail.rb index 15735369..ccd1d56c 100644 --- a/app/models/test_track/fake/split_detail.rb +++ b/app/models/test_track/fake/split_detail.rb @@ -13,14 +13,14 @@ def details def _details { - name: name, + name:, hypothesis: "user will interact more with blue banner", location: "home screen", platform: "mobile", owner: "mobile team", assignment_criteria: "user has mobile app", description: "banner test to see if users will interact more", - variant_details: variant_details + variant_details: } end diff --git a/app/models/test_track/fake/visitor.rb b/app/models/test_track/fake/visitor.rb index 6b80b3ab..d06a5736 100644 --- a/app/models/test_track/fake/visitor.rb +++ b/app/models/test_track/fake/visitor.rb @@ -28,7 +28,7 @@ def split_registry def _assignments split_registry.split_names.map do |split_name| - variant = TestTrack::VariantCalculator.new(visitor: self, split_name: split_name).variant + variant = TestTrack::VariantCalculator.new(visitor: self, split_name:).variant Assignment.new(split_name, variant, false, "the_context") end end diff --git a/app/models/test_track/notify_assignment_job.rb b/app/models/test_track/notify_assignment_job.rb index a10a8bae..cc0127e0 100644 --- a/app/models/test_track/notify_assignment_job.rb +++ b/app/models/test_track/notify_assignment_job.rb @@ -15,7 +15,7 @@ def perform tracking_result = maybe_track unless assignment.feature_gate? TestTrack::Remote::AssignmentEvent.create!( - visitor_id: visitor_id, + visitor_id:, split_name: assignment.split_name, context: assignment.context, mixpanel_result: tracking_result diff --git a/app/models/test_track/remote/fake_server.rb b/app/models/test_track/remote/fake_server.rb index a71cc6ee..8b9b227f 100644 --- a/app/models/test_track/remote/fake_server.rb +++ b/app/models/test_track/remote/fake_server.rb @@ -4,6 +4,6 @@ class TestTrack::Remote::FakeServer def self.reset!(seed) raise('Cannot reset FakeServer if TestTrack is enabled.') if TestTrack.enabled? - put('api/v1/reset', seed: seed) + put('api/v1/reset', seed:) end end diff --git a/app/models/test_track/remote/split_detail.rb b/app/models/test_track/remote/split_detail.rb index c67db70a..255ee5c5 100644 --- a/app/models/test_track/remote/split_detail.rb +++ b/app/models/test_track/remote/split_detail.rb @@ -16,7 +16,7 @@ def self.from_name(name) def self.fake_instance_attributes(name) { - name: name, + name:, hypothesis: "fake hypothesis", assignment_criteria: "fake criteria for everyone", description: "fake but still good description", diff --git a/app/models/test_track/unsynced_assignments_notifier.rb b/app/models/test_track/unsynced_assignments_notifier.rb index e8632b20..80d97c99 100644 --- a/app/models/test_track/unsynced_assignments_notifier.rb +++ b/app/models/test_track/unsynced_assignments_notifier.rb @@ -24,7 +24,7 @@ def notify def assignment_job_args(assignment) { - visitor_id: visitor_id, + visitor_id:, context: assignment.context, split_name: assignment.split_name, variant: assignment.variant diff --git a/app/models/test_track/visitor.rb b/app/models/test_track/visitor.rb index e14156bf..d0c1e3a6 100644 --- a/app/models/test_track/visitor.rb +++ b/app/models/test_track/visitor.rb @@ -24,7 +24,7 @@ def vary(split_name, opts = {}) raise ArgumentError, "must provide block to `vary` for #{split_name}" unless block_given? - v = TestTrack::VaryDsl.new(assignment: assignment_for(split_name), context: context, split_registry: split_registry) + v = TestTrack::VaryDsl.new(assignment: assignment_for(split_name), context:, split_registry:) yield v v.send :run end @@ -36,9 +36,9 @@ def ab(split_name, opts = {}) # rubocop:disable Metrics/MethodLength, Metrics/Ab context = require_option!(opts, :context) raise "unknown opts: #{opts.keys.to_sentence}" if opts.present? - ab_configuration = TestTrack::AbConfiguration.new split_name: split_name, true_variant: true_variant, split_registry: split_registry + ab_configuration = TestTrack::AbConfiguration.new(split_name:, true_variant:, split_registry:) - vary(split_name, context: context) do |v| + vary(split_name, context:) do |v| v.when ab_configuration.variants[:true] do # rubocop:disable Lint/BooleanSymbol true end @@ -148,7 +148,7 @@ def fetch_assignment_for(split_name) end def generate_assignment_for(split_name) - assignment_registry[split_name] = TestTrack::Assignment.new(visitor: self, split_name: split_name) + assignment_registry[split_name] = TestTrack::Assignment.new(visitor: self, split_name:) end def maybe_prefix(split_name) diff --git a/app/models/test_track/web_session.rb b/app/models/test_track/web_session.rb index ef4d5fa3..55fbd72a 100644 --- a/app/models/test_track/web_session.rb +++ b/app/models/test_track/web_session.rb @@ -70,8 +70,8 @@ def unauthenticated_visitor_id def visitors @visitors ||= TestTrack::WebSessionVisitorRepository.new( - current_identity: current_identity, - unauthenticated_visitor_id: unauthenticated_visitor_id + current_identity:, + unauthenticated_visitor_id: ) end @@ -81,7 +81,7 @@ def current_visitor def set_cookie(name, value) cookies[name] = { - value: value, + value:, domain: cookie_domain, secure: request.ssl?, httponly: false, diff --git a/gemfiles/rails_6_1.gemfile.lock b/gemfiles/rails_6_1.gemfile.lock deleted file mode 100644 index c5b75642..00000000 --- a/gemfiles/rails_6_1.gemfile.lock +++ /dev/null @@ -1,236 +0,0 @@ -PATH - remote: .. - specs: - test_track_rails_client (7.1.2) - activejob (>= 6.0) - activemodel (>= 6.0) - faraday (>= 0.8) - faraday_middleware - mixpanel-ruby (~> 1.4) - multi_json (~> 1.7) - public_suffix (>= 2.0.0) - railties (>= 5.1) - request_store (~> 1.3) - sprockets-rails - -GEM - remote: https://rubygems.org/ - specs: - 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) - 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.7.6) - activesupport (= 6.1.7.6) - globalid (>= 0.3.6) - activemodel (6.1.7.6) - activesupport (= 6.1.7.6) - 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.6) - public_suffix (>= 2.0.2, < 6.0) - appraisal (2.5.0) - bundler - rake - thor (>= 0.14.0) - ast (2.4.2) - builder (3.2.4) - coderay (1.1.3) - concurrent-ruby (1.2.2) - crack (0.4.5) - rexml - crass (1.0.6) - diff-lcs (1.5.0) - docile (1.4.0) - erubi (1.12.0) - faraday (1.10.3) - faraday-em_http (~> 1.0) - faraday-em_synchrony (~> 1.0) - faraday-excon (~> 1.1) - faraday-httpclient (~> 1.0) - faraday-multipart (~> 1.0) - faraday-net_http (~> 1.0) - faraday-net_http_persistent (~> 1.0) - faraday-patron (~> 1.0) - faraday-rack (~> 1.0) - faraday-retry (~> 1.0) - ruby2_keywords (>= 0.0.4) - faraday-em_http (1.0.0) - faraday-em_synchrony (1.0.0) - faraday-excon (1.1.0) - faraday-httpclient (1.0.1) - faraday-multipart (1.0.4) - multipart-post (~> 2) - faraday-net_http (1.0.1) - faraday-net_http_persistent (1.2.0) - faraday-patron (1.0.0) - faraday-rack (1.0.0) - faraday-retry (1.0.3) - faraday_middleware (1.2.0) - faraday (~> 1.0) - globalid (1.2.1) - activesupport (>= 6.1) - hashdiff (1.1.0) - i18n (1.14.1) - concurrent-ruby (~> 1.0) - jbuilder (2.11.5) - actionview (>= 5.0.0) - activesupport (>= 5.0.0) - json (2.7.1) - loofah (2.22.0) - crass (~> 1.0.2) - nokogiri (>= 1.12.0) - method_source (1.0.0) - minitest (5.20.0) - mixpanel-ruby (1.7.0) - multi_json (1.15.0) - multipart-post (2.3.0) - nokogiri (1.16.0-arm64-darwin) - racc (~> 1.4) - nokogiri (1.16.0-x86_64-darwin) - racc (~> 1.4) - nokogiri (1.16.0-x86_64-linux) - racc (~> 1.4) - parallel (1.24.0) - parser (3.3.0.0) - ast (~> 2.4.1) - racc - pry (0.14.2) - coderay (~> 1.1) - method_source (~> 1.0) - pry-rails (0.3.9) - pry (>= 0.10.4) - public_suffix (5.0.4) - racc (1.7.3) - rack (2.2.8) - rack-test (2.1.0) - rack (>= 1.3) - rails-controller-testing (1.0.5) - actionpack (>= 5.0.1.rc1) - actionview (>= 5.0.1.rc1) - activesupport (>= 5.0.1.rc1) - 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 (6.1.7.6) - actionpack (= 6.1.7.6) - activesupport (= 6.1.7.6) - method_source - rake (>= 12.2) - thor (~> 1.0) - rainbow (3.1.1) - rake (13.1.0) - regexp_parser (2.8.3) - request_store (1.5.1) - rack (>= 1.4) - rexml (3.2.6) - rspec-core (3.12.2) - rspec-support (~> 3.12.0) - rspec-expectations (3.12.3) - diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.12.0) - rspec-mocks (3.12.6) - diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.12.0) - rspec-rails (6.1.0) - actionpack (>= 6.1) - activesupport (>= 6.1) - railties (>= 6.1) - rspec-core (~> 3.12) - rspec-expectations (~> 3.12) - rspec-mocks (~> 3.12) - rspec-support (~> 3.12) - rspec-support (3.12.1) - rubocop (1.48.1) - json (~> 2.3) - parallel (~> 1.10) - parser (>= 3.2.0.0) - rainbow (>= 2.2.2, < 4.0) - regexp_parser (>= 1.8, < 3.0) - rexml (>= 3.2.5, < 4.0) - rubocop-ast (>= 1.26.0, < 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-performance (1.20.1) - rubocop (>= 1.48.1, < 2.0) - rubocop-ast (>= 1.30.0, < 2.0) - rubocop-rails (2.23.1) - activesupport (>= 4.2.0) - rack (>= 1.1) - rubocop (>= 1.33.0, < 2.0) - rubocop-ast (>= 1.30.0, < 2.0) - ruby-progressbar (1.13.0) - ruby2_keywords (0.0.5) - shoulda-matchers (6.0.0) - activesupport (>= 5.2.0) - simplecov (0.22.0) - docile (~> 1.1) - simplecov-html (~> 0.11) - simplecov_json_formatter (~> 0.1) - simplecov-html (0.12.3) - simplecov_json_formatter (0.1.4) - 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) - thor (1.3.0) - timecop (0.9.8) - tzinfo (2.0.6) - concurrent-ruby (~> 1.0) - unicode-display_width (2.5.0) - webmock (3.19.1) - addressable (>= 2.8.0) - crack (>= 0.3.2) - hashdiff (>= 0.4.0, < 2.0.0) - zeitwerk (2.6.12) - -PLATFORMS - arm64-darwin-22 - arm64-darwin-23 - x86_64-darwin-21 - x86_64-darwin-22 - x86_64-linux - -DEPENDENCIES - appraisal - jbuilder - pry-rails - rails-controller-testing - railties (~> 6.1.0) - rspec-rails - rubocop (~> 1.48.0) - rubocop-performance - rubocop-rails - shoulda-matchers (>= 2.8) - simplecov - test_track_rails_client! - timecop - webmock - -RUBY VERSION - ruby 3.0.5p211 - -BUNDLED WITH - 2.4.12 diff --git a/gemfiles/rails_7_0.gemfile b/gemfiles/rails_7_0.gemfile index 86350583..b3925541 100644 --- a/gemfiles/rails_7_0.gemfile +++ b/gemfiles/rails_7_0.gemfile @@ -2,9 +2,8 @@ source "https://rubygems.org" -ruby ">= 2.7.0" - gem "jbuilder" +gem "concurrent-ruby", "1.3.4" gem "railties", "~> 7.0.0" gemspec path: "../" diff --git a/gemfiles/rails_7_0.gemfile.lock b/gemfiles/rails_7_0.gemfile.lock index d9d58e7c..5c7985bc 100644 --- a/gemfiles/rails_7_0.gemfile.lock +++ b/gemfiles/rails_7_0.gemfile.lock @@ -1,61 +1,70 @@ PATH remote: .. specs: - test_track_rails_client (7.1.2) - activejob (>= 6.0) - activemodel (>= 6.0) + test_track_rails_client (8.0.0) + activejob (>= 7.0, < 8.1) + activemodel (>= 7.0, < 8.1) faraday (>= 0.8) faraday_middleware mixpanel-ruby (~> 1.4) multi_json (~> 1.7) public_suffix (>= 2.0.0) - railties (>= 5.1) + railties (>= 7.0, < 8.1) request_store (~> 1.3) sprockets-rails GEM remote: https://rubygems.org/ specs: - actionpack (7.0.8) - actionview (= 7.0.8) - activesupport (= 7.0.8) + actionpack (7.0.8.7) + actionview (= 7.0.8.7) + activesupport (= 7.0.8.7) rack (~> 2.0, >= 2.2.4) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actionview (7.0.8) - activesupport (= 7.0.8) + actionview (7.0.8.7) + activesupport (= 7.0.8.7) 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) + activejob (7.0.8.7) + activesupport (= 7.0.8.7) globalid (>= 0.3.6) - activemodel (7.0.8) - activesupport (= 7.0.8) - activesupport (7.0.8) + activemodel (7.0.8.7) + activesupport (= 7.0.8.7) + activesupport (7.0.8.7) 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) + addressable (2.8.7) + public_suffix (>= 2.0.2, < 7.0) appraisal (2.5.0) bundler rake thor (>= 0.14.0) ast (2.4.2) - builder (3.2.4) + 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.9) + builder (3.3.0) coderay (1.1.3) - concurrent-ruby (1.2.2) - crack (0.4.5) + concurrent-ruby (1.3.4) + crack (1.0.0) + bigdecimal rexml crass (1.0.6) - diff-lcs (1.5.0) - docile (1.4.0) - erubi (1.12.0) - faraday (1.10.3) + diff-lcs (1.5.1) + docile (1.4.1) + erubi (1.13.1) + faraday (1.10.4) faraday-em_http (~> 1.0) faraday-em_synchrony (~> 1.0) faraday-excon (~> 1.1) @@ -71,51 +80,62 @@ GEM faraday-em_synchrony (1.0.0) faraday-excon (1.1.0) faraday-httpclient (1.0.1) - faraday-multipart (1.0.4) - multipart-post (~> 2) - faraday-net_http (1.0.1) + faraday-multipart (1.1.0) + multipart-post (~> 2.0) + faraday-net_http (1.0.2) faraday-net_http_persistent (1.2.0) faraday-patron (1.0.0) faraday-rack (1.0.0) faraday-retry (1.0.3) - faraday_middleware (1.2.0) + faraday_middleware (1.2.1) faraday (~> 1.0) globalid (1.2.1) activesupport (>= 6.1) - hashdiff (1.1.0) - i18n (1.14.1) + hashdiff (1.1.2) + i18n (1.14.7) concurrent-ruby (~> 1.0) - jbuilder (2.11.5) + jbuilder (2.13.0) actionview (>= 5.0.0) activesupport (>= 5.0.0) - json (2.7.1) - loofah (2.22.0) + json (2.9.1) + language_server-protocol (3.17.0.3) + loofah (2.24.0) crass (~> 1.0.2) nokogiri (>= 1.12.0) - method_source (1.0.0) - minitest (5.20.0) + method_source (1.1.0) + minitest (5.25.4) mixpanel-ruby (1.7.0) multi_json (1.15.0) - multipart-post (2.3.0) - nokogiri (1.16.0-arm64-darwin) + multipart-post (2.4.1) + nokogiri (1.18.2-aarch64-linux-gnu) racc (~> 1.4) - nokogiri (1.16.0-x86_64-darwin) + nokogiri (1.18.2-aarch64-linux-musl) racc (~> 1.4) - nokogiri (1.16.0-x86_64-linux) + nokogiri (1.18.2-arm-linux-gnu) racc (~> 1.4) - parallel (1.24.0) - parser (3.3.0.0) + nokogiri (1.18.2-arm-linux-musl) + racc (~> 1.4) + nokogiri (1.18.2-arm64-darwin) + racc (~> 1.4) + nokogiri (1.18.2-x86_64-darwin) + racc (~> 1.4) + nokogiri (1.18.2-x86_64-linux-gnu) + racc (~> 1.4) + nokogiri (1.18.2-x86_64-linux-musl) + racc (~> 1.4) + parallel (1.26.3) + parser (3.3.7.0) ast (~> 2.4.1) racc - pry (0.14.2) + pry (0.15.2) coderay (~> 1.1) method_source (~> 1.0) - pry-rails (0.3.9) - pry (>= 0.10.4) - public_suffix (5.0.4) - racc (1.7.3) - rack (2.2.8) - rack-test (2.1.0) + pry-rails (0.3.11) + pry (>= 0.13.0) + public_suffix (6.0.1) + racc (1.8.1) + rack (2.2.10) + rack-test (2.2.0) rack (>= 1.3) rails-controller-testing (1.0.5) actionpack (>= 5.0.1.rc1) @@ -125,112 +145,128 @@ GEM 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.0.8) - actionpack (= 7.0.8) - activesupport (= 7.0.8) + 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 (7.0.8.7) + actionpack (= 7.0.8.7) + activesupport (= 7.0.8.7) method_source rake (>= 12.2) thor (~> 1.0) zeitwerk (~> 2.5) rainbow (3.1.1) - rake (13.1.0) - regexp_parser (2.8.3) - request_store (1.5.1) + rake (13.2.1) + regexp_parser (2.10.0) + request_store (1.7.0) rack (>= 1.4) - rexml (3.2.6) - rspec-core (3.12.2) - rspec-support (~> 3.12.0) - rspec-expectations (3.12.3) + rexml (3.4.0) + 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.12.0) - rspec-mocks (3.12.6) + rspec-support (~> 3.13.0) + rspec-mocks (3.13.2) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.12.0) - rspec-rails (6.1.0) - actionpack (>= 6.1) - activesupport (>= 6.1) - railties (>= 6.1) - rspec-core (~> 3.12) - rspec-expectations (~> 3.12) - rspec-mocks (~> 3.12) - rspec-support (~> 3.12) - rspec-support (3.12.1) - rubocop (1.48.1) + 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-support (3.13.2) + rubocop (1.62.1) json (~> 2.3) + language_server-protocol (>= 3.17.0) parallel (~> 1.10) - parser (>= 3.2.0.0) + 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.26.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-performance (1.20.1) + rubocop-ast (1.37.0) + parser (>= 3.3.1.0) + rubocop-capybara (2.21.0) + rubocop (~> 1.41) + 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.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) ruby2_keywords (0.0.5) - shoulda-matchers (6.0.0) + shoulda-matchers (6.4.0) activesupport (>= 5.2.0) simplecov (0.22.0) docile (~> 1.1) simplecov-html (~> 0.11) simplecov_json_formatter (~> 0.1) - simplecov-html (0.12.3) + simplecov-html (0.13.1) simplecov_json_formatter (0.1.4) 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-rails (3.5.2) + actionpack (>= 6.1) + activesupport (>= 6.1) sprockets (>= 3.0.0) - thor (1.3.0) - timecop (0.9.8) + thor (1.3.2) + timecop (0.9.10) tzinfo (2.0.6) concurrent-ruby (~> 1.0) - unicode-display_width (2.5.0) - webmock (3.19.1) + unicode-display_width (2.6.0) + webmock (3.24.0) addressable (>= 2.8.0) crack (>= 0.3.2) hashdiff (>= 0.4.0, < 2.0.0) - zeitwerk (2.6.12) + zeitwerk (2.6.18) PLATFORMS - arm64-darwin-22 - arm64-darwin-23 - x86_64-darwin-21 - x86_64-darwin-22 - x86_64-linux + aarch64-linux-gnu + aarch64-linux-musl + arm-linux-gnu + arm-linux-musl + arm64-darwin + x86_64-darwin + x86_64-linux-gnu + x86_64-linux-musl DEPENDENCIES appraisal + betterlint + concurrent-ruby (= 1.3.4) jbuilder pry-rails rails-controller-testing railties (~> 7.0.0) rspec-rails - rubocop (~> 1.48.0) - rubocop-performance - rubocop-rails shoulda-matchers (>= 2.8) simplecov test_track_rails_client! timecop webmock - -RUBY VERSION - ruby 3.0.5p211 + zeitwerk (< 2.7) BUNDLED WITH - 2.4.12 + 2.6.3 diff --git a/gemfiles/rails_6_1.gemfile b/gemfiles/rails_7_1.gemfile similarity index 70% rename from gemfiles/rails_6_1.gemfile rename to gemfiles/rails_7_1.gemfile index 40bcb349..414dda89 100644 --- a/gemfiles/rails_6_1.gemfile +++ b/gemfiles/rails_7_1.gemfile @@ -2,9 +2,7 @@ source "https://rubygems.org" -ruby ">= 2.7.0" - gem "jbuilder" -gem "railties", "~> 6.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 new file mode 100644 index 00000000..2e1b9e7c --- /dev/null +++ b/gemfiles/rails_7_1.gemfile.lock @@ -0,0 +1,312 @@ +PATH + remote: .. + specs: + test_track_rails_client (8.0.0) + activejob (>= 7.0, < 8.1) + activemodel (>= 7.0, < 8.1) + faraday (>= 0.8) + faraday_middleware + mixpanel-ruby (~> 1.4) + multi_json (~> 1.7) + public_suffix (>= 2.0.0) + railties (>= 7.0, < 8.1) + request_store (~> 1.3) + sprockets-rails + +GEM + remote: https://rubygems.org/ + specs: + actionpack (7.1.5.1) + actionview (= 7.1.5.1) + activesupport (= 7.1.5.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.5.1) + activesupport (= 7.1.5.1) + builder (~> 3.1) + erubi (~> 1.11) + rails-dom-testing (~> 2.2) + rails-html-sanitizer (~> 1.6) + activejob (7.1.5.1) + activesupport (= 7.1.5.1) + globalid (>= 0.3.6) + activemodel (7.1.5.1) + activesupport (= 7.1.5.1) + activesupport (7.1.5.1) + base64 + benchmark (>= 0.3) + bigdecimal + concurrent-ruby (~> 1.0, >= 1.0.2) + connection_pool (>= 2.2.5) + drb + i18n (>= 1.6, < 2) + logger (>= 1.4.2) + minitest (>= 5.1) + mutex_m + securerandom (>= 0.3) + tzinfo (~> 2.0) + addressable (2.8.7) + public_suffix (>= 2.0.2, < 7.0) + appraisal (2.5.0) + bundler + rake + thor (>= 0.14.0) + ast (2.4.2) + base64 (0.2.0) + benchmark (0.4.0) + 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.9) + builder (3.3.0) + coderay (1.1.3) + concurrent-ruby (1.3.5) + connection_pool (2.5.0) + crack (1.0.0) + bigdecimal + rexml + crass (1.0.6) + date (3.4.1) + diff-lcs (1.5.1) + docile (1.4.1) + drb (2.2.1) + erubi (1.13.1) + faraday (1.10.4) + faraday-em_http (~> 1.0) + faraday-em_synchrony (~> 1.0) + faraday-excon (~> 1.1) + faraday-httpclient (~> 1.0) + faraday-multipart (~> 1.0) + faraday-net_http (~> 1.0) + faraday-net_http_persistent (~> 1.0) + faraday-patron (~> 1.0) + faraday-rack (~> 1.0) + faraday-retry (~> 1.0) + ruby2_keywords (>= 0.0.4) + faraday-em_http (1.0.0) + faraday-em_synchrony (1.0.0) + faraday-excon (1.1.0) + faraday-httpclient (1.0.1) + faraday-multipart (1.1.0) + multipart-post (~> 2.0) + faraday-net_http (1.0.2) + faraday-net_http_persistent (1.2.0) + faraday-patron (1.0.0) + faraday-rack (1.0.0) + faraday-retry (1.0.3) + faraday_middleware (1.2.1) + faraday (~> 1.0) + globalid (1.2.1) + activesupport (>= 6.1) + hashdiff (1.1.2) + i18n (1.14.7) + concurrent-ruby (~> 1.0) + io-console (0.8.0) + irb (1.15.1) + pp (>= 0.6.0) + rdoc (>= 4.0.0) + reline (>= 0.4.2) + jbuilder (2.13.0) + actionview (>= 5.0.0) + activesupport (>= 5.0.0) + json (2.9.1) + language_server-protocol (3.17.0.3) + logger (1.6.5) + loofah (2.24.0) + crass (~> 1.0.2) + nokogiri (>= 1.12.0) + method_source (1.1.0) + minitest (5.25.4) + mixpanel-ruby (1.7.0) + multi_json (1.15.0) + multipart-post (2.4.1) + mutex_m (0.3.0) + nokogiri (1.18.2-aarch64-linux-gnu) + racc (~> 1.4) + nokogiri (1.18.2-aarch64-linux-musl) + racc (~> 1.4) + nokogiri (1.18.2-arm-linux-gnu) + racc (~> 1.4) + nokogiri (1.18.2-arm-linux-musl) + racc (~> 1.4) + nokogiri (1.18.2-arm64-darwin) + racc (~> 1.4) + nokogiri (1.18.2-x86_64-darwin) + racc (~> 1.4) + nokogiri (1.18.2-x86_64-linux-gnu) + racc (~> 1.4) + nokogiri (1.18.2-x86_64-linux-musl) + racc (~> 1.4) + parallel (1.26.3) + parser (3.3.7.0) + ast (~> 2.4.1) + racc + pp (0.6.2) + prettyprint + prettyprint (0.2.0) + pry (0.15.2) + coderay (~> 1.1) + method_source (~> 1.0) + pry-rails (0.3.11) + pry (>= 0.13.0) + psych (5.2.3) + date + stringio + public_suffix (6.0.1) + racc (1.8.1) + rack (3.1.8) + rack-session (2.1.0) + base64 (>= 0.1.0) + rack (>= 3.0.0) + rack-test (2.2.0) + rack (>= 1.3) + rackup (2.2.1) + rack (>= 3) + rails-controller-testing (1.0.5) + actionpack (>= 5.0.1.rc1) + actionview (>= 5.0.1.rc1) + activesupport (>= 5.0.1.rc1) + rails-dom-testing (2.2.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 (7.1.5.1) + actionpack (= 7.1.5.1) + activesupport (= 7.1.5.1) + irb + 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.11.0) + psych (>= 4.0.0) + regexp_parser (2.10.0) + reline (0.6.0) + io-console (~> 0.5) + request_store (1.7.0) + rack (>= 1.4) + rexml (3.4.0) + 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.13.0) + rspec-mocks (3.13.2) + diff-lcs (>= 1.2.0, < 2.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-support (3.13.2) + rubocop (1.62.1) + 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 (>= 1.8, < 3.0) + rexml (>= 3.2.5, < 4.0) + rubocop-ast (>= 1.31.1, < 2.0) + ruby-progressbar (~> 1.7) + unicode-display_width (>= 2.4.0, < 3.0) + rubocop-ast (1.37.0) + parser (>= 3.3.1.0) + rubocop-capybara (2.21.0) + rubocop (~> 1.41) + 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.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.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) + ruby2_keywords (0.0.5) + securerandom (0.4.1) + shoulda-matchers (6.4.0) + activesupport (>= 5.2.0) + simplecov (0.22.0) + docile (~> 1.1) + simplecov-html (~> 0.11) + simplecov_json_formatter (~> 0.1) + simplecov-html (0.13.1) + simplecov_json_formatter (0.1.4) + sprockets (4.2.1) + concurrent-ruby (~> 1.0) + rack (>= 2.2.4, < 4) + sprockets-rails (3.5.2) + actionpack (>= 6.1) + activesupport (>= 6.1) + sprockets (>= 3.0.0) + stringio (3.1.2) + thor (1.3.2) + timecop (0.9.10) + tzinfo (2.0.6) + concurrent-ruby (~> 1.0) + unicode-display_width (2.6.0) + webmock (3.24.0) + addressable (>= 2.8.0) + crack (>= 0.3.2) + hashdiff (>= 0.4.0, < 2.0.0) + zeitwerk (2.6.18) + +PLATFORMS + aarch64-linux-gnu + aarch64-linux-musl + arm-linux-gnu + arm-linux-musl + arm64-darwin + x86_64-darwin + x86_64-linux-gnu + x86_64-linux-musl + +DEPENDENCIES + appraisal + betterlint + jbuilder + pry-rails + rails-controller-testing + railties (~> 7.1.0) + rspec-rails + shoulda-matchers (>= 2.8) + simplecov + test_track_rails_client! + timecop + webmock + zeitwerk (< 2.7) + +BUNDLED WITH + 2.6.3 diff --git a/gemfiles/rails_7_2.gemfile b/gemfiles/rails_7_2.gemfile new file mode 100644 index 00000000..7a6041c7 --- /dev/null +++ b/gemfiles/rails_7_2.gemfile @@ -0,0 +1,8 @@ +# This file was generated by Appraisal + +source "https://rubygems.org" + +gem "jbuilder" +gem "railties", "~> 7.2.0" + +gemspec path: "../" diff --git a/gemfiles/rails_7_2.gemfile.lock b/gemfiles/rails_7_2.gemfile.lock new file mode 100644 index 00000000..50f32832 --- /dev/null +++ b/gemfiles/rails_7_2.gemfile.lock @@ -0,0 +1,312 @@ +PATH + remote: .. + specs: + test_track_rails_client (8.0.0) + activejob (>= 7.0, < 8.1) + activemodel (>= 7.0, < 8.1) + faraday (>= 0.8) + faraday_middleware + mixpanel-ruby (~> 1.4) + multi_json (~> 1.7) + public_suffix (>= 2.0.0) + railties (>= 7.0, < 8.1) + request_store (~> 1.3) + sprockets-rails + +GEM + remote: https://rubygems.org/ + specs: + actionpack (7.2.2.1) + actionview (= 7.2.2.1) + activesupport (= 7.2.2.1) + nokogiri (>= 1.8.5) + racc + rack (>= 2.2.4, < 3.2) + rack-session (>= 1.0.1) + rack-test (>= 0.6.3) + rails-dom-testing (~> 2.2) + rails-html-sanitizer (~> 1.6) + useragent (~> 0.16) + actionview (7.2.2.1) + activesupport (= 7.2.2.1) + builder (~> 3.1) + erubi (~> 1.11) + rails-dom-testing (~> 2.2) + rails-html-sanitizer (~> 1.6) + activejob (7.2.2.1) + activesupport (= 7.2.2.1) + globalid (>= 0.3.6) + activemodel (7.2.2.1) + activesupport (= 7.2.2.1) + activesupport (7.2.2.1) + base64 + benchmark (>= 0.3) + bigdecimal + concurrent-ruby (~> 1.0, >= 1.3.1) + connection_pool (>= 2.2.5) + drb + i18n (>= 1.6, < 2) + logger (>= 1.4.2) + minitest (>= 5.1) + securerandom (>= 0.3) + tzinfo (~> 2.0, >= 2.0.5) + addressable (2.8.7) + public_suffix (>= 2.0.2, < 7.0) + appraisal (2.5.0) + bundler + rake + thor (>= 0.14.0) + ast (2.4.2) + base64 (0.2.0) + benchmark (0.4.0) + 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.9) + builder (3.3.0) + coderay (1.1.3) + concurrent-ruby (1.3.5) + connection_pool (2.5.0) + crack (1.0.0) + bigdecimal + rexml + crass (1.0.6) + date (3.4.1) + diff-lcs (1.5.1) + docile (1.4.1) + drb (2.2.1) + erubi (1.13.1) + faraday (1.10.4) + faraday-em_http (~> 1.0) + faraday-em_synchrony (~> 1.0) + faraday-excon (~> 1.1) + faraday-httpclient (~> 1.0) + faraday-multipart (~> 1.0) + faraday-net_http (~> 1.0) + faraday-net_http_persistent (~> 1.0) + faraday-patron (~> 1.0) + faraday-rack (~> 1.0) + faraday-retry (~> 1.0) + ruby2_keywords (>= 0.0.4) + faraday-em_http (1.0.0) + faraday-em_synchrony (1.0.0) + faraday-excon (1.1.0) + faraday-httpclient (1.0.1) + faraday-multipart (1.1.0) + multipart-post (~> 2.0) + faraday-net_http (1.0.2) + faraday-net_http_persistent (1.2.0) + faraday-patron (1.0.0) + faraday-rack (1.0.0) + faraday-retry (1.0.3) + faraday_middleware (1.2.1) + faraday (~> 1.0) + globalid (1.2.1) + activesupport (>= 6.1) + hashdiff (1.1.2) + i18n (1.14.7) + concurrent-ruby (~> 1.0) + io-console (0.8.0) + irb (1.15.1) + pp (>= 0.6.0) + rdoc (>= 4.0.0) + reline (>= 0.4.2) + jbuilder (2.13.0) + actionview (>= 5.0.0) + activesupport (>= 5.0.0) + json (2.9.1) + language_server-protocol (3.17.0.3) + logger (1.6.5) + loofah (2.24.0) + crass (~> 1.0.2) + nokogiri (>= 1.12.0) + method_source (1.1.0) + minitest (5.25.4) + mixpanel-ruby (1.7.0) + multi_json (1.15.0) + multipart-post (2.4.1) + nokogiri (1.18.2-aarch64-linux-gnu) + racc (~> 1.4) + nokogiri (1.18.2-aarch64-linux-musl) + racc (~> 1.4) + nokogiri (1.18.2-arm-linux-gnu) + racc (~> 1.4) + nokogiri (1.18.2-arm-linux-musl) + racc (~> 1.4) + nokogiri (1.18.2-arm64-darwin) + racc (~> 1.4) + nokogiri (1.18.2-x86_64-darwin) + racc (~> 1.4) + nokogiri (1.18.2-x86_64-linux-gnu) + racc (~> 1.4) + nokogiri (1.18.2-x86_64-linux-musl) + racc (~> 1.4) + parallel (1.26.3) + parser (3.3.7.0) + ast (~> 2.4.1) + racc + pp (0.6.2) + prettyprint + prettyprint (0.2.0) + pry (0.15.2) + coderay (~> 1.1) + method_source (~> 1.0) + pry-rails (0.3.11) + pry (>= 0.13.0) + psych (5.2.3) + date + stringio + public_suffix (6.0.1) + racc (1.8.1) + rack (3.1.8) + rack-session (2.1.0) + base64 (>= 0.1.0) + rack (>= 3.0.0) + rack-test (2.2.0) + rack (>= 1.3) + rackup (2.2.1) + rack (>= 3) + rails-controller-testing (1.0.5) + actionpack (>= 5.0.1.rc1) + actionview (>= 5.0.1.rc1) + activesupport (>= 5.0.1.rc1) + rails-dom-testing (2.2.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 (7.2.2.1) + actionpack (= 7.2.2.1) + activesupport (= 7.2.2.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.11.0) + psych (>= 4.0.0) + regexp_parser (2.10.0) + reline (0.6.0) + io-console (~> 0.5) + request_store (1.7.0) + rack (>= 1.4) + rexml (3.4.0) + 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.13.0) + rspec-mocks (3.13.2) + diff-lcs (>= 1.2.0, < 2.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-support (3.13.2) + rubocop (1.62.1) + 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 (>= 1.8, < 3.0) + rexml (>= 3.2.5, < 4.0) + rubocop-ast (>= 1.31.1, < 2.0) + ruby-progressbar (~> 1.7) + unicode-display_width (>= 2.4.0, < 3.0) + rubocop-ast (1.37.0) + parser (>= 3.3.1.0) + rubocop-capybara (2.21.0) + rubocop (~> 1.41) + 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.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.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) + ruby2_keywords (0.0.5) + securerandom (0.4.1) + shoulda-matchers (6.4.0) + activesupport (>= 5.2.0) + simplecov (0.22.0) + docile (~> 1.1) + simplecov-html (~> 0.11) + simplecov_json_formatter (~> 0.1) + simplecov-html (0.13.1) + simplecov_json_formatter (0.1.4) + sprockets (4.2.1) + concurrent-ruby (~> 1.0) + rack (>= 2.2.4, < 4) + sprockets-rails (3.5.2) + actionpack (>= 6.1) + activesupport (>= 6.1) + sprockets (>= 3.0.0) + stringio (3.1.2) + thor (1.3.2) + timecop (0.9.10) + tzinfo (2.0.6) + concurrent-ruby (~> 1.0) + unicode-display_width (2.6.0) + useragent (0.16.11) + webmock (3.24.0) + addressable (>= 2.8.0) + crack (>= 0.3.2) + hashdiff (>= 0.4.0, < 2.0.0) + zeitwerk (2.6.18) + +PLATFORMS + aarch64-linux-gnu + aarch64-linux-musl + arm-linux-gnu + arm-linux-musl + arm64-darwin + x86_64-darwin + x86_64-linux-gnu + x86_64-linux-musl + +DEPENDENCIES + appraisal + betterlint + jbuilder + pry-rails + rails-controller-testing + railties (~> 7.2.0) + rspec-rails + shoulda-matchers (>= 2.8) + simplecov + test_track_rails_client! + timecop + webmock + zeitwerk (< 2.7) + +BUNDLED WITH + 2.6.3 diff --git a/gemfiles/rails_8_0.gemfile b/gemfiles/rails_8_0.gemfile new file mode 100644 index 00000000..19567e70 --- /dev/null +++ b/gemfiles/rails_8_0.gemfile @@ -0,0 +1,8 @@ +# This file was generated by Appraisal + +source "https://rubygems.org" + +gem "jbuilder" +gem "railties", "~> 8.0.0" + +gemspec path: "../" diff --git a/gemfiles/rails_8_0.gemfile.lock b/gemfiles/rails_8_0.gemfile.lock new file mode 100644 index 00000000..6e13a4ec --- /dev/null +++ b/gemfiles/rails_8_0.gemfile.lock @@ -0,0 +1,313 @@ +PATH + remote: .. + specs: + test_track_rails_client (8.0.0) + activejob (>= 7.0, < 8.1) + activemodel (>= 7.0, < 8.1) + faraday (>= 0.8) + faraday_middleware + mixpanel-ruby (~> 1.4) + multi_json (~> 1.7) + public_suffix (>= 2.0.0) + railties (>= 7.0, < 8.1) + request_store (~> 1.3) + sprockets-rails + +GEM + remote: https://rubygems.org/ + specs: + actionpack (8.0.1) + actionview (= 8.0.1) + activesupport (= 8.0.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) + 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 (8.0.1) + activesupport (= 8.0.1) + globalid (>= 0.3.6) + activemodel (8.0.1) + activesupport (= 8.0.1) + activesupport (8.0.1) + base64 + benchmark (>= 0.3) + bigdecimal + concurrent-ruby (~> 1.0, >= 1.3.1) + connection_pool (>= 2.2.5) + drb + i18n (>= 1.6, < 2) + 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) + appraisal (2.5.0) + bundler + rake + thor (>= 0.14.0) + ast (2.4.2) + base64 (0.2.0) + benchmark (0.4.0) + 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.9) + builder (3.3.0) + coderay (1.1.3) + concurrent-ruby (1.3.5) + connection_pool (2.5.0) + crack (1.0.0) + bigdecimal + rexml + crass (1.0.6) + date (3.4.1) + diff-lcs (1.5.1) + docile (1.4.1) + drb (2.2.1) + erubi (1.13.1) + faraday (1.10.4) + faraday-em_http (~> 1.0) + faraday-em_synchrony (~> 1.0) + faraday-excon (~> 1.1) + faraday-httpclient (~> 1.0) + faraday-multipart (~> 1.0) + faraday-net_http (~> 1.0) + faraday-net_http_persistent (~> 1.0) + faraday-patron (~> 1.0) + faraday-rack (~> 1.0) + faraday-retry (~> 1.0) + ruby2_keywords (>= 0.0.4) + faraday-em_http (1.0.0) + faraday-em_synchrony (1.0.0) + faraday-excon (1.1.0) + faraday-httpclient (1.0.1) + faraday-multipart (1.1.0) + multipart-post (~> 2.0) + faraday-net_http (1.0.2) + faraday-net_http_persistent (1.2.0) + faraday-patron (1.0.0) + faraday-rack (1.0.0) + faraday-retry (1.0.3) + faraday_middleware (1.2.1) + faraday (~> 1.0) + globalid (1.2.1) + activesupport (>= 6.1) + hashdiff (1.1.2) + i18n (1.14.7) + concurrent-ruby (~> 1.0) + io-console (0.8.0) + irb (1.15.1) + pp (>= 0.6.0) + rdoc (>= 4.0.0) + reline (>= 0.4.2) + jbuilder (2.13.0) + actionview (>= 5.0.0) + activesupport (>= 5.0.0) + json (2.9.1) + language_server-protocol (3.17.0.3) + logger (1.6.5) + loofah (2.24.0) + crass (~> 1.0.2) + nokogiri (>= 1.12.0) + method_source (1.1.0) + minitest (5.25.4) + mixpanel-ruby (1.7.0) + multi_json (1.15.0) + multipart-post (2.4.1) + nokogiri (1.18.2-aarch64-linux-gnu) + racc (~> 1.4) + nokogiri (1.18.2-aarch64-linux-musl) + racc (~> 1.4) + nokogiri (1.18.2-arm-linux-gnu) + racc (~> 1.4) + nokogiri (1.18.2-arm-linux-musl) + racc (~> 1.4) + nokogiri (1.18.2-arm64-darwin) + racc (~> 1.4) + nokogiri (1.18.2-x86_64-darwin) + racc (~> 1.4) + nokogiri (1.18.2-x86_64-linux-gnu) + racc (~> 1.4) + nokogiri (1.18.2-x86_64-linux-musl) + racc (~> 1.4) + parallel (1.26.3) + parser (3.3.7.0) + ast (~> 2.4.1) + racc + pp (0.6.2) + prettyprint + prettyprint (0.2.0) + pry (0.15.2) + coderay (~> 1.1) + method_source (~> 1.0) + pry-rails (0.3.11) + pry (>= 0.13.0) + psych (5.2.3) + date + stringio + public_suffix (6.0.1) + racc (1.8.1) + rack (3.1.8) + rack-session (2.1.0) + base64 (>= 0.1.0) + rack (>= 3.0.0) + rack-test (2.2.0) + rack (>= 1.3) + rackup (2.2.1) + rack (>= 3) + rails-controller-testing (1.0.5) + actionpack (>= 5.0.1.rc1) + actionview (>= 5.0.1.rc1) + activesupport (>= 5.0.1.rc1) + rails-dom-testing (2.2.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.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.11.0) + psych (>= 4.0.0) + regexp_parser (2.10.0) + reline (0.6.0) + io-console (~> 0.5) + request_store (1.7.0) + rack (>= 1.4) + rexml (3.4.0) + 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.13.0) + rspec-mocks (3.13.2) + diff-lcs (>= 1.2.0, < 2.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-support (3.13.2) + rubocop (1.62.1) + 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 (>= 1.8, < 3.0) + rexml (>= 3.2.5, < 4.0) + rubocop-ast (>= 1.31.1, < 2.0) + ruby-progressbar (~> 1.7) + unicode-display_width (>= 2.4.0, < 3.0) + rubocop-ast (1.37.0) + parser (>= 3.3.1.0) + rubocop-capybara (2.21.0) + rubocop (~> 1.41) + 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.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.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) + ruby2_keywords (0.0.5) + securerandom (0.4.1) + shoulda-matchers (6.4.0) + activesupport (>= 5.2.0) + simplecov (0.22.0) + docile (~> 1.1) + simplecov-html (~> 0.11) + simplecov_json_formatter (~> 0.1) + simplecov-html (0.13.1) + simplecov_json_formatter (0.1.4) + sprockets (4.2.1) + concurrent-ruby (~> 1.0) + rack (>= 2.2.4, < 4) + sprockets-rails (3.5.2) + actionpack (>= 6.1) + activesupport (>= 6.1) + sprockets (>= 3.0.0) + stringio (3.1.2) + thor (1.3.2) + timecop (0.9.10) + tzinfo (2.0.6) + concurrent-ruby (~> 1.0) + unicode-display_width (2.6.0) + uri (1.0.2) + useragent (0.16.11) + webmock (3.24.0) + addressable (>= 2.8.0) + crack (>= 0.3.2) + hashdiff (>= 0.4.0, < 2.0.0) + zeitwerk (2.6.18) + +PLATFORMS + aarch64-linux-gnu + aarch64-linux-musl + arm-linux-gnu + arm-linux-musl + arm64-darwin + x86_64-darwin + x86_64-linux-gnu + x86_64-linux-musl + +DEPENDENCIES + appraisal + betterlint + jbuilder + pry-rails + rails-controller-testing + railties (~> 8.0.0) + rspec-rails + shoulda-matchers (>= 2.8) + simplecov + test_track_rails_client! + timecop + webmock + zeitwerk (< 2.7) + +BUNDLED WITH + 2.6.3 diff --git a/lib/test_track.rb b/lib/test_track.rb index b022e5c2..362382df 100644 --- a/lib/test_track.rb +++ b/lib/test_track.rb @@ -142,6 +142,6 @@ def enabled? end def app_ab(split_name, context:) - app.test_track_ab(split_name, context: context) + app.test_track_ab(split_name, context:) end end diff --git a/lib/test_track_rails_client/assignment_helper.rb b/lib/test_track_rails_client/assignment_helper.rb index ff64324e..f0364400 100644 --- a/lib/test_track_rails_client/assignment_helper.rb +++ b/lib/test_track_rails_client/assignment_helper.rb @@ -18,10 +18,10 @@ def stub_test_track_assignments(assignment_registry) # rubocop:disable Metrics/A weights: { variant.to_s => 100 }, feature_gate: split_name.end_with?('_enabled') } - assignments << { split_name: split_name, variant: variant.to_s, unsynced: false } + assignments << { split_name:, variant: variant.to_s, unsynced: false } end - visitor_attributes = { id: "fake_visitor_id", assignments: assignments } + visitor_attributes = { id: "fake_visitor_id", assignments: } allow(TestTrack::Remote::Visitor).to receive(:fake_instance_attributes).and_return(visitor_attributes) allow(TestTrack::Remote::SplitRegistry).to receive(:fake_instance_attributes).and_return(split_registry) diff --git a/lib/test_track_rails_client/version.rb b/lib/test_track_rails_client/version.rb index a6b2c031..de8838c0 100644 --- a/lib/test_track_rails_client/version.rb +++ b/lib/test_track_rails_client/version.rb @@ -1,3 +1,3 @@ module TestTrackRailsClient - VERSION = "7.1.2".freeze + VERSION = "8.0.0".freeze end diff --git a/spec/dummy/config/application.rb b/spec/dummy/config/application.rb index 2a638c31..10d8bec8 100644 --- a/spec/dummy/config/application.rb +++ b/spec/dummy/config/application.rb @@ -12,16 +12,6 @@ module Dummy class Application < Rails::Application - def rails_version_between?(version_1, version_2) - Rails.gem_version.between?( - Gem::Version.new(version_1), - Gem::Version.new(version_2), - ) - end - - config.load_defaults 5.1 if rails_version_between?('5.1', '5.2') - config.load_defaults 5.2 if rails_version_between?('5.2', '6.0') - config.load_defaults 6.0 if rails_version_between?('6.0', '6.1') - config.load_defaults 6.1 if rails_version_between?('6.1', '6.2') + config.load_defaults Rails::VERSION::STRING.to_f end end diff --git a/spec/dummy/config/secrets.yml b/spec/dummy/config/secrets.yml deleted file mode 100644 index a32945f7..00000000 --- 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: ddf3b1d6c76caada29b2f5f0b1e007765016518b0cd8e6634161eeec5d98fafabc62d74df83e17f4dcfa80b979dd2c974d3e6d3e78a840208794495650531e6a - -test: - secret_key_base: 1a94d829a33d28611f5b4d7c2abb4cd368b6497e4547fc34092b86f492e2bbdbc672c067a1498ca987a84b33442914ef4ed8e171475fe5e3700036e05fc3196d - -# 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/helpers/test_track/application_helper_spec.rb b/spec/helpers/test_track/application_helper_spec.rb index 1369cb73..66095cb9 100644 --- a/spec/helpers/test_track/application_helper_spec.rb +++ b/spec/helpers/test_track/application_helper_spec.rb @@ -2,7 +2,7 @@ RSpec.describe TestTrack::ApplicationHelper do describe "#test_track_setup_tag" do - let(:session) { instance_double(TestTrack::WebSession, state_hash: state_hash) } + let(:session) { instance_double(TestTrack::WebSession, state_hash:) } let(:state_hash) { { 'something' => 'or other!' } } before do diff --git a/spec/jobs/test_track/assignment_event_job_spec.rb b/spec/jobs/test_track/assignment_event_job_spec.rb index 24c30e6c..fe6a9a77 100644 --- a/spec/jobs/test_track/assignment_event_job_spec.rb +++ b/spec/jobs/test_track/assignment_event_job_spec.rb @@ -4,7 +4,7 @@ let(:split_name) { "phaser" } let(:assignment) do { - split_name: split_name, + split_name:, variant: "stun", context: "the_context" } diff --git a/spec/models/test_track/ab_configuration_spec.rb b/spec/models/test_track/ab_configuration_spec.rb index 32ea29d3..15bd7c2c 100644 --- a/spec/models/test_track/ab_configuration_spec.rb +++ b/spec/models/test_track/ab_configuration_spec.rb @@ -9,7 +9,7 @@ { split_name: :button_color, true_variant: :red, - split_registry: split_registry + split_registry: } end diff --git a/spec/models/test_track/assignment_spec.rb b/spec/models/test_track/assignment_spec.rb index 8f17923d..7c0f6720 100644 --- a/spec/models/test_track/assignment_spec.rb +++ b/spec/models/test_track/assignment_spec.rb @@ -4,7 +4,7 @@ let(:visitor) { instance_double(TestTrack::Visitor, offline?: offline) } let(:offline) { false } - subject { described_class.new(visitor: visitor, split_name: :split_name) } + subject { described_class.new(visitor:, split_name: :split_name) } describe "#split_name" do it "returns a string" do @@ -14,7 +14,7 @@ describe "#variant" do let(:variant) { :the_variant } - let(:variant_calculator) { instance_double(TestTrack::VariantCalculator, variant: variant) } + let(:variant_calculator) { instance_double(TestTrack::VariantCalculator, variant:) } before do allow(TestTrack::VariantCalculator).to receive(:new).and_return(variant_calculator) @@ -55,7 +55,7 @@ end context "for a feature gate" do - subject { described_class.new(visitor: visitor, split_name: :feature_enabled) } + subject { described_class.new(visitor:, split_name: :feature_enabled) } it "also returns true" do expect(subject.unsynced?).to eq true @@ -65,7 +65,7 @@ describe "#feature_gate?" do context "when the split name ends with '_enabled'" do - subject { described_class.new(visitor: visitor, split_name: :feature_enabled) } + subject { described_class.new(visitor:, split_name: :feature_enabled) } it "returns true" do expect(subject.feature_gate?).to eq true @@ -73,7 +73,7 @@ end context "when the split name ends with something else" do - subject { described_class.new(visitor: visitor, split_name: :feature_experiment) } + subject { described_class.new(visitor:, split_name: :feature_experiment) } it "returns false" do expect(subject.feature_gate?).to eq false diff --git a/spec/models/test_track/config_updater_spec.rb b/spec/models/test_track/config_updater_spec.rb index 16018c5e..71e66a4e 100644 --- a/spec/models/test_track/config_updater_spec.rb +++ b/spec/models/test_track/config_updater_spec.rb @@ -49,7 +49,7 @@ describe "#split" do let(:split_config) { instance_double(TestTrack::Remote::SplitConfig, save: true) } - let(:invalid_split_config) { instance_double(TestTrack::Remote::SplitConfig, save: false, errors: errors) } + let(:invalid_split_config) { instance_double(TestTrack::Remote::SplitConfig, save: false, errors:) } it "updates split_config" do allow(TestTrack::Remote::SplitConfig).to receive(:new).and_call_original @@ -206,7 +206,7 @@ describe "#identifier_type" do let(:identifier_type) { instance_double(TestTrack::Remote::IdentifierType, save: true) } - let(:invalid_identifier_type) { instance_double(TestTrack::Remote::IdentifierType, save: false, errors: errors) } + let(:invalid_identifier_type) { instance_double(TestTrack::Remote::IdentifierType, save: false, errors:) } it "updates identifier_type" do allow(TestTrack::Remote::IdentifierType).to receive(:new).and_call_original diff --git a/spec/models/test_track/notify_assignment_job_spec.rb b/spec/models/test_track/notify_assignment_job_spec.rb index 9be5b959..ab99e001 100644 --- a/spec/models/test_track/notify_assignment_job_spec.rb +++ b/spec/models/test_track/notify_assignment_job_spec.rb @@ -14,7 +14,7 @@ let(:params) do { visitor_id: "fake_visitor_id", - assignment: assignment + assignment: } end let(:split_registry_url) { "http://testtrack.dev/api/v2/split_registry" } diff --git a/spec/models/test_track/variant_calculator_spec.rb b/spec/models/test_track/variant_calculator_spec.rb index 71917790..6ed7e2d0 100644 --- a/spec/models/test_track/variant_calculator_spec.rb +++ b/spec/models/test_track/variant_calculator_spec.rb @@ -1,9 +1,9 @@ require 'rails_helper' RSpec.describe TestTrack::VariantCalculator do - let(:params) { { visitor: visitor, split_name: 'blue_button' } } + let(:params) { { visitor:, split_name: 'blue_button' } } - let(:visitor) { instance_double(TestTrack::Visitor, id: fake_visitor_id, split_registry: split_registry) } + let(:visitor) { instance_double(TestTrack::Visitor, id: fake_visitor_id, split_registry:) } let(:fake_visitor_id) { "00000000-0000-0000-0000-000000000000" } diff --git a/spec/models/test_track/vary_dsl_spec.rb b/spec/models/test_track/vary_dsl_spec.rb index 8c0d8d7d..7ee22456 100644 --- a/spec/models/test_track/vary_dsl_spec.rb +++ b/spec/models/test_track/vary_dsl_spec.rb @@ -3,8 +3,8 @@ RSpec.describe TestTrack::VaryDsl do subject do described_class.new( - assignment: assignment, - split_registry: split_registry, + assignment:, + split_registry:, context: "the_context" ) end @@ -52,8 +52,8 @@ it "raises when given an unknown option" do expect { described_class.new( - assignment: assignment, - split_registry: split_registry, + assignment:, + split_registry:, context: "the_context", one_of_these_things_is_not_like_the_other: "hint: its me!" ) @@ -63,7 +63,7 @@ it "raises when missing a required option" do expect { described_class.new( - split_registry: split_registry + split_registry: ) }.to raise_error("Must provide assignment") end @@ -76,8 +76,8 @@ it "raises a descriptive error" do expect { described_class.new( - assignment: assignment, - split_registry: split_registry, + assignment:, + split_registry:, context: "the_context" ) }.to raise_error("unknown split: not_a_real_split.") @@ -88,8 +88,8 @@ allow(Rails.env).to receive(:development?).and_return true expect { described_class.new( - assignment: assignment, - split_registry: split_registry, + assignment:, + split_registry:, context: "the_context" ) }.to raise_error("unknown split: not_a_real_split. You may need to run rake test_track:schema:load.") diff --git a/spec/models/test_track/visitor_spec.rb b/spec/models/test_track/visitor_spec.rb index ee99bc71..4dcfa8ca 100644 --- a/spec/models/test_track/visitor_spec.rb +++ b/spec/models/test_track/visitor_spec.rb @@ -129,7 +129,7 @@ let(:blue_block) { -> { '.blue' } } let(:red_block) { -> { '.red' } } let(:split_name) { 'quagmire' } - let(:assignment) { instance_double(TestTrack::Assignment, split_name: split_name, variant: "manageable", unsynced?: true) } + let(:assignment) { instance_double(TestTrack::Assignment, split_name:, variant: "manageable", unsynced?: true) } context "new_visitor" do before do @@ -150,7 +150,7 @@ def vary_quagmire_split it "creates a new assignment" do expect(vary_quagmire_split).to eq "#winning" - expect(TestTrack::Assignment).to have_received(:new).with(visitor: new_visitor, split_name: split_name) + expect(TestTrack::Assignment).to have_received(:new).with(visitor: new_visitor, split_name:) expect(assignment).to have_received(:context=).with(:spec) end diff --git a/spec/models/test_track/web_session_spec.rb b/spec/models/test_track/web_session_spec.rb index 7bfeadc7..4ef3b5df 100644 --- a/spec/models/test_track/web_session_spec.rb +++ b/spec/models/test_track/web_session_spec.rb @@ -19,7 +19,7 @@ def current_clown; end let(:cookies) { { tt_visitor_id: "fake_visitor_id" }.with_indifferent_access } let(:headers) { {} } - let(:request) { double(:request, host: "www.foo.com", ssl?: true, headers: headers, local?: local?) } + let(:request) { double(:request, host: "www.foo.com", ssl?: true, headers:, local?: local?) } let(:local?) { false } let(:response) { double(:response, headers: {}) } let(:unsynced_assignments_notifier) { instance_double(TestTrack::UnsyncedAssignmentsNotifier, notify: true) } @@ -345,7 +345,7 @@ def current_clown; end { id: "fake_visitor_id", assignments: [ - { split_name: 'switched_split', variant: 'not_what_i_thought', unsynced: unsynced } + { split_name: 'switched_split', variant: 'not_what_i_thought', unsynced: } ] } end @@ -533,7 +533,7 @@ def current_clown; end let(:sampling_weight) { 1 } let(:split_registry) { instance_double(TestTrack::SplitRegistry) } - let(:visitor) { instance_double(TestTrack::Visitor, split_registry: split_registry, assignment_json: "assignments") } + let(:visitor) { instance_double(TestTrack::Visitor, split_registry:, assignment_json: "assignments") } before do allow(subject).to receive(:current_visitor).and_return(visitor) allow(split_registry).to receive(:to_hash).and_return(split_registry_hash) diff --git a/spec/models/test_track/web_session_visitor_repository_spec.rb b/spec/models/test_track/web_session_visitor_repository_spec.rb index 7682e1d9..61889772 100644 --- a/spec/models/test_track/web_session_visitor_repository_spec.rb +++ b/spec/models/test_track/web_session_visitor_repository_spec.rb @@ -7,8 +7,8 @@ subject do described_class.new( - current_identity: current_identity, - unauthenticated_visitor_id: unauthenticated_visitor_id + current_identity:, + unauthenticated_visitor_id: ) end diff --git a/spec/support/rails_compatibility_spec_helper.rb b/spec/support/rails_compatibility_spec_helper.rb index 63e866ca..fac1b67e 100644 --- a/spec/support/rails_compatibility_spec_helper.rb +++ b/spec/support/rails_compatibility_spec_helper.rb @@ -2,7 +2,7 @@ module RailsCompatibilitySpecHelper %i(get post put delete).each do |method_name| define_method method_name do |action, params = {}, session = {}, flash = {}| if Rails::VERSION::MAJOR >= 5 - super(action, params: params, session: session, flash: flash) + super(action, params:, session:, flash:) else super(action, params, session, flash) end diff --git a/test_track_rails_client.gemspec b/test_track_rails_client.gemspec index 9ca96989..5075fa2c 100644 --- a/test_track_rails_client.gemspec +++ b/test_track_rails_client.gemspec @@ -16,28 +16,29 @@ Gem::Specification.new do |s| s.files = Dir["{app,config,db,lib,vendor}/**/*", "LICENSE", "Rakefile", "README.md"] - s.add_dependency 'activejob', '>= 6.0' - s.add_dependency 'activemodel', '>= 6.0' + rails_constraints = ['>= 7.0', '< 8.1'] + + s.add_dependency 'activejob', rails_constraints + s.add_dependency 'activemodel', rails_constraints s.add_dependency "faraday", ">= 0.8" s.add_dependency 'faraday_middleware' s.add_dependency 'mixpanel-ruby', '~> 1.4' s.add_dependency 'multi_json', '~> 1.7' s.add_dependency 'public_suffix', '>= 2.0.0' - s.add_dependency 'railties', '>= 5.1' + s.add_dependency 'railties', rails_constraints s.add_dependency 'request_store', '~> 1.3' s.add_dependency 'sprockets-rails' s.add_development_dependency 'appraisal' + s.add_development_dependency 'betterlint' s.add_development_dependency 'pry-rails' s.add_development_dependency 'rails-controller-testing' s.add_development_dependency 'rspec-rails' - s.add_development_dependency 'rubocop', '~> 1.48.0' - s.add_development_dependency 'rubocop-performance' - s.add_development_dependency 'rubocop-rails' s.add_development_dependency 'shoulda-matchers', '>= 2.8' s.add_development_dependency 'simplecov' s.add_development_dependency 'timecop' s.add_development_dependency 'webmock' + s.add_development_dependency 'zeitwerk', '< 2.7' - s.required_ruby_version = '>= 3.0' + s.required_ruby_version = '>= 3.1' end diff --git a/vendor/gems/her/lib/her/model/associations/association_proxy.rb b/vendor/gems/her/lib/her/model/associations/association_proxy.rb index 36bd2243..f687f05d 100644 --- a/vendor/gems/her/lib/her/model/associations/association_proxy.rb +++ b/vendor/gems/her/lib/her/model/associations/association_proxy.rb @@ -1,8 +1,11 @@ module Her module Model module Associations - class AssociationProxy < (ActiveSupport.const_defined?('ProxyObject') ? ActiveSupport::ProxyObject : ActiveSupport::BasicObject) + class AssociationProxy < BasicObject + undef_method :== + undef_method :equal? + # @private def self.install_proxy_methods(target_name, *names) names.each do |name| @@ -26,6 +29,10 @@ def association @_her_association end + def raise(*args) + ::Object.send(:raise, *args) + end + # @private def method_missing(name, *args, &block) if name == :object_id # avoid redefining object_id