trinidad 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +4 -0
- data/lib/trinidad.rb +1 -1
- data/lib/trinidad/command_line_parser.rb +1 -1
- data/lib/trinidad/server.rb +3 -3
- data/lib/trinidad/web_app.rb +2 -1
- metadata +3 -3
data/History.txt
CHANGED
data/lib/trinidad.rb
CHANGED
data/lib/trinidad/server.rb
CHANGED
@@ -53,7 +53,7 @@ module Trinidad
|
|
53
53
|
def create_from_web_apps
|
54
54
|
if @config[:web_apps]
|
55
55
|
@config[:web_apps].each do |name, app_config|
|
56
|
-
app_config[:context_path] ||= (name.to_s == 'default' ? '
|
56
|
+
app_config[:context_path] ||= (name.to_s == 'default' ? '' : "/#{name.to_s}")
|
57
57
|
app_config[:web_app_dir] ||= Dir.pwd
|
58
58
|
|
59
59
|
create_web_app(app_config)
|
@@ -72,7 +72,7 @@ module Trinidad
|
|
72
72
|
if (File.directory?(path) || path =~ /\.war$/)
|
73
73
|
name = File.basename(path)
|
74
74
|
app_config = {
|
75
|
-
:context_path => (name == 'default' ? '
|
75
|
+
:context_path => (name == 'default' ? '' : "/#{name.to_s}"),
|
76
76
|
:web_app_dir => File.expand_path(path)
|
77
77
|
}
|
78
78
|
|
@@ -190,7 +190,7 @@ module Trinidad
|
|
190
190
|
def add_default_web_app!(config)
|
191
191
|
if (!config.has_key?(:web_apps) && !config.has_key?(:apps_base))
|
192
192
|
default_app = {
|
193
|
-
:context_path => config[:context_path]
|
193
|
+
:context_path => config[:context_path],
|
194
194
|
:web_app_dir => config[:web_app_dir] || Dir.pwd,
|
195
195
|
:log => config[:log]
|
196
196
|
}
|
data/lib/trinidad/web_app.rb
CHANGED
@@ -62,7 +62,7 @@ module Trinidad
|
|
62
62
|
@app_config[:public] || @config[:public] || 'public'
|
63
63
|
end
|
64
64
|
|
65
|
-
%w{context_path web_app_dir libs_dir classes_dir default_web_xml
|
65
|
+
%w{context_path web_app_dir libs_dir classes_dir default_web_xml
|
66
66
|
jruby_min_runtimes jruby_max_runtimes rackup log}.each do |method_name|
|
67
67
|
define_method method_name do
|
68
68
|
sym = method_name.to_sym
|
@@ -80,6 +80,7 @@ module Trinidad
|
|
80
80
|
|
81
81
|
def war?; WebApp.war?(app_config); end
|
82
82
|
def work_dir; web_app_dir; end
|
83
|
+
def environment; @app_config[:environment] || @config[:environment] || 'development'; end
|
83
84
|
|
84
85
|
protected
|
85
86
|
def add_parameter_unless_exist(param_name, param_value)
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 1
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: 1.0.
|
8
|
+
- 3
|
9
|
+
version: 1.0.3
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- David Calavera
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-
|
17
|
+
date: 2010-12-08 00:00:00 +01:00
|
18
18
|
default_executable: trinidad
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|