diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b0f7fef2..c3e41e67 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,7 +11,7 @@ permissions: jobs: test: - name: ${{ matrix.ruby }} (Rack ${{ matrix.rack }}, Puma ${{ matrix.puma }}) + name: ${{ matrix.ruby }} (Rack ${{ matrix.rack }}, Puma ${{ matrix.puma }}, Tilt ${{ matrix.tilt }}) permissions: contents: read # to fetch code (actions/checkout) actions: read # to list jobs for workflow run (8398a7/action-slack) @@ -24,23 +24,30 @@ jobs: - stable rack: - '~> 2' + tilt: + - '~> 2.0.0' # Due to https://github.com/actions/runner/issues/849, we have to use quotes for '3.0' ruby: [2.6, 2.7, '3.0', 3.1, 3.2, truffleruby] include: - - { ruby: 2.6, rack: '~> 2', puma: '~> 5' } - - { ruby: 3.2, rack: '~> 2', puma: '~> 5' } - - { ruby: 3.2, rack: '~> 2', puma: latest } + # Puma + - { ruby: 3.1, rack: '~> 2', puma: '~> 5', tilt: '~> 2.0.0' } + - { ruby: 3.2, rack: '~> 2', puma: '~> 6.0', tilt: '~> 2.0.0' } + - { ruby: 3.2, rack: '~> 2', puma: head, tilt: '~> 2.0.0', allow-failure: true } + # Tilt + - { ruby: 3.1, rack: '~> 2', puma: stable, tilt: '~> 2', allow-failure: true } + - { ruby: 3.2, rack: '~> 2', puma: stable, tilt: head, allow-failure: true } # Due to flaky tests, see https://github.com/sinatra/sinatra/pull/1870 - - { ruby: jruby-9.3, rack: '~> 2', puma: stable, allow-failure: true } + - { ruby: jruby-9.3, rack: '~> 2', puma: stable, tilt: '~> 2.0.0', allow-failure: true } # Due to https://github.com/jruby/jruby/issues/7647 - - { ruby: jruby-9.4, rack: '~> 2', puma: stable, allow-failure: true } + - { ruby: jruby-9.4, rack: '~> 2', puma: stable, tilt: '~> 2.0.0', allow-failure: true } # Never fail our build due to problems with head - - { ruby: ruby-head, rack: '~> 2', puma: stable, allow-failure: true } - - { ruby: jruby-head, rack: '~> 2', puma: stable, allow-failure: true } - - { ruby: truffleruby-head, rack: '~> 2', puma: stable, allow-failure: true } + - { ruby: ruby-head, rack: '~> 2', puma: stable, tilt: '~> 2.0.0', allow-failure: true } + - { ruby: jruby-head, rack: '~> 2', puma: stable, tilt: '~> 2.0.0', allow-failure: true } + - { ruby: truffleruby-head, rack: '~> 2', puma: stable, tilt: '~> 2.0.0', allow-failure: true } env: rack: ${{ matrix.rack }} puma: ${{ matrix.puma }} + tilt: ${{ matrix.tilt }} steps: - name: Install dependencies run: | diff --git a/Gemfile b/Gemfile index e29eab78..ea870323 100644 --- a/Gemfile +++ b/Gemfile @@ -15,12 +15,12 @@ gem 'rake' rack_version = ENV['rack'].to_s rack_version = nil if rack_version.empty? || (rack_version == 'stable') -rack_version = { github: 'rack/rack' } if rack_version == 'latest' +rack_version = { github: 'rack/rack' } if rack_version == 'head' gem 'rack', rack_version puma_version = ENV['puma'].to_s puma_version = nil if puma_version.empty? || (puma_version == 'stable') -puma_version = { github: 'puma/puma' } if puma_version == 'latest' +puma_version = { github: 'puma/puma' } if puma_version == 'head' gem 'puma', puma_version gem 'minitest', '~> 5.0' diff --git a/rack-protection/Gemfile b/rack-protection/Gemfile index cc444308..690d4ca0 100644 --- a/rack-protection/Gemfile +++ b/rack-protection/Gemfile @@ -7,7 +7,7 @@ gem 'rake' rack_version = ENV['rack'].to_s rack_version = nil if rack_version.empty? || (rack_version == 'stable') -rack_version = { github: 'rack/rack' } if rack_version == 'main' +rack_version = { github: 'rack/rack' } if rack_version == 'head' gem 'rack', rack_version gem 'sinatra', path: '..' diff --git a/sinatra-contrib/Gemfile b/sinatra-contrib/Gemfile index 0e8fa6de..64cd23a1 100644 --- a/sinatra-contrib/Gemfile +++ b/sinatra-contrib/Gemfile @@ -32,12 +32,12 @@ group :development, :test do gem 'multi_json' end -# Allows stuff like `tilt=1.2.2 bundle install` or `tilt=master ...`. -# Used by the CI. -repos = { 'tilt' => 'rtomayko/tilt', 'rack' => 'rack/rack' } -%w[tilt rack].each do |lib| - dep = (ENV[lib] || 'stable').sub "#{lib}-", '' - dep = nil if dep == 'stable' - dep = { github: repos[lib], branch: dep } if dep && dep !~ (/(\d+\.?)+(\d+)?/) - gem lib, dep if dep -end +rack_version = ENV['rack'].to_s +rack_version = nil if rack_version.empty? || (rack_version == 'stable') +rack_version = { github: 'rack/rack' } if rack_version == 'head' +gem 'rack', rack_version + +tilt_version = ENV['tilt'].to_s +tilt_version = nil if tilt_version.empty? || (tilt_version == 'stable') +tilt_version = { github: 'jeremyevans/tilt' } if tilt_version == 'head' +gem 'tilt', tilt_version