warbler 1.3.0.beta1 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +9 -0
- data/LICENSE.txt +1 -1
- data/Manifest.txt +22 -0
- data/README.txt +6 -3
- data/Rakefile +2 -2
- data/bin/warble +1 -1
- data/ext/JarMain.java +3 -2
- data/ext/WarMain.java +3 -2
- data/ext/WarblerJar.java +2 -1
- data/ext/WarblerJarService.java +2 -1
- data/lib/warbler.rb +1 -1
- data/lib/warbler/application.rb +17 -1
- data/lib/warbler/config.rb +12 -3
- data/lib/warbler/gems.rb +1 -1
- data/lib/warbler/jar.rb +17 -12
- data/lib/warbler/task.rb +6 -15
- data/lib/warbler/templates/bundler.erb +3 -0
- data/lib/warbler/templates/jar.erb +5 -0
- data/lib/warbler/templates/rack.erb +1 -1
- data/lib/warbler/templates/war.erb +1 -0
- data/lib/warbler/traits.rb +5 -3
- data/lib/warbler/traits/bundler.rb +52 -14
- data/lib/warbler/traits/gemspec.rb +6 -11
- data/lib/warbler/traits/jar.rb +4 -1
- data/lib/warbler/traits/merb.rb +2 -1
- data/lib/warbler/traits/nogemspec.rb +2 -1
- data/lib/warbler/traits/rack.rb +3 -1
- data/lib/warbler/traits/rails.rb +13 -8
- data/lib/warbler/traits/war.rb +12 -6
- data/lib/warbler/version.rb +2 -2
- data/lib/warbler/war.rb +7 -0
- data/lib/warbler_jar.jar +0 -0
- data/spec/drb_helper.rb +41 -0
- data/spec/sample_bundler/Gemfile.lock +10 -0
- data/spec/sample_bundler/config.ru +0 -0
- data/spec/sample_bundler/vendor/bundle/jruby/1.8/cache/rake-0.8.7.gem +0 -0
- data/spec/sample_bundler/vendor/bundle/jruby/1.8/gems/rake-0.8.7/lib/rake.rb +2506 -0
- data/spec/sample_bundler/vendor/bundle/jruby/1.8/specifications/rake-0.8.7.gemspec +31 -0
- data/spec/sample_bundler/vendor/bundle/ruby/1.8/cache/rake-0.8.7.gem +0 -0
- data/spec/sample_bundler/vendor/bundle/ruby/1.8/gems/rake-0.8.7/lib/rake.rb +2506 -0
- data/spec/sample_bundler/vendor/bundle/ruby/1.8/specifications/rake-0.8.7.gemspec +30 -0
- data/spec/sample_bundler/vendor/bundle/ruby/1.9.1/cache/rake-0.8.7.gem +0 -0
- data/spec/sample_bundler/vendor/bundle/ruby/1.9.1/gems/rake-0.8.7/lib/rake.rb +2506 -0
- data/spec/sample_bundler/vendor/bundle/ruby/1.9.1/specifications/rake-0.8.7.gemspec +30 -0
- data/spec/sample_jar/sample_jar.gemspec +0 -1
- data/spec/sample_war/config/environments/production.rb +3 -0
- data/spec/spec_helper.rb +32 -5
- data/spec/warbler/application_spec.rb +11 -2
- data/spec/warbler/bundler_spec.rb +136 -0
- data/spec/warbler/config_spec.rb +2 -2
- data/spec/warbler/gems_spec.rb +2 -2
- data/spec/warbler/jar_spec.rb +63 -108
- data/spec/warbler/task_spec.rb +29 -20
- data/spec/warbler/traits_spec.rb +3 -2
- data/spec/warbler/war_spec.rb +3 -2
- data/warble.rb +3 -0
- data/web.xml.erb +2 -2
- metadata +179 -177
data/spec/warbler/task_spec.rb
CHANGED
@@ -1,14 +1,15 @@
|
|
1
1
|
#--
|
2
|
-
# Copyright (c) 2010 Engine Yard, Inc.
|
2
|
+
# Copyright (c) 2010-2011 Engine Yard, Inc.
|
3
3
|
# Copyright (c) 2007-2009 Sun Microsystems, Inc.
|
4
4
|
# This source code is available under the MIT license.
|
5
5
|
# See the file LICENSE.txt for details.
|
6
6
|
#++
|
7
7
|
|
8
|
-
require File.
|
8
|
+
require File.expand_path('../../spec_helper', __FILE__)
|
9
9
|
|
10
10
|
describe Warbler::Task do
|
11
11
|
run_in_directory "spec/sample_war"
|
12
|
+
use_fresh_environment
|
12
13
|
|
13
14
|
let :config do
|
14
15
|
Warbler::Config.new do |config|
|
@@ -112,24 +113,32 @@ describe Warbler::Task do
|
|
112
113
|
File.exist?('app/helpers/application_helper.class').should be_false
|
113
114
|
end
|
114
115
|
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
116
|
+
context "where symlinks are available" do
|
117
|
+
begin
|
118
|
+
ln_s "README.txt", "r.txt.symlink", :verbose => false
|
119
|
+
it "should process symlinks by storing a file in the archive that has the same contents as the source" do
|
120
|
+
File.open("config/special.txt", "wb") {|f| f << "special"}
|
121
|
+
Dir.chdir("config") { ln_s "special.txt", "link.txt" }
|
122
|
+
silence { run_task "warble" }
|
123
|
+
Zip::ZipFile.open("#{config.jar_name}.war") do |zf|
|
124
|
+
special = zf.get_input_stream('WEB-INF/config/special.txt') {|io| io.read }
|
125
|
+
link = zf.get_input_stream('WEB-INF/config/link.txt') {|io| io.read }
|
126
|
+
link.should == special
|
127
|
+
end
|
128
|
+
end
|
129
|
+
|
130
|
+
it "should process directory symlinks by copying the whole subdirectory" do
|
131
|
+
Dir.chdir("lib") { ln_s "tasks", "rakelib" }
|
132
|
+
silence { run_task "warble" }
|
133
|
+
Zip::ZipFile.open("#{config.jar_name}.war") do |zf|
|
134
|
+
zf.find_entry("WEB-INF/lib/tasks/utils.rake").should_not be_nil
|
135
|
+
zf.find_entry("WEB-INF/lib/rakelib/").should_not be_nil
|
136
|
+
zf.find_entry("WEB-INF/lib/rakelib/utils.rake").should_not be_nil if defined?(JRUBY_VERSION)
|
137
|
+
end
|
138
|
+
end
|
139
|
+
|
140
|
+
rm_f "r.txt.symlink", :verbose => false
|
141
|
+
rescue NotImplementedError
|
133
142
|
end
|
134
143
|
end
|
135
144
|
|
data/spec/warbler/traits_spec.rb
CHANGED
@@ -1,10 +1,11 @@
|
|
1
1
|
#--
|
2
|
-
# Copyright (c) 2010 Engine Yard, Inc.
|
2
|
+
# Copyright (c) 2010-2011 Engine Yard, Inc.
|
3
|
+
# Copyright (c) 2007-2009 Sun Microsystems, Inc.
|
3
4
|
# This source code is available under the MIT license.
|
4
5
|
# See the file LICENSE.txt for details.
|
5
6
|
#++
|
6
7
|
|
7
|
-
require File.
|
8
|
+
require File.expand_path('../../spec_helper', __FILE__)
|
8
9
|
|
9
10
|
describe Warbler::Traits do
|
10
11
|
it "are ordered by fewer dependencies first" do
|
data/spec/warbler/war_spec.rb
CHANGED
@@ -1,10 +1,11 @@
|
|
1
1
|
#--
|
2
|
-
# Copyright (c) 2010 Engine Yard, Inc.
|
2
|
+
# Copyright (c) 2010-2011 Engine Yard, Inc.
|
3
|
+
# Copyright (c) 2007-2009 Sun Microsystems, Inc.
|
3
4
|
# This source code is available under the MIT license.
|
4
5
|
# See the file LICENSE.txt for details.
|
5
6
|
#++
|
6
7
|
|
7
|
-
require File.
|
8
|
+
require File.expand_path('../../spec_helper', __FILE__)
|
8
9
|
|
9
10
|
describe Warbler::War do
|
10
11
|
it "is deprecated, replace occurrences with Warbler::Jar" do
|
data/warble.rb
CHANGED
@@ -115,6 +115,9 @@ Warbler::Config.new do |config|
|
|
115
115
|
# Application booter to use, one of :rack, :rails, or :merb (autodetected by default)
|
116
116
|
# config.webxml.booter = :rails
|
117
117
|
|
118
|
+
# Set JRuby to run in 1.9 mode.
|
119
|
+
# config.webxml.jruby.compat.version = "1.9"
|
120
|
+
|
118
121
|
# When using the :rack booter, "Rackup" script to use.
|
119
122
|
# - For 'rackup.path', the value points to the location of the rackup
|
120
123
|
# script in the web archive file. You need to make sure this file
|
data/web.xml.erb
CHANGED
@@ -22,11 +22,11 @@
|
|
22
22
|
<listener-class><%= webxml.servlet_context_listener %></listener-class>
|
23
23
|
</listener>
|
24
24
|
|
25
|
-
<% if webxml.jndi then webxml.jndi.each do |jndi| %>
|
25
|
+
<% if webxml.jndi then [webxml.jndi].flatten.each do |jndi| %>
|
26
26
|
<resource-ref>
|
27
27
|
<res-ref-name><%= jndi %></res-ref-name>
|
28
28
|
<res-type>javax.sql.DataSource</res-type>
|
29
29
|
<res-auth>Container</res-auth>
|
30
30
|
</resource-ref>
|
31
31
|
<% end; end %>
|
32
|
-
</web-app>
|
32
|
+
</web-app>
|
metadata
CHANGED
@@ -1,98 +1,86 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: warbler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
hash: 27
|
5
|
+
prerelease:
|
5
6
|
segments:
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
version: 1.3.0.beta1
|
7
|
+
- 1
|
8
|
+
- 3
|
9
|
+
- 0
|
10
|
+
version: 1.3.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
|
-
|
13
|
+
- Nick Sieger
|
14
14
|
autorequire:
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date:
|
19
|
-
default_executable:
|
18
|
+
date: 2011-04-18 00:00:00 Z
|
20
19
|
dependencies:
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
requirements:
|
86
|
-
- - ">="
|
87
|
-
- !ruby/object:Gem::Version
|
88
|
-
segments:
|
89
|
-
- 2
|
90
|
-
- 0
|
91
|
-
- 4
|
92
|
-
version: 2.0.4
|
93
|
-
requirement: *id005
|
94
|
-
prerelease: false
|
95
|
-
type: :development
|
20
|
+
- !ruby/object:Gem::Dependency
|
21
|
+
type: :runtime
|
22
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
23
|
+
none: false
|
24
|
+
requirements:
|
25
|
+
- - ">="
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
hash: 49
|
28
|
+
segments:
|
29
|
+
- 0
|
30
|
+
- 8
|
31
|
+
- 7
|
32
|
+
version: 0.8.7
|
33
|
+
version_requirements: *id001
|
34
|
+
name: rake
|
35
|
+
prerelease: false
|
36
|
+
- !ruby/object:Gem::Dependency
|
37
|
+
type: :runtime
|
38
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
39
|
+
none: false
|
40
|
+
requirements:
|
41
|
+
- - ">="
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
hash: 7
|
44
|
+
segments:
|
45
|
+
- 1
|
46
|
+
- 4
|
47
|
+
- 0
|
48
|
+
version: 1.4.0
|
49
|
+
version_requirements: *id002
|
50
|
+
name: jruby-jars
|
51
|
+
prerelease: false
|
52
|
+
- !ruby/object:Gem::Dependency
|
53
|
+
type: :runtime
|
54
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
55
|
+
none: false
|
56
|
+
requirements:
|
57
|
+
- - ">="
|
58
|
+
- !ruby/object:Gem::Version
|
59
|
+
hash: 23
|
60
|
+
segments:
|
61
|
+
- 1
|
62
|
+
- 0
|
63
|
+
- 0
|
64
|
+
version: 1.0.0
|
65
|
+
version_requirements: *id003
|
66
|
+
name: jruby-rack
|
67
|
+
prerelease: false
|
68
|
+
- !ruby/object:Gem::Dependency
|
69
|
+
type: :runtime
|
70
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
71
|
+
none: false
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
hash: 51
|
76
|
+
segments:
|
77
|
+
- 0
|
78
|
+
- 9
|
79
|
+
- 4
|
80
|
+
version: 0.9.4
|
81
|
+
version_requirements: *id004
|
82
|
+
name: rubyzip
|
83
|
+
prerelease: false
|
96
84
|
description: |-
|
97
85
|
Warbler is a gem to make a Java jar or war file out of any Ruby,
|
98
86
|
Rails, Merb, or Rack application. Warbler provides a minimal,
|
@@ -100,118 +88,132 @@ description: |-
|
|
100
88
|
deployment to a Java environment.
|
101
89
|
email: nick@nicksieger.com
|
102
90
|
executables:
|
103
|
-
|
91
|
+
- warble
|
104
92
|
extensions: []
|
105
93
|
|
106
94
|
extra_rdoc_files:
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
95
|
+
- History.txt
|
96
|
+
- LICENSE.txt
|
97
|
+
- Manifest.txt
|
98
|
+
- README.txt
|
111
99
|
files:
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
100
|
+
- Gemfile
|
101
|
+
- History.txt
|
102
|
+
- LICENSE.txt
|
103
|
+
- Manifest.txt
|
104
|
+
- README.txt
|
105
|
+
- Rakefile
|
106
|
+
- bin/warble
|
107
|
+
- ext/JarMain.java
|
108
|
+
- ext/WarMain.java
|
109
|
+
- ext/WarblerJar.java
|
110
|
+
- ext/WarblerJarService.java
|
111
|
+
- lib/warbler.rb
|
112
|
+
- lib/warbler/application.rb
|
113
|
+
- lib/warbler/config.rb
|
114
|
+
- lib/warbler/gems.rb
|
115
|
+
- lib/warbler/jar.rb
|
116
|
+
- lib/warbler/task.rb
|
117
|
+
- lib/warbler/templates/bundler.erb
|
118
|
+
- lib/warbler/templates/config.erb
|
119
|
+
- lib/warbler/templates/jar.erb
|
120
|
+
- lib/warbler/templates/rack.erb
|
121
|
+
- lib/warbler/templates/rails.erb
|
122
|
+
- lib/warbler/templates/war.erb
|
123
|
+
- lib/warbler/traits.rb
|
124
|
+
- lib/warbler/traits/bundler.rb
|
125
|
+
- lib/warbler/traits/gemspec.rb
|
126
|
+
- lib/warbler/traits/jar.rb
|
127
|
+
- lib/warbler/traits/merb.rb
|
128
|
+
- lib/warbler/traits/nogemspec.rb
|
129
|
+
- lib/warbler/traits/rack.rb
|
130
|
+
- lib/warbler/traits/rails.rb
|
131
|
+
- lib/warbler/traits/war.rb
|
132
|
+
- lib/warbler/version.rb
|
133
|
+
- lib/warbler/war.rb
|
134
|
+
- lib/warbler_jar.jar
|
135
|
+
- spec/drb_helper.rb
|
136
|
+
- spec/sample_bundler/Gemfile.lock
|
137
|
+
- spec/sample_bundler/config.ru
|
138
|
+
- spec/sample_bundler/vendor/bundle/jruby/1.8/cache/rake-0.8.7.gem
|
139
|
+
- spec/sample_bundler/vendor/bundle/jruby/1.8/gems/rake-0.8.7/lib/rake.rb
|
140
|
+
- spec/sample_bundler/vendor/bundle/jruby/1.8/specifications/rake-0.8.7.gemspec
|
141
|
+
- spec/sample_bundler/vendor/bundle/ruby/1.8/cache/rake-0.8.7.gem
|
142
|
+
- spec/sample_bundler/vendor/bundle/ruby/1.8/gems/rake-0.8.7/lib/rake.rb
|
143
|
+
- spec/sample_bundler/vendor/bundle/ruby/1.8/specifications/rake-0.8.7.gemspec
|
144
|
+
- spec/sample_bundler/vendor/bundle/ruby/1.9.1/cache/rake-0.8.7.gem
|
145
|
+
- spec/sample_bundler/vendor/bundle/ruby/1.9.1/gems/rake-0.8.7/lib/rake.rb
|
146
|
+
- spec/sample_bundler/vendor/bundle/ruby/1.9.1/specifications/rake-0.8.7.gemspec
|
147
|
+
- spec/sample_jar/History.txt
|
148
|
+
- spec/sample_jar/Manifest.txt
|
149
|
+
- spec/sample_jar/README.txt
|
150
|
+
- spec/sample_jar/lib/sample_jar.rb
|
151
|
+
- spec/sample_jar/sample_jar.gemspec
|
152
|
+
- spec/sample_jar/test/test_sample_jar.rb
|
153
|
+
- spec/sample_war/app/controllers/application.rb
|
154
|
+
- spec/sample_war/app/helpers/application_helper.rb
|
155
|
+
- spec/sample_war/config/boot.rb
|
156
|
+
- spec/sample_war/config/database.yml
|
157
|
+
- spec/sample_war/config/environment.rb
|
158
|
+
- spec/sample_war/config/environments/development.rb
|
159
|
+
- spec/sample_war/config/environments/production.rb
|
160
|
+
- spec/sample_war/config/environments/test.rb
|
161
|
+
- spec/sample_war/config/initializers/inflections.rb
|
162
|
+
- spec/sample_war/config/initializers/mime_types.rb
|
163
|
+
- spec/sample_war/config/initializers/new_rails_defaults.rb
|
164
|
+
- spec/sample_war/config/routes.rb
|
165
|
+
- spec/sample_war/lib/tasks/utils.rake
|
166
|
+
- spec/sample_war/public/404.html
|
167
|
+
- spec/sample_war/public/422.html
|
168
|
+
- spec/sample_war/public/500.html
|
169
|
+
- spec/sample_war/public/favicon.ico
|
170
|
+
- spec/sample_war/public/index.html
|
171
|
+
- spec/sample_war/public/robots.txt
|
172
|
+
- spec/spec_helper.rb
|
173
|
+
- spec/warbler/application_spec.rb
|
174
|
+
- spec/warbler/bundler_spec.rb
|
175
|
+
- spec/warbler/config_spec.rb
|
176
|
+
- spec/warbler/gems_spec.rb
|
177
|
+
- spec/warbler/jar_spec.rb
|
178
|
+
- spec/warbler/task_spec.rb
|
179
|
+
- spec/warbler/traits_spec.rb
|
180
|
+
- spec/warbler/war_spec.rb
|
181
|
+
- warble.rb
|
182
|
+
- web.xml.erb
|
180
183
|
homepage: http://caldersphere.rubyforge.org/warbler
|
181
184
|
licenses: []
|
182
185
|
|
183
186
|
post_install_message:
|
184
187
|
rdoc_options:
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
188
|
+
- --main
|
189
|
+
- README.txt
|
190
|
+
- -SHN
|
191
|
+
- -f
|
192
|
+
- darkfish
|
190
193
|
require_paths:
|
191
|
-
|
194
|
+
- lib
|
192
195
|
required_ruby_version: !ruby/object:Gem::Requirement
|
193
196
|
none: false
|
194
197
|
requirements:
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
198
|
+
- - ">="
|
199
|
+
- !ruby/object:Gem::Version
|
200
|
+
hash: 3
|
201
|
+
segments:
|
202
|
+
- 0
|
203
|
+
version: "0"
|
201
204
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
202
205
|
none: false
|
203
206
|
requirements:
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
version: 1.3.1
|
207
|
+
- - ">="
|
208
|
+
- !ruby/object:Gem::Version
|
209
|
+
hash: 3
|
210
|
+
segments:
|
211
|
+
- 0
|
212
|
+
version: "0"
|
211
213
|
requirements: []
|
212
214
|
|
213
215
|
rubyforge_project: caldersphere
|
214
|
-
rubygems_version: 1.
|
216
|
+
rubygems_version: 1.7.2
|
215
217
|
signing_key:
|
216
218
|
specification_version: 3
|
217
219
|
summary: Warbler chirpily constructs .war files of your Rails applications.
|