Skip to content

Commit

Permalink
Refactor/cucumber rails 3 1 1 (#592)
Browse files Browse the repository at this point in the history
* Update changelog;

* Remove contributing from default files
Update some minimum dev deps

* Remove ancient ref to finding out if a file exists - use modern way

* Add note about ruby 3.1 EOL date

* Update changelog

* Updated gems for unsupported rails versions

* Amend helper install for feature tests;
  • Loading branch information
luke-hill authored Jan 30, 2025
1 parent 7077deb commit b680433
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 6 deletions.
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:
# 2.6 -> EOL Mar '22 -> Only test Rails versions initially released before Sep '22
# 2.7 -> EOL Mar '23 -> Only test Rails versions initially released before Sep '23
# 3.0 -> EOL Mar '24 -> Only test Rails versions initially released before Sep '24
# 3.1 -> EOL Mar '25 -> Only test Rails versions initially released before Sep '25
include:
- { ruby: '2.6', gemfile: 'rails_5_2' }
- { ruby: '2.7', gemfile: 'rails_6_0' }
Expand Down
4 changes: 4 additions & 0 deletions Appraisals
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
appraise 'rails_5_2' do
gem 'activerecord'
gem 'capybara', '< 3.33'
gem 'concurrent-ruby', '< 1.3.5'
gem 'cucumber', '< 6'
gem 'factory_bot', '< 6.4'
gem 'psych', '< 4'
Expand All @@ -14,6 +15,7 @@ end
appraise 'rails_6_0' do
gem 'activerecord'
gem 'capybara', '< 3.35'
gem 'concurrent-ruby', '< 1.3.5'
gem 'cucumber', '< 6'
gem 'factory_bot', '< 6.4'
gem 'matrix'
Expand All @@ -26,6 +28,7 @@ end
appraise 'rails_6_1' do
gem 'activerecord'
gem 'capybara', '< 3.38'
gem 'concurrent-ruby', '< 1.3.5'
gem 'factory_bot', '< 6.4'
gem 'psych', '< 4'
gem 'railties', '~> 6.1.7'
Expand All @@ -34,6 +37,7 @@ end

appraise 'rails_7_0' do
gem 'activerecord'
gem 'concurrent-ruby', '< 1.3.5'
gem 'cucumber', '< 10'
gem 'factory_bot', '< 6.6'
gem 'railties', '~> 7.0.8'
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
This file is intended to be modified using the [`changelog`](https://github.com/cucumber/changelog) command-line tool.

## [Unreleased]
### Changed
- Updated some dev dependencies and improved some dev rake tasks to make testing leaner

## [3.1.0] - 2024-11-25
- Add support for Rails 8.0 (No code changes required) [#590](https://github.com/cucumber/cucumber-rails/pull/590)

## [3.0.1] - 2024-11-05
### Changed
Expand Down
3 changes: 1 addition & 2 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# frozen_string_literal: true

require 'appraisal'
require 'pathname'
require 'cucumber/rake/task'
require 'rspec/core/rake_task'

Expand All @@ -21,7 +20,7 @@ namespace :test do

desc 'Run tests against specified gemfile, e.g. rake test:gemfile[rails_6_0]'
task :gemfile, :name do |_task, args|
unless args.name && Pathname.new("gemfiles/#{args.name}.gemfile").exist?
unless args.name && File.exist?("gemfiles/#{args.name}.gemfile")
raise ArgumentError, "You must provide the name of an existing Appraisal gemfile,
e.g. 'rake test:gemfile[rails_6_0]'"
end
Expand Down
8 changes: 4 additions & 4 deletions cucumber-rails.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ Gem::Specification.new do |s|
s.add_development_dependency('ammeter', '>= 1.1.5')
s.add_development_dependency('appraisal', '>= 2.4.1', '< 3')
s.add_development_dependency('aruba', '>= 1.1.2', '< 3')
s.add_development_dependency('database_cleaner', '>= 1.8', '< 3.0')
s.add_development_dependency('database_cleaner', '~> 2.0')
s.add_development_dependency('rails', '>= 5.2', '< 9')
s.add_development_dependency('rake', '>= 13.0')
s.add_development_dependency('rspec', '~> 3.12')
s.add_development_dependency('rake', '~> 13.2')
s.add_development_dependency('rspec', '~> 3.13')
s.add_development_dependency('rubocop', '~> 1.45.0')
s.add_development_dependency('rubocop-packaging', '~> 0.5.2')
s.add_development_dependency('rubocop-performance', '~> 1.17.1')
Expand All @@ -47,5 +47,5 @@ Gem::Specification.new do |s|
s.add_development_dependency('yard', '~> 0.9.10')

s.require_path = 'lib'
s.files = Dir['lib/**/*', 'CHANGELOG.md', 'CONTRIBUTING.md', 'LICENSE', 'README.md']
s.files = Dir['lib/**/*', 'CHANGELOG.md', 'LICENSE', 'README.md']
end
1 change: 1 addition & 0 deletions features/support/cucumber_rails_gem_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ def install_cucumber_rails(*options)
def configure_rails_gems
%w[bootsnap byebug jbuilder listen rails sass-rails turbolinks webpacker].each { |gem| remove_gem(gem) }
%w[railties activerecord actionpack].each { |rails_gem| add_gem(rails_gem, Rails.version) }
add_gem 'concurrent-ruby', '< 1.3.5' unless rails_equal_or_higher_than?('7.1')
end

def add_cucumber_rails(options)
Expand Down
1 change: 1 addition & 0 deletions gemfiles/rails_5_2.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ source "https://rubygems.org"

gem "activerecord"
gem "capybara", "< 3.33"
gem "concurrent-ruby", "< 1.3.5"
gem "cucumber", "< 6"
gem "factory_bot", "< 6.4"
gem "psych", "< 4"
Expand Down
1 change: 1 addition & 0 deletions gemfiles/rails_6_0.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ source "https://rubygems.org"

gem "activerecord"
gem "capybara", "< 3.35"
gem "concurrent-ruby", "< 1.3.5"
gem "cucumber", "< 6"
gem "factory_bot", "< 6.4"
gem "matrix"
Expand Down
1 change: 1 addition & 0 deletions gemfiles/rails_6_1.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ source "https://rubygems.org"

gem "activerecord"
gem "capybara", "< 3.38"
gem "concurrent-ruby", "< 1.3.5"
gem "factory_bot", "< 6.4"
gem "psych", "< 4"
gem "railties", "~> 6.1.7"
Expand Down
1 change: 1 addition & 0 deletions gemfiles/rails_7_0.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
source "https://rubygems.org"

gem "activerecord"
gem "concurrent-ruby", "< 1.3.5"
gem "cucumber", "< 10"
gem "factory_bot", "< 6.6"
gem "railties", "~> 7.0.8"
Expand Down

0 comments on commit b680433

Please sign in to comment.