From a2c331f37f72f21fd488c6f3daef5cf60bf0a6f3 Mon Sep 17 00:00:00 2001 From: tschafer-gc Date: Thu, 14 Nov 2024 12:13:20 +0000 Subject: [PATCH] Move rack and rackup into dev/test block --- .github/workflows/tests.yml | 2 +- Gemfile | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e4f976e..61ad22a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -24,7 +24,7 @@ jobs: fail-fast: false matrix: ruby_version: ["3.0", "3.1", "3.2", "3.3"] - rack_version: ["2.2", "3.1"] + rack_version: ["2.2.5", "3.1"] runs-on: ubuntu-latest services: postgres: diff --git a/Gemfile b/Gemfile index aea1fbb..e735f2d 100644 --- a/Gemfile +++ b/Gemfile @@ -17,6 +17,14 @@ group :development, :test do gem 'rubocop-rspec', '~> 3.0.2' gem 'rubocop-sequel', '~> 0.3.4' gem 'sequel', require: nil + + rack_version = ENV.fetch('RACK_VERSION', "3.1") + gem "rack", rack_version + if Gem::Version.new(rack_version) < Gem::Version.new('3.0.0') + gem "rackup", "~> 1.0" + else + gem "rackup", "~> 2.0" + end end group :test do @@ -25,14 +33,6 @@ group :test do gem 'rspec', '~> 3.9' end -rack_version = ENV['RACK_VERSION'] || "3.0" -gem "rack", rack_version -if Gem::Version.new(rack_version) < Gem::Version.new('3.0.0') - gem "rackup", "~> 1.0" -else - gem "rackup", "~> 2.0" -end - gem 'prometheus-client', '~> 1.0' source "https://rubygems.pkg.github.com/gocardless" do gem "prometheus_gcstat"