Skip to content

Commit

Permalink
build: don't deprecate ruby2.7 & faraday < 1
Browse files Browse the repository at this point in the history
  • Loading branch information
thde committed Oct 25, 2024
1 parent dc8b28e commit ec84d59
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 5 deletions.
12 changes: 11 additions & 1 deletion .github/workflows/rspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,22 @@ jobs:
matrix:
os: [ubuntu-latest]
# Due to https://github.com/actions/runner/issues/849, we have to use quotes for '3.0'
ruby: ['3.0', '3.1', '3.2', '3.3']
ruby: ['2.7', '3.0', '3.1', '3.2', '3.3']
gemfile:
[
'gemfiles/faraday1.gemfile',
'gemfiles/faraday2.gemfile',
]
# Faraday 0.x with Ruby 3.x not supported
exclude:
- ruby: '3.0'
gemfile: gemfiles/faraday0.gemfile
- ruby: '3.1'
gemfile: gemfiles/faraday0.gemfile
- ruby: '3.2'
gemfile: gemfiles/faraday0.gemfile
- ruby: '3.3'
gemfile: gemfiles/faraday0.gemfile
runs-on: ${{ matrix.os }}
env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps
BUNDLE_GEMFILE: ${{ github.workspace }}/${{ matrix.gemfile }}
Expand Down
5 changes: 5 additions & 0 deletions Appraisals
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# frozen_string_literal: true

appraise 'faraday0' do
gem 'faraday', '< 1.0'
gem 'faraday_middleware', '< 1'
end

appraise 'faraday1' do
gem 'faraday', '= 1.0'
gem 'faraday_middleware', '< 2'
Expand Down
5 changes: 1 addition & 4 deletions bin/setup
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,4 @@ IFS=$'\n\t'
set -vx

bundle install

for filename in gemfiles/*.gemfile; do
BUNDLE_GEMFILE=$filename bundle install
done
bundle exec appraisal install
16 changes: 16 additions & 0 deletions gemfiles/faraday0.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# This file was generated by Appraisal

source "https://rubygems.org"

gem "appraisal", git: "https://github.com/thoughtbot/appraisal.git"
gem "pry"
gem "rake"
gem "rspec"
gem "rubocop"
gem "rubocop-performance"
gem "rubocop-rake"
gem "rubocop-rspec"
gem "faraday", "< 1.0"
gem "faraday_middleware", "< 1"

gemspec path: "../"

0 comments on commit ec84d59

Please sign in to comment.