kirk 0.1.6-java → 0.1.7-java

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.md CHANGED
@@ -51,6 +51,9 @@ we are going to put the following configuration file at `/path/to/Kirkfile`.
51
51
  # on. This defaults to "*"
52
52
  hosts "example.com", "*.example.org"
53
53
 
54
+ # Set arbitrary ENV variables
55
+ env :RAILS_ENV => "production"
56
+
54
57
  # Set the file that controls the redeploys. This is relative to
55
58
  # the applications root (the directory that the rackup file lives
56
59
  # in). Touch this file to redepoy the application.
@@ -33,6 +33,7 @@ module Kirk
33
33
  end
34
34
 
35
35
  require 'kirk/builder'
36
+ require 'kirk/client'
36
37
  require 'kirk/handler'
37
38
  require 'kirk/input_stream'
38
39
  require 'kirk/server'
@@ -1,9 +1,6 @@
1
1
  require 'java'
2
2
 
3
3
  module Kirk
4
- import 'java.util.zip.GZIPInputStream'
5
- import 'java.util.zip.InflaterInputStream'
6
-
7
4
  class Bootstrap
8
5
  def warmup(application_path)
9
6
  Dir.chdir File.expand_path(application_path)
@@ -0,0 +1,5 @@
1
+ module Kirk
2
+ class Client
3
+ # stuff
4
+ end
5
+ end
@@ -1,5 +1,8 @@
1
1
  module Kirk
2
2
  class Handler
3
+ import "java.util.zip.GZIPInputStream"
4
+ import "java.util.zip.InflaterInputStream"
5
+
3
6
  # Required environment variable keys
4
7
  REQUEST_METHOD = 'REQUEST_METHOD'.freeze
5
8
  SCRIPT_NAME = 'SCRIPT_NAME'.freeze
@@ -124,12 +124,12 @@ module Kirk
124
124
 
125
125
  else
126
126
 
127
- read_chunk_from_mem(missing, string)
127
+ read_chunk_from_mem(size, string, missing)
128
128
 
129
129
  end
130
130
  end
131
131
 
132
- def read_chunk_from_mem(missing, string)
132
+ def read_chunk_from_mem(size, string, missing)
133
133
  # We gonna have to read from the input stream
134
134
  if missing > 0 && !@eof
135
135
 
@@ -155,8 +155,11 @@ module Kirk
155
155
 
156
156
  end
157
157
 
158
+ limit = @position + size
159
+ limit = @read if @read < limit
160
+
158
161
  # Now move the amount read into the string
159
- @buffer.position(@position).limit(@read)
162
+ @buffer.position(@position).limit(limit)
160
163
 
161
164
  append_buffer_to_string(@buffer, string)
162
165
  end
@@ -1,14 +1,19 @@
1
+ require "kirk/jetty/jetty-client-7.2.2.v20101205"
1
2
  require "kirk/jetty/jetty-server-7.2.2.v20101205"
2
3
  require "kirk/jetty/servlet-api-2.5"
3
4
 
4
5
  module Kirk
5
6
  module Jetty
6
7
  # Gimme Jetty
8
+ import "org.eclipse.jetty.client.HttpClient"
9
+ import "org.eclipse.jetty.client.HttpExchange"
10
+
7
11
  import "org.eclipse.jetty.server.nio.SelectChannelConnector"
8
12
  import "org.eclipse.jetty.server.handler.AbstractHandler"
9
13
  import "org.eclipse.jetty.server.handler.ContextHandler"
10
14
  import "org.eclipse.jetty.server.handler.ContextHandlerCollection"
11
15
  import "org.eclipse.jetty.server.Server"
16
+
12
17
  import "org.eclipse.jetty.util.component.LifeCycle"
13
18
  import "org.eclipse.jetty.util.log.Log"
14
19
  import "org.eclipse.jetty.util.log.JavaUtilLog"
@@ -1,4 +1,4 @@
1
1
  module Kirk
2
2
  NAME = "kirk".freeze
3
- VERSION = "0.1.6".freeze
3
+ VERSION = "0.1.7".freeze
4
4
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: kirk
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.1.6
5
+ version: 0.1.7
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-02-07 00:00:00 -08:00
13
+ date: 2011-02-14 00:00:00 -08:00
14
14
  default_executable: kirk
15
15
  dependencies: []
16
16
 
@@ -32,6 +32,7 @@ files:
32
32
  - lib/kirk/bootstrap.rb
33
33
  - lib/kirk/builder.rb
34
34
  - lib/kirk/cli.rb
35
+ - lib/kirk/client.rb
35
36
  - lib/kirk/handler.rb
36
37
  - lib/kirk/input_stream.rb
37
38
  - lib/kirk/jetty.rb
@@ -44,6 +45,7 @@ files:
44
45
  - lib/kirk/applications/redeploy_client.rb
45
46
  - lib/rack/handler/kirk.rb
46
47
  - lib/kirk/native.jar
48
+ - lib/kirk/jetty/jetty-client-7.2.2.v20101205.jar
47
49
  - lib/kirk/jetty/jetty-server-7.2.2.v20101205.jar
48
50
  - lib/kirk/jetty/servlet-api-2.5.jar
49
51
  - bin/kirk
@@ -73,7 +75,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
73
75
  requirements: []
74
76
 
75
77
  rubyforge_project: kirk
76
- rubygems_version: 1.4.2
78
+ rubygems_version: 1.5.0
77
79
  signing_key:
78
80
  specification_version: 3
79
81
  summary: A JRuby Rack Server Based on Jetty