lhc 3.0.0 → 3.1.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: 532fd85310a7e113218217f2c338d64d373e55b1
4
- data.tar.gz: 87eaa6c2b66d287777b3f6f6726954322b184f26
3
+ metadata.gz: c9340ca162d9f5d5ad49d6a703e327d849f5b3ef
4
+ data.tar.gz: dbcbccfb870b4f438669b02f388f1e8eeb96ea69
5
5
  SHA512:
6
- metadata.gz: 52ed952ef6b926af1fd926f88f47e4a3f8a5c53c05e399ddb2ebef5a6007442f1a84ab6b1909799f20733999b996bca0fc30deb265dd8e75b889c64f6e08462e
7
- data.tar.gz: e8dc28efe138d2e16d49ff7be350139b36155d5ac35acf700e7b37e2036ebf05255b85aea6354131195daf1911472bd3723b9c4560e32f02a9d366e8f0e3a5ee
6
+ metadata.gz: 90f2ebae04ec5b322858cda86ac30bc985863c26aad6aab7478d615844a7676827caa7b4ecd5fe78982ec8a3d3be6198ad2b61d87ae918cc0a9e97d807c42b7c
7
+ data.tar.gz: 5854c0038f5ae2190a4175279b1ea8d8ffc46480efd2adeffbe6ba0062390851df2621003e2357d865e4a66fe7c829014c069b6c9b36f48fa8499beae5643cab
@@ -32,6 +32,10 @@ class LHC::Response
32
32
  raw.headers
33
33
  end
34
34
 
35
+ def options
36
+ raw.options
37
+ end
38
+
35
39
  # Provides response time in ms.
36
40
  def time
37
41
  (raw.time || 0) * 1000
@@ -1,3 +1,3 @@
1
1
  module LHC
2
- VERSION = "3.0.0"
2
+ VERSION = "3.1.0"
3
3
  end
@@ -0,0 +1,18 @@
1
+ require 'rails_helper'
2
+
3
+ describe LHC::Response do
4
+
5
+ context 'headers' do
6
+
7
+ let(:options) do
8
+ { 'return_code' => :ok }
9
+ end
10
+
11
+ let(:raw_response) { OpenStruct.new({ options: options }) }
12
+
13
+ it 'provides headers' do
14
+ response = LHC::Response.new(raw_response, nil)
15
+ expect(response.options).to eq options
16
+ end
17
+ end
18
+ 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.0.0
4
+ version: 3.1.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-10-28 00:00:00.000000000 Z
11
+ date: 2015-10-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -214,6 +214,7 @@ files:
214
214
  - spec/response/code_spec.rb
215
215
  - spec/response/data_spec.rb
216
216
  - spec/response/headers_spec.rb
217
+ - spec/response/options_spec.rb
217
218
  - spec/response/success_spec.rb
218
219
  - spec/response/time_spec.rb
219
220
  - spec/spec_helper.rb
@@ -322,6 +323,7 @@ test_files:
322
323
  - spec/response/code_spec.rb
323
324
  - spec/response/data_spec.rb
324
325
  - spec/response/headers_spec.rb
326
+ - spec/response/options_spec.rb
325
327
  - spec/response/success_spec.rb
326
328
  - spec/response/time_spec.rb
327
329
  - spec/spec_helper.rb