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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d86ac2e08f8c3e28d5791b4141f13dc961d7b1d03e2033835f543cccbe6d62a3
4
- data.tar.gz: 0aaaa60e26ce665213893a5a5efaad71decd8d6c25414907aad232a21cdd1533
3
+ metadata.gz: a5535fbba324eec41454922efc4e7b5e1c52e499c781b94879d3c5c5e5aa260b
4
+ data.tar.gz: 1fcf50869244a4f7d8eba9a55d8f1fc1dfc5a0214bc75b763e325a871539ad96
5
5
  SHA512:
6
- metadata.gz: 1de5425910668b5003f1619bfa65357405a246259c8a02a3d8821619dbb6cdf12ac3fc54380592ee9d26416752103471cc0a1087d7cfb2dc81fe007243ac9940
7
- data.tar.gz: a17750299991e3c560aa5746f9bdddd1315c3b201d8631a8a4777fd3c9473af66dceeb505c3494b12eb435d7bc6e44dddabd9bc0a1054fd7af948f41a4051d9a
6
+ metadata.gz: a95932acac40aa6830dd7040181475816f80176a3fc218da203b53c1b63455a25a5ed3d72a282a50cbfcc314c8ef43f3496673049b4507f864d2c894618d684c
7
+ data.tar.gz: 9c8a21433d0a8af543249d354aa129e16589a238d0ccea7aec26dcce3c0d399fb158226639c6955eacc3b5fe8ef00fffa277ba8c922073d2f7f1ee8f170e5311
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -1,10 +1,17 @@
1
- ### 3.8.2 / 2019-06-10
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.
@@ -139,7 +139,7 @@ module RSpec
139
139
  end
140
140
  end
141
141
 
142
- # The Differ is only needed when a a spec fails with a diffable failure.
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
@@ -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,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.keys
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
@@ -1,7 +1,7 @@
1
1
  module RSpec
2
2
  module Support
3
3
  module Version
4
- STRING = '3.8.2'
4
+ STRING = '3.8.3'
5
5
  end
6
6
  end
7
7
  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.2
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-06-10 00:00:00.000000000 Z
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.2/Changelog.md
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.3
146
+ rubygems_version: 3.0.6
147
147
  signing_key:
148
148
  specification_version: 4
149
- summary: rspec-support-3.8.2
149
+ summary: rspec-support-3.8.3
150
150
  test_files: []
metadata.gz.sig CHANGED
Binary file