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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d86ac2e08f8c3e28d5791b4141f13dc961d7b1d03e2033835f543cccbe6d62a3
4
- data.tar.gz: 0aaaa60e26ce665213893a5a5efaad71decd8d6c25414907aad232a21cdd1533
3
+ metadata.gz: 27ddd84c490aacfced87a3d772c93cf8391484030d28f78789ff5e9263811d42
4
+ data.tar.gz: 515eecb4064c04ac636b6171ad1308532596a13d9b132ac4689893ab76f43bfe
5
5
  SHA512:
6
- metadata.gz: 1de5425910668b5003f1619bfa65357405a246259c8a02a3d8821619dbb6cdf12ac3fc54380592ee9d26416752103471cc0a1087d7cfb2dc81fe007243ac9940
7
- data.tar.gz: a17750299991e3c560aa5746f9bdddd1315c3b201d8631a8a4777fd3c9473af66dceeb505c3494b12eb435d7bc6e44dddabd9bc0a1054fd7af948f41a4051d9a
6
+ metadata.gz: 3755a83a18dcd1326ac122e8250b0abbe0c50af2e630748478c8dfbf0c0f64f65d59725db3ae5370e382f49409b8f7d1639aa09a75c143d4186a8bfeda36a9e3
7
+ data.tar.gz: 6a41a8e6f905e1c2a37a776a2438d461859aab8434b1cd20c0aa4ca50fb17d898465535710018c8c01c199fde6e179ffef35feb1cd118dc4b71894a0a12d960b
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -1,10 +1,23 @@
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.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.
@@ -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.9.0'
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.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-06-10 00:00:00.000000000 Z
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.8.2/Changelog.md
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.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.9.0
150
150
  test_files: []
metadata.gz.sig CHANGED
Binary file