webmock 3.14.0 → 3.19.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (141) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +124 -2
  3. data/README.md +46 -18
  4. data/lib/webmock/api.rb +2 -0
  5. data/lib/webmock/assertion_failure.rb +2 -0
  6. data/lib/webmock/callback_registry.rb +2 -0
  7. data/lib/webmock/config.rb +2 -0
  8. data/lib/webmock/cucumber.rb +2 -0
  9. data/lib/webmock/deprecation.rb +2 -0
  10. data/lib/webmock/errors.rb +2 -0
  11. data/lib/webmock/http_lib_adapters/async_http_client_adapter.rb +8 -1
  12. data/lib/webmock/http_lib_adapters/curb_adapter.rb +4 -2
  13. data/lib/webmock/http_lib_adapters/em_http_request_adapter.rb +14 -6
  14. data/lib/webmock/http_lib_adapters/excon_adapter.rb +2 -0
  15. data/lib/webmock/http_lib_adapters/http_lib_adapter.rb +2 -0
  16. data/lib/webmock/http_lib_adapters/http_lib_adapter_registry.rb +2 -0
  17. data/lib/webmock/http_lib_adapters/http_rb/client.rb +3 -3
  18. data/lib/webmock/http_lib_adapters/http_rb/request.rb +3 -1
  19. data/lib/webmock/http_lib_adapters/http_rb/response.rb +6 -1
  20. data/lib/webmock/http_lib_adapters/http_rb/streamer.rb +6 -2
  21. data/lib/webmock/http_lib_adapters/http_rb/webmock.rb +8 -2
  22. data/lib/webmock/http_lib_adapters/http_rb_adapter.rb +2 -0
  23. data/lib/webmock/http_lib_adapters/httpclient_adapter.rb +2 -0
  24. data/lib/webmock/http_lib_adapters/manticore_adapter.rb +2 -0
  25. data/lib/webmock/http_lib_adapters/net_http.rb +24 -115
  26. data/lib/webmock/http_lib_adapters/net_http_response.rb +2 -0
  27. data/lib/webmock/http_lib_adapters/patron_adapter.rb +2 -0
  28. data/lib/webmock/http_lib_adapters/typhoeus_hydra_adapter.rb +2 -0
  29. data/lib/webmock/matchers/any_arg_matcher.rb +2 -0
  30. data/lib/webmock/matchers/hash_argument_matcher.rb +2 -0
  31. data/lib/webmock/matchers/hash_excluding_matcher.rb +2 -0
  32. data/lib/webmock/matchers/hash_including_matcher.rb +2 -0
  33. data/lib/webmock/minitest.rb +2 -0
  34. data/lib/webmock/rack_response.rb +2 -0
  35. data/lib/webmock/request_body_diff.rb +2 -0
  36. data/lib/webmock/request_execution_verifier.rb +2 -0
  37. data/lib/webmock/request_pattern.rb +26 -8
  38. data/lib/webmock/request_registry.rb +2 -0
  39. data/lib/webmock/request_signature.rb +4 -2
  40. data/lib/webmock/request_signature_snippet.rb +2 -0
  41. data/lib/webmock/request_stub.rb +34 -0
  42. data/lib/webmock/response.rb +10 -8
  43. data/lib/webmock/responses_sequence.rb +2 -0
  44. data/lib/webmock/rspec/matchers/request_pattern_matcher.rb +2 -0
  45. data/lib/webmock/rspec/matchers/webmock_matcher.rb +2 -0
  46. data/lib/webmock/rspec/matchers.rb +2 -0
  47. data/lib/webmock/rspec.rb +2 -0
  48. data/lib/webmock/stub_registry.rb +2 -0
  49. data/lib/webmock/stub_request_snippet.rb +2 -0
  50. data/lib/webmock/test_unit.rb +2 -0
  51. data/lib/webmock/util/hash_counter.rb +12 -6
  52. data/lib/webmock/util/hash_keys_stringifier.rb +2 -0
  53. data/lib/webmock/util/hash_validator.rb +2 -0
  54. data/lib/webmock/util/headers.rb +22 -8
  55. data/lib/webmock/util/json.rb +2 -0
  56. data/lib/webmock/util/query_mapper.rb +2 -0
  57. data/lib/webmock/util/uri.rb +3 -1
  58. data/lib/webmock/util/values_stringifier.rb +2 -0
  59. data/lib/webmock/util/version_checker.rb +7 -5
  60. data/lib/webmock/version.rb +3 -1
  61. data/lib/webmock/webmock.rb +12 -0
  62. data/lib/webmock.rb +2 -0
  63. metadata +51 -183
  64. data/.gemtest +0 -0
  65. data/.github/workflows/CI.yml +0 -37
  66. data/.gitignore +0 -34
  67. data/.rspec-tm +0 -2
  68. data/Gemfile +0 -9
  69. data/Rakefile +0 -38
  70. data/minitest/test_helper.rb +0 -34
  71. data/minitest/test_webmock.rb +0 -9
  72. data/minitest/webmock_spec.rb +0 -60
  73. data/spec/acceptance/async_http_client/async_http_client_spec.rb +0 -375
  74. data/spec/acceptance/async_http_client/async_http_client_spec_helper.rb +0 -73
  75. data/spec/acceptance/curb/curb_spec.rb +0 -499
  76. data/spec/acceptance/curb/curb_spec_helper.rb +0 -147
  77. data/spec/acceptance/em_http_request/em_http_request_spec.rb +0 -462
  78. data/spec/acceptance/em_http_request/em_http_request_spec_helper.rb +0 -77
  79. data/spec/acceptance/excon/excon_spec.rb +0 -77
  80. data/spec/acceptance/excon/excon_spec_helper.rb +0 -52
  81. data/spec/acceptance/http_rb/http_rb_spec.rb +0 -93
  82. data/spec/acceptance/http_rb/http_rb_spec_helper.rb +0 -54
  83. data/spec/acceptance/httpclient/httpclient_spec.rb +0 -217
  84. data/spec/acceptance/httpclient/httpclient_spec_helper.rb +0 -57
  85. data/spec/acceptance/manticore/manticore_spec.rb +0 -107
  86. data/spec/acceptance/manticore/manticore_spec_helper.rb +0 -35
  87. data/spec/acceptance/net_http/net_http_shared.rb +0 -153
  88. data/spec/acceptance/net_http/net_http_spec.rb +0 -369
  89. data/spec/acceptance/net_http/net_http_spec_helper.rb +0 -64
  90. data/spec/acceptance/net_http/real_net_http_spec.rb +0 -20
  91. data/spec/acceptance/patron/patron_spec.rb +0 -125
  92. data/spec/acceptance/patron/patron_spec_helper.rb +0 -54
  93. data/spec/acceptance/shared/allowing_and_disabling_net_connect.rb +0 -313
  94. data/spec/acceptance/shared/callbacks.rb +0 -148
  95. data/spec/acceptance/shared/complex_cross_concern_behaviors.rb +0 -36
  96. data/spec/acceptance/shared/enabling_and_disabling_webmock.rb +0 -95
  97. data/spec/acceptance/shared/precedence_of_stubs.rb +0 -15
  98. data/spec/acceptance/shared/request_expectations.rb +0 -930
  99. data/spec/acceptance/shared/returning_declared_responses.rb +0 -409
  100. data/spec/acceptance/shared/stubbing_requests.rb +0 -678
  101. data/spec/acceptance/typhoeus/typhoeus_hydra_spec.rb +0 -135
  102. data/spec/acceptance/typhoeus/typhoeus_hydra_spec_helper.rb +0 -60
  103. data/spec/acceptance/webmock_shared.rb +0 -41
  104. data/spec/fixtures/test.txt +0 -1
  105. data/spec/quality_spec.rb +0 -84
  106. data/spec/spec_helper.rb +0 -48
  107. data/spec/support/example_curl_output.txt +0 -22
  108. data/spec/support/failures.rb +0 -9
  109. data/spec/support/my_rack_app.rb +0 -53
  110. data/spec/support/network_connection.rb +0 -19
  111. data/spec/support/webmock_server.rb +0 -70
  112. data/spec/unit/api_spec.rb +0 -175
  113. data/spec/unit/errors_spec.rb +0 -129
  114. data/spec/unit/http_lib_adapters/http_lib_adapter_registry_spec.rb +0 -17
  115. data/spec/unit/http_lib_adapters/http_lib_adapter_spec.rb +0 -12
  116. data/spec/unit/matchers/hash_excluding_matcher_spec.rb +0 -61
  117. data/spec/unit/matchers/hash_including_matcher_spec.rb +0 -87
  118. data/spec/unit/rack_response_spec.rb +0 -112
  119. data/spec/unit/request_body_diff_spec.rb +0 -90
  120. data/spec/unit/request_execution_verifier_spec.rb +0 -208
  121. data/spec/unit/request_pattern_spec.rb +0 -736
  122. data/spec/unit/request_registry_spec.rb +0 -95
  123. data/spec/unit/request_signature_snippet_spec.rb +0 -89
  124. data/spec/unit/request_signature_spec.rb +0 -155
  125. data/spec/unit/request_stub_spec.rb +0 -199
  126. data/spec/unit/response_spec.rb +0 -286
  127. data/spec/unit/stub_registry_spec.rb +0 -103
  128. data/spec/unit/stub_request_snippet_spec.rb +0 -115
  129. data/spec/unit/util/hash_counter_spec.rb +0 -39
  130. data/spec/unit/util/hash_keys_stringifier_spec.rb +0 -27
  131. data/spec/unit/util/headers_spec.rb +0 -28
  132. data/spec/unit/util/json_spec.rb +0 -33
  133. data/spec/unit/util/query_mapper_spec.rb +0 -157
  134. data/spec/unit/util/uri_spec.rb +0 -371
  135. data/spec/unit/util/version_checker_spec.rb +0 -65
  136. data/spec/unit/webmock_spec.rb +0 -60
  137. data/test/http_request.rb +0 -24
  138. data/test/shared_test.rb +0 -108
  139. data/test/test_helper.rb +0 -23
  140. data/test/test_webmock.rb +0 -12
  141. data/webmock.gemspec +0 -54
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # This is a copy of https://github.com/jnunemaker/crack/blob/master/lib/crack/json.rb
2
4
  # with date parsing removed
