kirk 0.2.0.beta.3-java → 0.2.0.beta.4-java

Sign up to get free protection for your applications and to get access to all the features.
data/lib/kirk/client.rb CHANGED
@@ -23,6 +23,10 @@ module Kirk
23
23
  %w(request head get post put delete).each do |method|
24
24
  class_eval <<-RUBY
25
25
  def self.#{method}(*args, &blk)
26
+ client.#{method}(*args, &blk)
27
+ end
28
+
29
+ def #{method}(*args, &blk)
26
30
  g = group { |g| g.#{method}(*args, &blk) }
27
31
  g.responses.first
28
32
  end
@@ -22,11 +22,13 @@ module Kirk
22
22
  self.request = request
23
23
  self.response = Response.new(!handler.respond_to?(:on_response_body))
24
24
  self.method = request.method
25
- self.url = request.url
25
+ self.url = request.url.to_s
26
26
 
27
27
  if request.headers
28
28
  request.headers.each do |name, val|
29
- self.set_request_header(name.to_s, val.to_s)
29
+ name = name.to_s
30
+ val = val.to_s
31
+ self.set_request_header(name, val)
30
32
  end
31
33
  end
32
34
 
@@ -56,8 +56,8 @@ module Kirk
56
56
 
57
57
  %w/get post put delete head/.each do |method|
58
58
  class_eval <<-RUBY
59
- def #{method}(url, headers = nil, handler = nil)
60
- request(:#{method.upcase}, url, headers, handler)
59
+ def #{method}(url, handler = nil, body = nil, headers = {})
60
+ request(:#{method.upcase}, url, handler, body, headers)
61
61
  end
62
62
  RUBY
63
63
  end
data/lib/kirk/jetty.rb CHANGED
@@ -3,7 +3,7 @@ unless Kirk.sub_process?
3
3
  require "kirk/jetty/servlet-api-2.5"
4
4
 
5
5
  %w(util http io continuation server client).each do |mod|
6
- require "kirk/jetty/jetty-#{mod}-7.3.0.v20110203"
6
+ require "kirk/jetty/jetty-#{mod}-7.3.1.v20110307"
7
7
  end
8
8
  end
9
9
 
data/lib/kirk/native.jar CHANGED
Binary file
@@ -122,7 +122,9 @@ module Kirk
122
122
  when CONTENT_LENGTH_RESP
123
123
  response.set_content_length(value.to_i)
124
124
  else
125
- response.set_header(header, value)
125
+ value.split("\n").each do |v|
126
+ response.add_header(header, v)
127
+ end
126
128
  end
127
129
  end
128
130
 
data/lib/kirk/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Kirk
2
2
  NAME = "kirk".freeze
3
- VERSION = "0.2.0.beta.3".freeze
3
+ VERSION = "0.2.0.beta.4".freeze
4
4
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: kirk
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease: 6
5
- version: 0.2.0.beta.3
5
+ version: 0.2.0.beta.4
6
6
  platform: java
7
7
  authors:
8
8
  - Carl Lerche
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-03-01 00:00:00 -08:00
13
+ date: 2011-04-27 00:00:00 +03:00
14
14
  default_executable: kirk
15
15
  dependencies: []
16
16
 
@@ -49,12 +49,12 @@ files:
49
49
  - lib/kirk/server/redeploy_client.rb
50
50
  - lib/rack/handler/kirk.rb
51
51
  - lib/kirk/native.jar
52
- - lib/kirk/jetty/jetty-client-7.3.0.v20110203.jar
53
- - lib/kirk/jetty/jetty-continuation-7.3.0.v20110203.jar
54
- - lib/kirk/jetty/jetty-http-7.3.0.v20110203.jar
55
- - lib/kirk/jetty/jetty-io-7.3.0.v20110203.jar
56
- - lib/kirk/jetty/jetty-server-7.3.0.v20110203.jar
57
- - lib/kirk/jetty/jetty-util-7.3.0.v20110203.jar
52
+ - lib/kirk/jetty/jetty-client-7.3.1.v20110307.jar
53
+ - lib/kirk/jetty/jetty-continuation-7.3.1.v20110307.jar
54
+ - lib/kirk/jetty/jetty-http-7.3.1.v20110307.jar
55
+ - lib/kirk/jetty/jetty-io-7.3.1.v20110307.jar
56
+ - lib/kirk/jetty/jetty-server-7.3.1.v20110307.jar
57
+ - lib/kirk/jetty/jetty-util-7.3.1.v20110307.jar
58
58
  - lib/kirk/jetty/servlet-api-2.5.jar
59
59
  - bin/kirk
60
60
  - README.md