From 89f9fc243fba8ee4c0b27d4dd44907f3603d3b5f Mon Sep 17 00:00:00 2001 From: tschafer-gc Date: Thu, 14 Nov 2024 11:49:41 +0000 Subject: [PATCH] Make installations less hacky --- .github/workflows/tests.yml | 6 ------ Gemfile | 7 +++++++ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index c590df7..9d604b1 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -53,12 +53,6 @@ jobs: with: bundler-cache: true ruby-version: "${{ matrix.ruby_version }}" - - name: Update Gemfile for Rack and Rackup versions - run: | - if [[ "${{ matrix.rack_version }}" == "~> 2" ]]; then - echo 'gem "rackup", "~> 1"' >> Gemfile - fi - echo 'gem "rack", "${{ matrix.rack_version }}"' >> Gemfile - name: Install Dependencies run: bundle install - name: Start bin/que diff --git a/Gemfile b/Gemfile index 29c8aa4..f1bd768 100644 --- a/Gemfile +++ b/Gemfile @@ -25,6 +25,13 @@ group :test do gem 'rspec', '~> 3.9' end +gem "rack", ENV['RACK_VERSION'] +if ENV['RACK_VERSION'] == '2.0' + gem "rackup", "~> 2.0" +else + gem "rackup", "~> 3.0" +end + gem 'prometheus-client', '~> 1.0' source "https://rubygems.pkg.github.com/gocardless" do gem "prometheus_gcstat"