3
5
  # Copyright (c) 2004-2008 David Heinemeier Hansson
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module WebMock::Util
2
4
  class QueryMapper
3
5
  class << self
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module WebMock
2
4
 
3
5
  module Util
@@ -68,7 +70,7 @@ module WebMock
68
70
 
69
71
  def self.is_uri_localhost?(uri)
70
72
  uri.is_a?(Addressable::URI) &&
71
- %w(localhost 127.0.0.1 0.0.0.0).include?(uri.host)
73
+ %w(localhost 127.0.0.1 0.0.0.0 [::1]).include?(uri.host)
72
74
  end
73
75
 
74
76
  private
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class WebMock::Util::ValuesStringifier
2
4
  def self.stringify_values(value)
3
5
  case value
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # This code was created based on https://github.com/myronmarston/vcr/blob/master/lib/vcr/util/version_checker.rb
2
4
  # Thanks to @myronmarston
3
5
 
@@ -84,12 +86,12 @@ module WebMock
84
86
  def compare_version
85
87
  case
86
88
  when @major < @min_major then :too_low
89
+ when @major == @min_major && @minor < @min_minor then :too_low
90
+ when @major == @min_major && @minor == @min_minor && @patch < @min_patch then :too_low
87
91
  when @max_major && @major > @max_major then :too_high
