webmock-twirp 0.5.0 → 0.5.1

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: bbad5503c5dd1bde8669aecc1119f73c79b709ac1cb6075c664866ecd9d2f27c
4
- data.tar.gz: 7c3ee3cb14d758a6d4a75abefd6d4a87301a2176baa351f78339532252944f2d
3
+ metadata.gz: e45e4abde5e884aac42e578b3ac9ffc45cad2538d395cb8fff7bb87c391ef6fe
4
+ data.tar.gz: a7acf241b5cd85879bb0afa3d60c1b25dcf7f416eff3c85b58ee87224de8395a
5
5
  SHA512:
6
- metadata.gz: f185ac5c5a58f9188770b0ac787ef5d11c1a1d665b1f8cc1e33befcd27399b60adc645df990caa2368fbd354eec224397f63f06c1154d3039db487cc555193ea
7
- data.tar.gz: d24dd405de783c33a2a7c5aba2fe27a8208bccd1b613c91cb75618103a54437e1e88bdb609efaddfe89ebdb0b197c876bb305c8475f753c925e010ca35c5c35a
6
+ metadata.gz: 57fb45deb5e5bb6d379ea3935edd84b4441561a856fea45d37bd6904953ba2a7a8fabe861bdd4d1b850c7d728d813afa018a4f9d0371581044b8a61ce5f870b0
7
+ data.tar.gz: facbf65f3132f690eaedebe6db9d9914182439e8519f16e5ee415fe06494e18bd8af6c675809753bbe223ca40b2b89f57fde680a47abdb34080c1d61b8c7fa95
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ### v0.5.1 (2024-04-17)
2
+ - fix rpc name matching
3
+
1
4
  ### v0.5.0 (2024-04-07)
2
5
  - codecov upgrade
3
6
  - drop ruby 2.7 (#65)
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- webmock-twirp (0.5.0)
4
+ webmock-twirp (0.5.1)
5
5
  twirp (>= 1)
6
6
  webmock (>= 3)
7
7
 
@@ -61,14 +61,7 @@ module WebMock
61
61
  # match rpc dynamically after client resolves
62
62
  @rpc_name = rpc_name
63
63
 
64
- @request_pattern.with do |request|
65
- rpc_info = request.twirp_rpc
66
-
67
- !!rpc_info && (
68
- rpc_info[:rpc_method] == rpc_name ||
69
- rpc_info[:ruby_method] == rpc_name
70
- )
71
- end
64
+ with
72
65
  end
73
66
  end
74
67
 
@@ -106,6 +99,16 @@ module WebMock
106
99
  request = request_signature.twirp_request
107
100
  matched &&= !!request
108
101
 
102
+ # match rpc_name
103
+ if @rpc_name
104
+ rpc_info = request_signature.twirp_rpc
105
+
106
+ matched &&= !!rpc_info && (
107
+ rpc_info[:rpc_method] == @rpc_name ||
108
+ rpc_info[:ruby_method] == @rpc_name
109
+ )
110
+ end
111
+
109
112
  # match request attributes
110
113
  if attrs.any?
111
114
  matched &&= request.include?(attrs)
@@ -1,5 +1,5 @@
1
1
  module WebMock
2
2
  module Twirp
3
- VERSION = "0.5.0"
3
+ VERSION = "0.5.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: webmock-twirp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Pepper
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-04-07 00:00:00.000000000 Z
11
+ date: 2024-04-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: webmock
@@ -152,7 +152,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
152
152
  - !ruby/object:Gem::Version
153
153
  version: '0'
154
154
  requirements: []
155
- rubygems_version: 3.5.7
155
+ rubygems_version: 3.3.26
156
156
  signing_key:
157
157
  specification_version: 4
158
158
  summary: WebMock::Twirp