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

V3/doc updates #582

Merged
merged 8 commits into from
Nov 1, 2023
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
1 change: 0 additions & 1 deletion Appraisals
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ end
appraise 'rails_6_1' do
gem 'activerecord'
gem 'capybara', '< 3.38'
gem 'cucumber', '< 10'
gem 'psych', '< 4'
gem 'railties', '~> 6.1.3'
gem 'sqlite3', '~> 1.4'
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ This file is intended to be modified using the [`changelog`](github.com/cucumber
## [Unreleased]
### Changed
- Add support for Rails 7.1 [#575](https://github.com/cucumber/cucumber-rails/pull/575)
- Added new rubocop sub-gems (rails / rake) and updated versions to 2.6 ruby-conformance [#581](https://github.com/cucumber/cucumber-rails/pull/581)
- 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)

### Fixed
- Some of the rails 5.2 tests were installing lots of old conflicting gems ([luke-hill])
Expand Down
15 changes: 3 additions & 12 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,22 +40,13 @@ This document is a guide for those maintaining Cucumber-Rails, and others who wo
To remove and rebuild the different gemfiles (for example, to update a rails version or its
dependencies), use the following:

[bundle exec] appraisal update
[bundle exec] rake gemfiles:reinstall

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

[bundle exec] rake clean
[bundle exec] rake gemfiles:clean

## Release Process

* Make sure `CHANGELOG.md` is updated with the upcoming version number, and has entries for all fixes.
* No need to add a new version header at this point - this should be done when a new release is made, later.
* Make sure you have up-to-date and clean copy of `cucumber/cucumber.github.com.git` at the same level as cucumber repo.

Now release it

bundle update
bundle exec rake
git commit -m "Release X.Y.Z"
rake release
We now use polyglot-release. Consult [RELEASING.md](./RELEASING.md) for more info
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License

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

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
Expand Down
17 changes: 6 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,6 @@ Finally, bootstrap your Rails app, for example:

## Running Cucumber

With Rake:

rake cucumber

Without Rake:

[bundle exec] cucumber

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

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:
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:
```ruby
# features/support/env.rb
ENV['CR_REMOVE_RACK_TEST_HELPERS'] = 'true'
Expand All @@ -71,7 +66,7 @@ Cucumber feature. Let's say you think you have found a bug in the cucumber:insta
Fork this project, clone it to your workstation and check out a branch with a descriptive name:

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

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

### Setting up your environment

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

gem install bundler
bundle install
Expand Down Expand Up @@ -116,8 +111,8 @@ To support the multiple-gemfile testing, when adding a new dependency the follow

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

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

[the helper]: https://github.com/cucumber/cucumber-rails/blob/5e37c530560ae1c1a79521c38a54bae0be94242b/features/step_definitions/cucumber_rails_steps.rb#L15
[the helper method]: https://github.com/cucumber/cucumber-rails/blob/main/features/support/cucumber_rails_helper.rb#L19
17 changes: 7 additions & 10 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
# frozen_string_literal: true

CUCUMBER_RAILS_VERSION =
Gem::Specification.load("#{File.dirname(__FILE__)}/cucumber-rails.gemspec").version.version
require 'rubygems'
require 'appraisal'
require 'rake/clean'
require 'pathname'
require 'cucumber/rake/task'
require 'rspec/core/rake_task'

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

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

task default: :test

task test: %i[spec cucumber]

namespace :test do
Expand All @@ -35,7 +32,7 @@ end

namespace :gemfiles do
desc 'Re-install dependencies for all gemfiles'
task :install do
task :reinstall do
system 'bundle exec appraisal update'
end

Expand All @@ -45,5 +42,5 @@ namespace :gemfiles do
end

desc 'Remove all generated gemfiles and re-install dependencies'
task rebuild: %i[clean install]
task rebuild: %i[clean reinstall]
end
2 changes: 1 addition & 1 deletion bin/install_geckodriver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ curl --silent \
--fail \
--retry 3 \
--output /tmp/geckodriver_linux64.tar.gz \
https://github.com/mozilla/geckodriver/releases/download/v0.27.0/geckodriver-v0.27.0-linux64.tar.gz
https://github.com/mozilla/geckodriver/releases/download/v0.33.0/geckodriver-v0.33.0-linux64.tar.gz

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

Expand Down
4 changes: 2 additions & 2 deletions cucumber-rails.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ Gem::Specification.new do |s|
s.add_development_dependency('aruba', '>= 1.1.2', '< 3')
s.add_development_dependency('database_cleaner', '>= 1.8', '< 3.0')
s.add_development_dependency('rails', '>= 5.2', '< 8')
s.add_development_dependency('rake', '>= 12.0')
s.add_development_dependency('rspec', '~> 3.6')
s.add_development_dependency('rake', '>= 13.0')
s.add_development_dependency('rspec', '~> 3.12')
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 Down
5 changes: 0 additions & 5 deletions dev_tasks/cucumber.rake

This file was deleted.

5 changes: 0 additions & 5 deletions dev_tasks/rspec.rake

This file was deleted.

1 change: 0 additions & 1 deletion gemfiles/rails_6_1.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ source "https://rubygems.org"

gem "activerecord"
gem "capybara", "< 3.38"
gem "cucumber", "< 10"
gem "psych", "< 4"
gem "railties", "~> 6.1.3"
gem "sqlite3", "~> 1.4"
Expand Down