celluloid-http 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,6 @@
1
1
  module Celluloid::Http::Http
2
2
 
3
- def send_requst(request)
3
+ def send_request(request)
4
4
  connection = Celluloid::Http::Connection.open(request.host, request.port)
5
5
  connection.send_request request
6
6
 
@@ -8,6 +8,7 @@ class Celluloid::Http::Request
8
8
  attr_accessor :method, :body
9
9
 
10
10
  def_delegators :@uri, :scheme, :host, :path, :port, :query
11
+ def_delegators :@uri, :scheme=, :host=, :path=, :port=
11
12
 
12
13
  def initialize(url, options = {})
13
14
  @url = url
@@ -19,7 +20,7 @@ class Celluloid::Http::Request
19
20
  end
20
21
 
21
22
  def query_params
22
- @query_params ||= Rack::Utils.parse_nested_query @uri.query
23
+ Rack::Utils.parse_nested_query @uri.query
23
24
  end
24
25
 
25
26
  def to_s
@@ -35,8 +36,8 @@ class Celluloid::Http::Request
35
36
  end
36
37
 
37
38
  def merge_query_params(params)
38
- query_params.merge! params
39
- self.query = query_params
39
+ params = query_params.merge params
40
+ self.query = params
40
41
  end
41
42
 
42
43
  end
@@ -1,5 +1,5 @@
1
1
  module Celluloid
2
2
  module Http
3
- VERSION = "0.0.3"
3
+ VERSION = "0.0.4"
4
4
  end
5
5
  end
@@ -6,7 +6,7 @@ class HttpTest < TestCase
6
6
  stub_connection_with_fixture("en.wikipedia.org")
7
7
 
8
8
  request = Celluloid::Http::Request.new 'http://en.wikipedia.org/wiki/Http'
9
- response = Celluloid::Http.send_requst request
9
+ response = Celluloid::Http.send_request request
10
10
 
11
11
  assert_match /Wikipedia, the free encyclopedia/, response.body
12
12
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: celluloid-http
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: