Skip to content

Commit

Permalink
Prep v3 release (#565)
Browse files Browse the repository at this point in the history
* Update changelog, add note about removing rails 5.0 and 5.1 support

* Remove disregarded rails versions from testing matrix

* Update CI to use ubuntu 22

* Use latest bundler

* Remove appraisal generators for rails 5.0 and 5.1

* Restrict rails 5.2 by gemspec requirement

* Update minimum rubygems requirement

* Rails 5.2 updates

* Fix up rubocop deprecations / offenses

* Add changelog note for rails removals
  • Loading branch information
luke-hill authored Sep 14, 2023
1 parent 8363873 commit c131361
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 63 deletions.
12 changes: 3 additions & 9 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ name: build
on: [ push, pull_request, workflow_call ]
jobs:
test:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
ruby: ['2.6', '2.7', '3.0', '3.1']
gemfile: ['rails_5_0', 'rails_5_1', 'rails_5_2', 'rails_6_0', 'rails_6_1', 'rails_7_0']
gemfile: ['rails_5_2', 'rails_6_0', 'rails_6_1', 'rails_7_0']
exclude:
# Latest ruby will test
# - all rails versions in current major
Expand All @@ -23,13 +23,7 @@ jobs:
# 2.7 -> Supported until March '23 (At least)
# 3.0 -> Supported for a while...
- { ruby: '2.6', gemfile: 'rails_7_0' }
- { ruby: '2.7', gemfile: 'rails_5_0' }
- { ruby: '2.7', gemfile: 'rails_5_1' }
- { ruby: '3.0', gemfile: 'rails_5_0' }
- { ruby: '3.0', gemfile: 'rails_5_1' }
- { ruby: '3.0', gemfile: 'rails_5_2' } # Rails 5.2 won't work with Ruby 3+: https://github.com/rails/rails/issues/40938
- { ruby: '3.1', gemfile: 'rails_5_0' }
- { ruby: '3.1', gemfile: 'rails_5_1' }
- { ruby: '3.1', gemfile: 'rails_5_2' }
- { ruby: '3.1', gemfile: 'rails_6_0' }
env:
Expand All @@ -39,7 +33,7 @@ jobs:
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler: '2.1.4'
bundler: '2.4.19'
bundler-cache: true
- run: bundle exec rake spec
- run: bundle exec rubocop
Expand Down
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Lint/MissingSuper:

Layout/LineLength:
Max: 200
IgnoredPatterns:
AllowedPatterns:
- '^Given'
- '^When'
- '^Then'
Expand Down
20 changes: 0 additions & 20 deletions Appraisals
Original file line number Diff line number Diff line change
@@ -1,25 +1,5 @@
# frozen_string_literal: true

appraise 'rails_5_0' do
gem 'activerecord'
gem 'capybara', '< 3'
gem 'cucumber', '< 4'
gem 'psych', '< 4'
gem 'rails-html-sanitizer', '< 1.4'
gem 'railties', '~> 5.0.7'
gem 'sqlite3', '~> 1.3.13'
end

appraise 'rails_5_1' do
gem 'activerecord'
gem 'capybara', '< 3.15'
gem 'cucumber', '< 5'
gem 'psych', '< 4'
gem 'rails-html-sanitizer', '< 1.4'
gem 'railties', '~> 5.1.7'
gem 'sqlite3', '~> 1.3.13'
end

appraise 'rails_5_2' do
gem 'activerecord'
gem 'capybara', '< 3.33'
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ This file is intended to be modified using the [`changelog`](github.com/cucumber
### Removed
- Removed runtime dependencies: `mime-types`, `rexml`, and `webrick` [#559](https://github.com/cucumber/cucumber-rails/pull/559)

- Removed support for Ruby 2.5 [#558](https://github.com/cucumber/cucumber-rails/pull/558)

- Removed support for Rails 5.0 and 5.1 (5.2 is still supported and 6.0+ is now expected) [#565](https://github.com/cucumber/cucumber-rails/pull/565)

## [2.6.1] - 2022-10-12
### Changed
- Automate release process [#554](https://github.com/cucumber/cucumber-rails/pull/554)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
[![pull requests](https://oselvar.com/api/badge?label=pull%20requests&csvUrl=https%3A%2F%2Fraw.githubusercontent.com%2Fcucumber%2Foselvar-github-metrics%2Fmain%2Fdata%2Fcucumber%2Fcucumber-rails%2FpullRequests.csv)](https://oselvar.com/github/cucumber/oselvar-github-metrics/main/cucumber/cucumber-rails)
[![issues](https://oselvar.com/api/badge?label=issues&csvUrl=https%3A%2F%2Fraw.githubusercontent.com%2Fcucumber%2Foselvar-github-metrics%2Fmain%2Fdata%2Fcucumber%2Fcucumber-rails%2Fissues.csv)](https://oselvar.com/github/cucumber/oselvar-github-metrics/main/cucumber/cucumber-rails)

Cucumber-Rails brings Cucumber to Rails 5.x, 6.x and 7.x.
Cucumber-Rails brings Cucumber to Rails 5.2, 6.x and 7.x.

## Installation

Expand Down
4 changes: 2 additions & 2 deletions cucumber-rails.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Gem::Specification.new do |s|
s.add_runtime_dependency('capybara', ['>= 2.18', '< 4'])
s.add_runtime_dependency('cucumber', '>= 3.2', '< 9')
s.add_runtime_dependency('nokogiri', '~> 1.10')
s.add_runtime_dependency('railties', ['>= 5.0', '< 8'])
s.add_runtime_dependency('railties', ['>= 5.2', '< 8'])

# Main development dependencies
s.add_development_dependency('ammeter', '>= 1.1.4')
Expand All @@ -45,7 +45,7 @@ Gem::Specification.new do |s|
s.add_development_dependency('yard', '~> 0.9.10')

s.required_ruby_version = '>= 2.6.0'
s.required_rubygems_version = '>= 1.6.1'
s.required_rubygems_version = '>= 3.0.1'
s.require_path = 'lib'
s.files = Dir['lib/**/*', 'CHANGELOG.md', 'CONTRIBUTING.md', 'LICENSE', 'README.md']
end
7 changes: 3 additions & 4 deletions features/support/cucumber_rails_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def add_gem(name, *args)
gem_regexp = /gem ["']#{name}["'].*$/
gemfile_content = File.read(expand_path('Gemfile'))

if gemfile_content&.match?(gem_regexp)
if gemfile_content.match?(gem_regexp)
updated_gemfile_content = gemfile_content.gsub(gem_regexp, line)
overwrite_file('Gemfile', updated_gemfile_content)
else
Expand Down Expand Up @@ -77,9 +77,8 @@ def configure_rails_layout

def run_rails_new_command(options)
options[:name] ||= 'test_app'
flags = %w[ --skip-action-cable --skip-action-mailer --skip-active-job --skip-bootsnap --skip-bundle --skip-javascript
--skip-jbuilder --skip-listen --skip-spring --skip-sprockets --skip-test-unit --skip-turbolinks ]
flags += %w[--skip-active-storage] if rails_equal_or_higher_than?('5.2')
flags = %w[--skip-action-cable --skip-action-mailer --skip-active-job --skip-bootsnap --skip-bundle --skip-javascript
--skip-jbuilder --skip-listen --skip-spring --skip-sprockets --skip-test-unit --skip-turbolinks --skip-active-storage]
flags += %w[--skip-action-mailbox --skip-action-text] if rails_equal_or_higher_than?('6.0')
run_command "bundle exec rails new #{options[:name]} #{flags.join(' ')} #{options[:args]}"
end
Expand Down
13 changes: 0 additions & 13 deletions gemfiles/rails_5_0.gemfile

This file was deleted.

13 changes: 0 additions & 13 deletions gemfiles/rails_5_1.gemfile

This file was deleted.

0 comments on commit c131361

Please sign in to comment.