88
- when @major > @min_major then :ok
89
- when @minor < @min_minor then :too_low
90
- when @max_minor && @minor > @max_minor then :too_high
91
- when @minor > @min_minor then :ok
92
- when @patch < @min_patch then :too_low
92
+ when @max_major && @major == @max_major && @max_minor && @minor > @max_minor then :too_high
93
+
94
+ else :ok
93
95
  end
94
96
  end
95
97
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module WebMock
2
- VERSION = '3.14.0' unless defined?(::WebMock::VERSION)
4
+ VERSION = '3.19.1' unless defined?(::WebMock::VERSION)
3
5
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module WebMock
2
4
 
3
5
  def self.included(clazz)
@@ -70,6 +72,16 @@ module WebMock
70
72
  Config.instance.allow && net_connect_explicit_allowed?(Config.instance.allow, uri) )
71
73
  end
72
74
 
75
+ def self.net_http_connect_on_start?(uri)
76
+ allowed = Config.instance.net_http_connect_on_start || false
77
+
78
+ if [true, false].include?(allowed)
79
+ allowed
80
+ else
81
+ net_connect_explicit_allowed?(allowed, uri)
82
+ end
83
+ end
84
+
73
85
  def self.net_connect_explicit_allowed?(allowed, uri=nil)
74
86
  case allowed
75
87
  when Array
data/lib/webmock.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'singleton'
2
4
 
3
5
  require 'addressable/uri'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: webmock
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.14.0
4
+ version: 3.19.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bartosz Blimke
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-08-05 00:00:00.000000000 Z
11
+ date: 2023-08-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable
@@ -101,117 +101,117 @@ dependencies:
101
101
  - !ruby/object:Gem::Version
102
102
  version: 0.5.0
