ey_api_hmac 0.4.4 → 0.4.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -122,6 +122,12 @@ module EY
122
122
  else
123
123
  response
124
124
  end
125
+ when 204
126
+ if block_given?
127
+ yield({}, response["Location"])
128
+ else
129
+ response
130
+ end
125
131
  when 404
126
132
  raise NotFound.new(url)
127
133
  when 400
@@ -1,5 +1,5 @@
1
1
  module EY
2
2
  module ApiHMAC
3
- VERSION = "0.4.4"
3
+ VERSION = "0.4.5"
4
4
  end
5
5
  end
@@ -51,4 +51,14 @@ describe EY::ApiHMAC::AuthedConnection do
51
51
  lambda { @connection.get("/") }.should raise_exception(Rack::Idempotent::RetryLimitExceeded)
52
52
  end
53
53
  end
54
+ describe "204" do
55
+ before do
56
+ @connection.backend = lambda do |env|
57
+ [204, {}, []]
58
+ end
59
+ end
60
+ it "works" do
61
+ @connection.get("/"){|a,b| a }.should eq({})
62
+ end
63
+ end
54
64
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ey_api_hmac
3
3
  version: !ruby/object:Gem::Version
4
- hash: 7
4
+ hash: 5
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 4
9
- - 4
10
- version: 0.4.4
9
+ - 5
10
+ version: 0.4.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - "Jacob Burkhart & Thorben Schr\xC3\xB6der & David Calavera & others"
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-02-09 00:00:00 Z
18
+ date: 2012-03-23 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: rack-client