Skip to content

Commit 809d002

Browse files
authored
Refactor/remove misc files (#1721)
* Remove unused files * Remove files that can be used in a better way * Remove flog and instead use verbose loggers * Move references to new folder structure for upgrade hints * Fix changelog refs * Remove changelog script. Tweak gemspec script to only update regular gems and not bundler * Remove invite collaborator script. We use commit-bit auto-gen and release maintainers are strictly controlled * Octokit is now no longer needed * Remove release script from makefile * Add note about removing nokogiri as verbose dependency once we remove jUnit formatter * Update releasing process to new polyglot method * Fix up a tiny portion of readme * Remove useless constant assigns * Fix up failures move support code to env.rb * Add new changelog entry * Re-ordered changelog
1 parent 1b67456 commit 809d002

26 files changed

+117
-453
lines changed

.ruby-gemset

Lines changed: 0 additions & 1 deletion
This file was deleted.

.yardopts

Lines changed: 0 additions & 1 deletion
This file was deleted.

CHANGELOG.md

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ This document is formatted according to the principles of [Keep A CHANGELOG](htt
99
Please visit [cucumber/CONTRIBUTING.md](https://github.com/cucumber/cucumber/blob/master/CONTRIBUTING.md) for more info on how to contribute to Cucumber.
1010

1111
## [Unreleased]
12+
### Removed
13+
- Removed a whole bunch of miscellaneous script files that are no longer used (Either in development or usage) ([#1721](https://github.com/cucumber/cucumber-ruby/pull/1721) [luke-hill](https://github.com/luke-hill))
14+
1215
### Changed
1316
- Began to tidy up (Cleared some AutoFix cops), and organise rubocop tech-debt in repo (This introduced new rubocop sub-gems) ([#1716](https://github.com/cucumber/cucumber-ruby/pull/1716) [luke-hill](https://github.com/luke-hill))
1417

@@ -24,6 +27,9 @@ Please visit [cucumber/CONTRIBUTING.md](https://github.com/cucumber/cucumber/blo
2427
- Cucumber was unable to generate the correct `VERSION` constant ([#1729](https://github.com/cucumber/cucumber-ruby/pull/1729) [luke-hill](https://github.com/luke-hill))
2528

2629
## [9.0.0] - 2023-08-31
30+
### Removed
31+
- Removed support for Ruby 2.6 and JRuby 9.3 ([#1699](https://github.com/cucumber/cucumber-ruby/pull/1699))
32+
2733
### Added
2834
- Add option `--retry-total` ([#1669](https://github.com/cucumber/cucumber-ruby/pull/1669))
2935

@@ -36,9 +42,6 @@ with [mini_mime](https://rubygems.org/gems/mini_mime)
3642
### Fixed
3743
- Cucumber may raise NoMethodError when CUCUMBER_COLORS environment was set ([#1641](https://github.com/cucumber/cucumber-ruby/pull/1641/) [s2k](https://github.com/s2k))
3844

39-
### Removed
40-
- Removed support for Ruby 2.6 and JRuby 9.3 ([#1699](https://github.com/cucumber/cucumber-ruby/pull/1699))
41-
4245
## [8.0.0] - 2022-05-19
4346
### Added
4447
- Add a _WARNING_ message when using a space-separated string with cucumber_opts
@@ -57,13 +60,30 @@ with [mini_mime](https://rubygems.org/gems/mini_mime)
5760
- Suppress RSspec deprecation warnings([#1631](https://github.com/cucumber/cucumber-ruby/pull/1631))
5861

5962
## [8.0.0.RC.1] - 2022-01-19
63+
### Removed
64+
- `AfterConfiguration` has been removed. Please use `InstallPlugin` or `BeforeAll` instead.
65+
See upgrading notes for [8.0.0.md](upgrading_notes/8.0.0.md#upgrading-to-800) to update your code accordingly.
66+
([#1591](https://github.com/cucumber/cucumber-ruby/pull/1591))
67+
- The built-in Wire protocol
68+
The Wire protocol is still officially supported, but as an optional plugin rather
69+
than a built-in feature. See upgrading notes for [8.0.0.md](upgrading_notes/8.0.0.md#upgrading-to-800) to update your code accordingly.
70+
- Removed former unused `stdin` argument from `Cli::Main`. That may impact your code
71+
if you use cucumber API `Cucumber::Cli::Main`. See upgrading notes for [8.0.0.md](upgrading_notes/8.0.0.md#upgrading-to-800).
72+
([#1588](https://github.com/cucumber/cucumber-ruby/pull/1588))
73+
- Removed `DataTable#map_column!` and `DataTable#map_headers!`.
74+
Those methods were error-prone and planned to be removed a long time ago. You
75+
can use the immutable versions instead: `DataTable#map_column` and
76+
`DataTable#map_headers`.
77+
([#1590](https://github.com/cucumber/cucumber-ruby/pull/1590))
78+
- Removed support for Ruby 2.5 and JRuby 9.2.
79+
6080
### Changed
6181
- Replace dependency [cucumber-create-meta](https://rubygems.org/gems/cucumber-create-meta)
6282
with the new [cucumber-ci-environment](https://rubygems.org/gems/cucumber-ci-environment)
6383
([#1601](https://github.com/cucumber/cucumber-ruby/pull/1601))
6484

6585
- In `DataTable#map_column`, Changed the `strict` argument into a keyword argument.
66-
See [UPGRADING.md](./UPGRADING.md#upgrading-to-800)
86+
See upgrading notes for [8.0.0.md](upgrading_notes/8.0.0.md#upgrading-to-800)
6787
([#1594](https://github.com/cucumber/cucumber-ruby/pull/1594))
6888

6989
- Added Ruby 3.1 ([#1607](https://github.com/cucumber/cucumber-ruby/pull/1607))
@@ -87,25 +107,6 @@ with [mini_mime](https://rubygems.org/gems/mini_mime)
87107
- Fixed `DataTable#map_headers` when headers have the same prefix
88108
([#1598](https://github.com/cucumber/cucumber-ruby/pull/1598))
89109

90-
### Removed
91-
- `AfterConfiguration` has been removed. Please use `InstallPlugin` or `BeforeAll` instead.
92-
See the [UPGRADING.md](./UPGRADING.md#upgrading-to-800) to update your code accordingly.
93-
([#1591](https://github.com/cucumber/cucumber-ruby/pull/1591))
94-
- The built-in Wire protocol
95-
The Wire protocol is still officially supported, but as an optional plugin rather
96-
than a built-in feature. See the
97-
[UPGRADING.md](./UPGRADING.md#upgrading-to-800)
98-
to update your code accordingly.
99-
- Removed former unused `stdin` argument from `Cli::Main`. That may impact your code
100-
if you use cucumber API `Cucumber::Cli::Main`. See [UPGRADING.md](./UPGRADING.md#upgrading-to-800).
101-
([#1588](https://github.com/cucumber/cucumber-ruby/pull/1588))
102-
- Removed `DataTable#map_column!` and `DataTable#map_headers!`.
103-
Those methods were error-prone and planned to be removed a long time ago. You
104-
can use the immutable versions instead: `DataTable#map_column` and
105-
`DataTable#map_headers`.
106-
([#1590](https://github.com/cucumber/cucumber-ruby/pull/1590))
107-
- Removed support for Ruby 2.5 and JRuby 9.2.
108-
109110
[Unreleased]: https://github.com/cucumber/cucumber-ruby/compare/v9.0.1...HEAD
110111
[9.0.1]: https://github.com/cucumber/cucumber-ruby/compare/v9.0.0...v9.0.1
111112
[9.0.0]: https://github.com/cucumber/cucumber-ruby/compare/v8.0.0...v9.0.0

Makefile

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -41,22 +41,3 @@ bin/json-formatter: $(MONOREPO_PATH)/json-formatter/go/dist/cucumber-json-format
4141
clean:
4242
rm -rf acceptance/*.json bin/json-formatter
4343
.PHONY: clean
44-
45-
release:
46-
[ -d '../secrets' ] || git clone keybase://team/cucumberbdd/secrets ../secrets
47-
git -C ../secrets pull
48-
../secrets/update_permissions
49-
docker run \
50-
--volume "${shell pwd}":/app \
51-
--volume "${shell pwd}/../secrets/import-gpg-key.sh":/home/cukebot/import-gpg-key.sh \
52-
--volume "${shell pwd}/../secrets/codesigning.key":/home/cukebot/codesigning.key \
53-
--volume "${shell pwd}/../secrets/.ssh":/home/cukebot/.ssh \
54-
--volume "${shell pwd}/../secrets/.gem":/home/cukebot/.gem \
55-
--volume "${HOME}/.gitconfig":/home/cukebot/.gitconfig \
56-
--env CUCUMBER_USE_RELEASED_GEMS=1 \
57-
--env-file ../secrets/secrets.list \
58-
--user 1000 \
59-
--rm \
60-
-it cucumber/cucumber-build:latest \
61-
bash -c "rm Gemfile.lock && bundle && bundle exec rake && bundle exec rake release"
62-
.PHONY: release

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,7 @@ Later in this document, bundler is considered being used so all commands are usi
5252
- Ruby 3.0
5353
- Ruby 2.7
5454
- TruffleRuby 22.0.0+
55-
- JRuby (with [some limitations](https://github.com/cucumber/cucumber-ruby/blob/main/docs/jruby-limitations.md))
56-
- 9.4
55+
- JRuby 9.4+ (with [some limitations](https://github.com/cucumber/cucumber-ruby/blob/main/docs/jruby-limitations.md))
5756

5857
### Ruby on Rails
5958

@@ -105,19 +104,20 @@ And a file named `steps.rb` in `features/step_definitions` with:
105104
```ruby
106105
# features/step_definitions/steps.rb
107106

108-
Given("this will pass") do
107+
Given('this will pass') do
109108
@this_will_pass = true
110109
end
111110

112-
Given("this will fail") do
111+
Given('this will fail') do
113112
@this_will_pass = false
114113
end
115114

116-
When("I do an action") do
115+
When('I do an action') do
116+
:no_op
117117
end
118118

119119
Then("some results should be there") do
120-
expect(@this_will_pass)
120+
expect(@this_will_pass).to be true
121121
end
122122
```
123123

@@ -131,7 +131,7 @@ To execute a single feature file:
131131

132132
To execute a single example, indicates the line of the name of the example:
133133

134-
$ bundle exec cucumber features/rule.feature:7
134+
$ bundle exec cucumber features/rule.feature:5
135135

136136
To summarize the results on the standard output, and writte a HTML report on disk:
137137

RELEASING.md

Lines changed: 6 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,11 @@
1-
# Release process for cucumber-ruby
1+
See [.github/RELEASING](https://github.com/cucumber/.github/blob/main/RELEASING.md).
22

3-
## Prerequisites
3+
## When done ##
44

5-
To release `cucumber-ruby`, you'll need:
5+
Update the cucumber-ruby version in the documentation project:
66

7-
- to be a member of the core-team
8-
- make
9-
- docker
7+
* https://github.com/cucumber/docs.cucumber.io
108

11-
## cucumber-ruby-core
9+
The cucumber-ruby version for the docs is specified in the docs [versions.yaml](https://github.com/cucumber/docs.cucumber.io/blob/master/data/versions.yaml)
1210

13-
If internal libraries such as `cucumber-gherkin` needs to be updated, you'll
14-
need to update and release `cucumber-ruby-core` before releasing `cucumber-ruby`.
15-
16-
## Releasing cucumber-ruby
17-
18-
- Upgrade gems with `scripts/update-gemspec`
19-
- Bump the version number in `lib/cucumber/version`
20-
- Update `CHANGELOG.md` with the upcoming version number and create a new `Unreleased` section
21-
- Remove empty sections from `CHANGELOG.md`
22-
- Commit the changes using a verified signature
23-
```shell
24-
git commit --gpg-sign -am "Release X.Y.Z"
25-
git push
26-
```
27-
- Now release it: push to a dedicated `release/` branch:
28-
```shell
29-
git push origin main:release/vX.Y.Z
30-
```
31-
- Check the release has been successfully pushed to [rubygems](https://rubygems.org/gems/cucumber)
32-
- Finally, update the `cucumber-ruby` version in the
33-
[documentation project](https://cucumber.io/docs/installation/) in
34-
[versions.yaml](https://github.com/cucumber/docs/blob/master/data/versions.yaml).
11+
All done! Hurray!

cucumber.gemspec

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ Gem::Specification.new do |s|
3434
s.add_dependency 'sys-uname', '~> 1.2', '>= 1.2.3'
3535

3636
s.add_development_dependency 'cucumber-compatibility-kit', '~> 10.0'
37+
# Only needed whilst we are testing the formatters. Can be removed once we remove tests for those
3738
s.add_development_dependency 'nokogiri', '~> 1.13', '>= 1.13.6'
3839
s.add_development_dependency 'pry', '~> 0.14', '>= 0.14.1'
3940
s.add_development_dependency 'rake', '~> 13.0', '>= 13.0.6'
@@ -48,9 +49,6 @@ Gem::Specification.new do |s|
4849
s.add_development_dependency 'test-unit', '~> 3.6', '>= 3.6.1'
4950
s.add_development_dependency 'webrick', '~> 1.8', '>= 1.8.1'
5051

51-
# For maintainer scripts
52-
s.add_development_dependency 'octokit', '~> 6.0', '>= 6.1.0'
53-
5452
# Needed for rake examples
5553
s.add_development_dependency 'capybara', '~> 3.39', '>= 3.39.2'
5654
s.add_development_dependency 'rack-test', '~> 2.1', '>= 2.1.0'

features/lib/step_definitions/cucumber_steps.rb

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
# frozen_string_literal: true
22

3-
require 'securerandom'
4-
require 'nokogiri'
5-
63
Given('a directory without standard Cucumber project directory structure') do
74
FileUtils.cd('.') do
85
FileUtils.rm_rf 'features' if File.directory?('features')

features/lib/step_definitions/scenarios_and_steps.rb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
# frozen_string_literal: true
22

3-
def snake_case(name)
4-
name.downcase.gsub(/\W/, '_')
5-
end
6-
73
Given('the standard step definitions') do
84
write_file(
95
'features/step_definitions/steps.rb',

features/lib/support/env.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# frozen_string_literal: true
22

33
require 'cucumber/formatter/ansicolor'
4+
require 'securerandom'
5+
require 'nokogiri'
46

57
CUCUMBER_FEATURES_PATH = 'features/lib'
68

@@ -57,3 +59,7 @@
5759
After('@disable_fail_fast') do
5860
Cucumber.wants_to_quit = false
5961
end
62+
63+
def snake_case(name)
64+
name.downcase.gsub(/\W/, '_')
65+
end

0 commit comments

Comments
 (0)