rspec-core 3.8.0 → 3.8.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/Changelog.md +13 -0
- data/README.md +14 -14
- data/lib/rspec/core/configuration.rb +21 -2
- data/lib/rspec/core/formatters/exception_presenter.rb +12 -1
- data/lib/rspec/core/memoized_helpers.rb +20 -1
- data/lib/rspec/core/metadata.rb +1 -1
- data/lib/rspec/core/version.rb +1 -1
- metadata +10 -6
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 2e83f32ce194b3903060d4338a0dd48d533c2322a91c2c50cf4a4c6b34b6ca48
|
4
|
+
data.tar.gz: c63129c5d7bbc1bdfa955772aac6f5a2aff7a1b925bda15ea1099b608cf6aef2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5530f82ce2eb36ddd2b0b6c4fb062b1538fdb6615fe18d43ca7b959bda00b5c80331020dfcbe808d3e2c5352ad4cd3bd496792951fb1d600c2fcf7f7b1cf6e9b
|
7
|
+
data.tar.gz: 526bcd7bf5a7f85afa55559ea99fc4d9ff0811a5b1547a586dacfa584f4ecf74288a691f1968b262ae0fc47c2b89b2d6a90ef1a4a2549ee2c01cc54e40716d74
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/Changelog.md
CHANGED
@@ -1,3 +1,16 @@
|
|
1
|
+
### 3.8.1 / 2019-06-13
|
2
|
+
[Full Changelog](http://github.com/rspec/rspec-core/compare/v3.8.0...3-8-maintenance)
|
3
|
+
|
4
|
+
Bug Fixes:
|
5
|
+
|
6
|
+
* Handle RSpec description(s) with japanese chars in CP932 encoded files.
|
7
|
+
(Benoit Tigeot, #2575)
|
8
|
+
* When defining `let` methods that overwrite an existing method, prevent
|
9
|
+
a warning being issued by removing the old definition. (Jon Rowe, #2593)
|
10
|
+
* Prevent warning on Ruby 2.6.0-rc1 (Keiji Yoshimi, #2582)
|
11
|
+
* Fix `config.define_derived_metadata` so that it supports cascades.
|
12
|
+
(Myron Marston, #2630).
|
13
|
+
|
1
14
|
### 3.8.0 / 2018-08-04
|
2
15
|
[Full Changelog](http://github.com/rspec/rspec-core/compare/v3.7.1...v3.8.0)
|
3
16
|
|
data/README.md
CHANGED
@@ -19,20 +19,6 @@ RSpec repos as well. Add the following to your `Gemfile`:
|
|
19
19
|
end
|
20
20
|
```
|
21
21
|
|
22
|
-
## Contributing
|
23
|
-
|
24
|
-
Once you've set up the environment, you'll need to cd into the working
|
25
|
-
directory of whichever repo you want to work in. From there you can run the
|
26
|
-
specs and cucumber features, and make patches.
|
27
|
-
|
28
|
-
NOTE: You do not need to use rspec-dev to work on a specific RSpec repo. You
|
29
|
-
can treat each RSpec repo as an independent project.
|
30
|
-
|
31
|
-
* [Build details](BUILD_DETAIL.md)
|
32
|
-
* [Code of Conduct](CODE_OF_CONDUCT.md)
|
33
|
-
* [Detailed contributing guide](CONTRIBUTING.md)
|
34
|
-
* [Development setup guide](DEVELOPMENT.md)
|
35
|
-
|
36
22
|
## Basic Structure
|
37
23
|
|
38
24
|
RSpec uses the words "describe" and "it" so we can express concepts like a conversation:
|
@@ -376,6 +362,20 @@ Finished in 0.000379 seconds
|
|
376
362
|
1 example, 0 failures
|
377
363
|
```
|
378
364
|
|
365
|
+
## Contributing
|
366
|
+
|
367
|
+
Once you've set up the environment, you'll need to cd into the working
|
368
|
+
directory of whichever repo you want to work in. From there you can run the
|
369
|
+
specs and cucumber features, and make patches.
|
370
|
+
|
371
|
+
NOTE: You do not need to use rspec-dev to work on a specific RSpec repo. You
|
372
|
+
can treat each RSpec repo as an independent project.
|
373
|
+
|
374
|
+
* [Build details](BUILD_DETAIL.md)
|
375
|
+
* [Code of Conduct](CODE_OF_CONDUCT.md)
|
376
|
+
* [Detailed contributing guide](CONTRIBUTING.md)
|
377
|
+
* [Development setup guide](DEVELOPMENT.md)
|
378
|
+
|
379
379
|
## Also see
|
380
380
|
|
381
381
|
* [https://github.com/rspec/rspec](https://github.com/rspec/rspec)
|
@@ -1855,9 +1855,28 @@ module RSpec
|
|
1855
1855
|
|
1856
1856
|
# @private
|
1857
1857
|
def apply_derived_metadata_to(metadata)
|
1858
|
-
|
1859
|
-
|
1858
|
+
already_run_blocks = Set.new
|
1859
|
+
|
1860
|
+
# We loop and attempt to re-apply metadata blocks to support cascades
|
1861
|
+
# (e.g. where a derived bit of metadata triggers the application of
|
1862
|
+
# another piece of derived metadata, etc)
|
1863
|
+
#
|
1864
|
+
# We limit our looping to 200 times as a way to detect infinitely recursing derived metadata blocks.
|
1865
|
+
# It's hard to imagine a valid use case for a derived metadata cascade greater than 200 iterations.
|
1866
|
+
200.times do
|
1867
|
+
return if @derived_metadata_blocks.items_for(metadata).all? do |block|
|
1868
|
+
already_run_blocks.include?(block).tap do |skip_block|
|
1869
|
+
block.call(metadata) unless skip_block
|
1870
|
+
already_run_blocks << block
|
1871
|
+
end
|
1872
|
+
end
|
1860
1873
|
end
|
1874
|
+
|
1875
|
+
# If we got here, then `@derived_metadata_blocks.items_for(metadata).all?` never returned
|
1876
|
+
# `true` above and we treat this as an attempt to recurse infinitely. It's better to fail
|
1877
|
+
# with a clear # error than hang indefinitely, which is what would happen if we didn't limit
|
1878
|
+
# the looping above.
|
1879
|
+
raise SystemStackError, "Attempted to recursively derive metadata indefinitely."
|
1861
1880
|
end
|
1862
1881
|
|
1863
1882
|
# Defines a `before` hook. See {Hooks#before} for full docs.
|
@@ -81,7 +81,7 @@ module RSpec
|
|
81
81
|
|
82
82
|
def fully_formatted_lines(failure_number, colorizer)
|
83
83
|
lines = [
|
84
|
-
description,
|
84
|
+
encoded_description(description),
|
85
85
|
detail_formatter.call(example, colorizer),
|
86
86
|
formatted_message_and_backtrace(colorizer),
|
87
87
|
extra_detail_formatter.call(failure_number, colorizer),
|
@@ -244,6 +244,17 @@ module RSpec
|
|
244
244
|
end
|
245
245
|
end
|
246
246
|
|
247
|
+
if String.method_defined?(:encoding)
|
248
|
+
def encoded_description(description)
|
249
|
+
return if description.nil?
|
250
|
+
encoded_string(description)
|
251
|
+
end
|
252
|
+
else # for 1.8.7
|
253
|
+
def encoded_description(description)
|
254
|
+
description
|
255
|
+
end
|
256
|
+
end
|
257
|
+
|
247
258
|
def exception_backtrace
|
248
259
|
exception.backtrace || []
|
249
260
|
end
|
@@ -288,7 +288,26 @@ EOS
|
|
288
288
|
raise(
|
289
289
|
"#let or #subject called with a reserved name #initialize"
|
290
290
|
) if :initialize == name
|
291
|
-
MemoizedHelpers.module_for(self)
|
291
|
+
our_module = MemoizedHelpers.module_for(self)
|
292
|
+
|
293
|
+
# If we have a module clash in our helper module
|
294
|
+
# then we need to remove it to prevent a warning.
|
295
|
+
#
|
296
|
+
# Note we do not check ancestor modules (see: `instance_methods(false)`)
|
297
|
+
# as we can override them.
|
298
|
+
if our_module.instance_methods(false).include?(name)
|
299
|
+
our_module.__send__(:remove_method, name)
|
300
|
+
end
|
301
|
+
our_module.__send__(:define_method, name, &block)
|
302
|
+
|
303
|
+
# If we have a module clash in the example module
|
304
|
+
# then we need to remove it to prevent a warning.
|
305
|
+
#
|
306
|
+
# Note we do not check ancestor modules (see: `instance_methods(false)`)
|
307
|
+
# as we can override them.
|
308
|
+
if instance_methods(false).include?(name)
|
309
|
+
remove_method(name)
|
310
|
+
end
|
292
311
|
|
293
312
|
# Apply the memoization. The method has been defined in an ancestor
|
294
313
|
# module so we can use `super` here to get the value.
|
data/lib/rspec/core/metadata.rb
CHANGED
@@ -169,7 +169,7 @@ module RSpec
|
|
169
169
|
end
|
170
170
|
|
171
171
|
def description_separator(parent_part, child_part)
|
172
|
-
if parent_part.is_a?(Module) &&
|
172
|
+
if parent_part.is_a?(Module) && /^(?:#|::|\.)/.match(child_part.to_s)
|
173
173
|
''.freeze
|
174
174
|
else
|
175
175
|
' '.freeze
|
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.8.
|
4
|
+
version: 3.8.1
|
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:
|
49
|
+
date: 2019-06-13 00:00:00.000000000 Z
|
50
50
|
dependencies:
|
51
51
|
- !ruby/object:Gem::Dependency
|
52
52
|
name: rspec-support
|
@@ -263,7 +263,12 @@ files:
|
|
263
263
|
homepage: https://github.com/rspec/rspec-core
|
264
264
|
licenses:
|
265
265
|
- MIT
|
266
|
-
metadata:
|
266
|
+
metadata:
|
267
|
+
bug_tracker_uri: https://github.com/rspec/rspec-core/issues
|
268
|
+
changelog_uri: https://github.com/rspec/rspec-core/blob/v3.8.1/Changelog.md
|
269
|
+
documentation_uri: https://rspec.info/documentation/
|
270
|
+
mailing_list_uri: https://groups.google.com/forum/#!forum/rspec
|
271
|
+
source_code_uri: https://github.com/rspec/rspec-core
|
267
272
|
post_install_message:
|
268
273
|
rdoc_options:
|
269
274
|
- "--charset=UTF-8"
|
@@ -280,9 +285,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
280
285
|
- !ruby/object:Gem::Version
|
281
286
|
version: '0'
|
282
287
|
requirements: []
|
283
|
-
|
284
|
-
rubygems_version: 2.6.13
|
288
|
+
rubygems_version: 3.0.3
|
285
289
|
signing_key:
|
286
290
|
specification_version: 4
|
287
|
-
summary: rspec-core-3.8.
|
291
|
+
summary: rspec-core-3.8.1
|
288
292
|
test_files: []
|
metadata.gz.sig
CHANGED
Binary file
|