103
103
  - !ruby/object:Gem::Dependency
104
- name: http
104
+ name: em-http-request
105
105
  requirement: !ruby/object:Gem::Requirement
106
106
  requirements:
107
107
  - - ">="
108
108
  - !ruby/object:Gem::Version
109
- version: 0.8.0
109
+ version: 1.0.2
110
110
  type: :development
111
111
  prerelease: false
112
112
  version_requirements: !ruby/object:Gem::Requirement
113
113
  requirements:
114
114
  - - ">="
115
115
  - !ruby/object:Gem::Version
116
- version: 0.8.0
116
+ version: 1.0.2
117
117
  - !ruby/object:Gem::Dependency
118
- name: rack
118
+ name: em-synchrony
119
119
  requirement: !ruby/object:Gem::Requirement
120
120
  requirements:
121
- - - ">"
121
+ - - ">="
122
122
  - !ruby/object:Gem::Version
123
- version: '1.6'
123
+ version: 1.0.0
124
124
  type: :development
125
125
  prerelease: false
126
126
  version_requirements: !ruby/object:Gem::Requirement
127
127
  requirements:
128
- - - ">"
128
+ - - ">="
129
129
  - !ruby/object:Gem::Version
130
- version: '1.6'
130
+ version: 1.0.0
131
131
  - !ruby/object:Gem::Dependency
132
- name: rspec
132
+ name: async-http
133
133
  requirement: !ruby/object:Gem::Requirement
134
134
  requirements:
135
135
  - - ">="
136
136
  - !ruby/object:Gem::Version
137
- version: 3.1.0
137
+ version: 0.48.0
138
138
  type: :development
139
139
  prerelease: false
140
140
  version_requirements: !ruby/object:Gem::Requirement
141
141
  requirements:
142
142
  - - ">="
143
143
  - !ruby/object:Gem::Version
144
- version: 3.1.0
144
+ version: 0.48.0
145
145
  - !ruby/object:Gem::Dependency
146
- name: httpclient
146
+ name: http
147
147
  requirement: !ruby/object:Gem::Requirement
148
148
  requirements:
149
149
  - - ">="
150
150
  - !ruby/object:Gem::Version
151
- version: 2.2.4
151
+ version: 0.8.0
152
152
  type: :development
153
153
  prerelease: false
154
154
  version_requirements: !ruby/object:Gem::Requirement
155
155
  requirements:
156
156
  - - ">="
157
157
  - !ruby/object:Gem::Version
158
- version: 2.2.4
158
+ version: 0.8.0
159
159
  - !ruby/object:Gem::Dependency
160
- name: em-http-request
160
+ name: rack
161
161
  requirement: !ruby/object:Gem::Requirement
162
162
  requirements:
163
- - - ">="
163
+ - - ">"
164
164
  - !ruby/object:Gem::Version
165
- version: 1.0.2
165
+ version: '1.6'
166
166
  type: :development
167
167
  prerelease: false
168
168
  version_requirements: !ruby/object:Gem::Requirement
169
169
  requirements:
170
- - - ">="
170
+ - - ">"
171
171
  - !ruby/object:Gem::Version
172
- version: 1.0.2
172
+ version: '1.6'
173
173
  - !ruby/object:Gem::Dependency
174
- name: em-synchrony
174
+ name: rspec
175
175
  requirement: !ruby/object:Gem::Requirement
176
176
  requirements:
177
177
  - - ">="
178
178
  - !ruby/object:Gem::Version
179
- version: 1.0.0
179
+ version: 3.1.0
180
180
  type: :development
181
181
  prerelease: false
182
182
  version_requirements: !ruby/object:Gem::Requirement
183
183
  requirements:
184
184
  - - ">="
185
185
  - !ruby/object:Gem::Version
186
- version: 1.0.0
186
+ version: 3.1.0
187
187
  - !ruby/object:Gem::Dependency
188
- name: excon
188
+ name: httpclient
189
189
  requirement: !ruby/object:Gem::Requirement
190
190
  requirements:
191
191
  - - ">="
192
192
  - !ruby/object:Gem::Version
193
- version: 0.27.5
193
+ version: 2.2.4
194
194
  type: :development
195
195
  prerelease: false
196
196
  version_requirements: !ruby/object:Gem::Requirement
197
197
  requirements:
198
198
  - - ">="
199
199
  - !ruby/object:Gem::Version
200
- version: 0.27.5
200
+ version: 2.2.4
201
201
  - !ruby/object:Gem::Dependency
