rspec-support 3.8.2 → 3.9.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
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/Changelog.md +15 -2
- data/lib/rspec/support.rb +1 -1
- data/lib/rspec/support/differ.rb +1 -1
- data/lib/rspec/support/method_signature_verifier.rb +11 -1
- data/lib/rspec/support/version.rb +1 -1
- metadata +5 -5
- 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: 27ddd84c490aacfced87a3d772c93cf8391484030d28f78789ff5e9263811d42
|
4
|
+
data.tar.gz: 515eecb4064c04ac636b6171ad1308532596a13d9b132ac4689893ab76f43bfe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3755a83a18dcd1326ac122e8250b0abbe0c50af2e630748478c8dfbf0c0f64f65d59725db3ae5370e382f49409b8f7d1639aa09a75c143d4186a8bfeda36a9e3
|
7
|
+
data.tar.gz: 6a41a8e6f905e1c2a37a776a2438d461859aab8434b1cd20c0aa4ca50fb17d898465535710018c8c01c199fde6e179ffef35feb1cd118dc4b71894a0a12d960b
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/Changelog.md
CHANGED
@@ -1,10 +1,23 @@
|
|
1
|
-
### 3.
|
2
|
-
|
1
|
+
### 3.9.0 / 2019-10-07
|
2
|
+
|
3
|
+
*NO CHANGES*
|
4
|
+
|
5
|
+
Version 3.9.0 was released to allow other RSpec gems to release 3.9.0.
|
6
|
+
|
7
|
+
### 3.8.3 / 2019-10-02
|
3
8
|
|
4
9
|
Bug Fixes:
|
5
10
|
|
11
|
+
* Escape \r when outputting strings inside arrays.
|
12
|
+
(Tomita Masahiro, Jon Rowe, #378)
|
6
13
|
* Ensure that optional hash arguments are recognised correctly vs keyword
|
7
14
|
arguments. (Evgeni Dzhelyov, #366)
|
15
|
+
|
16
|
+
### 3.8.2 / 2019-06-10
|
17
|
+
[Full Changelog](http://github.com/rspec/rspec-support/compare/v3.8.1...v3.8.2)
|
18
|
+
|
19
|
+
Bug Fixes:
|
20
|
+
|
8
21
|
* Ensure that an empty hash is recognised as empty keyword arguments when
|
9
22
|
applicable. (Thomas Walpole, #375)
|
10
23
|
* Ensure that diffing truthy values produce diffs consistently.
|
data/lib/rspec/support.rb
CHANGED
@@ -139,7 +139,7 @@ module RSpec
|
|
139
139
|
end
|
140
140
|
end
|
141
141
|
|
142
|
-
# The Differ is only needed when a
|
142
|
+
# The Differ is only needed when a spec fails with a diffable failure.
|
143
143
|
# In the more common case of all specs passing or the only failures being
|
144
144
|
# non-diffable, we can avoid the extra cost of loading the differ, diff-lcs,
|
145
145
|
# pp, etc by avoiding an unnecessary require. Instead, autoload will take
|
data/lib/rspec/support/differ.rb
CHANGED
@@ -77,6 +77,8 @@ module RSpec
|
|
77
77
|
given_kw_args - @allowed_kw_args
|
78
78
|
end
|
79
79
|
|
80
|
+
# If the last argument is Hash, Ruby will treat only symbol keys as keyword arguments
|
81
|
+
# the rest will be grouped in another Hash and passed as positional argument.
|
80
82
|
def has_kw_args_in?(args)
|
81
83
|
Hash === args.last &&
|
82
84
|
could_contain_kw_args?(args) &&
|
@@ -87,6 +89,7 @@ module RSpec
|
|
87
89
|
# contain keyword arguments?
|
88
90
|
def could_contain_kw_args?(args)
|
89
91
|
return false if args.count <= min_non_kw_args
|
92
|
+
|
90
93
|
@allows_any_kw_args || @allowed_kw_args.any?
|
91
94
|
end
|
92
95
|
|
@@ -359,7 +362,14 @@ module RSpec
|
|
359
362
|
|
360
363
|
def split_args(*args)
|
361
364
|
kw_args = if @signature.has_kw_args_in?(args)
|
362
|
-
args.pop
|
365
|
+
last = args.pop
|
366
|
+
non_kw_args = last.reject { |k, _| k.is_a?(Symbol) }
|
367
|
+
if non_kw_args.empty?
|
368
|
+
last.keys
|
369
|
+
else
|
370
|
+
args << non_kw_args
|
371
|
+
last.select { |k, _| k.is_a?(Symbol) }.keys
|
372
|
+
end
|
363
373
|
else
|
364
374
|
[]
|
365
375
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rspec-support
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Chelimsky
|
@@ -48,7 +48,7 @@ cert_chain:
|
|
48
48
|
ZsVDj6a7lH3cNqtWXZxrb2wO38qV5AkYj8SQK7Hj3/Yui9myUX3crr+PdetazSqQ
|
49
49
|
F3MdtaDehhjC
|
50
50
|
-----END CERTIFICATE-----
|
51
|
-
date: 2019-
|
51
|
+
date: 2019-10-07 00:00:00.000000000 Z
|
52
52
|
dependencies:
|
53
53
|
- !ruby/object:Gem::Dependency
|
54
54
|
name: rake
|
@@ -123,7 +123,7 @@ licenses:
|
|
123
123
|
- MIT
|
124
124
|
metadata:
|
125
125
|
bug_tracker_uri: https://github.com/rspec/rspec-support/issues
|
126
|
-
changelog_uri: https://github.com/rspec/rspec-support/blob/v3.
|
126
|
+
changelog_uri: https://github.com/rspec/rspec-support/blob/v3.9.0/Changelog.md
|
127
127
|
documentation_uri: https://rspec.info/documentation/
|
128
128
|
mailing_list_uri: https://groups.google.com/forum/#!forum/rspec
|
129
129
|
source_code_uri: https://github.com/rspec/rspec-support
|
@@ -143,8 +143,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
143
143
|
- !ruby/object:Gem::Version
|
144
144
|
version: '0'
|
145
145
|
requirements: []
|
146
|
-
rubygems_version: 3.0.
|
146
|
+
rubygems_version: 3.0.6
|
147
147
|
signing_key:
|
148
148
|
specification_version: 4
|
149
|
-
summary: rspec-support-3.
|
149
|
+
summary: rspec-support-3.9.0
|
150
150
|
test_files: []
|
metadata.gz.sig
CHANGED
Binary file
|