From b1d583336dc7eaaa98b786ef755edc6d20105a32 Mon Sep 17 00:00:00 2001 From: Eduardo Navarro Date: Tue, 28 May 2024 10:00:03 +0200 Subject: [PATCH] Test with Rails 7.1 --- .github/workflows/spec.yml | 2 +- gemfiles/Gemfile.rails-7.1.x | 9 +++++++++ spec/requests/active_record_sql_metrics_spec.rb | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 gemfiles/Gemfile.rails-7.1.x diff --git a/.github/workflows/spec.yml b/.github/workflows/spec.yml index 10553c6..976e346 100644 --- a/.github/workflows/spec.yml +++ b/.github/workflows/spec.yml @@ -12,7 +12,7 @@ jobs: strategy: matrix: ruby: [ '3.0', '3.1', '3.2', 'head' ] - rails: [ 'gemfiles/Gemfile.rails-6.1.x', 'gemfiles/Gemfile.rails-7.0.x'] + rails: [ 'gemfiles/Gemfile.rails-6.1.x', 'gemfiles/Gemfile.rails-7.0.x', 'gemfiles/Gemfile.rails-7.1.x'] exclude: [] continue-on-error: ${{ endsWith(matrix.ruby, 'head') || matrix.ruby == 'debug' }} env: diff --git a/gemfiles/Gemfile.rails-7.1.x b/gemfiles/Gemfile.rails-7.1.x new file mode 100644 index 0000000..d81176c --- /dev/null +++ b/gemfiles/Gemfile.rails-7.1.x @@ -0,0 +1,9 @@ +source "https://rubygems.org" + +gem 'actionpack', '~> 7.1.0' +gem 'activesupport', '~> 7.1.0' +gem 'activemodel', '~> 7.1.0' +gem 'sqlite3', '~> 1.4' +gem 'rspec-rails' + +gemspec :path => '../' diff --git a/spec/requests/active_record_sql_metrics_spec.rb b/spec/requests/active_record_sql_metrics_spec.rb index 2ed0c4d..031fe6b 100644 --- a/spec/requests/active_record_sql_metrics_spec.rb +++ b/spec/requests/active_record_sql_metrics_spec.rb @@ -29,7 +29,7 @@ additional_field: :value, request_id: :request_id, value: be_between(1, 500), - sql: "INSERT INTO \"metrics\" (\"name\", \"created_at\", \"updated_at\") VALUES (xxx)" + sql: /^INSERT INTO "metrics" \("name", "created_at", "updated_at"\) VALUES \(xxx\)( RETURNING "id")?$/ ) ) end