Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Bump tests to Ruby 3.0+ and Rails 6.1+ #23

Merged
merged 4 commits into from
Apr 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 5 additions & 13 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,14 @@ jobs:
strategy:
matrix:
ruby:
- "3.3"
- "3.2"
- "3.1"
- "3.0"
- "2.7"
- "2.6"
- "2.5"
gemfile:
- rails_5_2.gemfile
- rails_6_0.gemfile
- rails_6_1.gemfile
- rails_7_0.gemfile
exclude:
- ruby: "3.0"
gemfile: rails_5_2.gemfile
- ruby: "2.5"
gemfile: rails_7_0.gemfile
- ruby: "2.6"
gemfile: rails_7_0.gemfile
- rails_7_1.gemfile
fail-fast: False

env:
Expand Down Expand Up @@ -60,7 +52,7 @@ jobs:
- uses: actions/checkout@master
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.0
ruby-version: "3.3"
bundler-cache: True

- run: bundle exec rubocop --parallel --color
11 changes: 4 additions & 7 deletions Appraisals
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
appraise "rails-5-2" do
gem 'rails', '~> 5.2.0'
end

appraise "rails-6-0" do
gem 'rails', '~> 6.0.0'
end

appraise "rails-6-1" do
gem 'rails', '~> 6.1.0'
Expand All @@ -14,6 +7,10 @@ appraise "rails-7-0" do
gem 'rails', '~> 7.0.0'
end

appraise "rails-7-1" do
gem 'rails', '~> 7.1.0'
end

appraise "rails-head" do
gem 'rails', github: 'rails/rails'
end
11 changes: 10 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,18 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

### Changed

- Dropped unsupported Ruby and Rails versions from test matrix

### Added

- Added Rails 6.1 + 7.0 and Ruby 3.0 to new Github Actions test pipeline
- Added Rails 6.1 + 7.0 and Ruby 3.0 to new GitHub Actions test pipeline
- Added Rails 7.1 and Ruby 3.1, 3.2, 3.3 to test matrix

### Fixed

- Fix header case issues in test suite with Rails 7.1

## 2.1.0 - 2019-02-28

Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ gem 'will_paginate'

gem 'actionpack', '>= 3.2.0'
gem 'activerecord', '>= 3.2.0'
gem 'sqlite3', '~> 2.0'
gem 'sqlite3', '~> 1.4' # Rails does NOT accept 2.0

gem 'rspec'
gem 'rspec-rails'
Expand Down
21 changes: 0 additions & 21 deletions gemfiles/rails_6_0.gemfile

This file was deleted.

2 changes: 1 addition & 1 deletion gemfiles/rails_6_1.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ gem "pagy"
gem "will_paginate"
gem "actionpack", ">= 3.2.0"
gem "activerecord", ">= 3.2.0"
gem "sqlite3", "~> 2.0"
gem "sqlite3", "~> 1.4"
gem "rspec"
gem "rspec-rails"
gem "my-rubocop", github: "jgraichen/my-rubocop", ref: "v3"
Expand Down
2 changes: 1 addition & 1 deletion gemfiles/rails_7_0.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ gem "pagy"
gem "will_paginate"
gem "actionpack", ">= 3.2.0"
gem "activerecord", ">= 3.2.0"
gem "sqlite3", "~> 2.0"
gem "sqlite3", "~> 1.4"
gem "rspec"
gem "rspec-rails"
gem "my-rubocop", github: "jgraichen/my-rubocop", ref: "v3"
Expand Down
4 changes: 2 additions & 2 deletions gemfiles/rails_5_2.gemfile → gemfiles/rails_7_1.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ gem "pagy"
gem "will_paginate"
gem "actionpack", ">= 3.2.0"
gem "activerecord", ">= 3.2.0"
gem "sqlite3", "~> 2.0"
gem "sqlite3", "~> 1.4"
gem "rspec"
gem "rspec-rails"
gem "my-rubocop", github: "jgraichen/my-rubocop", ref: "v3"
gem "rails", "~> 5.2.0"
gem "rails", "~> 7.1.0"

group :development do
gem "appraisal"
Expand Down
2 changes: 1 addition & 1 deletion gemfiles/rails_head.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ gem "pagy"
gem "will_paginate"
gem "actionpack", ">= 3.2.0"
gem "activerecord", ">= 3.2.0"
gem "sqlite3", "~> 2.0"
gem "sqlite3", "~> 1.4"
gem "rspec"
gem "rspec-rails"
gem "my-rubocop", github: "jgraichen/my-rubocop", ref: "v3"
Expand Down
18 changes: 9 additions & 9 deletions spec/responders/paginate_responder_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -170,21 +170,21 @@
describe 'headers' do
subject do
action.call
response.headers.to_h
response.headers.to_h.transform_keys(&:downcase)
end

it { is_expected.to include 'X-Total-Pages' => '14' }
it { is_expected.to include 'X-Total-Count' => '676' }
it { is_expected.to include 'X-Per-Page' => '50' }
it { is_expected.to include 'X-Current-Page' => '1' }
it { is_expected.to include 'x-total-pages' => '14' }
it { is_expected.to include 'x-total-count' => '676' }
it { is_expected.to include 'x-per-page' => '50' }
it { is_expected.to include 'x-current-page' => '1' }

context 'when method is HEAD' do
let(:method) { :head }

it { is_expected.to include 'X-Total-Pages' => '14' }
it { is_expected.to include 'X-Total-Count' => '676' }
it { is_expected.to include 'X-Per-Page' => '50' }
it { is_expected.to include 'X-Current-Page' => '1' }
it { is_expected.to include 'x-total-pages' => '14' }
it { is_expected.to include 'x-total-count' => '676' }
it { is_expected.to include 'x-per-page' => '50' }
it { is_expected.to include 'x-current-page' => '1' }
end
end
end