hyperion_http 0.1.3 → 0.1.4

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: 703f7193788110358cd78d9f7e6ae05582f5f162
4
- data.tar.gz: b49182985aacb2b2f3d2807200b10c5873dfdffe
3
+ metadata.gz: d9d372cf4d4619f6f072bc380c17063ecb5fe855
4
+ data.tar.gz: 26f3f857b2e7c95172957dbaed57c63daa4528a7
5
5
  SHA512:
6
- metadata.gz: b9c94fa7cefb90d8cbfb49e34e19ecc8129d64f79ef6321e5aedb1a894e07ebb3bf54da01e57cb19c0938de8ee5c332626cf6585aced7917a03b58d840fe90bb
7
- data.tar.gz: 70229fff4a01fbedad1c924cab318e17e223a916a29cfd320b332514675b1783af99cbc64a1f33768a12c44a6970fe230aefbcbda9ca4772a231959b2dbdcc26
6
+ metadata.gz: f38a45cf7bf55934c47dfd23bb1516fbd489751f32a74ed78bc3171e1e68b7ee7fa38eb0d856ee0809a816aed593538ebb1c092c79367e4251a3423e18730145
7
+ data.tar.gz: a80a5552f4a2419ab751806a4f6b3aeb4f26790ee2390bcbbb52906442c00019f639b86d8bcdc74505162225e91aa2edec1bb8e96651ca04817cc82364741951
@@ -1,3 +1,3 @@
1
1
  class Hyperion
2
- VERSION = '0.1.3'
2
+ VERSION = '0.1.4'
3
3
  end
@@ -19,11 +19,12 @@ class Hyperion
19
19
  Hyperion::Util.guard_param(opts, 'an options hash', Hash)
20
20
 
21
21
  body = opts[:body]
22
+ headers = opts[:headers] || {}
22
23
  additional_handler_hash = opts[:also_handle] || {}
23
24
  render = opts[:render] || Proc.identity
24
25
  project = project || Proc.identity
25
26
 
26
- Hyperion.request(route, body) do |result|
27
+ Hyperion.request(route, body, headers) do |result|
27
28
  all_handlers = [hash_handler(additional_handler_hash),
28
29
  handler_from_including_class,
29
30
  built_in_handler(project, render)]
@@ -1,6 +1,8 @@
1
1
  require 'ostruct'
2
2
  require 'hyperion_test'
3
3
 
4
+ # TODO: rename this file to something appropriate. superion became Hyperion::Requestor
5
+
4
6
  class ClassWithHyperionHandlers
5
7
  include Hyperion::Requestor
6
8
 
@@ -37,6 +39,13 @@ describe Hyperion::Requestor do
37
39
  assert_result({'a' => 'b'})
38
40
  end
39
41
 
42
+ it 'makes requests with additional headers' do
43
+ headers = {'X-my-header' => 'value'}
44
+ arrange(:get, {'a' => 'b'})
45
+ expect(Hyperion).to receive(:request).with(@route, nil, headers)
46
+ @result = request(@route, headers: headers)
47
+ end
48
+
40
49
  it 'makes requests with payload bodies' do
41
50
  arrange(:put, {'a' => 'b'})
42
51
  @result = request(@route, body: {'the' => 'body'})
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hyperion_http
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Indigo BioAutomation, Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-02 00:00:00.000000000 Z
11
+ date: 2015-11-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler