trinidad 1.4.1 → 1.4.3
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +17 -4
- data/History.txt +57 -0
- data/LICENSE +5 -4
- data/README.md +96 -24
- data/Rakefile +89 -29
- data/lib/rack/handler/trinidad.rb +3 -5
- data/lib/trinidad.rb +4 -3
- data/lib/trinidad/command_line_parser.rb +81 -55
- data/lib/trinidad/configuration.rb +23 -20
- data/lib/trinidad/lifecycle/host.rb +2 -0
- data/lib/trinidad/lifecycle/web_app/default.rb +59 -25
- data/lib/trinidad/lifecycle/web_app/shared.rb +115 -14
- data/lib/trinidad/lifecycle/web_app/war.rb +6 -3
- data/lib/trinidad/server.rb +14 -14
- data/lib/trinidad/version.rb +1 -1
- data/lib/trinidad/web_app.rb +363 -78
- data/rakelib/tomcat.rake +29 -18
- data/trinidad.gemspec +7 -7
- metadata +7 -9
- data/rakelib/trinidad.rake +0 -26
- data/rakelib/trinidad_jars.rake +0 -26
data/rakelib/tomcat.rake
CHANGED
@@ -2,8 +2,8 @@ require 'open-uri'
|
|
2
2
|
require 'tmpdir'
|
3
3
|
|
4
4
|
namespace :tomcat do
|
5
|
+
include TrinidadRakeHelpers
|
5
6
|
|
6
|
-
TOMCAT_CORE_JAR = File.expand_path('../../trinidad-libs/tomcat-core.jar', __FILE__)
|
7
7
|
TOMCAT_MAVEN_REPO = 'http://repo2.maven.org/maven2/org/apache/tomcat'
|
8
8
|
|
9
9
|
tomcat = "#{TOMCAT_MAVEN_REPO}/embed/tomcat-embed-core/%s/tomcat-embed-core-%s.jar"
|
@@ -36,9 +36,9 @@ namespace :tomcat do
|
|
36
36
|
FileUtils.rm_r temp_dir
|
37
37
|
end
|
38
38
|
|
39
|
-
|
39
|
+
TOMCAT_CORE_TARGET_DIR = File.expand_path('../../target/tomcat-core', __FILE__)
|
40
40
|
|
41
|
-
desc "Updates Tomcat to a given version e.g. `rake tomcat:update[7.0.
|
41
|
+
desc "Updates Tomcat to a given version e.g. `rake tomcat:update[7.0.30]`"
|
42
42
|
task :update, :version do |_, args|
|
43
43
|
Rake::Task['tomcat:fetch'].invoke(version = args[:version])
|
44
44
|
Rake::Task['tomcat:patch'].invoke
|
@@ -49,27 +49,38 @@ namespace :tomcat do
|
|
49
49
|
file.gsub!(/TOMCAT_VERSION = '(.+)'/, "TOMCAT_VERSION = '#{version}'")
|
50
50
|
File.open(path, 'w') { |io| io.write(file) }
|
51
51
|
|
52
|
-
puts "DONE - Tomcat's version has been updated
|
52
|
+
puts "DONE - Tomcat's version has been updated to #{version} succesfully !\n"
|
53
|
+
puts "`export trinidad_jars=true && bundle install` to use the local trinidad_jars gem with bundler"
|
54
|
+
end
|
55
|
+
|
56
|
+
task :patch do
|
57
|
+
Rake::Task['tomcat-core:jar'].invoke
|
53
58
|
end
|
54
59
|
|
55
|
-
task :
|
56
|
-
|
57
|
-
sh 'javac -Xlint:deprecation -Xlint:unchecked -g -source 1.6 -target 1.6 ' +
|
58
|
-
"-classpath #{TOMCAT_CORE_JAR} -d #{TARGET_DIR} " +
|
59
|
-
Dir["src/java/**/*.java"].join(" ")
|
60
|
+
task :clear do
|
61
|
+
rm TOMCAT_CORE_JAR if File.exist?(TOMCAT_CORE_JAR)
|
60
62
|
end
|
63
|
+
task :clean => :clear
|
61
64
|
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
65
|
+
end
|
66
|
+
|
67
|
+
namespace :'tomcat-core' do
|
68
|
+
|
69
|
+
task :compile do
|
70
|
+
javac "src/tomcat-core/java", TOMCAT_CORE_TARGET_DIR
|
68
71
|
end
|
69
72
|
|
70
|
-
task :
|
71
|
-
|
73
|
+
task :jar => :compile do
|
74
|
+
unless File.exist?(TOMCAT_CORE_JAR)
|
75
|
+
fail "missing #{TOMCAT_CORE_JAR} run tomcat:update first"
|
76
|
+
end
|
77
|
+
jar TOMCAT_CORE_TARGET_DIR, TOMCAT_CORE_JAR
|
78
|
+
end
|
79
|
+
|
80
|
+
task :clear do
|
81
|
+
rm_r TOMCAT_CORE_TARGET_DIR if File.exist?(TOMCAT_CORE_TARGET_DIR)
|
72
82
|
rm TOMCAT_CORE_JAR if File.exist?(TOMCAT_CORE_JAR)
|
73
83
|
end
|
84
|
+
task :clean => :clear
|
74
85
|
|
75
|
-
end
|
86
|
+
end
|
data/trinidad.gemspec
CHANGED
@@ -3,12 +3,12 @@ $:.push File.expand_path("../lib", __FILE__)
|
|
3
3
|
require 'trinidad/version'
|
4
4
|
|
5
5
|
Gem::Specification.new do |s|
|
6
|
-
s.name
|
7
|
-
s.rubyforge_project = 'trinidad'
|
6
|
+
s.name = 'trinidad'
|
8
7
|
s.version = Trinidad::VERSION
|
9
8
|
|
10
|
-
s.summary
|
11
|
-
s.description = "Trinidad allows you to run
|
9
|
+
s.summary = "Web server for Rails/Rack applications built upon JRuby::Rack and Apache Tomcat"
|
10
|
+
s.description = "Trinidad allows you to run Rails or Rack applications within " +
|
11
|
+
"an embedded Apache Tomcat container. Serves your requests with the elegance of a cat !"
|
12
12
|
|
13
13
|
s.authors = ["David Calavera"]
|
14
14
|
s.email = 'calavera@apache.org'
|
@@ -21,8 +21,8 @@ Gem::Specification.new do |s|
|
|
21
21
|
s.rdoc_options = ["--charset=UTF-8"]
|
22
22
|
s.extra_rdoc_files = %w[README.md LICENSE]
|
23
23
|
|
24
|
-
s.add_dependency('trinidad_jars', ">= 1.0
|
25
|
-
s.add_dependency('jruby-rack', ">= 1.1.
|
24
|
+
s.add_dependency('trinidad_jars', ">= 1.1.0")
|
25
|
+
s.add_dependency('jruby-rack', ">= 1.1.10")
|
26
26
|
|
27
27
|
s.add_development_dependency('rack')
|
28
28
|
s.add_development_dependency('rake')
|
@@ -34,7 +34,7 @@ Gem::Specification.new do |s|
|
|
34
34
|
s.files = `git ls-files`.split("\n").sort.
|
35
35
|
reject { |file| file =~ /^\./ }. # .gitignore, .travis.yml
|
36
36
|
reject { |file| file =~ /^spec\// }. # spec/**/*.spec
|
37
|
-
reject { |file| file =~ /^src\// }. # src/*
|
37
|
+
reject { |file| file =~ /^src\// }. # src/* compiled into the jars
|
38
38
|
# reject trinidad_jars.gemspec files :
|
39
39
|
reject { |file| file == 'trinidad_jars.gemspec' ||
|
40
40
|
file == 'lib/trinidad/jars.rb' ||
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: trinidad
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 1.4.
|
5
|
+
version: 1.4.3
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- David Calavera
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2012-
|
13
|
+
date: 2012-09-20 00:00:00 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: trinidad_jars
|
@@ -20,7 +20,7 @@ dependencies:
|
|
20
20
|
requirements:
|
21
21
|
- - ">="
|
22
22
|
- !ruby/object:Gem::Version
|
23
|
-
version: 1.0
|
23
|
+
version: 1.1.0
|
24
24
|
type: :runtime
|
25
25
|
version_requirements: *id001
|
26
26
|
- !ruby/object:Gem::Dependency
|
@@ -31,7 +31,7 @@ dependencies:
|
|
31
31
|
requirements:
|
32
32
|
- - ">="
|
33
33
|
- !ruby/object:Gem::Version
|
34
|
-
version: 1.1.
|
34
|
+
version: 1.1.10
|
35
35
|
type: :runtime
|
36
36
|
version_requirements: *id002
|
37
37
|
- !ruby/object:Gem::Dependency
|
@@ -100,7 +100,7 @@ dependencies:
|
|
100
100
|
version: "0"
|
101
101
|
type: :development
|
102
102
|
version_requirements: *id008
|
103
|
-
description: Trinidad allows you to run
|
103
|
+
description: Trinidad allows you to run Rails or Rack applications within an embedded Apache Tomcat container. Serves your requests with the elegance of a cat !
|
104
104
|
email: calavera@apache.org
|
105
105
|
executables:
|
106
106
|
- trinidad
|
@@ -133,8 +133,6 @@ files:
|
|
133
133
|
- lib/trinidad/version.rb
|
134
134
|
- lib/trinidad/web_app.rb
|
135
135
|
- rakelib/tomcat.rake
|
136
|
-
- rakelib/trinidad.rake
|
137
|
-
- rakelib/trinidad_jars.rake
|
138
136
|
- trinidad.gemspec
|
139
137
|
homepage: http://github.com/trinidad/trinidad
|
140
138
|
licenses: []
|
@@ -158,10 +156,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
158
156
|
version: "0"
|
159
157
|
requirements: []
|
160
158
|
|
161
|
-
rubyforge_project:
|
159
|
+
rubyforge_project:
|
162
160
|
rubygems_version: 1.8.15
|
163
161
|
signing_key:
|
164
162
|
specification_version: 3
|
165
|
-
summary:
|
163
|
+
summary: Web server for Rails/Rack applications built upon JRuby::Rack and Apache Tomcat
|
166
164
|
test_files: []
|
167
165
|
|
data/rakelib/trinidad.rake
DELETED
@@ -1,26 +0,0 @@
|
|
1
|
-
namespace :trinidad do
|
2
|
-
|
3
|
-
def trinidad_version
|
4
|
-
version("lib/trinidad/version.rb", 'VERSION')
|
5
|
-
end
|
6
|
-
|
7
|
-
def trinidad_gem_file
|
8
|
-
"trinidad-#{trinidad_version}.gem"
|
9
|
-
end
|
10
|
-
|
11
|
-
desc "Build trinidad gem"
|
12
|
-
task :build do
|
13
|
-
build('trinidad.gemspec', trinidad_gem_file)
|
14
|
-
end
|
15
|
-
|
16
|
-
desc "Install trinidad gem"
|
17
|
-
task :install => :build do
|
18
|
-
sh "gem install pkg/#{trinidad_gem_file}"
|
19
|
-
end
|
20
|
-
|
21
|
-
desc "Release trinidad gem"
|
22
|
-
task :release => :build do
|
23
|
-
release('trinidad', trinidad_gem_file, trinidad_version)
|
24
|
-
end
|
25
|
-
|
26
|
-
end
|
data/rakelib/trinidad_jars.rake
DELETED
@@ -1,26 +0,0 @@
|
|
1
|
-
namespace :trinidad_jars do
|
2
|
-
|
3
|
-
def trinidad_jars_version
|
4
|
-
version("lib/trinidad/jars.rb", 'TRINIDAD_JARS_VERSION')
|
5
|
-
end
|
6
|
-
|
7
|
-
def trinidad_jars_gem_file
|
8
|
-
"trinidad_jars-#{trinidad_jars_version}.gem"
|
9
|
-
end
|
10
|
-
|
11
|
-
desc "Build trinidad_jars gem"
|
12
|
-
task :build do
|
13
|
-
build('trinidad_jars.gemspec', trinidad_jars_gem_file)
|
14
|
-
end
|
15
|
-
|
16
|
-
desc "Install trinidad_jars gem"
|
17
|
-
task :install => :build do
|
18
|
-
sh "gem install pkg/#{trinidad_jars_gem_file}"
|
19
|
-
end
|
20
|
-
|
21
|
-
desc "Release trinidad_jars gem"
|
22
|
-
task :release => :build do
|
23
|
-
release('trinidad_jars', trinidad_jars_gem_file, trinidad_jars_version)
|
24
|
-
end
|
25
|
-
|
26
|
-
end
|