202
- name: async-http
202
+ name: excon
203
203
  requirement: !ruby/object:Gem::Requirement
204
204
  requirements:
205
205
  - - ">="
206
206
  - !ruby/object:Gem::Version
207
- version: 0.48.0
207
+ version: 0.27.5
208
208
  type: :development
209
209
  prerelease: false
210
210
  version_requirements: !ruby/object:Gem::Requirement
211
211
  requirements:
212
212
  - - ">="
213
213
  - !ruby/object:Gem::Version
214
- version: 0.48.0
214
+ version: 0.27.5
215
215
  - !ruby/object:Gem::Dependency
216
216
  name: minitest
217
217
  requirement: !ruby/object:Gem::Requirement
@@ -268,6 +268,20 @@ dependencies:
268
268
  - - ">="
269
269
  - !ruby/object:Gem::Version
270
270
  version: '0'
271
+ - !ruby/object:Gem::Dependency
272
+ name: rspec-retry
273
+ requirement: !ruby/object:Gem::Requirement
274
+ requirements:
275
+ - - ">="
276
+ - !ruby/object:Gem::Version
277
+ version: '0'
278
+ type: :development
279
+ prerelease: false
280
+ version_requirements: !ruby/object:Gem::Requirement
281
+ requirements:
282
+ - - ">="
283
+ - !ruby/object:Gem::Version
284
+ version: '0'
271
285
  description: WebMock allows stubbing HTTP requests and setting expectations on HTTP
272
286
  requests.
273
287
  email:
@@ -276,15 +290,9 @@ executables: []
276
290
  extensions: []
277
291
  extra_rdoc_files: []
278
292
  files:
279
- - ".gemtest"
280
- - ".github/workflows/CI.yml"
281
- - ".gitignore"
282
- - ".rspec-tm"
283
293
  - CHANGELOG.md
284
- - Gemfile
285
294
  - LICENSE
286
295
  - README.md
287
- - Rakefile
288
296
  - lib/webmock.rb
289
297
  - lib/webmock/api.rb
290
298
  - lib/webmock/assertion_failure.rb
@@ -344,86 +352,14 @@ files:
344
352
  - lib/webmock/util/version_checker.rb
345
353
  - lib/webmock/version.rb
346
354
  - lib/webmock/webmock.rb
