jruby-rack-worker 0.5-jruby → 0.6-jruby

Sign up to get free protection for your applications and to get access to all the features.
Binary file
@@ -0,0 +1,14 @@
1
+ require 'jruby/rack/worker/version'
2
+
3
+ module JRuby
4
+ module Rack
5
+ module Worker
6
+ unless const_defined?(:JAR_PATH)
7
+ JAR_PATH = File.expand_path("../../jruby-rack-worker_#{VERSION}.jar", File.dirname(__FILE__))
8
+ end
9
+ def self.load_jar(method = :load)
10
+ send(method, JAR_PATH) # load JAR_PATH
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,20 @@
1
+ module JRuby
2
+ module Rack
3
+ module Worker
4
+
5
+ ENV = Hash.new do |hash, key|
6
+ if hash.key? key = key.to_s
7
+ hash[key]
8
+ else
9
+ manager = self.manager
10
+ val = manager ? manager.getParameter(key) : nil
11
+ val = ::ENV[key] if val.nil?
12
+ hash[key] = val
13
+ end
14
+ end
15
+
16
+ def self.manager; $worker_manager; end
17
+
18
+ end
19
+ end
20
+ end
@@ -1,7 +1,7 @@
1
1
  module JRuby
2
2
  module Rack
3
3
  module Worker
4
- VERSION = '0.5'
4
+ VERSION = '0.6'
5
5
  end
6
6
  end
7
7
  end
@@ -1,2 +1,2 @@
1
- require 'jruby/rack/worker/version'
2
- require File.expand_path("jruby-rack-worker_#{JRuby::Rack::Worker::VERSION}.jar", File.dirname(__FILE__))
1
+ require 'jruby/rack/worker'
2
+ JRuby::Rack::Worker.load_jar
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: jruby-rack-worker
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: "0.5"
5
+ version: "0.6"
6
6
  platform: jruby
7
7
  authors:
8
8
  - Karol Bucek
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2012-10-05 00:00:00 Z
13
+ date: 2012-10-11 00:00:00 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: jruby-rack
@@ -35,8 +35,10 @@ extra_rdoc_files: []
35
35
  files:
36
36
  - README.md
37
37
  - LICENSE
38
- - lib/jruby-rack-worker_0.5.jar
38
+ - lib/jruby-rack-worker_0.6.jar
39
39
  - lib/jruby_rack_worker.rb
40
+ - lib/jruby/rack/worker.rb
41
+ - lib/jruby/rack/worker/env.rb
40
42
  - lib/jruby/rack/worker/version.rb
41
43
  homepage: http://github.com/kares/jruby-rack-worker
42
44
  licenses: []
Binary file