cucumber-core 13.0.2 → 13.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -1
- data/lib/cucumber/core/event.rb +5 -5
- data/lib/cucumber/core/event_bus.rb +1 -0
- data/lib/cucumber/core/events.rb +1 -1
- data/lib/cucumber/core/gherkin/document.rb +1 -1
- data/lib/cucumber/core/gherkin/writer/helpers.rb +1 -1
- data/lib/cucumber/core/gherkin/writer.rb +1 -1
- data/lib/cucumber/core/test/{action.rb → actions/action.rb} +1 -28
- data/lib/cucumber/core/test/actions/undefined_action.rb +31 -0
- data/lib/cucumber/core/test/actions/unskippable_action.rb +16 -0
- data/lib/cucumber/core/test/actions.rb +9 -0
- data/lib/cucumber/core/test/case.rb +1 -0
- data/lib/cucumber/core/test/doc_string.rb +2 -0
- data/lib/cucumber/core/test/location.rb +1 -1
- data/lib/cucumber/core/test/result.rb +6 -1
- data/lib/cucumber/core/test/step.rb +2 -1
- metadata +16 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b2b88e7441c1f14355f2126f50c6373dfd45cd21298d37533297efc44e62cfff
|
4
|
+
data.tar.gz: bf8cb6fbb013a074b6e65c846cfc76d42f259654639f999b7bd1a91f9bca02ef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 315e5ac87eb4c89f510ab9626aa3b6e2413ee459ba428ebd0d4be867e171d9600ef25aa9c941e9b34aca98f2375b292365d2d30f72e4a7225ff388180aa7a01a
|
7
|
+
data.tar.gz: d35ddfa0b15ffae9b824d3826b775f90eb9603f62c88b014ed2edc950226b4afd5fd4a05558922e5e43613dc7d3f686b5607e8d33ef11d20e083b75ba4185974
|
data/CHANGELOG.md
CHANGED
@@ -10,6 +10,10 @@ Please visit [cucumber/CONTRIBUTING.md](https://github.com/cucumber/cucumber/blo
|
|
10
10
|
|
11
11
|
## [Unreleased]
|
12
12
|
|
13
|
+
## [13.0.3] - 2024-07-24
|
14
|
+
### Changed
|
15
|
+
- Fixed up all remaining Layout auto-correct cops in the codebase
|
16
|
+
|
13
17
|
## [13.0.2] - 2024-03-21
|
14
18
|
### Changed
|
15
19
|
- Added CI testing for Ruby 3.3
|
@@ -60,7 +64,8 @@ See upgrading notes for [13.0.0.md](upgrading_notes/13.0.0.md#upgrading-to-1300)
|
|
60
64
|
### Changed
|
61
65
|
- Updated `cucumber-gherkin` and `cucumber-messages`
|
62
66
|
|
63
|
-
[Unreleased]: https://github.com/cucumber/cucumber-ruby-core/compare/v13.0.
|
67
|
+
[Unreleased]: https://github.com/cucumber/cucumber-ruby-core/compare/v13.0.3...HEAD
|
68
|
+
[13.0.3]: https://github.com/cucumber/cucumber-ruby-core/compare/v13.0.2...v13.0.3
|
64
69
|
[13.0.2]: https://github.com/cucumber/cucumber-ruby-core/compare/v13.0.1...v13.0.2
|
65
70
|
[13.0.1]: https://github.com/cucumber/cucumber-ruby-core/compare/v13.0.0...v13.0.1
|
66
71
|
[13.0.0]: https://github.com/cucumber/cucumber-ruby-core/compare/v12.0.0...v13.0.0
|
data/lib/cucumber/core/event.rb
CHANGED
@@ -48,11 +48,11 @@ module Cucumber
|
|
48
48
|
def underscore(string)
|
49
49
|
string
|
50
50
|
.to_s
|
51
|
-
.gsub('::', '/')
|
52
|
-
gsub(/([A-Z]+)([A-Z][a-z])/, '\1_\2')
|
53
|
-
gsub(/([a-z\d])([A-Z])/, '\1_\2')
|
54
|
-
tr('-', '_')
|
55
|
-
downcase
|
51
|
+
.gsub('::', '/')
|
52
|
+
.gsub(/([A-Z]+)([A-Z][a-z])/, '\1_\2')
|
53
|
+
.gsub(/([a-z\d])([A-Z])/, '\1_\2')
|
54
|
+
.tr('-', '_')
|
55
|
+
.downcase
|
56
56
|
end
|
57
57
|
end
|
58
58
|
end
|
@@ -29,6 +29,7 @@ module Cucumber
|
|
29
29
|
|
30
30
|
def broadcast(event)
|
31
31
|
raise ArgumentError, "Event type #{event.class} is not registered. Try one of these:\n#{event_types.values.join("\n")}" unless registered_type?(event.class)
|
32
|
+
|
32
33
|
handlers_for(event.class).each { |handler| handler.call(event) }
|
33
34
|
@event_queue << event
|
34
35
|
end
|
data/lib/cucumber/core/events.rb
CHANGED
@@ -40,7 +40,7 @@ module Cucumber
|
|
40
40
|
attr_reader :test_case
|
41
41
|
end
|
42
42
|
|
43
|
-
#
|
43
|
+
# Signals that a {Test::Step} is about to be executed
|
44
44
|
class TestStepStarted < Event.new(:test_step)
|
45
45
|
# @return [Test::Step] the test step to be executed
|
46
46
|
attr_reader :test_step
|
@@ -10,6 +10,7 @@ module Cucumber
|
|
10
10
|
class Action
|
11
11
|
def initialize(location = nil, &block)
|
12
12
|
raise ArgumentError, 'Passing a block to execute the action is mandatory.' unless block
|
13
|
+
|
13
14
|
@location = location || Test::Location.new(*block.source_location)
|
14
15
|
@block = block
|
15
16
|
@timer = Timer.new
|
@@ -51,34 +52,6 @@ module Cucumber
|
|
51
52
|
Result::Skipped.new
|
52
53
|
end
|
53
54
|
end
|
54
|
-
|
55
|
-
class UnskippableAction < Action
|
56
|
-
def skip(*args)
|
57
|
-
execute(*args)
|
58
|
-
end
|
59
|
-
end
|
60
|
-
|
61
|
-
class UndefinedAction
|
62
|
-
attr_reader :location
|
63
|
-
|
64
|
-
def initialize(source_location)
|
65
|
-
@location = source_location
|
66
|
-
end
|
67
|
-
|
68
|
-
def execute(*)
|
69
|
-
undefined
|
70
|
-
end
|
71
|
-
|
72
|
-
def skip(*)
|
73
|
-
undefined
|
74
|
-
end
|
75
|
-
|
76
|
-
private
|
77
|
-
|
78
|
-
def undefined
|
79
|
-
Result::Undefined.new
|
80
|
-
end
|
81
|
-
end
|
82
55
|
end
|
83
56
|
end
|
84
57
|
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'cucumber/core/test/result'
|
4
|
+
|
5
|
+
module Cucumber
|
6
|
+
module Core
|
7
|
+
module Test
|
8
|
+
class UndefinedAction
|
9
|
+
attr_reader :location
|
10
|
+
|
11
|
+
def initialize(source_location)
|
12
|
+
@location = source_location
|
13
|
+
end
|
14
|
+
|
15
|
+
def execute(*)
|
16
|
+
undefined
|
17
|
+
end
|
18
|
+
|
19
|
+
def skip(*)
|
20
|
+
undefined
|
21
|
+
end
|
22
|
+
|
23
|
+
private
|
24
|
+
|
25
|
+
def undefined
|
26
|
+
Result::Undefined.new
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'cucumber/core/test/result'
|
4
|
+
require 'cucumber/core/test/actions/action'
|
5
|
+
|
6
|
+
module Cucumber
|
7
|
+
module Core
|
8
|
+
module Test
|
9
|
+
class UnskippableAction < Action
|
10
|
+
def skip(*args)
|
11
|
+
execute(*args)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,9 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'cucumber/core/test/location'
|
4
|
+
require 'cucumber/core/test/result'
|
5
|
+
require 'cucumber/core/test/timer'
|
6
|
+
|
7
|
+
require 'cucumber/core/test/actions/action'
|
8
|
+
require 'cucumber/core/test/actions/undefined_action'
|
9
|
+
require 'cucumber/core/test/actions/unskippable_action'
|
@@ -11,6 +11,7 @@ module Cucumber
|
|
11
11
|
|
12
12
|
def initialize(id, name, test_steps, location, parent_locations, tags, language, around_hooks = [])
|
13
13
|
raise ArgumentError.new("test_steps should be an Array but is a #{test_steps.class}") unless test_steps.is_a?(Array)
|
14
|
+
|
14
15
|
@id = id
|
15
16
|
@name = name
|
16
17
|
@test_steps = test_steps
|
@@ -43,6 +43,7 @@ module Cucumber
|
|
43
43
|
|
44
44
|
def map
|
45
45
|
raise ArgumentError, 'No block given' unless block_given?
|
46
|
+
|
46
47
|
new_content = yield content
|
47
48
|
self.class.new(new_content, content_type)
|
48
49
|
end
|
@@ -62,6 +63,7 @@ module Cucumber
|
|
62
63
|
if other.respond_to?(:to_str)
|
63
64
|
return content == other.to_str
|
64
65
|
end
|
66
|
+
|
65
67
|
false
|
66
68
|
end
|
67
69
|
|
@@ -64,6 +64,7 @@ module Cucumber
|
|
64
64
|
|
65
65
|
def initialize(duration)
|
66
66
|
raise ArgumentError unless duration
|
67
|
+
|
67
68
|
@duration = duration
|
68
69
|
end
|
69
70
|
|
@@ -109,6 +110,7 @@ module Cucumber
|
|
109
110
|
def initialize(duration, exception)
|
110
111
|
raise ArgumentError unless duration
|
111
112
|
raise ArgumentError unless exception
|
113
|
+
|
112
114
|
@duration = duration
|
113
115
|
@exception = exception
|
114
116
|
end
|
@@ -186,6 +188,7 @@ module Cucumber
|
|
186
188
|
|
187
189
|
def with_appended_backtrace(step)
|
188
190
|
return self unless step.respond_to?(:backtrace_line)
|
191
|
+
|
189
192
|
set_backtrace([]) unless backtrace
|
190
193
|
backtrace << step.backtrace_line
|
191
194
|
self
|
@@ -193,6 +196,7 @@ module Cucumber
|
|
193
196
|
|
194
197
|
def with_filtered_backtrace(filter)
|
195
198
|
return self unless backtrace
|
199
|
+
|
196
200
|
filter.new(dup).exception
|
197
201
|
end
|
198
202
|
|
@@ -298,6 +302,7 @@ module Cucumber
|
|
298
302
|
else
|
299
303
|
return false unless settings.key?(type)
|
300
304
|
return false unless set?(type)
|
305
|
+
|
301
306
|
settings[type]
|
302
307
|
end
|
303
308
|
end
|
@@ -377,7 +382,7 @@ module Cucumber
|
|
377
382
|
if for_status
|
378
383
|
@totals.fetch(for_status, 0)
|
379
384
|
else
|
380
|
-
@totals.values.reduce(0) { |total,count| total + count }
|
385
|
+
@totals.values.reduce(0) { |total, count| total + count }
|
381
386
|
end
|
382
387
|
end
|
383
388
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'cucumber/core/test/result'
|
4
|
-
require 'cucumber/core/test/
|
4
|
+
require 'cucumber/core/test/actions'
|
5
5
|
require 'cucumber/core/test/empty_multiline_argument'
|
6
6
|
|
7
7
|
module Cucumber
|
@@ -12,6 +12,7 @@ module Cucumber
|
|
12
12
|
|
13
13
|
def initialize(id, text, location, multiline_arg = Test::EmptyMultilineArgument.new, action = Test::UndefinedAction.new(location))
|
14
14
|
raise ArgumentError if text.nil? || text.empty?
|
15
|
+
|
15
16
|
@id = id
|
16
17
|
@text = text
|
17
18
|
@location = location
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cucumber-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 13.0.
|
4
|
+
version: 13.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aslak Hellesøy
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date: 2024-
|
15
|
+
date: 2024-07-24 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: cucumber-gherkin
|
@@ -117,47 +117,47 @@ dependencies:
|
|
117
117
|
- !ruby/object:Gem::Version
|
118
118
|
version: 1.28.2
|
119
119
|
- !ruby/object:Gem::Dependency
|
120
|
-
name: rubocop-
|
120
|
+
name: rubocop-packaging
|
121
121
|
requirement: !ruby/object:Gem::Requirement
|
122
122
|
requirements:
|
123
123
|
- - "~>"
|
124
124
|
- !ruby/object:Gem::Version
|
125
|
-
version: 0.
|
125
|
+
version: 0.5.1
|
126
126
|
type: :development
|
127
127
|
prerelease: false
|
128
128
|
version_requirements: !ruby/object:Gem::Requirement
|
129
129
|
requirements:
|
130
130
|
- - "~>"
|
131
131
|
- !ruby/object:Gem::Version
|
132
|
-
version: 0.
|
132
|
+
version: 0.5.1
|
133
133
|
- !ruby/object:Gem::Dependency
|
134
|
-
name: rubocop-
|
134
|
+
name: rubocop-rake
|
135
135
|
requirement: !ruby/object:Gem::Requirement
|
136
136
|
requirements:
|
137
137
|
- - "~>"
|
138
138
|
- !ruby/object:Gem::Version
|
139
|
-
version:
|
139
|
+
version: 0.6.0
|
140
140
|
type: :development
|
141
141
|
prerelease: false
|
142
142
|
version_requirements: !ruby/object:Gem::Requirement
|
143
143
|
requirements:
|
144
144
|
- - "~>"
|
145
145
|
- !ruby/object:Gem::Version
|
146
|
-
version:
|
146
|
+
version: 0.6.0
|
147
147
|
- !ruby/object:Gem::Dependency
|
148
|
-
name: rubocop-
|
148
|
+
name: rubocop-rspec
|
149
149
|
requirement: !ruby/object:Gem::Requirement
|
150
150
|
requirements:
|
151
151
|
- - "~>"
|
152
152
|
- !ruby/object:Gem::Version
|
153
|
-
version:
|
153
|
+
version: 2.10.0
|
154
154
|
type: :development
|
155
155
|
prerelease: false
|
156
156
|
version_requirements: !ruby/object:Gem::Requirement
|
157
157
|
requirements:
|
158
158
|
- - "~>"
|
159
159
|
- !ruby/object:Gem::Version
|
160
|
-
version:
|
160
|
+
version: 2.10.0
|
161
161
|
description: Core library for the Cucumber BDD app
|
162
162
|
email: cukes@googlegroups.com
|
163
163
|
executables: []
|
@@ -179,7 +179,10 @@ files:
|
|
179
179
|
- lib/cucumber/core/gherkin/writer/helpers.rb
|
180
180
|
- lib/cucumber/core/platform.rb
|
181
181
|
- lib/cucumber/core/report/summary.rb
|
182
|
-
- lib/cucumber/core/test/
|
182
|
+
- lib/cucumber/core/test/actions.rb
|
183
|
+
- lib/cucumber/core/test/actions/action.rb
|
184
|
+
- lib/cucumber/core/test/actions/undefined_action.rb
|
185
|
+
- lib/cucumber/core/test/actions/unskippable_action.rb
|
183
186
|
- lib/cucumber/core/test/around_hook.rb
|
184
187
|
- lib/cucumber/core/test/case.rb
|
185
188
|
- lib/cucumber/core/test/data_table.rb
|
@@ -225,5 +228,5 @@ requirements: []
|
|
225
228
|
rubygems_version: 3.3.5
|
226
229
|
signing_key:
|
227
230
|
specification_version: 4
|
228
|
-
summary: cucumber-core-13.0.
|
231
|
+
summary: cucumber-core-13.0.3
|
229
232
|
test_files: []
|