347
- - minitest/test_helper.rb
348
- - minitest/test_webmock.rb
349
- - minitest/webmock_spec.rb
350
- - spec/acceptance/async_http_client/async_http_client_spec.rb
351
- - spec/acceptance/async_http_client/async_http_client_spec_helper.rb
352
- - spec/acceptance/curb/curb_spec.rb
353
- - spec/acceptance/curb/curb_spec_helper.rb
354
- - spec/acceptance/em_http_request/em_http_request_spec.rb
355
- - spec/acceptance/em_http_request/em_http_request_spec_helper.rb
356
- - spec/acceptance/excon/excon_spec.rb
357
- - spec/acceptance/excon/excon_spec_helper.rb
358
- - spec/acceptance/http_rb/http_rb_spec.rb
359
- - spec/acceptance/http_rb/http_rb_spec_helper.rb
360
- - spec/acceptance/httpclient/httpclient_spec.rb
361
- - spec/acceptance/httpclient/httpclient_spec_helper.rb
362
- - spec/acceptance/manticore/manticore_spec.rb
363
- - spec/acceptance/manticore/manticore_spec_helper.rb
364
- - spec/acceptance/net_http/net_http_shared.rb
365
- - spec/acceptance/net_http/net_http_spec.rb
366
- - spec/acceptance/net_http/net_http_spec_helper.rb
367
- - spec/acceptance/net_http/real_net_http_spec.rb
368
- - spec/acceptance/patron/patron_spec.rb
369
- - spec/acceptance/patron/patron_spec_helper.rb
370
- - spec/acceptance/shared/allowing_and_disabling_net_connect.rb
371
- - spec/acceptance/shared/callbacks.rb
372
- - spec/acceptance/shared/complex_cross_concern_behaviors.rb
373
- - spec/acceptance/shared/enabling_and_disabling_webmock.rb
374
- - spec/acceptance/shared/precedence_of_stubs.rb
375
- - spec/acceptance/shared/request_expectations.rb
376
- - spec/acceptance/shared/returning_declared_responses.rb
377
- - spec/acceptance/shared/stubbing_requests.rb
378
- - spec/acceptance/typhoeus/typhoeus_hydra_spec.rb
379
- - spec/acceptance/typhoeus/typhoeus_hydra_spec_helper.rb
380
- - spec/acceptance/webmock_shared.rb
381
- - spec/fixtures/test.txt
382
- - spec/quality_spec.rb
383
- - spec/spec_helper.rb
384
- - spec/support/example_curl_output.txt
385
- - spec/support/failures.rb
386
- - spec/support/my_rack_app.rb
387
- - spec/support/network_connection.rb
388
- - spec/support/webmock_server.rb
389
- - spec/unit/api_spec.rb
390
- - spec/unit/errors_spec.rb
391
- - spec/unit/http_lib_adapters/http_lib_adapter_registry_spec.rb
392
- - spec/unit/http_lib_adapters/http_lib_adapter_spec.rb
393
- - spec/unit/matchers/hash_excluding_matcher_spec.rb
394
- - spec/unit/matchers/hash_including_matcher_spec.rb
395
- - spec/unit/rack_response_spec.rb
396
- - spec/unit/request_body_diff_spec.rb
397
- - spec/unit/request_execution_verifier_spec.rb
398
- - spec/unit/request_pattern_spec.rb
399
- - spec/unit/request_registry_spec.rb
400
- - spec/unit/request_signature_snippet_spec.rb
401
- - spec/unit/request_signature_spec.rb
402
- - spec/unit/request_stub_spec.rb
403
- - spec/unit/response_spec.rb
404
- - spec/unit/stub_registry_spec.rb
405
- - spec/unit/stub_request_snippet_spec.rb
406
- - spec/unit/util/hash_counter_spec.rb
407
- - spec/unit/util/hash_keys_stringifier_spec.rb
408
- - spec/unit/util/headers_spec.rb
409
- - spec/unit/util/json_spec.rb
410
- - spec/unit/util/query_mapper_spec.rb
411
- - spec/unit/util/uri_spec.rb
412
- - spec/unit/util/version_checker_spec.rb
413
- - spec/unit/webmock_spec.rb
414
- - test/http_request.rb
415
- - test/shared_test.rb
416
- - test/test_helper.rb
417
- - test/test_webmock.rb
418
- - webmock.gemspec
419
- homepage: http://github.com/bblimke/webmock
355
+ homepage: https://github.com/bblimke/webmock
420
356
  licenses:
421
357
  - MIT
422
358
  metadata:
423
359
  bug_tracker_uri: https://github.com/bblimke/webmock/issues
424
- changelog_uri: https://github.com/bblimke/webmock/blob/v3.14.0/CHANGELOG.md
425
- documentation_uri: https://www.rubydoc.info/gems/webmock/3.14.0
426
- source_code_uri: https://github.com/bblimke/webmock/tree/v3.14.0
360
+ changelog_uri: https://github.com/bblimke/webmock/blob/v3.19.1/CHANGELOG.md
361
+ documentation_uri: https://www.rubydoc.info/gems/webmock/3.19.1
362
+ source_code_uri: https://github.com/bblimke/webmock/tree/v3.19.1
427
363
  wiki_uri: https://github.com/bblimke/webmock/wiki
428
364
  post_install_message:
429
365
  rdoc_options: []
@@ -433,83 +369,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
433
369
  requirements:
434
370
  - - ">="
435
371
  - !ruby/object:Gem::Version
436
- version: '2.0'
372
+ version: '2.5'
437
373
  required_rubygems_version: !ruby/object:Gem::Requirement
438
374
  requirements:
439
375
  - - ">="
440
376
  - !ruby/object:Gem::Version
441
377
  version: '0'
442
378
  requirements: []
443
- rubygems_version: 3.1.2
379
+ rubygems_version: 3.4.19
444
380
  signing_key:
445
381
  specification_version: 4
446
382
  summary: Library for stubbing HTTP requests in Ruby.
