sessionm-resthome 0.8.8 → 0.8.9

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.8.8
1
+ 0.8.9
@@ -17,17 +17,27 @@ class AsyncConnectionAdapter < HTTParty::ConnectionAdapter
17
17
  # add a request method to EventMachine::HttpConnection to simulate how Net::HTTP works
18
18
  class AsyncHTTPConnection < EventMachine::HttpConnection
19
19
  def request(raw_request)
20
+ options = {:head => {}}
21
+ raw_request.each_header do |k, v|
22
+ options[:head][k] = v
23
+ end
24
+
25
+ if raw_request.body
26
+ options[:head]['Content-Length'] = raw_request.body.bytesize
27
+ options[:body] = raw_request.body
28
+ end
29
+
20
30
  case raw_request
21
31
  when Net::HTTP::Get
22
- AsyncHTTPResponse.new self.get
32
+ AsyncHTTPResponse.new self.get options
23
33
  when Net::HTTP::Post
24
- AsyncHTTPResponse.new self.post
34
+ AsyncHTTPResponse.new self.post options
25
35
  when Net::HTTP::Put
26
- AsyncHTTPResponse.new self.put
36
+ AsyncHTTPResponse.new self.put options
27
37
  when Net::HTTP::Delete
28
- AsyncHTTPResponse.new self.delete
38
+ AsyncHTTPResponse.new self.delete options
29
39
  when Net::HTTP::Head
30
- AsyncHTTPResponse.new self.head
40
+ AsyncHTTPResponse.new self.head options
31
41
  else
32
42
  raise "unknown request type #{raw_request}"
33
43
  end
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "sessionm-resthome"
8
- s.version = "0.8.8"
8
+ s.version = "0.8.9"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Doug Youch"]
12
- s.date = "2013-06-03"
12
+ s.date = "2013-06-04"
13
13
  s.description = "Simple wrapper class generator for consuming RESTful web services"
14
14
  s.email = "doug@sessionm.com"
15
15
  s.extra_rdoc_files = [
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sessionm-resthome
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.8
4
+ version: 0.8.9
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-06-03 00:00:00.000000000 Z
12
+ date: 2013-06-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: httparty
@@ -201,7 +201,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
201
201
  version: '0'
202
202
  segments:
203
203
  - 0
204
- hash: -1974835088991150874
204
+ hash: 2130390588193651110
205
205
  required_rubygems_version: !ruby/object:Gem::Requirement
206
206
  none: false
207
207
  requirements: