webmock 3.1.1 → 3.2.0

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
  SHA1:
3
- metadata.gz: a60e5c10c12015a55daf2ca648d2fd5ec97f42a6
4
- data.tar.gz: edad48fc72fd4249a1b2ebaf3c5e493663369305
3
+ metadata.gz: dcc2534597446961ba1489ab97892043fde75a6f
4
+ data.tar.gz: 1ef34b8d183d56935d2991b73cfa183d172f1df5
5
5
  SHA512:
6
- metadata.gz: 9db9e13d0e01c92862350f63d70291bd5d78ba5bdf6cdc3cb2df898f608bcb37289f3598dc58ab51c6f8328a2328b75fdecad487548078a390443a4f2d16eaa8
7
- data.tar.gz: 12473cebc137918d46f50c5c2d8d7b58a5d16dce5a88965ca564915a445a5530ecc141262889ad857eb259c575c45534fda31d66cbaf390003ae0ccfcf664011
6
+ metadata.gz: f5ed61bb690ad3b649b944d2fbfe5d6c636303befe3ef378a3096dc17aa087fbb19ea36f73623400ae97bf20a30decb864ff32ba3fd9c0e452ef4dbf5b75e060
7
+ data.tar.gz: e6d8db01788d4f7684cece257af0efa5ae975c2f194cf72c907883a212e35534a6e281d5ef8fa14cf6dc44d5e6b719464941592fa9cbbd86752124569e27774f
@@ -1,5 +1,16 @@
1
1
  # Changelog
2
2
 
3
+ ## 3.2.0
4
+
5
+ * Automatically disable WebMock after Rspec suite
6
+
7
+ Thanks to [Michał Matyas](https://github.com/d4rky-pl)
8
+
9
+ * Fixed bug when handling redirection using Curb.
10
+
11
+ Thanks to [Olia Kremmyda](https://github.com/Olia-Kremmyda)
12
+
13
+
3
14
  ## 3.1.1
4
15
 
5
16
  * Warning message is displayed only once when adding query params to URIAddressablePattern.
data/README.md CHANGED
@@ -1049,6 +1049,8 @@ People who submitted patches and new features or suggested improvements. Many th
1049
1049
  * Rick Song
1050
1050
  * NARUSE, Yui
1051
1051
  * Piotr Boniecki
1052
+ * Olia Kremmyda
1053
+ * Michał Matyas
1052
1054
 
1053
1055
  For a full list of contributors you can visit the
1054
1056
  [contributors](https://github.com/bblimke/webmock/contributors) page.
@@ -183,7 +183,7 @@ if defined?(Curl)
183
183
  self.url = location
184
184
 
185
185
  curb_or_webmock do
186
- send( "http_#{@webmock_method}_without_webmock" )
186
+ send( :http, {'method' => @webmock_method} )
187
187
  end
188
188
 
189
189
  self.url = first_url
@@ -20,13 +20,19 @@ end
20
20
 
21
21
  require 'webmock/rspec/matchers'
22
22
 
23
- WebMock.enable!
24
-
25
23
  RSPEC_CONFIGURER.configure { |config|
26
24
 
27
25
  config.include WebMock::API
28
26
  config.include WebMock::Matchers
29
27
 
28
+ config.before(:suite) do
29
+ WebMock.enable!
30
+ end
31
+
32
+ config.after(:suite) do
33
+ WebMock.disable!
34
+ end
35
+
30
36
  config.after(:each) do
31
37
  WebMock.reset!
32
38
  end
@@ -1,3 +1,3 @@
1
1
  module WebMock
2
- VERSION = '3.1.1' unless defined?(::WebMock::VERSION)
2
+ VERSION = '3.2.0' unless defined?(::WebMock::VERSION)
3
3
  end
@@ -8,7 +8,10 @@ module HttpRbSpecHelper
8
8
  chain = chain.basic_auth(user: basic_auth[0], pass: basic_auth[1])
9
9
  end
10
10
 
11
- response = chain.request(method, normalize_uri(uri), options)
11
+ ssl_ctx = OpenSSL::SSL::SSLContext.new
12
+ ssl_ctx.verify_mode = OpenSSL::SSL::VERIFY_NONE
13
+
14
+ response = chain.request(method, normalize_uri(uri), options.merge(ssl_context: ssl_ctx))
12
15
 
13
16
  OpenStruct.new({
14
17
  body: response.body.to_s,
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.1.1
4
+ version: 3.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bartosz Blimke
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-11-19 00:00:00.000000000 Z
11
+ date: 2018-01-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable
@@ -112,16 +112,16 @@ dependencies:
112
112
  name: rack
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - '='
115
+ - - ">"
116
116
  - !ruby/object:Gem::Version
117
- version: 1.6.0
117
+ version: '1.6'
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
- - - '='
122
+ - - ">"
123
123
  - !ruby/object:Gem::Version
124
- version: 1.6.0
124
+ version: '1.6'
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: rspec
127
127
  requirement: !ruby/object:Gem::Requirement
@@ -398,7 +398,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
398
398
  version: '0'
399
399
  requirements: []
400
400
  rubyforge_project: webmock
401
- rubygems_version: 2.2.2
401
+ rubygems_version: 2.6.13
402
402
  signing_key:
403
403
  specification_version: 4
404
404
  summary: Library for stubbing HTTP requests in Ruby.