447
- test_files:
448
- - spec/acceptance/async_http_client/async_http_client_spec.rb
449
- - spec/acceptance/async_http_client/async_http_client_spec_helper.rb
450
- - spec/acceptance/curb/curb_spec.rb
451
- - spec/acceptance/curb/curb_spec_helper.rb
452
- - spec/acceptance/em_http_request/em_http_request_spec.rb
453
- - spec/acceptance/em_http_request/em_http_request_spec_helper.rb
454
- - spec/acceptance/excon/excon_spec.rb
455
- - spec/acceptance/excon/excon_spec_helper.rb
456
- - spec/acceptance/http_rb/http_rb_spec.rb
457
- - spec/acceptance/http_rb/http_rb_spec_helper.rb
458
- - spec/acceptance/httpclient/httpclient_spec.rb
459
- - spec/acceptance/httpclient/httpclient_spec_helper.rb
460
- - spec/acceptance/manticore/manticore_spec.rb
461
- - spec/acceptance/manticore/manticore_spec_helper.rb
462
- - spec/acceptance/net_http/net_http_shared.rb
463
- - spec/acceptance/net_http/net_http_spec.rb
464
- - spec/acceptance/net_http/net_http_spec_helper.rb
465
- - spec/acceptance/net_http/real_net_http_spec.rb
466
- - spec/acceptance/patron/patron_spec.rb
467
- - spec/acceptance/patron/patron_spec_helper.rb
468
- - spec/acceptance/shared/allowing_and_disabling_net_connect.rb
469
- - spec/acceptance/shared/callbacks.rb
470
- - spec/acceptance/shared/complex_cross_concern_behaviors.rb
471
- - spec/acceptance/shared/enabling_and_disabling_webmock.rb
472
- - spec/acceptance/shared/precedence_of_stubs.rb
473
- - spec/acceptance/shared/request_expectations.rb
474
- - spec/acceptance/shared/returning_declared_responses.rb
475
- - spec/acceptance/shared/stubbing_requests.rb
476
- - spec/acceptance/typhoeus/typhoeus_hydra_spec.rb
477
- - spec/acceptance/typhoeus/typhoeus_hydra_spec_helper.rb
478
- - spec/acceptance/webmock_shared.rb
479
- - spec/fixtures/test.txt
480
- - spec/quality_spec.rb
481
- - spec/spec_helper.rb
482
- - spec/support/example_curl_output.txt
483
- - spec/support/failures.rb
484
- - spec/support/my_rack_app.rb
485
- - spec/support/network_connection.rb
486
- - spec/support/webmock_server.rb
487
- - spec/unit/api_spec.rb
488
- - spec/unit/errors_spec.rb
489
- - spec/unit/http_lib_adapters/http_lib_adapter_registry_spec.rb
490
- - spec/unit/http_lib_adapters/http_lib_adapter_spec.rb
491
- - spec/unit/matchers/hash_excluding_matcher_spec.rb
492
- - spec/unit/matchers/hash_including_matcher_spec.rb
493
- - spec/unit/rack_response_spec.rb
494
- - spec/unit/request_body_diff_spec.rb
495
- - spec/unit/request_execution_verifier_spec.rb
496
- - spec/unit/request_pattern_spec.rb
497
- - spec/unit/request_registry_spec.rb
498
- - spec/unit/request_signature_snippet_spec.rb
499
- - spec/unit/request_signature_spec.rb
500
- - spec/unit/request_stub_spec.rb
501
- - spec/unit/response_spec.rb
502
- - spec/unit/stub_registry_spec.rb
503
- - spec/unit/stub_request_snippet_spec.rb
504
- - spec/unit/util/hash_counter_spec.rb
505
- - spec/unit/util/hash_keys_stringifier_spec.rb
506
- - spec/unit/util/headers_spec.rb
507
- - spec/unit/util/json_spec.rb
508
- - spec/unit/util/query_mapper_spec.rb
509
- - spec/unit/util/uri_spec.rb
510
- - spec/unit/util/version_checker_spec.rb
511
- - spec/unit/webmock_spec.rb
512
- - test/http_request.rb
513
- - test/shared_test.rb
514
- - test/test_helper.rb
515
- - test/test_webmock.rb
383
+ test_files: []
data/.gemtest DELETED
File without changes
@@ -1,37 +0,0 @@
1
- name: CI
2
-
3
- on:
4
- push:
5
- branches:
6
- - master
7
- pull_request:
8
-
9
- jobs:
10
- build:
11
- runs-on: ubuntu-latest
12
- strategy:
13
- fail-fast: false
14
- matrix:
15
- ruby:
16
- - head
17
- - '3.0'
18
- - '2.7'
19
- - '2.6'
20
- - '2.5'
21
- - jruby
22
- continue-on-error: ${{ matrix.ruby == 'head' }}
23
- name: Ruby ${{ matrix.ruby }}
24
- env:
25
- JRUBY_OPTS: "--debug"
26
- steps:
27
- - uses: actions/checkout@v2
28
- - name: Install Apt Packages
29
- run: |
30
- sudo apt-get install libcurl4-openssl-dev -y
31
- - uses: ruby/setup-ruby@v1
32
- continue-on-error: true
33
- with:
34
- ruby-version: ${{ matrix.ruby }}
35
- bundler-cache: true
36
- - run: |
37
- bundle exec rake
data/.gitignore DELETED
@@ -1,34 +0,0 @@
1
- ## MAC OS
2
- .DS_Store
3
-
4
- ## TEXTMATE
5
- *.tmproj
6
- tmtags
7
-
8
- ## EMACS
9
- *~
10
- \#*
11
- .\#*
12
-
13
- ## VIM
14
- .*.sw[a-z]
15
-
16
- ## RubyMine and related
17
- .idea
18
-
19
- ## PROJECT::GENERAL
20
- coverage
21
- rdoc
22
- pkg
23
-
24
- ## PROJECT::SPECIFIC
25
- *.gem
26
- .bundle
27
- Gemfile.lock
28
- gemfiles/*.gemfile.lock
29
- pkg/*
30
- tmp/*
31
- *.rbc
32
- *.rbx
33
- .ruby-gemset
34
- .ruby-version
data/.rspec-tm DELETED
@@ -1,2 +0,0 @@
1
- --rspec-version 2.0.0
2
- --bundler
data/Gemfile DELETED
@@ -1,9 +0,0 @@
1
- source 'https://rubygems.org/'
2
-
3
- gemspec
4
-
5
- gem 'rake'
6
-
7
- platforms :jruby do
8
- gem 'jruby-openssl'
9
- end
data/Rakefile DELETED
@@ -1,38 +0,0 @@
1
- require 'bundler'
2
- Bundler::GemHelper.install_tasks
3
-
4
- require "rspec/core/rake_task"
5
- RSpec::Core::RakeTask.new(:spec) do |t|
6
- t.rspec_opts = %w[
7
- --force-color
8
- --format progress
9
- --require ./spec/spec_helper.rb
10
- ]
11
- t.pattern = 'spec/**/*_spec.rb'
12
- end
13
-
14
- RSpec::Core::RakeTask.new(:spec_http_without_webmock) do |t|
15
- t.rspec_opts = %w[
16
- --force-color
17
- --format progress
18
- --require ./spec/acceptance/net_http/real_net_http_spec.rb
19
- ]
20
- t.pattern = 'spec/acceptance/net_http/real_net_http_spec.rb'
21
- end
22
-
23
- require 'rake/testtask'
24
- Rake::TestTask.new(:test) do |test|
25
- test.test_files = FileList["test/**/*.rb"].exclude("test/test_helper.rb")
26
- test.options = "--use-color"
27
- test.verbose = false
28
- test.warning = false
29
- end
30
-
31
- Rake::TestTask.new(:minitest) do |test|
32
- test.test_files = FileList["minitest/**/*.rb"].exclude("test/test_helper.rb")
33
- test.options = "--pride"
34
- test.verbose = false
35
- test.warning = false
36
- end
37
-
38
- task default: [:spec, :spec_http_without_webmock, :test, :minitest]
@@ -1,34 +0,0 @@
1
- require 'rubygems'
2
-
3
- $LOAD_PATH.unshift(File.dirname(__FILE__))
4
- $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
5
-
6
- require File.expand_path(File.dirname(__FILE__) + '/../test/http_request')
7
-
8
- gem 'minitest'
9
-
10
- require 'minitest/autorun'
11
- require 'webmock/minitest'
12
-
13
- test_class = defined?(MiniTest::Test) ? MiniTest::Test : MiniTest::Unit::TestCase
14
-
15
- test_class.class_eval do
16
-
17
- def assert_raise(*exp, &block)
18
- assert_raises(*exp, &block)
19
- end
20
-
21
- def assert_raise_with_message(e, message, &block)
22
- e = assert_raises(e, &block)
23
- if message.is_a?(Regexp)
24
- assert_match(message, e.message)
25
- else
26
- assert_equal(message, e.message)
27
- end
28
- end
29
-
30
- def assert_fail(message, &block)
31
- assert_raise_with_message(MiniTest::Assertion, message, &block)
32
- end
33
-
34
- end
@@ -1,9 +0,0 @@
1
- require File.expand_path(File.dirname(__FILE__) + '/test_helper')
2
- require File.expand_path(File.dirname(__FILE__) + '/../test/shared_test')
3
-
4
- test_class = defined?(MiniTest::Test) ? MiniTest::Test : MiniTest::Unit::TestCase
5
-
6
-
7
- class MiniTestWebMock < test_class
8
- include SharedTest
9
- end