lhc 3.2.0 → 3.3.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: 43a289b03b874bf4db882437401c6f5f7ce76111
4
- data.tar.gz: aa18dab5fe11eff93eada4ad91267a54357afb14
3
+ metadata.gz: 4bd80d03c65bd862b57ce1124558e137284a3d23
4
+ data.tar.gz: 4329e5c72edb5119904420d08faaf971190d45e8
5
5
  SHA512:
6
- metadata.gz: a6677681346af6436d59ed7201a7666e049aebb4ec35a8145a7c4afbb98ba37960544e982536d57e4d17a325236fcf2f217fe075fb5a1dd7f3ceeac35338f8d9
7
- data.tar.gz: 08c21acba94b0f42aff47ae3168e02a9cb884f552c4b195e024c77d75fe20a02429355a92da14ef1e9c37d22cd239a7d50a612f96534bbae8f56cc6412650f35
6
+ metadata.gz: 3129c6d7886946887fb0574d356a405c8e2b5e5f92cafc063582dad73307a62f1d2bc1210e8e570bbe7b22568ac52f1c23392cc88d9e9cb20dbcf3c2eaa2d10b
7
+ data.tar.gz: 4c484cdc38c4f0efa2b37ab8b455c49fde466d62ed4e69653c2ad3528ec09a1bf0225f4ffb4489ff2ba3bee5c23552fb050b8963e2eda771d56975048b0a55f1
@@ -7,7 +7,7 @@ require 'active_support/core_ext/object/deep_dup'
7
7
  # and it communicates with interceptors.
8
8
  class LHC::Request
9
9
 
10
- TYPHOEUS_OPTIONS = [:params, :method, :body, :headers]
10
+ TYPHOEUS_OPTIONS = [:params, :method, :body, :headers, :follow_location]
11
11
 
12
12
  attr_accessor :response, :options, :raw
13
13
 
@@ -25,6 +25,10 @@ class LHC::Response
25
25
  @data
26
26
  end
27
27
 
28
+ def effective_url
29
+ raw.effective_url
30
+ end
31
+
28
32
  def body
29
33
  raw.body
30
34
  end
@@ -1,3 +1,3 @@
1
1
  module LHC
2
- VERSION = "3.2.0"
2
+ VERSION = "3.3.0"
3
3
  end
@@ -0,0 +1,16 @@
1
+ require 'rails_helper'
2
+
3
+ describe LHC::Response do
4
+
5
+ context 'effective_url' do
6
+
7
+ let(:effective_url) { 'https://www.local.ch' }
8
+
9
+ let(:raw_response) { OpenStruct.new(effective_url: effective_url) }
10
+
11
+ it 'provides effective_url' do
12
+ response = LHC::Response.new(raw_response, nil)
13
+ expect(response.effective_url).to eq effective_url
14
+ end
15
+ end
16
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lhc
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.0
4
+ version: 3.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - local.ch
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-01 00:00:00.000000000 Z
11
+ date: 2015-12-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -218,6 +218,7 @@ files:
218
218
  - spec/response/body_spec.rb
219
219
  - spec/response/code_spec.rb
220
220
  - spec/response/data_spec.rb
221
+ - spec/response/effective_url_spec.rb
221
222
  - spec/response/headers_spec.rb
222
223
  - spec/response/options_spec.rb
223
224
  - spec/response/success_spec.rb
@@ -327,6 +328,7 @@ test_files:
327
328
  - spec/response/body_spec.rb
328
329
  - spec/response/code_spec.rb
329
330
  - spec/response/data_spec.rb
331
+ - spec/response/effective_url_spec.rb
330
332
  - spec/response/headers_spec.rb
331
333
  - spec/response/options_spec.rb
332
334
  - spec/response/success_spec.rb