rspec-core 3.9.3 → 3.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/Changelog.md +10 -0
- data/lib/rspec/core/configuration.rb +6 -0
- data/lib/rspec/core/drb.rb +7 -0
- data/lib/rspec/core/formatters/exception_presenter.rb +7 -5
- data/lib/rspec/core/invocations.rb +1 -1
- data/lib/rspec/core/option_parser.rb +5 -0
- data/lib/rspec/core/runner.rb +12 -4
- data/lib/rspec/core/version.rb +1 -1
- metadata +6 -6
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0117b5c68702f84872a6b528a286040ebad81a5201912cf75add518b16391fd8
|
4
|
+
data.tar.gz: 6a744e765c464099b304f42223079af2133ee5e278ffa3f3f3c5118f0ccdae54
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d659433a8e529d32ef874d0e6c6d100a5482f1dbb1bcc00a65daccbdfd23fd16307f6938b01fada58609ea828f7215992574dd7fda7f1c2873763f9abbf77574
|
7
|
+
data.tar.gz: bdec2aae3e9a5a0c34ccba2bb97a3f4480fa8400f605bb0625b609ebb90a3abf77bfcdbe247f0137d00a2d69f26c3e9ee1565a7a653afe3d14376b3eb97f6ac4
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/Changelog.md
CHANGED
@@ -1,3 +1,13 @@
|
|
1
|
+
### 3.10.0 / 2020-10-30
|
2
|
+
[Full Changelog](http://github.com/rspec/rspec-core/compare/v3.9.3...v3.10.0)
|
3
|
+
|
4
|
+
Enhancements:
|
5
|
+
|
6
|
+
* Memoize `RSpec::Core::Formatters::ExceptionPresenter#exception_lines` to improve performance
|
7
|
+
with slow exception messages. (Maxime Lapointe, #2743)
|
8
|
+
* Add configuration for an error exit code (to disambiguate errored builds from failed builds
|
9
|
+
by exit status). (Dana Sherson, #2749)
|
10
|
+
|
1
11
|
# 3.9.3 / 2020-09-30
|
2
12
|
[Full Changelog](http://github.com/rspec/rspec-core/compare/v3.9.2...v3.9.3)
|
3
13
|
|
@@ -242,6 +242,11 @@ module RSpec
|
|
242
242
|
# @return [Integer]
|
243
243
|
add_setting :failure_exit_code
|
244
244
|
|
245
|
+
# @macro add_setting
|
246
|
+
# The exit code to return if there are any errors outside examples (default: failure_exit_code)
|
247
|
+
# @return [Integer]
|
248
|
+
add_setting :error_exit_code
|
249
|
+
|
245
250
|
# @macro add_setting
|
246
251
|
# Whether or not to fail when there are no RSpec examples (default: false).
|
247
252
|
# @return [Boolean]
|
@@ -523,6 +528,7 @@ module RSpec
|
|
523
528
|
@pattern = '**{,/*/**}/*_spec.rb'
|
524
529
|
@exclude_pattern = ''
|
525
530
|
@failure_exit_code = 1
|
531
|
+
@error_exit_code = nil # so it can be overridden by failure exit code
|
526
532
|
@fail_if_no_examples = false
|
527
533
|
@spec_files_loaded = false
|
528
534
|
|
data/lib/rspec/core/drb.rb
CHANGED
@@ -51,6 +51,7 @@ module RSpec
|
|
51
51
|
argv << "--order" << @submitted_options[:order] if @submitted_options[:order]
|
52
52
|
|
53
53
|
add_failure_exit_code(argv)
|
54
|
+
add_error_exit_code(argv)
|
54
55
|
add_full_description(argv)
|
55
56
|
add_filter(argv, :inclusion, @filter_manager.inclusions)
|
56
57
|
add_filter(argv, :exclusion, @filter_manager.exclusions)
|
@@ -67,6 +68,12 @@ module RSpec
|
|
67
68
|
argv << "--failure-exit-code" << @submitted_options[:failure_exit_code].to_s
|
68
69
|
end
|
69
70
|
|
71
|
+
def add_error_exit_code(argv)
|
72
|
+
return unless @submitted_options[:error_exit_code]
|
73
|
+
|
74
|
+
argv << "--error-exit-code" << @submitted_options[:error_exit_code].to_s
|
75
|
+
end
|
76
|
+
|
70
77
|
def add_full_description(argv)
|
71
78
|
return unless @submitted_options[:full_description]
|
72
79
|
|
@@ -183,12 +183,14 @@ module RSpec
|
|
183
183
|
# rubocop:enable Lint/RescueException
|
184
184
|
|
185
185
|
def exception_lines
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
186
|
+
@exception_lines ||= begin
|
187
|
+
lines = []
|
188
|
+
lines << "#{exception_class_name}:" unless exception_class_name =~ /RSpec/
|
189
|
+
encoded_string(exception_message_string(exception)).split("\n").each do |line|
|
190
|
+
lines << (line.empty? ? line : " #{line}")
|
191
|
+
end
|
192
|
+
lines
|
190
193
|
end
|
191
|
-
lines
|
192
194
|
end
|
193
195
|
|
194
196
|
def extra_failure_lines
|
@@ -95,6 +95,11 @@ module RSpec::Core
|
|
95
95
|
options[:failure_exit_code] = code
|
96
96
|
end
|
97
97
|
|
98
|
+
parser.on('--error-exit-code CODE', Integer,
|
99
|
+
'Override the exit code used when there are errors loading or running specs outside of examples.') do |code|
|
100
|
+
options[:error_exit_code] = code
|
101
|
+
end
|
102
|
+
|
98
103
|
parser.on('-X', '--[no-]drb', 'Run examples via DRb.') do |use_drb|
|
99
104
|
options[:drb] = use_drb
|
100
105
|
options[:runner] = RSpec::Core::Invocations::DRbWithFallback.new if use_drb
|
data/lib/rspec/core/runner.rb
CHANGED
@@ -84,7 +84,7 @@ module RSpec
|
|
84
84
|
# @param out [IO] output stream
|
85
85
|
def run(err, out)
|
86
86
|
setup(err, out)
|
87
|
-
return @configuration.reporter.exit_early(
|
87
|
+
return @configuration.reporter.exit_early(exit_code) if RSpec.world.wants_to_quit
|
88
88
|
|
89
89
|
run_specs(@world.ordered_example_groups).tap do
|
90
90
|
persist_example_statuses
|
@@ -112,7 +112,7 @@ module RSpec
|
|
112
112
|
# failed.
|
113
113
|
def run_specs(example_groups)
|
114
114
|
examples_count = @world.example_count(example_groups)
|
115
|
-
|
115
|
+
examples_passed = @configuration.reporter.report(examples_count) do |reporter|
|
116
116
|
@configuration.with_suite_hooks do
|
117
117
|
if examples_count == 0 && @configuration.fail_if_no_examples
|
118
118
|
return @configuration.failure_exit_code
|
@@ -120,9 +120,9 @@ module RSpec
|
|
120
120
|
|
121
121
|
example_groups.map { |g| g.run(reporter) }.all?
|
122
122
|
end
|
123
|
-
end
|
123
|
+
end
|
124
124
|
|
125
|
-
|
125
|
+
exit_code(examples_passed)
|
126
126
|
end
|
127
127
|
|
128
128
|
# @private
|
@@ -186,6 +186,14 @@ module RSpec
|
|
186
186
|
end
|
187
187
|
end
|
188
188
|
|
189
|
+
# @private
|
190
|
+
def exit_code(examples_passed=false)
|
191
|
+
return @configuration.error_exit_code || @configuration.failure_exit_code if @world.non_example_failure
|
192
|
+
return @configuration.failure_exit_code unless examples_passed
|
193
|
+
|
194
|
+
0
|
195
|
+
end
|
196
|
+
|
189
197
|
private
|
190
198
|
|
191
199
|
def persist_example_statuses
|
data/lib/rspec/core/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rspec-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Steven Baker
|
@@ -46,7 +46,7 @@ cert_chain:
|
|
46
46
|
ZsVDj6a7lH3cNqtWXZxrb2wO38qV5AkYj8SQK7Hj3/Yui9myUX3crr+PdetazSqQ
|
47
47
|
F3MdtaDehhjC
|
48
48
|
-----END CERTIFICATE-----
|
49
|
-
date: 2020-
|
49
|
+
date: 2020-10-30 00:00:00.000000000 Z
|
50
50
|
dependencies:
|
51
51
|
- !ruby/object:Gem::Dependency
|
52
52
|
name: rspec-support
|
@@ -54,14 +54,14 @@ dependencies:
|
|
54
54
|
requirements:
|
55
55
|
- - "~>"
|
56
56
|
- !ruby/object:Gem::Version
|
57
|
-
version: 3.
|
57
|
+
version: 3.10.0
|
58
58
|
type: :runtime
|
59
59
|
prerelease: false
|
60
60
|
version_requirements: !ruby/object:Gem::Requirement
|
61
61
|
requirements:
|
62
62
|
- - "~>"
|
63
63
|
- !ruby/object:Gem::Version
|
64
|
-
version: 3.
|
64
|
+
version: 3.10.0
|
65
65
|
- !ruby/object:Gem::Dependency
|
66
66
|
name: cucumber
|
67
67
|
requirement: !ruby/object:Gem::Requirement
|
@@ -267,7 +267,7 @@ licenses:
|
|
267
267
|
- MIT
|
268
268
|
metadata:
|
269
269
|
bug_tracker_uri: https://github.com/rspec/rspec-core/issues
|
270
|
-
changelog_uri: https://github.com/rspec/rspec-core/blob/v3.
|
270
|
+
changelog_uri: https://github.com/rspec/rspec-core/blob/v3.10.0/Changelog.md
|
271
271
|
documentation_uri: https://rspec.info/documentation/
|
272
272
|
mailing_list_uri: https://groups.google.com/forum/#!forum/rspec
|
273
273
|
source_code_uri: https://github.com/rspec/rspec-core
|
@@ -290,5 +290,5 @@ requirements: []
|
|
290
290
|
rubygems_version: 3.1.3
|
291
291
|
signing_key:
|
292
292
|
specification_version: 4
|
293
|
-
summary: rspec-core-3.
|
293
|
+
summary: rspec-core-3.10.0
|
294
294
|
test_files: []
|
metadata.gz.sig
CHANGED
Binary file
|