cucumber-core 3.0.0 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/cucumber/core/version.rb +1 -1
- metadata +19 -85
- data/.coveralls.yml +0 -1
- data/.github/ISSUE_TEMPLATE.md +0 -48
- data/.github/PULL_REQUEST_TEMPLATE.md +0 -39
- data/.rspec +0 -1
- data/.ruby-gemset +0 -1
- data/.travis.yml +0 -30
- data/.yardopts +0 -6
- data/Gemfile +0 -2
- data/Rakefile +0 -28
- data/cucumber-core.gemspec +0 -36
- data/spec/capture_warnings.rb +0 -74
- data/spec/coverage.rb +0 -11
- data/spec/cucumber/core/ast/background_spec.rb +0 -11
- data/spec/cucumber/core/ast/data_table_spec.rb +0 -81
- data/spec/cucumber/core/ast/doc_string_spec.rb +0 -114
- data/spec/cucumber/core/ast/empty_multiline_argument_spec.rb +0 -28
- data/spec/cucumber/core/ast/examples_table_spec.rb +0 -113
- data/spec/cucumber/core/ast/location_spec.rb +0 -199
- data/spec/cucumber/core/ast/outline_step_spec.rb +0 -93
- data/spec/cucumber/core/ast/step_spec.rb +0 -174
- data/spec/cucumber/core/compiler_spec.rb +0 -267
- data/spec/cucumber/core/event_bus_spec.rb +0 -163
- data/spec/cucumber/core/event_spec.rb +0 -40
- data/spec/cucumber/core/filter_spec.rb +0 -101
- data/spec/cucumber/core/gherkin/parser_spec.rb +0 -261
- data/spec/cucumber/core/gherkin/writer_spec.rb +0 -333
- data/spec/cucumber/core/report/summary_spec.rb +0 -175
- data/spec/cucumber/core/test/action_spec.rb +0 -154
- data/spec/cucumber/core/test/case_spec.rb +0 -316
- data/spec/cucumber/core/test/duration_matcher.rb +0 -20
- data/spec/cucumber/core/test/filters/locations_filter_spec.rb +0 -405
- data/spec/cucumber/core/test/result_spec.rb +0 -474
- data/spec/cucumber/core/test/runner_spec.rb +0 -310
- data/spec/cucumber/core/test/step_spec.rb +0 -98
- data/spec/cucumber/core/test/timer_spec.rb +0 -25
- data/spec/cucumber/core_spec.rb +0 -262
- data/spec/readme_spec.rb +0 -37
- data/spec/report_api_spy.rb +0 -25
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 47cd08b6e3d6df7ffef0782538481a560b3434c8
|
4
|
+
data.tar.gz: a8a4cf61a292b873b9b1eb53ae4058458afeb0e3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6bf8cf9e11baa952d2daf7cc70a483c8472f4acb6a73b38c7578ec68d1e49bf130a7fb31ca0e775624152a630c3a900df7c677d07ef4933c2eceef264da50dac
|
7
|
+
data.tar.gz: ba2a915a99d6991cc982757dc331340ed3f3938c77514732dfb3d95955ed3747f1ecfa19b0a8bd330f473b53e379dc0792cf531f86bfa3ef80eb471936e2cf4c
|
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: 3.
|
4
|
+
version: 3.1.0
|
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: 2017-
|
15
|
+
date: 2017-11-28 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: gherkin
|
@@ -20,28 +20,28 @@ dependencies:
|
|
20
20
|
requirements:
|
21
21
|
- - ">="
|
22
22
|
- !ruby/object:Gem::Version
|
23
|
-
version:
|
23
|
+
version: 5.0.0
|
24
24
|
type: :runtime
|
25
25
|
prerelease: false
|
26
26
|
version_requirements: !ruby/object:Gem::Requirement
|
27
27
|
requirements:
|
28
28
|
- - ">="
|
29
29
|
- !ruby/object:Gem::Version
|
30
|
-
version:
|
30
|
+
version: 5.0.0
|
31
31
|
- !ruby/object:Gem::Dependency
|
32
32
|
name: cucumber-tag_expressions
|
33
33
|
requirement: !ruby/object:Gem::Requirement
|
34
34
|
requirements:
|
35
|
-
- - "
|
35
|
+
- - "~>"
|
36
36
|
- !ruby/object:Gem::Version
|
37
|
-
version: 1.0
|
37
|
+
version: 1.1.0
|
38
38
|
type: :runtime
|
39
39
|
prerelease: false
|
40
40
|
version_requirements: !ruby/object:Gem::Requirement
|
41
41
|
requirements:
|
42
|
-
- - "
|
42
|
+
- - "~>"
|
43
43
|
- !ruby/object:Gem::Version
|
44
|
-
version: 1.0
|
44
|
+
version: 1.1.0
|
45
45
|
- !ruby/object:Gem::Dependency
|
46
46
|
name: backports
|
47
47
|
requirement: !ruby/object:Gem::Requirement
|
@@ -60,16 +60,16 @@ dependencies:
|
|
60
60
|
name: bundler
|
61
61
|
requirement: !ruby/object:Gem::Requirement
|
62
62
|
requirements:
|
63
|
-
- - "
|
63
|
+
- - "~>"
|
64
64
|
- !ruby/object:Gem::Version
|
65
|
-
version: 1.
|
65
|
+
version: 1.16.0
|
66
66
|
type: :development
|
67
67
|
prerelease: false
|
68
68
|
version_requirements: !ruby/object:Gem::Requirement
|
69
69
|
requirements:
|
70
|
-
- - "
|
70
|
+
- - "~>"
|
71
71
|
- !ruby/object:Gem::Version
|
72
|
-
version: 1.
|
72
|
+
version: 1.16.0
|
73
73
|
- !ruby/object:Gem::Dependency
|
74
74
|
name: rake
|
75
75
|
requirement: !ruby/object:Gem::Requirement
|
@@ -90,14 +90,14 @@ dependencies:
|
|
90
90
|
requirements:
|
91
91
|
- - "~>"
|
92
92
|
- !ruby/object:Gem::Version
|
93
|
-
version: '3'
|
93
|
+
version: '3.6'
|
94
94
|
type: :development
|
95
95
|
prerelease: false
|
96
96
|
version_requirements: !ruby/object:Gem::Requirement
|
97
97
|
requirements:
|
98
98
|
- - "~>"
|
99
99
|
- !ruby/object:Gem::Version
|
100
|
-
version: '3'
|
100
|
+
version: '3.6'
|
101
101
|
- !ruby/object:Gem::Dependency
|
102
102
|
name: unindent
|
103
103
|
requirement: !ruby/object:Gem::Requirement
|
@@ -160,20 +160,10 @@ executables: []
|
|
160
160
|
extensions: []
|
161
161
|
extra_rdoc_files: []
|
162
162
|
files:
|
163
|
-
- ".coveralls.yml"
|
164
|
-
- ".github/ISSUE_TEMPLATE.md"
|
165
|
-
- ".github/PULL_REQUEST_TEMPLATE.md"
|
166
|
-
- ".rspec"
|
167
|
-
- ".ruby-gemset"
|
168
|
-
- ".travis.yml"
|
169
|
-
- ".yardopts"
|
170
163
|
- CHANGELOG.md
|
171
164
|
- CONTRIBUTING.md
|
172
|
-
- Gemfile
|
173
165
|
- LICENSE
|
174
166
|
- README.md
|
175
|
-
- Rakefile
|
176
|
-
- cucumber-core.gemspec
|
177
167
|
- lib/cucumber/core.rb
|
178
168
|
- lib/cucumber/core/ast.rb
|
179
169
|
- lib/cucumber/core/ast/background.rb
|
@@ -218,35 +208,7 @@ files:
|
|
218
208
|
- lib/cucumber/core/test/step.rb
|
219
209
|
- lib/cucumber/core/test/timer.rb
|
220
210
|
- lib/cucumber/core/version.rb
|
221
|
-
|
222
|
-
- spec/coverage.rb
|
223
|
-
- spec/cucumber/core/ast/background_spec.rb
|
224
|
-
- spec/cucumber/core/ast/data_table_spec.rb
|
225
|
-
- spec/cucumber/core/ast/doc_string_spec.rb
|
226
|
-
- spec/cucumber/core/ast/empty_multiline_argument_spec.rb
|
227
|
-
- spec/cucumber/core/ast/examples_table_spec.rb
|
228
|
-
- spec/cucumber/core/ast/location_spec.rb
|
229
|
-
- spec/cucumber/core/ast/outline_step_spec.rb
|
230
|
-
- spec/cucumber/core/ast/step_spec.rb
|
231
|
-
- spec/cucumber/core/compiler_spec.rb
|
232
|
-
- spec/cucumber/core/event_bus_spec.rb
|
233
|
-
- spec/cucumber/core/event_spec.rb
|
234
|
-
- spec/cucumber/core/filter_spec.rb
|
235
|
-
- spec/cucumber/core/gherkin/parser_spec.rb
|
236
|
-
- spec/cucumber/core/gherkin/writer_spec.rb
|
237
|
-
- spec/cucumber/core/report/summary_spec.rb
|
238
|
-
- spec/cucumber/core/test/action_spec.rb
|
239
|
-
- spec/cucumber/core/test/case_spec.rb
|
240
|
-
- spec/cucumber/core/test/duration_matcher.rb
|
241
|
-
- spec/cucumber/core/test/filters/locations_filter_spec.rb
|
242
|
-
- spec/cucumber/core/test/result_spec.rb
|
243
|
-
- spec/cucumber/core/test/runner_spec.rb
|
244
|
-
- spec/cucumber/core/test/step_spec.rb
|
245
|
-
- spec/cucumber/core/test/timer_spec.rb
|
246
|
-
- spec/cucumber/core_spec.rb
|
247
|
-
- spec/readme_spec.rb
|
248
|
-
- spec/report_api_spy.rb
|
249
|
-
homepage: http://cukes.info
|
211
|
+
homepage: https://cucumber.io
|
250
212
|
licenses:
|
251
213
|
- MIT
|
252
214
|
metadata: {}
|
@@ -259,7 +221,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
259
221
|
requirements:
|
260
222
|
- - ">="
|
261
223
|
- !ruby/object:Gem::Version
|
262
|
-
version: 1
|
224
|
+
version: '2.1'
|
263
225
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
264
226
|
requirements:
|
265
227
|
- - ">="
|
@@ -267,36 +229,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
267
229
|
version: '0'
|
268
230
|
requirements: []
|
269
231
|
rubyforge_project:
|
270
|
-
rubygems_version: 2.
|
232
|
+
rubygems_version: 2.6.8
|
271
233
|
signing_key:
|
272
234
|
specification_version: 4
|
273
|
-
summary: cucumber-core-3.
|
274
|
-
test_files:
|
275
|
-
- spec/capture_warnings.rb
|
276
|
-
- spec/coverage.rb
|
277
|
-
- spec/cucumber/core/ast/background_spec.rb
|
278
|
-
- spec/cucumber/core/ast/data_table_spec.rb
|
279
|
-
- spec/cucumber/core/ast/doc_string_spec.rb
|
280
|
-
- spec/cucumber/core/ast/empty_multiline_argument_spec.rb
|
281
|
-
- spec/cucumber/core/ast/examples_table_spec.rb
|
282
|
-
- spec/cucumber/core/ast/location_spec.rb
|
283
|
-
- spec/cucumber/core/ast/outline_step_spec.rb
|
284
|
-
- spec/cucumber/core/ast/step_spec.rb
|
285
|
-
- spec/cucumber/core/compiler_spec.rb
|
286
|
-
- spec/cucumber/core/event_bus_spec.rb
|
287
|
-
- spec/cucumber/core/event_spec.rb
|
288
|
-
- spec/cucumber/core/filter_spec.rb
|
289
|
-
- spec/cucumber/core/gherkin/parser_spec.rb
|
290
|
-
- spec/cucumber/core/gherkin/writer_spec.rb
|
291
|
-
- spec/cucumber/core/report/summary_spec.rb
|
292
|
-
- spec/cucumber/core/test/action_spec.rb
|
293
|
-
- spec/cucumber/core/test/case_spec.rb
|
294
|
-
- spec/cucumber/core/test/duration_matcher.rb
|
295
|
-
- spec/cucumber/core/test/filters/locations_filter_spec.rb
|
296
|
-
- spec/cucumber/core/test/result_spec.rb
|
297
|
-
- spec/cucumber/core/test/runner_spec.rb
|
298
|
-
- spec/cucumber/core/test/step_spec.rb
|
299
|
-
- spec/cucumber/core/test/timer_spec.rb
|
300
|
-
- spec/cucumber/core_spec.rb
|
301
|
-
- spec/readme_spec.rb
|
302
|
-
- spec/report_api_spy.rb
|
235
|
+
summary: cucumber-core-3.1.0
|
236
|
+
test_files: []
|
data/.coveralls.yml
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
service_name: travis-ci
|
data/.github/ISSUE_TEMPLATE.md
DELETED
@@ -1,48 +0,0 @@
|
|
1
|
-
<!-- These sections are meant as guidance for you, to help you give the kind of information we'll need to help with your issue. If a section doesn't seem to fit, just skip it.
|
2
|
-
|
3
|
-
In general: Please provide as much information as you can to help us solving your problem -->
|
4
|
-
|
5
|
-
## Summary
|
6
|
-
|
7
|
-
<!--- Provide a general summary description of the issue -->
|
8
|
-
|
9
|
-
## Expected Behavior
|
10
|
-
|
11
|
-
<!--- If you're describing a bug, tell us what should happen -->
|
12
|
-
<!--- If you're suggesting a change/improvement, tell us how it should work -->
|
13
|
-
<!--- Feel free to use Given / Then / Then if that helps, but please add some plain-language context too -->
|
14
|
-
|
15
|
-
## Current Behavior
|
16
|
-
|
17
|
-
<!--- If describing a bug, tell us what happens instead of the expected behavior -->
|
18
|
-
<!--- If suggesting a change/improvement, explain the difference from current behavior -->
|
19
|
-
|
20
|
-
<!--- If you have got some output place it in the code block below. Otherwise remove it. -->
|
21
|
-
~~~
|
22
|
-
~~~
|
23
|
-
|
24
|
-
## Possible Solution
|
25
|
-
|
26
|
-
<!--- Not obligatory, but suggest a fix/reason for the bug, -->
|
27
|
-
<!--- or ideas how to implement the addition or change -->
|
28
|
-
|
29
|
-
## Steps to Reproduce (for bugs)
|
30
|
-
|
31
|
-
<!--- Provide a link to a live example, or an unambiguous set of steps to -->
|
32
|
-
<!--- reproduce this bug. Include code to reproduce, if relevant -->
|
33
|
-
1.
|
34
|
-
2.
|
35
|
-
3.
|
36
|
-
4.
|
37
|
-
|
38
|
-
## Context & Motivation
|
39
|
-
|
40
|
-
<!--- How has this issue affected you? What are you trying to accomplish? -->
|
41
|
-
<!--- Providing context helps us come up with a solution that is most useful in the real world -->
|
42
|
-
|
43
|
-
## Your Environment
|
44
|
-
|
45
|
-
<!--- If you're reporting a bug, include as many relevant details about the environment you experienced the bug in -->
|
46
|
-
* Version used:
|
47
|
-
* Operating System and version:
|
48
|
-
* Link to your project:
|
@@ -1,39 +0,0 @@
|
|
1
|
-
<!-- These sections are meant as guidance for you. If something doesn't fit, you can just skip it. -->
|
2
|
-
|
3
|
-
## Summary
|
4
|
-
|
5
|
-
<!--- Provide a general summary description of your changes -->
|
6
|
-
|
7
|
-
## Details
|
8
|
-
|
9
|
-
<!--- Describe your changes in detail -->
|
10
|
-
|
11
|
-
## Motivation and Context
|
12
|
-
|
13
|
-
<!--- Why is this change required? What problem does it solve? -->
|
14
|
-
<!--- If it fixes an open issue, please link to the issue here. -->
|
15
|
-
|
16
|
-
## How Has This Been Tested?
|
17
|
-
|
18
|
-
<!--- Please add tests for changes to the code, otherwise we probably won't merge it -->
|
19
|
-
|
20
|
-
<!--- Please describe in detail how you tested your changes. -->
|
21
|
-
<!--- Include details of your testing environment, tests ran to see how -->
|
22
|
-
<!--- your change affects other areas of the code, etc. -->
|
23
|
-
|
24
|
-
## Screenshots (if appropriate):
|
25
|
-
|
26
|
-
## Types of changes
|
27
|
-
|
28
|
-
<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
|
29
|
-
- [ ] Bug fix (non-breaking change which fixes an issue)
|
30
|
-
- [ ] New feature (non-breaking change which adds functionality)
|
31
|
-
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
|
32
|
-
|
33
|
-
## Checklist:
|
34
|
-
|
35
|
-
<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
|
36
|
-
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
|
37
|
-
- [ ] I've added tests for my code
|
38
|
-
- [ ] My change requires a change to the documentation.
|
39
|
-
- [ ] I have updated the documentation accordingly.
|
data/.rspec
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
--color --tag ~slow
|
data/.ruby-gemset
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
cucumber
|
data/.travis.yml
DELETED
@@ -1,30 +0,0 @@
|
|
1
|
-
language: ruby
|
2
|
-
sudo: false
|
3
|
-
|
4
|
-
matrix:
|
5
|
-
include:
|
6
|
-
- rvm: ruby-head
|
7
|
-
- rvm: 2.4.1
|
8
|
-
- rvm: 2.3.4
|
9
|
-
- rvm: 2.2
|
10
|
-
- rvm: 2.1
|
11
|
-
- rvm: 2.0.0
|
12
|
-
- rvm: jruby-9.1.13.0
|
13
|
-
env:
|
14
|
-
- JRUBY_OPTS="--debug"
|
15
|
-
- LC_ALL=en_US.UTF-8
|
16
|
-
- LANG=en_US.UTF-8
|
17
|
-
- LANGUAGE=en_US.UTF-8
|
18
|
-
allow_failures:
|
19
|
-
- rvm: ruby-head
|
20
|
-
fast_finish: true
|
21
|
-
|
22
|
-
# whitelist
|
23
|
-
branches:
|
24
|
-
only:
|
25
|
-
- master
|
26
|
-
|
27
|
-
notifications:
|
28
|
-
webhooks:
|
29
|
-
urls: # gitter
|
30
|
-
- https://webhooks.gitter.im/e/dc010332f9d40fcc21c4
|
data/.yardopts
DELETED
data/Gemfile
DELETED
data/Rakefile
DELETED
@@ -1,28 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
require 'rubygems'
|
3
|
-
require 'bundler'
|
4
|
-
Bundler::GemHelper.install_tasks
|
5
|
-
|
6
|
-
$:.unshift File.expand_path("../lib", __FILE__)
|
7
|
-
|
8
|
-
require "rspec/core/rake_task"
|
9
|
-
RSpec::Core::RakeTask.new(:spec) do |t|
|
10
|
-
t.ruby_opts = %w[-r./spec/coverage -w]
|
11
|
-
end
|
12
|
-
|
13
|
-
require_relative 'spec/capture_warnings'
|
14
|
-
include CaptureWarnings
|
15
|
-
namespace :spec do
|
16
|
-
task :warnings do
|
17
|
-
report_warnings do
|
18
|
-
Rake::Task['spec'].invoke
|
19
|
-
end
|
20
|
-
end
|
21
|
-
|
22
|
-
desc "run (slow) performance tests"
|
23
|
-
RSpec::Core::RakeTask.new(:slow) do |t|
|
24
|
-
t.rspec_opts = %w[--tag slow]
|
25
|
-
end
|
26
|
-
end
|
27
|
-
|
28
|
-
task default: ['spec:warnings', 'spec:slow']
|
data/cucumber-core.gemspec
DELETED
@@ -1,36 +0,0 @@
|
|
1
|
-
# -*- encoding: utf-8 -*-
|
2
|
-
$LOAD_PATH.unshift File.expand_path("../lib", __FILE__)
|
3
|
-
require "cucumber/core/version"
|
4
|
-
|
5
|
-
Gem::Specification.new do |s|
|
6
|
-
s.name = 'cucumber-core'
|
7
|
-
s.version = Cucumber::Core::Version
|
8
|
-
s.authors = ["Aslak Hellesøy", "Matt Wynne", "Steve Tooke", "Oleg Sukhodolsky", "Tom Brand"]
|
9
|
-
s.description = 'Core library for the Cucumber BDD app'
|
10
|
-
s.summary = "cucumber-core-#{s.version}"
|
11
|
-
s.email = 'cukes@googlegroups.com'
|
12
|
-
s.homepage = "http://cukes.info"
|
13
|
-
s.platform = Gem::Platform::RUBY
|
14
|
-
s.license = "MIT"
|
15
|
-
s.required_ruby_version = ">= 1.9.3"
|
16
|
-
|
17
|
-
s.add_dependency 'gherkin', '>= 4.1.3'
|
18
|
-
s.add_dependency 'cucumber-tag_expressions', '>= 1.0.1'
|
19
|
-
s.add_dependency 'backports', '>= 3.8.0'
|
20
|
-
|
21
|
-
s.add_development_dependency 'bundler', '>= 1.3.5'
|
22
|
-
s.add_development_dependency 'rake', '>= 0.9.2'
|
23
|
-
s.add_development_dependency 'rspec', '~> 3'
|
24
|
-
s.add_development_dependency 'unindent', '>= 1.0'
|
25
|
-
s.add_development_dependency 'kramdown', '~> 1.4.2'
|
26
|
-
s.add_development_dependency 'yard'
|
27
|
-
|
28
|
-
# For coverage reports
|
29
|
-
s.add_development_dependency 'coveralls', '~> 0.7'
|
30
|
-
|
31
|
-
s.rubygems_version = ">= 1.6.1"
|
32
|
-
s.files = `git ls-files`.split("\n").reject {|path| path =~ /\.gitignore$/ }
|
33
|
-
s.test_files = `git ls-files -- spec/*`.split("\n")
|
34
|
-
s.rdoc_options = ["--charset=UTF-8"]
|
35
|
-
s.require_path = "lib"
|
36
|
-
end
|
data/spec/capture_warnings.rb
DELETED
@@ -1,74 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
# With thanks to @myronmarston
|
3
|
-
# https://github.com/vcr/vcr/blob/master/spec/capture_warnings.rb
|
4
|
-
|
5
|
-
module CaptureWarnings
|
6
|
-
def report_warnings(&block)
|
7
|
-
current_dir = Dir.pwd
|
8
|
-
warnings, errors = capture_error(&block).partition { |line| line.include?('warning') }
|
9
|
-
project_warnings, other_warnings = warnings.uniq.partition { |line| line.include?(current_dir) }
|
10
|
-
|
11
|
-
if errors.any?
|
12
|
-
puts errors.join("\n")
|
13
|
-
end
|
14
|
-
|
15
|
-
if other_warnings.any?
|
16
|
-
puts "#{ other_warnings.count } non-cucumber-core warnings detected, set VIEW_OTHER_WARNINGS=true to see them."
|
17
|
-
print_warnings('other', other_warnings) if ENV['VIEW_OTHER_WARNINGS']
|
18
|
-
end
|
19
|
-
|
20
|
-
# Until they fix https://bugs.ruby-lang.org/issues/10661
|
21
|
-
if RUBY_VERSION == "2.2.0"
|
22
|
-
project_warnings = project_warnings.reject { |w| w =~ /warning: possible reference to past scope/ }
|
23
|
-
end
|
24
|
-
|
25
|
-
if project_warnings.any?
|
26
|
-
puts "#{ project_warnings.count } cucumber-core warnings detected"
|
27
|
-
print_warnings('cucumber-core', project_warnings)
|
28
|
-
fail "Please remove all cucumber-core warnings."
|
29
|
-
end
|
30
|
-
|
31
|
-
ensure_system_exit_if_required
|
32
|
-
end
|
33
|
-
|
34
|
-
def capture_error(&block)
|
35
|
-
old_stderr = STDERR.clone
|
36
|
-
pipe_r, pipe_w = IO.pipe
|
37
|
-
pipe_r.sync = true
|
38
|
-
error = String.new
|
39
|
-
reader = Thread.new do
|
40
|
-
begin
|
41
|
-
loop do
|
42
|
-
error << pipe_r.readpartial(1024)
|
43
|
-
end
|
44
|
-
rescue EOFError
|
45
|
-
end
|
46
|
-
end
|
47
|
-
STDERR.reopen(pipe_w)
|
48
|
-
block.call
|
49
|
-
ensure
|
50
|
-
capture_system_exit
|
51
|
-
STDERR.reopen(old_stderr)
|
52
|
-
pipe_w.close
|
53
|
-
reader.join
|
54
|
-
return error.split("\n")
|
55
|
-
end
|
56
|
-
|
57
|
-
def print_warnings(type, warnings)
|
58
|
-
puts
|
59
|
-
puts "-" * 30 + " #{type} warnings: " + "-" * 30
|
60
|
-
puts
|
61
|
-
puts warnings.join("\n")
|
62
|
-
puts
|
63
|
-
puts "-" * 75
|
64
|
-
puts
|
65
|
-
end
|
66
|
-
|
67
|
-
def ensure_system_exit_if_required
|
68
|
-
raise @system_exit if @system_exit
|
69
|
-
end
|
70
|
-
|
71
|
-
def capture_system_exit
|
72
|
-
@system_exit = $!
|
73
|
-
end
|
74
|
-
end
|