rspec-support 3.8.2 → 3.8.3
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 +9 -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: a5535fbba324eec41454922efc4e7b5e1c52e499c781b94879d3c5c5e5aa260b
|
4
|
+
data.tar.gz: 1fcf50869244a4f7d8eba9a55d8f1fc1dfc5a0214bc75b763e325a871539ad96
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a95932acac40aa6830dd7040181475816f80176a3fc218da203b53c1b63455a25a5ed3d72a282a50cbfcc314c8ef43f3496673049b4507f864d2c894618d684c
|
7
|
+
data.tar.gz: 9c8a21433d0a8af543249d354aa129e16589a238d0ccea7aec26dcce3c0d399fb158226639c6955eacc3b5fe8ef00fffa277ba8c922073d2f7f1ee8f170e5311
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/Changelog.md
CHANGED
@@ -1,10 +1,17 @@
|
|
1
|
-
### 3.8.
|
2
|
-
[Full Changelog](http://github.com/rspec/rspec-support/compare/v3.8.1...v3.8.2)
|
1
|
+
### 3.8.3 / 2019-10-02
|
3
2
|
|
4
3
|
Bug Fixes:
|
5
4
|
|
5
|
+
* Escape \r when outputting strings inside arrays.
|
6
|
+
(Tomita Masahiro, Jon Rowe, #378)
|
6
7
|
* Ensure that optional hash arguments are recognised correctly vs keyword
|
7
8
|
arguments. (Evgeni Dzhelyov, #366)
|
9
|
+
|
10
|
+
### 3.8.2 / 2019-06-10
|
11
|
+
[Full Changelog](http://github.com/rspec/rspec-support/compare/v3.8.1...v3.8.2)
|
12
|
+
|
13
|
+
Bug Fixes:
|
14
|
+
|
8
15
|
* Ensure that an empty hash is recognised as empty keyword arguments when
|
9
16
|
applicable. (Thomas Walpole, #375)
|
10
17
|
* 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.8.
|
4
|
+
version: 3.8.3
|
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-02 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.8.
|
126
|
+
changelog_uri: https://github.com/rspec/rspec-support/blob/v3.8.3/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.8.
|
149
|
+
summary: rspec-support-3.8.3
|
150
150
|
test_files: []
|
metadata.gz.sig
CHANGED
Binary file
|