rspec-support 3.8.0 → 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 +5 -5
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/Changelog.md +33 -0
- data/lib/rspec/support.rb +1 -1
- data/lib/rspec/support/differ.rb +2 -2
- data/lib/rspec/support/method_signature_verifier.rb +14 -2
- data/lib/rspec/support/object_formatter.rb +1 -1
- data/lib/rspec/support/spec/shell_out.rb +6 -1
- data/lib/rspec/support/version.rb +1 -1
- metadata +10 -20
- 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: 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,3 +1,36 @@
|
|
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
|
8
|
+
|
9
|
+
Bug Fixes:
|
10
|
+
|
11
|
+
* Escape \r when outputting strings inside arrays.
|
12
|
+
(Tomita Masahiro, Jon Rowe, #378)
|
13
|
+
* Ensure that optional hash arguments are recognised correctly vs keyword
|
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
|
+
|
21
|
+
* Ensure that an empty hash is recognised as empty keyword arguments when
|
22
|
+
applicable. (Thomas Walpole, #375)
|
23
|
+
* Ensure that diffing truthy values produce diffs consistently.
|
24
|
+
(Lucas Nestor, #377)
|
25
|
+
|
26
|
+
### 3.8.1 / 2019-03-03
|
27
|
+
[Full Changelog](http://github.com/rspec/rspec-support/compare/v3.8.0...v3.8.1)
|
28
|
+
|
29
|
+
Bug Fixes:
|
30
|
+
|
31
|
+
* Ensure that inspecting a `SimpleDelegator` based object works regardless of
|
32
|
+
visibilty of the `__getobj__` method. (Jon Rowe, #369)
|
33
|
+
|
1
34
|
### 3.8.0 / 2018-08-04
|
2
35
|
[Full Changelog](http://github.com/rspec/rspec-support/compare/v3.7.1...v3.8.0)
|
3
36
|
|
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
@@ -11,7 +11,7 @@ module RSpec
|
|
11
11
|
def diff(actual, expected)
|
12
12
|
diff = ""
|
13
13
|
|
14
|
-
|
14
|
+
unless actual.nil? || expected.nil?
|
15
15
|
if all_strings?(actual, expected)
|
16
16
|
if any_multiline_strings?(actual, expected)
|
17
17
|
diff = diff_as_string(coerce_to_string(actual), coerce_to_string(expected))
|
@@ -97,7 +97,7 @@ module RSpec
|
|
97
97
|
if Array === entry
|
98
98
|
entry.inspect
|
99
99
|
else
|
100
|
-
entry.to_s.gsub("\n", "\\n")
|
100
|
+
entry.to_s.gsub("\n", "\\n").gsub("\r", "\\r")
|
101
101
|
end
|
102
102
|
end
|
103
103
|
end
|
@@ -77,14 +77,19 @@ 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
|
-
Hash === args.last &&
|
83
|
+
Hash === args.last &&
|
84
|
+
could_contain_kw_args?(args) &&
|
85
|
+
(args.last.empty? || args.last.keys.any? { |x| x.is_a?(Symbol) })
|
82
86
|
end
|
83
87
|
|
84
88
|
# Without considering what the last arg is, could it
|
85
89
|
# contain keyword arguments?
|
86
90
|
def could_contain_kw_args?(args)
|
87
91
|
return false if args.count <= min_non_kw_args
|
92
|
+
|
88
93
|
@allows_any_kw_args || @allowed_kw_args.any?
|
89
94
|
end
|
90
95
|
|
@@ -357,7 +362,14 @@ module RSpec
|
|
357
362
|
|
358
363
|
def split_args(*args)
|
359
364
|
kw_args = if @signature.has_kw_args_in?(args)
|
360
|
-
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
|
361
373
|
else
|
362
374
|
[]
|
363
375
|
end
|
@@ -59,10 +59,15 @@ module RSpec
|
|
59
59
|
l =~ %r{bundler/source/rubygems} ||
|
60
60
|
# Ignore bundler + rubygems warning.
|
61
61
|
l =~ %r{site_ruby/\d\.\d\.\d/rubygems} ||
|
62
|
+
l =~ %r{jruby-\d\.\d\.\d\.\d/lib/ruby/stdlib/rubygems} ||
|
62
63
|
# This is required for windows for some reason
|
63
64
|
l =~ %r{lib/bundler/rubygems} ||
|
64
65
|
# This is a JRuby file that generates warnings on 9.0.3.0
|
65
|
-
l =~ %r{lib/ruby/stdlib/jar}
|
66
|
+
l =~ %r{lib/ruby/stdlib/jar} ||
|
67
|
+
# This is a JRuby file that generates warnings on 9.1.7.0
|
68
|
+
l =~ %r{org/jruby/RubyKernel\.java} ||
|
69
|
+
# Remove blank lines
|
70
|
+
l == "" || l.nil?
|
66
71
|
end.join("\n")
|
67
72
|
end
|
68
73
|
|
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,22 +48,8 @@ cert_chain:
|
|
48
48
|
ZsVDj6a7lH3cNqtWXZxrb2wO38qV5AkYj8SQK7Hj3/Yui9myUX3crr+PdetazSqQ
|
49
49
|
F3MdtaDehhjC
|
50
50
|
-----END CERTIFICATE-----
|
51
|
-
date:
|
51
|
+
date: 2019-10-07 00:00:00.000000000 Z
|
52
52
|
dependencies:
|
53
|
-
- !ruby/object:Gem::Dependency
|
54
|
-
name: bundler
|
55
|
-
requirement: !ruby/object:Gem::Requirement
|
56
|
-
requirements:
|
57
|
-
- - "~>"
|
58
|
-
- !ruby/object:Gem::Version
|
59
|
-
version: '1.3'
|
60
|
-
type: :development
|
61
|
-
prerelease: false
|
62
|
-
version_requirements: !ruby/object:Gem::Requirement
|
63
|
-
requirements:
|
64
|
-
- - "~>"
|
65
|
-
- !ruby/object:Gem::Version
|
66
|
-
version: '1.3'
|
67
53
|
- !ruby/object:Gem::Dependency
|
68
54
|
name: rake
|
69
55
|
requirement: !ruby/object:Gem::Requirement
|
@@ -135,7 +121,12 @@ files:
|
|
135
121
|
homepage: https://github.com/rspec/rspec-support
|
136
122
|
licenses:
|
137
123
|
- MIT
|
138
|
-
metadata:
|
124
|
+
metadata:
|
125
|
+
bug_tracker_uri: https://github.com/rspec/rspec-support/issues
|
126
|
+
changelog_uri: https://github.com/rspec/rspec-support/blob/v3.9.0/Changelog.md
|
127
|
+
documentation_uri: https://rspec.info/documentation/
|
128
|
+
mailing_list_uri: https://groups.google.com/forum/#!forum/rspec
|
129
|
+
source_code_uri: https://github.com/rspec/rspec-support
|
139
130
|
post_install_message:
|
140
131
|
rdoc_options:
|
141
132
|
- "--charset=UTF-8"
|
@@ -152,9 +143,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
152
143
|
- !ruby/object:Gem::Version
|
153
144
|
version: '0'
|
154
145
|
requirements: []
|
155
|
-
|
156
|
-
rubygems_version: 2.6.13
|
146
|
+
rubygems_version: 3.0.6
|
157
147
|
signing_key:
|
158
148
|
specification_version: 4
|
159
|
-
summary: rspec-support-3.
|
149
|
+
summary: rspec-support-3.9.0
|
160
150
|
test_files: []
|
metadata.gz.sig
CHANGED
Binary file
|