webmock 1.22.2 → 1.22.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.22.3
4
+
5
+ * Return "effective_url" attribute in Typhoeus::Response
6
+
7
+ Thanks to [Senya](https://github.com/cmrd-senya)
8
+
3
9
  ## 1.22.2
4
10
 
5
11
  * Fix: prevents adding an extra =true to urls with parameters without values
@@ -97,7 +97,8 @@ if defined?(Typhoeus)
97
97
  :code => webmock_response.status[0],
98
98
  :status_message => webmock_response.status[1],
99
99
  :body => webmock_response.body,
100
- :headers => webmock_response.headers
100
+ :headers => webmock_response.headers,
101
+ :effective_url => request_signature.uri
101
102
  )
102
103
  end
103
104
  response.mock = :webmock
@@ -1,3 +1,3 @@
1
1
  module WebMock
2
- VERSION = '1.22.2' unless defined?(::WebMock::VERSION)
2
+ VERSION = '1.22.3' unless defined?(::WebMock::VERSION)
3
3
  end
@@ -20,6 +20,18 @@ unless RUBY_PLATFORM =~ /java/
20
20
  WebMock.reset!
21
21
  end
22
22
 
23
+ describe "supposed response fields" do
24
+ it "present" do
25
+ stub_request(:get, "http://www.example.com").to_return(:headers => {'X-Test' => '1'})
26
+ response = Typhoeus.get("http://www.example.com")
27
+ expect(response.code).not_to be_nil
28
+ expect(response.status_message).not_to be_nil
29
+ expect(response.body).not_to be_nil
30
+ expect(response.headers).not_to be_nil
31
+ expect(response.effective_url).not_to be_nil
32
+ end
33
+ end
34
+
23
35
  describe "when params are used" do
24
36
  it "should take into account params for POST request" do
25
37
  stub_request(:post, "www.example.com/?hello=world").with(:query => {:hello => 'world'})
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: webmock
3
3
  version: !ruby/object:Gem::Version
4
- hash: 75
4
+ hash: 73
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 22
9
- - 2
10
- version: 1.22.2
9
+ - 3
10
+ version: 1.22.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Bartosz Blimke
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2015-10-29 00:00:00 +01:00
18
+ date: 2015-11-02 00:00:00 +01:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency