kirk 0.1.5-java → 0.1.6-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.
@@ -3,7 +3,8 @@ module Kirk
3
3
  class Config
4
4
  include Native::ApplicationConfig
5
5
 
6
- attr_accessor :hosts,
6
+ attr_accessor :env,
7
+ :hosts,
7
8
  :listen,
8
9
  :watch,
9
10
  :rackup,
@@ -11,6 +12,7 @@ module Kirk
11
12
  :bootstrap_path
12
13
 
13
14
  def initialize
15
+ @env = {}
14
16
  @hosts = []
15
17
  @listen = listen
16
18
  end
@@ -23,6 +25,26 @@ module Kirk
23
25
  alias getApplicationPath application_path
24
26
  alias getRackupPath rackup
25
27
  alias getBootstrapPath bootstrap_path
28
+
29
+ def getEnvironment
30
+ map = java.util.HashMap.new
31
+ env = ENV.dup
32
+
33
+ self.env.each do |key, val|
34
+ env[key.to_s] = val
35
+ end
36
+
37
+ env.each do |key, val|
38
+ next unless val
39
+
40
+ key = key.to_java_string
41
+ val = val.to_s.to_java_string
42
+
43
+ map.put(key, val)
44
+ end
45
+
46
+ map
47
+ end
26
48
  end
27
49
  end
28
50
  end
@@ -56,6 +56,10 @@ module Kirk
56
56
  @current = nil
57
57
  end
58
58
 
59
+ def env(env)
60
+ @current.env.merge!(env)
61
+ end
62
+
59
63
  def hosts(*hosts)
60
64
  @current.hosts.concat hosts
61
65
  end
Binary file
@@ -1,4 +1,4 @@
1
1
  module Kirk
2
2
  NAME = "kirk".freeze
3
- VERSION = "0.1.5".freeze
3
+ VERSION = "0.1.6".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.5
5
+ version: 0.1.6
6
6
  platform: java
7
7
  authors:
8
8
  - Carl Lerche