From 29c0567c63b971125c2655f5f51751d3649fea44 Mon Sep 17 00:00:00 2001 From: Kayla Reopelle Date: Tue, 19 Nov 2024 15:19:15 -0800 Subject: [PATCH 1/5] test: Update que Appraisals The latest version of the gem now supports Rails 7.2 --- instrumentation/que/Appraisals | 2 +- instrumentation/que/Gemfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/instrumentation/que/Appraisals b/instrumentation/que/Appraisals index 7792e4821..f05da4c55 100644 --- a/instrumentation/que/Appraisals +++ b/instrumentation/que/Appraisals @@ -9,7 +9,7 @@ appraise 'que-1.x' do end appraise 'que-2.x' do - gem 'que', '~> 2.3' + gem 'que', '~> 2.4' end appraise 'que-latest' do diff --git a/instrumentation/que/Gemfile b/instrumentation/que/Gemfile index af89399b5..46bfbfb01 100644 --- a/instrumentation/que/Gemfile +++ b/instrumentation/que/Gemfile @@ -9,7 +9,7 @@ source 'https://rubygems.org' gemspec group :test do - gem 'activerecord', '< 7.2.0', '> 6.1.0' + gem 'activerecord' gem 'pg' gem 'opentelemetry-helpers-sql-obfuscation', path: '../../helpers/sql-obfuscation' gem 'opentelemetry-instrumentation-base', path: '../base' From 3b9224f669b812cfa35d16526f77f59ab9564e93 Mon Sep 17 00:00:00 2001 From: Kayla Reopelle Date: Tue, 19 Nov 2024 16:47:56 -0800 Subject: [PATCH 2/5] test: Appraise specific Active Record versions Active Record 7.2+ are only compatible with que 2.4.1+ --- instrumentation/que/Appraisals | 3 +++ instrumentation/que/Gemfile | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/instrumentation/que/Appraisals b/instrumentation/que/Appraisals index f05da4c55..a3b7a215b 100644 --- a/instrumentation/que/Appraisals +++ b/instrumentation/que/Appraisals @@ -6,12 +6,15 @@ appraise 'que-1.x' do gem 'que', '~> 1.4' + gem 'activerecord', '~> 7.1.0' end appraise 'que-2.x' do gem 'que', '~> 2.4' + gem 'activerecord', '~> 7.2.0' end appraise 'que-latest' do gem 'que' + gem 'activerecord' end diff --git a/instrumentation/que/Gemfile b/instrumentation/que/Gemfile index 46bfbfb01..1cf945c0a 100644 --- a/instrumentation/que/Gemfile +++ b/instrumentation/que/Gemfile @@ -9,7 +9,6 @@ source 'https://rubygems.org' gemspec group :test do - gem 'activerecord' gem 'pg' gem 'opentelemetry-helpers-sql-obfuscation', path: '../../helpers/sql-obfuscation' gem 'opentelemetry-instrumentation-base', path: '../base' From df529441691e9152a5dcebedbe5393c8245b70c5 Mon Sep 17 00:00:00 2001 From: Kayla Reopelle Date: Wed, 20 Nov 2024 17:12:01 -0800 Subject: [PATCH 3/5] test: Add Ruby version constraint to activerecord --- instrumentation/que/Appraisals | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/instrumentation/que/Appraisals b/instrumentation/que/Appraisals index a3b7a215b..373a2b940 100644 --- a/instrumentation/que/Appraisals +++ b/instrumentation/que/Appraisals @@ -11,10 +11,15 @@ end appraise 'que-2.x' do gem 'que', '~> 2.4' - gem 'activerecord', '~> 7.2.0' -end + if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('3.1.0') + gem 'activerecord', '~> 7.2.0' + else + gem 'activerecord' + end + end -appraise 'que-latest' do - gem 'que' - gem 'activerecord' + appraise 'que-latest' do + gem 'que' + gem 'activerecord' + end end From 0d5dcd64e136c2fdd1d4e0da5edd190caa6a830a Mon Sep 17 00:00:00 2001 From: Kayla Reopelle Date: Thu, 21 Nov 2024 09:25:50 -0800 Subject: [PATCH 4/5] test: remove extra end --- instrumentation/que/Appraisals | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/instrumentation/que/Appraisals b/instrumentation/que/Appraisals index 373a2b940..aea780b4c 100644 --- a/instrumentation/que/Appraisals +++ b/instrumentation/que/Appraisals @@ -18,8 +18,7 @@ appraise 'que-2.x' do end end - appraise 'que-latest' do - gem 'que' - gem 'activerecord' - end +appraise 'que-latest' do + gem 'que' + gem 'activerecord' end From 0595e722eed29ba0500ef6062ef4c1b849ce43b4 Mon Sep 17 00:00:00 2001 From: Kayla Reopelle Date: Thu, 21 Nov 2024 12:33:15 -0800 Subject: [PATCH 5/5] style: Rubocop indentation --- instrumentation/que/Appraisals | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/instrumentation/que/Appraisals b/instrumentation/que/Appraisals index aea780b4c..dc7c61668 100644 --- a/instrumentation/que/Appraisals +++ b/instrumentation/que/Appraisals @@ -11,12 +11,12 @@ end appraise 'que-2.x' do gem 'que', '~> 2.4' - if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('3.1.0') - gem 'activerecord', '~> 7.2.0' - else - gem 'activerecord' - end + if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('3.1.0') + gem 'activerecord', '~> 7.2.0' + else + gem 'activerecord' end +end appraise 'que-latest' do gem 'que'