trinidad 1.4.1 → 1.4.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.
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
- TARGET_DIR = File.expand_path('../../target', __FILE__)
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.26]`"
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 succesfully, please build Trinidad again."
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 :compile do
56
- FileUtils.mkdir TARGET_DIR unless File.exists?(TARGET_DIR)
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
- task :patch => :compile do
63
- Dir.chdir(TARGET_DIR) do
64
- entries = Dir.entries(TARGET_DIR) - [ '.', '..']
65
- puts "updating #{TOMCAT_CORE_JAR}"
66
- %x{jar -uvf #{TOMCAT_CORE_JAR} #{entries.join(' ')}}
67
- end
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 :clean do
71
- rm_r TARGET_DIR if File.exist?(TARGET_DIR)
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 = 'trinidad'
7
- s.rubyforge_project = 'trinidad'
6
+ s.name = 'trinidad'
8
7
  s.version = Trinidad::VERSION
9
8
 
10
- s.summary = "Simple library to run rails applications into an embedded Tomcat"
11
- s.description = "Trinidad allows you to run a rails or rackup applications within an embedded Apache Tomcat container"
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.5")
25
- s.add_dependency('jruby-rack', ">= 1.1.7")
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/* patched into tomcat-core.jar
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.1
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-08-17 00:00:00 Z
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.5
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.7
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 a rails or rackup applications within an embedded Apache Tomcat container
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: trinidad
159
+ rubyforge_project:
162
160
  rubygems_version: 1.8.15
163
161
  signing_key:
164
162
  specification_version: 3
165
- summary: Simple library to run rails applications into an embedded Tomcat
163
+ summary: Web server for Rails/Rack applications built upon JRuby::Rack and Apache Tomcat
166
164
  test_files: []
167
165
 
@@ -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
@@ -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