trinidad 1.0.2 → 1.0.3

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.
@@ -1,3 +1,7 @@
1
+ == 1.0.3 (2010-12-08)
2
+
3
+ * fix TRINIDAD-31: fix bug causing trailing slashes errors loading assets
4
+
1
5
  == 1.0.2 (2010-11-11)
2
6
 
3
7
  * stop using application directory as work directory to prevent TRINIDAD-27 and other issues
@@ -24,5 +24,5 @@ require 'trinidad/rackup_web_app'
24
24
  require 'trinidad/war_web_app'
25
25
 
26
26
  module Trinidad
27
- VERSION = '1.0.2'
27
+ VERSION = '1.0.3'
28
28
  end
@@ -13,7 +13,7 @@ module Trinidad
13
13
  @default_options = {
14
14
  :port => 3000,
15
15
  :environment => 'development',
16
- :context_path => '/',
16
+ :context_path => '',
17
17
  :libs_dir => 'lib',
18
18
  :classes_dir => 'classes',
19
19
  :ssl_port => 8443,
@@ -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' ? '/' : "/#{name.to_s}")
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' ? '/' : "/#{name.to_s}"),
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
  }
@@ -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 environment
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
- - 2
9
- version: 1.0.2
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-11-11 00:00:00 -06:00
17
+ date: 2010-12-08 00:00:00 +01:00
18
18
  default_executable: trinidad
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency