Skip to content

Commit 7f15d01

Browse files
authored
V3/doc updates (#582)
* Update contributing.md * update readme.md * Use later versions of rspec/rake * Tidy up rakefile * Fix typo in changelog * Rails 6.1 is the latest 6.x so permit latest cucumber * Update license year that was massively outdated * Update link to old legacy geckodriver
1 parent d73a14c commit 7f15d01

File tree

11 files changed

+21
-50
lines changed

11 files changed

+21
-50
lines changed

Appraisals

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ end
2424
appraise 'rails_6_1' do
2525
gem 'activerecord'
2626
gem 'capybara', '< 3.38'
27-
gem 'cucumber', '< 10'
2827
gem 'psych', '< 4'
2928
gem 'railties', '~> 6.1.3'
3029
gem 'sqlite3', '~> 1.4'

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ This file is intended to be modified using the [`changelog`](github.com/cucumber
1010
## [Unreleased]
1111
### Changed
1212
- Add support for Rails 7.1 [#575](https://github.com/cucumber/cucumber-rails/pull/575)
13-
- Added new rubocop sub-gems (rails / rake) and updated versions to 2.6 ruby-conformance [#581](https://github.com/cucumber/cucumber-rails/pull/581)
13+
- Added new rubocop sub-gems (rails / rake) and updated repo to be rubocop 2.6 conformant [#581](https://github.com/cucumber/cucumber-rails/pull/581)
1414

1515
### Fixed
1616
- Some of the rails 5.2 tests were installing lots of old conflicting gems ([luke-hill])

CONTRIBUTING.md

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -40,22 +40,13 @@ This document is a guide for those maintaining Cucumber-Rails, and others who wo
4040
To remove and rebuild the different gemfiles (for example, to update a rails version or its
4141
dependencies), use the following:
4242

43-
[bundle exec] appraisal update
43+
[bundle exec] rake gemfiles:reinstall
4444

4545
If you've changed versions of the dependencies, you may find it helpful to forcefully clean
4646
each appraisal's gem lock file in `gemfiles/`. You can do this using:
4747

48-
[bundle exec] rake clean
48+
[bundle exec] rake gemfiles:clean
4949

5050
## Release Process
5151

52-
* Make sure `CHANGELOG.md` is updated with the upcoming version number, and has entries for all fixes.
53-
* No need to add a new version header at this point - this should be done when a new release is made, later.
54-
* Make sure you have up-to-date and clean copy of `cucumber/cucumber.github.com.git` at the same level as cucumber repo.
55-
56-
Now release it
57-
58-
bundle update
59-
bundle exec rake
60-
git commit -m "Release X.Y.Z"
61-
rake release
52+
We now use polyglot-release. Consult [RELEASING.md](./RELEASING.md) for more info

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License
22

3-
Copyright (c) 2008-2020 Aslak Hellesøy and the Cucumber Team.
3+
Copyright (c) 2008-2024 Aslak Hellesøy and the Cucumber Team.
44

55
Permission is hereby granted, free of charge, to any person obtaining
66
a copy of this software and associated documentation files (the

README.md

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,6 @@ Finally, bootstrap your Rails app, for example:
3333

3434
## Running Cucumber
3535

36-
With Rake:
37-
38-
rake cucumber
39-
40-
Without Rake:
41-
4236
[bundle exec] cucumber
4337

4438
## Configuration options
@@ -52,7 +46,8 @@ before and after your scenarios. You can disable this behaviour like so:
5246
Cucumber::Rails::Database.autorun_database_cleaner = false
5347
```
5448

55-
By default, cucumber-rails will auto mix-in the helpers from `Rack::Test` into your default Cucumber World instance. You can prevent this behaviour like so:
49+
By default, cucumber-rails will auto mix-in the helpers from `Rack::Test` into your default Cucumber World instance.
50+
You can prevent this behaviour like so:
5651
```ruby
5752
# features/support/env.rb
5853
ENV['CR_REMOVE_RACK_TEST_HELPERS'] = 'true'
@@ -71,7 +66,7 @@ Cucumber feature. Let's say you think you have found a bug in the cucumber:insta
7166
Fork this project, clone it to your workstation and check out a branch with a descriptive name:
7267

7368
git clone [email protected]:you/cucumber-rails.git
74-
git checkout -b bugfix/generator-fails-on-ruby-31
69+
git checkout -b bugfix/generator-fails-on-bundle-exec
7570

7671
Start by making sure you can run the existing features. Now, create a feature that demonstrates
7772
what's wrong. See the existing features for examples. When you have a failing feature that
@@ -83,7 +78,7 @@ feature) before you send the pull request.
8378

8479
### Setting up your environment
8580

86-
Make sure you have a supported ruby installed, cd into your cucumber-rails repository and:
81+
Make sure you have a supported ruby installed, cd into your `cucumber-rails` repository and run
8782

8883
gem install bundler
8984
bundle install
@@ -116,8 +111,8 @@ To support the multiple-gemfile testing, when adding a new dependency the follow
116111

117112
1. If it's a runtime dependency of the gem, add it to the gemspec
118113
2. If it's a primary development dependency, add it to the gemspec
119-
3. If it's a dependency of a generated rails app in a test, add it to [the helper] that modifies the `Gemfile`
114+
3. If it's a dependency of a generated rails app in a test, add it to [the helper method] that modifies the `Gemfile`
120115

121116
For example, rspec is a primary development dependency, so it lives in the gemspec.
122117

123-
[the helper]: https://github.com/cucumber/cucumber-rails/blob/5e37c530560ae1c1a79521c38a54bae0be94242b/features/step_definitions/cucumber_rails_steps.rb#L15
118+
[the helper method]: https://github.com/cucumber/cucumber-rails/blob/main/features/support/cucumber_rails_helper.rb#L19

Rakefile

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,16 @@
11
# frozen_string_literal: true
22

3-
CUCUMBER_RAILS_VERSION =
4-
Gem::Specification.load("#{File.dirname(__FILE__)}/cucumber-rails.gemspec").version.version
5-
require 'rubygems'
63
require 'appraisal'
7-
require 'rake/clean'
84
require 'pathname'
5+
require 'cucumber/rake/task'
6+
require 'rspec/core/rake_task'
97

10-
$LOAD_PATH.unshift("#{File.dirname(__FILE__)}/lib")
11-
Dir["#{File.dirname(__FILE__)}/dev_tasks/*.rake"].sort.each { |ext| load ext }
8+
Cucumber::Rake::Task.new
9+
RSpec::Core::RakeTask.new
1210

13-
CLEAN.include('doc', 'tmp')
11+
$LOAD_PATH.unshift("#{File.dirname(__FILE__)}/lib")
1412

1513
task default: :test
16-
1714
task test: %i[spec cucumber]
1815

1916
namespace :test do
@@ -35,7 +32,7 @@ end
3532

3633
namespace :gemfiles do
3734
desc 'Re-install dependencies for all gemfiles'
38-
task :install do
35+
task :reinstall do
3936
system 'bundle exec appraisal update'
4037
end
4138

@@ -45,5 +42,5 @@ namespace :gemfiles do
4542
end
4643

4744
desc 'Remove all generated gemfiles and re-install dependencies'
48-
task rebuild: %i[clean install]
45+
task rebuild: %i[clean reinstall]
4946
end

bin/install_geckodriver.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ curl --silent \
88
--fail \
99
--retry 3 \
1010
--output /tmp/geckodriver_linux64.tar.gz \
11-
https://github.com/mozilla/geckodriver/releases/download/v0.27.0/geckodriver-v0.27.0-linux64.tar.gz
11+
https://github.com/mozilla/geckodriver/releases/download/v0.33.0/geckodriver-v0.33.0-linux64.tar.gz
1212

1313
sudo tar -C /usr/local/bin -xvzf /tmp/geckodriver_linux64.tar.gz geckodriver
1414

cucumber-rails.gemspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ Gem::Specification.new do |s|
3434
s.add_development_dependency('aruba', '>= 1.1.2', '< 3')
3535
s.add_development_dependency('database_cleaner', '>= 1.8', '< 3.0')
3636
s.add_development_dependency('rails', '>= 5.2', '< 8')
37-
s.add_development_dependency('rake', '>= 12.0')
38-
s.add_development_dependency('rspec', '~> 3.6')
37+
s.add_development_dependency('rake', '>= 13.0')
38+
s.add_development_dependency('rspec', '~> 3.12')
3939
s.add_development_dependency('rubocop', '~> 1.45.0')
4040
s.add_development_dependency('rubocop-packaging', '~> 0.5.2')
4141
s.add_development_dependency('rubocop-performance', '~> 1.17.1')

dev_tasks/cucumber.rake

Lines changed: 0 additions & 5 deletions
This file was deleted.

dev_tasks/rspec.rake

Lines changed: 0 additions & 5 deletions
This file was deleted.

gemfiles/rails_6_1.gemfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ source "https://rubygems.org"
44

55
gem "activerecord"
66
gem "capybara", "< 3.38"
7-
gem "cucumber", "< 10"
87
gem "psych", "< 4"
98
gem "railties", "~> 6.1.3"
109
gem "sqlite3", "~> 1.4"

0 commit comments

Comments
 (0)