rspec-expectations 3.8.0 → 3.8.2

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
- SHA1:
3
- metadata.gz: c64b53ac0865670b12407e85b12dfef41a915675
4
- data.tar.gz: 72290b7d0bfa0774d0a75ba08c9c4f87b3684e9b
2
+ SHA256:
3
+ metadata.gz: 6894036d2c3468b781a1a264a637930e11a60362003dd6ecaf05905bb9d3ed44
4
+ data.tar.gz: 43fce45f3193b59a1559b08125a602d5ad12089e5fdd321b5dbc3d149f88b7cc
5
5
  SHA512:
6
- metadata.gz: 9c98a819df168dca33a9a74275a8b8034d7670c22e9bf40cfa4c4e483fe0c78d1aba80ff6a846024153b8e31e60fcecfd3b8473ff12172bb58801cea842c921f
7
- data.tar.gz: 1901f329e2f9c3023e25a2bd198c0a5aa89efbbf40e33dbd25e31d56c5584bcd30472878fb07a19fa9ca24d743c7f6c60744081c76ab4aeb0081f73efaae5207
6
+ metadata.gz: a50144ac2b3dd7e620766173e25ffe5ff6bcd5f8b71c65eacfb3d4c975eb6c2a80c47be786e3727b316b53883a3e4c47db4a0adff8cc20befeb0d0ecb98fe941
7
+ data.tar.gz: a964fb2ed34b703b6cb2f17efe3153c1422a45202376f4cdd5b2e3bd4847065de186464684c3aaf9d83a746eede227be226e3de5b0c5267f11b791d3499efaf2
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -1,3 +1,22 @@
1
+ ### 3.8.2 / 2018-10-09
2
+ [Full Changelog](http://github.com/rspec/rspec-expectations/compare/v3.8.1...v3.8.2)
3
+
4
+ Bug Fixes:
5
+
6
+ * Change `include` matcher to rely on a `respond_to?(:include?)` check rather than a direct
7
+ Hash comparison before calling `to_hash` to convert to a hash. (Jordan Owens, #1073)
8
+ * Prevent unexpected call stack jumps from causing an obscure error (`IndexError`), and
9
+ replace that error with a proper informative message. (Jon Rowe, #1076)
10
+
11
+ ### 3.8.1 / 2018-08-06
12
+ [Full Changelog](http://github.com/rspec/rspec-expectations/compare/v3.8.0...v3.8.1)
13
+
14
+ Bug Fixes:
15
+
16
+ * Fix regression in `include` matcher so stopped
17
+ `expect(hash.with_indifferent_access).to include(:symbol_key)`
18
+ from working. (Eito Katagiri, #1069)
19
+
1
20
  ### 3.8.0 / 2018-08-04
2
21
  [Full Changelog](http://github.com/rspec/rspec-expectations/compare/v3.7.0...v3.8.0)
3
22
 
@@ -2,7 +2,7 @@ module RSpec
2
2
  module Expectations
3
3
  # @private
4
4
  module Version
5
- STRING = '3.8.0'
5
+ STRING = '3.8.2'
6
6
  end
7
7
  end
8
8
  end
@@ -15,14 +15,14 @@ module RSpec
15
15
  # @api private
16
16
  # @return [Boolean]
17
17
  def matches?(actual)
18
- actual = actual.to_hash if actual.respond_to?(:to_hash)
18
+ actual = actual.to_hash if convert_to_hash?(actual)
19
19
  perform_match(actual) { |v| v }
20
20
  end
21
21
 
22
22
  # @api private
23
23
  # @return [Boolean]
24
24
  def does_not_match?(actual)
25
- actual = actual.to_hash if actual.respond_to?(:to_hash)
25
+ actual = actual.to_hash if convert_to_hash?(actual)
26
26
  perform_match(actual) { |v| !v }
27
27
  end
28
28
 
@@ -139,6 +139,10 @@ module RSpec
139
139
  actual.include?(str) && lines.none? { |line| line == str }
140
140
  end
141
141
  end
142
+
143
+ def convert_to_hash?(obj)
144
+ !obj.respond_to?(:include?) && obj.respond_to?(:to_hash)
145
+ end
142
146
  end
143
147
  end
144
148
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec-expectations
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.8.0
4
+ version: 3.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steven Baker
@@ -45,7 +45,7 @@ cert_chain:
45
45
  ZsVDj6a7lH3cNqtWXZxrb2wO38qV5AkYj8SQK7Hj3/Yui9myUX3crr+PdetazSqQ
46
46
  F3MdtaDehhjC
47
47
  -----END CERTIFICATE-----
48
- date: 2018-08-04 00:00:00.000000000 Z
48
+ date: 2018-10-09 00:00:00.000000000 Z
49
49
  dependencies:
50
50
  - !ruby/object:Gem::Dependency
51
51
  name: rspec-support
@@ -218,8 +218,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
218
218
  version: '0'
219
219
  requirements: []
220
220
  rubyforge_project:
221
- rubygems_version: 2.6.13
221
+ rubygems_version: 2.7.6
222
222
  signing_key:
223
223
  specification_version: 4
224
- summary: rspec-expectations-3.8.0
224
+ summary: rspec-expectations-3.8.2
225
225
  test_files: []
metadata.gz.sig CHANGED
Binary file