Skip to content

Commit 302bd42

Browse files
authored
[Ruby]: refactor -> Remove legacy ruby support (#268)
* Fix changelog versions * Fix missing / invalid styled changelog entries * Update to ruby 2.6 minimum * Update dependencies * Add basic rubocop subgems and legacy versions * Add initially generated rubocop todo and partial rubocop configs * Use correct value for rubygems version requirement * Re-gen todo file * Add disabled cop note * Add checkpoint note * Update workflows and changelog
1 parent 82d4233 commit 302bd42

File tree

7 files changed

+450
-77
lines changed

7 files changed

+450
-77
lines changed

.github/workflows/release-ruby.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,14 @@ jobs:
1717
needs: [pre-release-check, test-ruby]
1818
runs-on: ubuntu-latest
1919
environment: Release
20-
2120
steps:
2221
- uses: actions/checkout@v4
23-
2422
- uses: ./.github/actions/prepare
25-
26-
- name: Set up Ruby
27-
uses: ruby/setup-ruby@v1
23+
- uses: ruby/setup-ruby@v1
2824
with:
29-
ruby-version: "3.0"
25+
ruby-version: '3.2'
3026
bundler-cache: true
3127
working-directory: ruby
32-
3328
- name: Publish ruby gem
3429
uses: cucumber/[email protected]
3530
with:

.github/workflows/test-ruby.yml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,17 @@ jobs:
1818
matrix:
1919
os:
2020
- ubuntu-latest
21-
ruby: ["2.7", "3.0"]
21+
ruby: ['2.7', '3.0', '3.1', '3.2']
2222
include:
2323
- os: macos-latest
24-
ruby: "3.0"
25-
24+
ruby: '3.2'
2625
steps:
2726
- uses: actions/checkout@v4
28-
2927
- uses: ./.github/actions/prepare
30-
31-
- name: Set up Ruby
32-
uses: ruby/setup-ruby@v1
28+
- uses: ruby/setup-ruby@v1
3329
with:
3430
ruby-version: ${{ matrix.ruby }}
3531
bundler-cache: true
3632
working-directory: ruby
37-
3833
- run: bundle exec rake
3934
working-directory: ruby

CHANGELOG.md

Lines changed: 45 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -6,74 +6,84 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/)
66
and this project adheres to [Semantic Versioning](http://semver.org/).
77

88
## [Unreleased]
9+
### Added
10+
- [Ruby] CI: Test on ruby 3.1/3.2 ([#268](https://github.com/cucumber/html-formatter/pull/268))
11+
12+
### Changed
13+
- [Ruby] Minimum ruby version is now 2.6+ ([#268](https://github.com/cucumber/html-formatter/pull/268))
14+
- [Ruby] Add placeholder rubocop files ready for rubocop refactoring ([#268](https://github.com/cucumber/html-formatter/pull/268))
915

1016
## [20.4.0] - 2023-07-13
1117
### Changed
12-
- Upgrade `@cucumber/react-components` to v21.1.1
18+
- Upgrade `@cucumber/react-components` to 21.1.1
1319

1420
## [20.3.1] - 2023-06-02
1521
### Fixed
1622
- Set viewport width to device width
1723

1824
## [20.3.0] - 2023-04-07
1925
### Changed
20-
- Upgrade Cucumber Messages to v22.0.0
26+
- Upgrade `messages` to 22.0.0
2127

2228
## [20.2.1] - 2022-12-17
2329
### Fixed
2430
- [Java] Allow `io.cucumber:messages:18.0.0` as the minimum version
2531

2632
## [20.2.0] - 2022-11-27
2733
### Changed
28-
- Upgrade to `@cucumber/react-components` `21.0.1`
34+
- Upgrade `@cucumber/react-components` to `21.0.1`
2935
- Upgrade to React 18
3036
- [Java] Enabled reproducible builds
3137

3238
## [20.1.0] - 2022-09-14
3339
### Changed
34-
- Upgrade to `@cucumber/react-components` `^20.2.0`
40+
- Upgrade `@cucumber/react-components` to `^20.2.0`
3541

3642
## [20.0.0] - 2022-08-07
43+
### Changed
44+
- A variety of dependabot updates
3745

3846
## [19.2.0] - 2022-05-27
3947
### Changed
4048
- Upgrade to `@cucumber/react-components` `^20.1.0`
4149

4250
## [19.1.0] - 2022-04-15
51+
### Changed
52+
- A variety of dependabot updates
4353

4454
## [19.0.0] - 2022-03-25
4555
### Changed
46-
- Upgrade to `@cucumber/react` `^19.2.0`
56+
- Upgrade `@cucumber/react` to `^19.2.0`
4757

4858
### Removed
49-
- binary command that accepted ndjson on stdin to create a report ([#4](https://github.com/cucumber/html-formatter/issues/4))
59+
- Binary command that accepted ndjson on stdin to create a report ([#4](https://github.com/cucumber/html-formatter/issues/4))
5060

5161
## [18.0.0] - 2022-01-26
5262
### Added
5363
- Use `auto` theme to automatically render with light or dark theme per platform preference.
5464

5565
### Changed
56-
- Upgrade to `@cucumber/react` `^19.0.0`
66+
- Upgrade `@cucumber/react` to `^19.0.0`
5767

5868
## [17.0.0] - 2021-09-02
5969
### Changed
60-
- Upgrade to `@cucumber/react` `^18.0.0`
70+
- Upgrade `@cucumber/react` to `^18.0.0`
6171

6272
### Fixed
6373
- [Java] Fix a regression from 14.0.0 where the embedded JavaScript had the wrong content,
6474
preventing reports from displaying properly.
6575

6676
## [16.0.1] - 2021-07-19
6777
### Changed
68-
- Upgrade to `messages` v17.0.1
78+
- Upgrade `messages` to 17.0.1
6979

7080
## [16.0.0] - 2021-07-08
7181
### Added
7282
- Add filters and highlighted search terms in URL query parameter of HTML reports to make sharing those easier
7383
([#1302](https://github.com/cucumber/cucumber/pull/1302))
7484

7585
### Changed
76-
- Upgrade Cucumber Messages to v17.0.0
86+
- Upgrade Cucumber Messages to 17.0.0
7787

7888
## [15.0.2] - 2021-05-27
7989
### Fixed
@@ -102,9 +112,9 @@ preventing reports from displaying properly.
102112

103113
## [12.0.0] - 2021-02-08
104114
### Changed
105-
- Upgrade to gherkin 17.0.0
106-
- Upgrade to messages 14.0.0
107-
- Upgrade to query 8.0.0
115+
- Upgrade `gherkin` to 17.0.0
116+
- Upgrade `messages` to 14.0.0
117+
- Upgrade `query` to 8.0.0
108118

109119
### Fixed
110120
- Reclassified bundled dependencies as `devDependencies` only ([#1308](https://github.com/cucumber/cucumber/pull/1308))
@@ -126,6 +136,8 @@ preventing reports from displaying properly.
126136
- Upgrade `@cucumber/react`
127137

128138
## [11.0.0] - 2020-12-17
139+
### Fixed
140+
- Nothing changed, just tagged a new release to trigger build
129141

130142
## [10.0.0] - 2020-11-04
131143
### Changed
@@ -166,22 +178,17 @@ even if there were no errors.
166178
## [6.0.2] - 2020-05-01
167179
### Added
168180
- [Java] Enable consumers to find our version at runtime using `clazz.getPackage().getImplementationVersion()` by upgrading to `cucumber-parent:2.1.0`
169-
([#976](https://github.com/cucumber/cucumber/pull/976)
170-
[aslakhellesoy](https://github.com/aslakhellesoy))
181+
([#976](https://github.com/cucumber/cucumber/pull/976) [aslakhellesoy](https://github.com/aslakhellesoy))
171182

172183
### Fixed
173184
- [Java] Use version range for messages dependency
174-
([#986](https://github.com/cucumber/cucumber/pull/986)
175-
[mpkorstanje](https://github.com/mpkorstanje))
185+
([#986](https://github.com/cucumber/cucumber/pull/986) [mpkorstanje](https://github.com/mpkorstanje))
176186
- [Java] Make writer idempotent when failing to close underlying writer
177-
([#986](https://github.com/cucumber/cucumber/pull/986)
178-
[mpkorstanje](https://github.com/mpkorstanje))
187+
([#986](https://github.com/cucumber/cucumber/pull/986) [mpkorstanje](https://github.com/mpkorstanje))
179188

180189
## [6.0.1] - 2020-04-15
181190
### Fixed
182-
- Fix Ruby release
183-
([#970](https://github.com/cucumber/cucumber/pull/970)
184-
[aslakhellesoy](https://github.com/aslakhellesoy))
191+
- Fix Ruby release ([#970](https://github.com/cucumber/cucumber/pull/970) [aslakhellesoy](https://github.com/aslakhellesoy))
185192

186193
## [6.0.0] - 2020-04-14
187194
### Changed
@@ -198,36 +205,29 @@ even if there were no errors.
198205

199206
## [4.3.0] - 2020-03-13
200207
### Added
201-
- Ruby implementation
202-
([#931](https://github.com/cucumber/cucumber/pull/931)
203-
[vincent-psarga](https://github.com/vincent-psarga))
208+
- Ruby implementation ([#931](https://github.com/cucumber/cucumber/pull/931) [vincent-psarga](https://github.com/vincent-psarga))
204209

205210
## [4.2.0] - 2020-03-10
206211
### Added
207212
- Java: New Java implementation
208-
([#922](https://github.com/cucumber/cucumber/pull/922)
209-
[mpkorstanje](https://github.com/mpkorstanje))
213+
([#922](https://github.com/cucumber/cucumber/pull/922) [mpkorstanje](https://github.com/mpkorstanje))
210214
- JavaScript: Add a mustache template in the JavaScript npm module that other implementations can use
211215
- JavaScript: Add `CucumberHtmlStream` (default export), allowing this module to be used as a library (in Cucumber.js)
212216

213217
### Changed
214218
- It's not _really_ needed. This does break SEO, but that's not a goal for Cucumber HTML reports.
215219
- Using both server side rendering and client side rendering results in conflicting versions of the react dom being used during development.
216-
([#923](https://github.com/cucumber/cucumber/pull/923)
217-
[aslakhellesoy](https://github.com/mpkorstanje))
220+
([#923](https://github.com/cucumber/cucumber/pull/923) [aslakhellesoy](https://github.com/mpkorstanje))
218221
- JavaScript: No server side rendering
219222
- JavaScript Use a custom mustache template engine that streams output. Ported from Java
220223

221224
### Fixed
222225
- [JavaScript] Lower memory footprint - messages are no longer buffered during HTML generation
223-
([#928](https://github.com/cucumber/cucumber/pull/928)
224-
[aslakhellesoy](https://github.com/aslakhellesoy))
226+
([#928](https://github.com/cucumber/cucumber/pull/928) [aslakhellesoy](https://github.com/aslakhellesoy))
225227

226228
## [4.1.0] - 2020-03-02
227229
### Added
228-
- Embed CSS in generated HTML
229-
([#911](https://github.com/cucumber/cucumber/pull/911)
230-
[aslakhellesoy](https://github.com/vincent-psarga))
230+
- Embed CSS in generated HTML ([#911](https://github.com/cucumber/cucumber/pull/911) [aslakhellesoy](https://github.com/vincent-psarga))
231231

232232
## [4.0.0] - 2020-02-15
233233
### Changed
@@ -290,19 +290,17 @@ even if there were no errors.
290290
### Added
291291
- First release
292292

293-
### Fixed
294-
295-
[Unreleased]: https://github.com/cucumber/html-formatter/compare/v20.4.0...main
296-
[20.4.0]: https://github.com/cucumber/html-formatter/compare/v20.3.1...main
297-
[20.3.1]: https://github.com/cucumber/html-formatter/compare/v20.3.0...main
298-
[20.3.0]: https://github.com/cucumber/html-formatter/compare/v20.2.1...main
299-
[20.2.1]: https://github.com/cucumber/html-formatter/compare/v20.2.0...main
300-
[20.2.0]: https://github.com/cucumber/html-formatter/compare/v20.1.0...main
301-
[20.1.0]: https://github.com/cucumber/html-formatter/compare/v20.0.0...main
302-
[20.0.0]: https://github.com/cucumber/html-formatter/compare/v19.2.0...main
303-
[19.2.0]: https://github.com/cucumber/html-formatter/compare/v19.1.0...main
304-
[19.1.0]: https://github.com/cucumber/html-formatter/compare/v19.0.0...main
305-
[19.0.0]: https://github.com/cucumber/html-formatter/compare/v18.0.0...main
293+
[Unreleased]: https://github.com/cucumber/html-formatter/compare/v20.4.0...HEAD
294+
[20.4.0]: https://github.com/cucumber/html-formatter/compare/v20.3.1...v20.4.0
295+
[20.3.1]: https://github.com/cucumber/html-formatter/compare/v20.3.0...v20.3.1
296+
[20.3.0]: https://github.com/cucumber/html-formatter/compare/v20.2.1...v20.3.0
297+
[20.2.1]: https://github.com/cucumber/html-formatter/compare/v20.2.0...v20.2.1
298+
[20.2.0]: https://github.com/cucumber/html-formatter/compare/v20.1.0...v20.2.0
299+
[20.1.0]: https://github.com/cucumber/html-formatter/compare/v20.0.0...v20.1.0
300+
[20.0.0]: https://github.com/cucumber/html-formatter/compare/v19.2.0...v20.0.0
301+
[19.2.0]: https://github.com/cucumber/html-formatter/compare/v19.1.0...v19.2.0
302+
[19.1.0]: https://github.com/cucumber/html-formatter/compare/v19.0.0...v19.1.0
303+
[19.0.0]: https://github.com/cucumber/html-formatter/compare/v18.0.0...v19.0.0
306304
[18.0.0]: https://github.com/cucumber/html-formatter/compare/v17.0.0...v18.0.0
307305
[17.0.0]: https://github.com/cucumber/html-formatter/compare/v16.0.1...v17.0.0
308306
[16.0.1]: https://github.com/cucumber/html-formatter/compare/v16.0.0...v16.0.1

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ Once you have Node.js installed, you can use:
2121

2222
make prepare
2323

24-
This will build the Javascript package and copy the required artifacts to the Java and Ruby packages.
24+
This will build the Javascript package and copy the required artifacts to the Java and Ruby packages.

ruby/.rubocop.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
inherit_from: .rubocop_todo.yml
2+
3+
require:
4+
- rubocop-rspec
5+
6+
AllCops:
7+
TargetRubyVersion: 2.6
8+
NewCops: enable
9+
Exclude:
10+
- 'vendor/**/*'
11+
12+
# Disabled on our repo's to enable polyglot-release
13+
Gemspec/RequireMFA:
14+
Enabled: false
15+
16+
Layout/LineLength:
17+
Max: 200
18+
19+
Style/Documentation:
20+
Enabled: false
21+
22+
Style/RegexpLiteral:
23+
EnforcedStyle: slashes
24+
AllowInnerSlashes: true
25+
26+
RSpec/MessageSpies:
27+
EnforcedStyle: receive

0 commit comments

Comments
 (0)