rspec-mocks 3.12.4 → 3.12.6

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: efbe21159038369570929be696cd7f44b23c367f6e96d3c037aa791454a1c739
4
- data.tar.gz: 7a5d840187a13422c78b8ac6fffc205bd6b4841b8ba2c150be8026a5e650d381
3
+ metadata.gz: 51d2892643ca24dce94963c553f2fdee71d55d9c3c2b2d14ba4fb2cb4ed0876a
4
+ data.tar.gz: ceb42a276b994afe0eaffe46e3a7f314393caf5ba39a5804969b955dc9f309d0
5
5
  SHA512:
6
- metadata.gz: 325a0c1eee0cd639bb0645f927bae2a41793eaaaadc9871046906f1101d515585dbea17320d56840ff9741d19a61c9203c2fa9073297a10f9ba90fb21b068c5a
7
- data.tar.gz: 3334fed9cb0f29768ed9faa0d335572a42484f4930f7bc2f837045a6d7f250d9357059468fed3eb67aa67464cddb4a728e95beb21e0c8c282a75f731167c4fcb
6
+ metadata.gz: 3d19a308278d05b7703dafc5a88ca5b897badd3e60619fce025937b2ee677e36bea53f9ff2386b4180d107ce45dc695fecb68c69e46d0a4d0ec8063126d30b5f
7
+ data.tar.gz: dd881cdd051593ef697cab19d41b760933daca59768ad12430551743936d4373c575f2cc8cfe496e955e90b3cd965d14ec1f2b097c66f63e5e35e34d720696d9
checksums.yaml.gz.sig CHANGED
Binary file
data/Changelog.md CHANGED
@@ -1,7 +1,23 @@
1
1
  ### Development
2
- [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.12.4...3-12-maintenance)
2
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.12.6...3-12-maintenance)
3
3
 
4
- ### 3.12.4 / 2023-01-17
4
+ ### 3.12.6 / 2023-07-11
5
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.12.5...v3.12.6)
6
+
7
+ Bug Fixes:
8
+
9
+ * Fix an issue with `and_call_original` when using the `method_missing` fallback
10
+ with keyword arguments. (Igor Drozdov, #1552)
11
+
12
+ ### 3.12.5 / 2023-03-30
13
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.12.4...v3.12.5)
14
+
15
+ Bug Fixes:
16
+
17
+ * Fix compatibility issue with Rails where active_support monkey patches `with`
18
+ when using any instance. (Lachlan Sylvester, #1540)
19
+
20
+ ### 3.12.4 / 2023-03-12
5
21
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.12.3...v3.12.4)
6
22
 
7
23
  Bug Fixes:
@@ -83,6 +83,15 @@ module RSpec
83
83
  end
84
84
  end
85
85
 
86
+ unless defined?(BasicObject)
87
+ class BasicObject
88
+ # Remove all methods except those expected to be defined on BasicObject
89
+ (instance_methods.map(&:to_sym) - [:__send__, :"!", :instance_eval, :==, :instance_exec, :"!=", :equal?, :__id__, :__binding__, :object_id]).each do |method|
90
+ undef_method method
91
+ end
92
+ end
93
+ end
94
+
86
95
  # @private
87
96
  # Delegates messages to each of the given targets in order to
88
97
  # provide the fluent interface that is available off of message
@@ -91,12 +100,12 @@ module RSpec
91
100
  # `targets` will typically contain 1 of the `AnyInstance::Recorder`
92
101
  # return values and N `MessageExpectation` instances (one per instance
93
102
  # of the `any_instance` klass).
94
- class FluentInterfaceProxy
103
+ class FluentInterfaceProxy < BasicObject
95
104
  def initialize(targets)
96
105
  @targets = targets
97
106
  end
98
107
 
99
- if RUBY_VERSION.to_f > 1.8
108
+ if ::RUBY_VERSION.to_f > 1.8
100
109
  def respond_to_missing?(method_name, include_private=false)
101
110
  super || @targets.first.respond_to?(method_name, include_private)
102
111
  end
@@ -26,10 +26,7 @@ module RSpec
26
26
  # handler of the object. This accounts for cases where the user has not
27
27
  # correctly defined `respond_to?`, and also 1.8 which does not provide
28
28
  # method handles for missing methods even if `respond_to?` is correct.
29
- @original_implementation_callable ||= original_method ||
30
- Proc.new do |*args, &block|
31
- @object.__send__(:method_missing, @method_name, *args, &block)
32
- end
29
+ @original_implementation_callable ||= original_method || method_missing_block
33
30
  end
34
31
 
35
32
  alias_method :save_original_implementation_callable!, :original_implementation_callable
@@ -40,6 +37,16 @@ module RSpec
40
37
  @proxy.original_method_handle_for(method_name)
41
38
  end
42
39
 
40
+ # @private
41
+ def method_missing_block
42
+ block = Proc.new do |*args, &b|
43
+ @object.__send__(:method_missing, @method_name, *args, &b)
44
+ end
45
+ block.ruby2_keywords if block.respond_to?(:ruby2_keywords)
46
+
47
+ block
48
+ end
49
+
43
50
  # @private
44
51
  def visibility
45
52
  @proxy.visibility_for(@method_name)
@@ -3,7 +3,7 @@ module RSpec
3
3
  # Version information for RSpec mocks.
4
4
  module Version
5
5
  # Version of RSpec mocks currently in use in SemVer format.
6
- STRING = '3.12.4'
6
+ STRING = '3.12.6'
7
7
  end
8
8
  end
9
9
  end
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec-mocks
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.12.4
4
+ version: 3.12.6
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: 2023-03-12 00:00:00.000000000 Z
48
+ date: 2023-07-11 00:00:00.000000000 Z
49
49
  dependencies:
50
50
  - !ruby/object:Gem::Dependency
51
51
  name: rspec-support
@@ -194,7 +194,7 @@ licenses:
194
194
  - MIT
195
195
  metadata:
196
196
  bug_tracker_uri: https://github.com/rspec/rspec-mocks/issues
197
- changelog_uri: https://github.com/rspec/rspec-mocks/blob/v3.12.4/Changelog.md
197
+ changelog_uri: https://github.com/rspec/rspec-mocks/blob/v3.12.6/Changelog.md
198
198
  documentation_uri: https://rspec.info/documentation/
199
199
  mailing_list_uri: https://groups.google.com/forum/#!forum/rspec
200
200
  source_code_uri: https://github.com/rspec/rspec-mocks
@@ -217,5 +217,5 @@ requirements: []
217
217
  rubygems_version: 3.4.1
218
218
  signing_key:
219
219
  specification_version: 4
220
- summary: rspec-mocks-3.12.4
220
+ summary: rspec-mocks-3.12.6
221
221
  test_files: []
metadata.gz.sig CHANGED
Binary file