warbler 0.9.12 → 0.9.13
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/History.txt +8 -0
- data/Manifest.txt +2 -2
- data/README.txt +51 -48
- data/Rakefile +6 -3
- data/lib/{jruby-complete-1.1.6.jar → jruby-complete-1.3.0RC1.jar} +0 -0
- data/lib/jruby-rack-0.9.4.jar +0 -0
- data/lib/warbler/task.rb +7 -3
- data/lib/warbler/version.rb +1 -1
- data/spec/warbler/task_spec.rb +12 -2
- metadata +5 -5
- data/lib/jruby-rack-0.9.3.jar +0 -0
data/History.txt
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
== 0.9.13
|
|
2
|
+
|
|
3
|
+
* RailsConf 2009 edition.
|
|
4
|
+
* Only bundled JRuby and JRuby-Rack upgrades. Bug fixes will have to come in 0.9.14.
|
|
5
|
+
* This should also be the last release with bundled JRuby and JRuby-Rack.
|
|
6
|
+
* Upgrade to JRuby 1.3.0RC1 and JRuby-Rack 0.9.4. The latter allows
|
|
7
|
+
Rails 2.3 to work with Warbler.
|
|
8
|
+
|
|
1
9
|
== 0.9.12
|
|
2
10
|
|
|
3
11
|
* Allow framework auto-detection to be disabled. Set
|
data/Manifest.txt
CHANGED
|
@@ -9,8 +9,8 @@ generators/warble
|
|
|
9
9
|
generators/warble/templates
|
|
10
10
|
generators/warble/templates/warble.rb
|
|
11
11
|
generators/warble/warble_generator.rb
|
|
12
|
-
lib/jruby-complete-1.
|
|
13
|
-
lib/jruby-rack-0.9.
|
|
12
|
+
lib/jruby-complete-1.3.0RC1.jar
|
|
13
|
+
lib/jruby-rack-0.9.4.jar
|
|
14
14
|
lib/warbler
|
|
15
15
|
lib/warbler/config.rb
|
|
16
16
|
lib/warbler/gems.rb
|
data/README.txt
CHANGED
|
@@ -26,19 +26,19 @@ Warbler's +warble+ command is just a small wrapper around Rake with internally
|
|
|
26
26
|
defined tasks. (Notice "rake" still prints out in the message, but you should
|
|
27
27
|
substitute "warble" for "rake" on the command line when running this way.)
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
29
|
+
$ warble -T
|
|
30
|
+
rake config # Generate a configuration file to customize your war assembly
|
|
31
|
+
rake pluginize # Unpack warbler as a plugin in your Rails application
|
|
32
|
+
rake war # Create trunk.war
|
|
33
|
+
rake war:app # Copy all application files into the .war
|
|
34
|
+
rake war:clean # Clean up the .war file and the staging area
|
|
35
|
+
rake war:gems # Unpack all gems into WEB-INF/gems
|
|
36
|
+
rake war:jar # Run the jar command to create the .war
|
|
37
|
+
rake war:java_libs # Copy all java libraries into the .war
|
|
38
|
+
rake war:public # Copy all public HTML files to the root of the .war
|
|
39
|
+
rake war:webxml # Generate a web.xml file for the webapp
|
|
40
|
+
|
|
41
|
+
Warbler makes heavy use of Rake's file and directory tasks, so only recently
|
|
42
42
|
updated files will be copied, making repeated assemblies much faster.
|
|
43
43
|
|
|
44
44
|
== Configuration
|
|
@@ -49,10 +49,10 @@ Rails applications are detected automatically and configured appropriately.
|
|
|
49
49
|
The following items are set up for you:
|
|
50
50
|
|
|
51
51
|
* The Rails gem is packaged if you haven't vendored Rails.
|
|
52
|
-
* Other gems configured in Rails.configuration.gems are packaged
|
|
53
|
-
later)
|
|
54
|
-
* Multi-thread-safe execution (as introduced in Rails 2.2) is detected
|
|
55
|
-
runtime pooling is disabled.
|
|
52
|
+
* Other gems configured in Rails.configuration.gems are packaged
|
|
53
|
+
(Rails 2.1 or later)
|
|
54
|
+
* Multi-thread-safe execution (as introduced in Rails 2.2) is detected
|
|
55
|
+
and runtime pooling is disabled.
|
|
56
56
|
|
|
57
57
|
=== Merb applications
|
|
58
58
|
|
|
@@ -66,20 +66,22 @@ contents will be used as the rackup script for your Rack-based application.
|
|
|
66
66
|
You will probably need to specify framework and application gems in
|
|
67
67
|
config/warble.rb.
|
|
68
68
|
|
|
69
|
-
See http://
|
|
69
|
+
See <a href="http://jruby-rack.kenai.com/sources/main/show/examples">the examples in the jruby-rack project</a>
|
|
70
70
|
of how to configure Warbler to package Camping and Sinatra apps.
|
|
71
71
|
|
|
72
72
|
=== Configuration auto-detect notes
|
|
73
73
|
|
|
74
|
-
* If you don't have database access in the environment where you
|
|
75
|
-
application, you may wish to set
|
|
76
|
-
the top of config.rb. In
|
|
77
|
-
details such as booter,
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
74
|
+
* If you don't have database access in the environment where you
|
|
75
|
+
package your application, you may wish to set
|
|
76
|
+
`Warbler.framework_detection` to false at the top of config.rb. In
|
|
77
|
+
this case you may need to specify additional details such as booter,
|
|
78
|
+
gems and other settings.
|
|
79
|
+
* A more accurate way of detecting a Merb application's gems is
|
|
80
|
+
needed. Until then, you will have to specify them in
|
|
81
|
+
config/warble.rb. See below.
|
|
82
|
+
* Is it possible to more generally detect what gems an application
|
|
83
|
+
uses? Gem.loaded_specs is available, but the application needs to be
|
|
84
|
+
loaded first before its contents are reliable.
|
|
83
85
|
|
|
84
86
|
=== Custom configuration
|
|
85
87
|
|
|
@@ -98,7 +100,7 @@ doing this. With the gem, simply run
|
|
|
98
100
|
|
|
99
101
|
If you have Warbler installed as a plugin, use the generator:
|
|
100
102
|
|
|
101
|
-
|
|
103
|
+
script/generate warble
|
|
102
104
|
|
|
103
105
|
Finally, edit the config/warble.rb to your taste. If you install the gem but
|
|
104
106
|
later decide you'd like to have it as a plugin, use the +pluginize+ command:
|
|
@@ -122,16 +124,17 @@ Java web applications are configured mainly through this file, and Warbler
|
|
|
122
124
|
creates a suitable default file for you for use. However, if you need to
|
|
123
125
|
customize it in any way, you have two options.
|
|
124
126
|
|
|
125
|
-
1. If you just want a static web.xml file whose contents you manually
|
|
126
|
-
you may copy the one generated for you in
|
|
127
|
-
to <tt>config/web.xml</tt> and
|
|
128
|
-
webapp for you.
|
|
129
|
-
2. If you want to inject some dynamic information into the file, copy
|
|
130
|
-
<tt>WARBLER_HOME/web.xml.erb</tt> to
|
|
131
|
-
contents will be evaluated for you
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
127
|
+
1. If you just want a static web.xml file whose contents you manually
|
|
128
|
+
control, you may copy the one generated for you in
|
|
129
|
+
<tt>tmp/war/WEB-INF/web.xml</tt> to <tt>config/web.xml</tt> and
|
|
130
|
+
modify as needed. It will be copied into the webapp for you.
|
|
131
|
+
2. If you want to inject some dynamic information into the file, copy
|
|
132
|
+
the <tt>WARBLER_HOME/web.xml.erb</tt> to
|
|
133
|
+
<tt>config/web.xml.erb</tt>. Its contents will be evaluated for you
|
|
134
|
+
and put in the webapp. Note that you can also pass arbitrary
|
|
135
|
+
properties to the ERb template by setting
|
|
136
|
+
<tt>config.webxml.customkey</tt> values in your
|
|
137
|
+
<tt>config/warble.rb</tt> file.
|
|
135
138
|
|
|
136
139
|
For more information on configuration, see Warbler::Config.
|
|
137
140
|
|
|
@@ -141,17 +144,17 @@ If Warbler isn't packaging the files you were expecting, there are several
|
|
|
141
144
|
debug tasks available to give you more insight into what's going on.
|
|
142
145
|
|
|
143
146
|
* <tt>war:debug</tt> prints a YAML dump of the current configuration
|
|
144
|
-
* <tt>war:debug:X</tt> prints a list of files that Warbler will
|
|
145
|
-
that stage of assembly. Valid values of <tt>X</tt>
|
|
146
|
-
gems, public, includes, excludes</tt>.
|
|
147
|
+
* <tt>war:debug:X</tt> prints a list of files that Warbler will
|
|
148
|
+
include during that stage of assembly. Valid values of <tt>X</tt>
|
|
149
|
+
are <tt>app, java_libs, gems, public, includes, excludes</tt>.
|
|
147
150
|
|
|
148
151
|
== Source
|
|
149
152
|
|
|
150
153
|
You can get the Warbler source using Git, in any of the following ways:
|
|
151
154
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
+
git clone git://kenai.com/warbler~main
|
|
156
|
+
git clone git://git.caldersphere.net/warbler.git
|
|
157
|
+
git clone git://github.com/nicksieger/warbler.git
|
|
155
158
|
|
|
156
159
|
You can also download a tarball of Warbler source at
|
|
157
160
|
http://github.com/nicksieger/warbler/tree/master.
|
|
@@ -160,8 +163,8 @@ http://github.com/nicksieger/warbler/tree/master.
|
|
|
160
163
|
|
|
161
164
|
Warbler is provided under the terms of the MIT license.
|
|
162
165
|
|
|
163
|
-
|
|
166
|
+
Warbler (c) 2007-2009 Sun Microsystems, Inc.
|
|
164
167
|
|
|
165
|
-
Warbler also bundles several other pieces of software for convenience.
|
|
166
|
-
read the file LICENSES.txt to ensure that you agree with the
|
|
167
|
-
components.
|
|
168
|
+
Warbler also bundles several other pieces of software for convenience.
|
|
169
|
+
Please read the file LICENSES.txt to ensure that you agree with the
|
|
170
|
+
terms of all the components.
|
data/Rakefile
CHANGED
|
@@ -15,10 +15,9 @@ begin
|
|
|
15
15
|
p.email = "nick@nicksieger.com"
|
|
16
16
|
p.summary = "Warbler chirpily constructs .war files of your Rails applications."
|
|
17
17
|
p.changes = p.paragraphs_of('History.txt', 0..1).join("\n\n")
|
|
18
|
-
p.description = p.paragraphs_of('README.txt',
|
|
18
|
+
p.description = p.paragraphs_of('README.txt', 1...2).join("\n\n")
|
|
19
19
|
p.extra_deps << ['rake', '>= 0.7.3']
|
|
20
20
|
p.test_globs = ["spec/**/*_spec.rb"]
|
|
21
|
-
p.rdoc_pattern = /\.(rb|txt)/
|
|
22
21
|
end
|
|
23
22
|
hoe.spec.files = MANIFEST
|
|
24
23
|
hoe.spec.dependencies.delete_if { |dep| dep.name == "hoe" }
|
|
@@ -35,7 +34,11 @@ end
|
|
|
35
34
|
# !@#$ no easy way to empty the default list of prerequisites
|
|
36
35
|
Rake::Task['default'].send :instance_variable_set, "@prerequisites", FileList[]
|
|
37
36
|
|
|
38
|
-
|
|
37
|
+
if defined?(JRUBY_VERSION)
|
|
38
|
+
task :default => :spec
|
|
39
|
+
else
|
|
40
|
+
task :default => :rcov
|
|
41
|
+
end
|
|
39
42
|
|
|
40
43
|
Spec::Rake::SpecTask.new do |t|
|
|
41
44
|
t.spec_opts ||= []
|
|
Binary file
|
|
Binary file
|
data/lib/warbler/task.rb
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#--
|
|
2
|
-
# (c) Copyright 2007-
|
|
2
|
+
# (c) Copyright 2007-2009 Sun Microsystems, Inc.
|
|
3
3
|
# See the file LICENSES.txt included with the distribution for
|
|
4
4
|
# software license details.
|
|
5
5
|
#++
|
|
@@ -227,7 +227,11 @@ module Warbler
|
|
|
227
227
|
end
|
|
228
228
|
|
|
229
229
|
def define_webinf_file_tasks
|
|
230
|
-
target_files = @config.dirs.
|
|
230
|
+
target_files = @config.dirs.select do |d|
|
|
231
|
+
exists = File.directory?(d)
|
|
232
|
+
warn "warning: application directory `#{d}' does not exist or is not a directory; skipping" unless exists
|
|
233
|
+
exists
|
|
234
|
+
end.map do |d|
|
|
231
235
|
define_file_task(d, "#{@config.staging_dir}/#{apply_pathmaps(d, :application)}")
|
|
232
236
|
end
|
|
233
237
|
files = FileList[*(@config.dirs.map{|d| "#{d}/**/*"})]
|
|
@@ -318,7 +322,7 @@ module Warbler
|
|
|
318
322
|
|
|
319
323
|
task gem_unpack_task_name => [dest.pathmap("%d")] do |t|
|
|
320
324
|
require 'rubygems/installer'
|
|
321
|
-
Gem::Installer.new(src).unpack(dest)
|
|
325
|
+
Gem::Installer.new(src, :unpack => true).unpack(dest)
|
|
322
326
|
end
|
|
323
327
|
|
|
324
328
|
if @config.gem_dependencies
|
data/lib/warbler/version.rb
CHANGED
data/spec/warbler/task_spec.rb
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#--
|
|
2
|
-
# (c) Copyright 2007-
|
|
2
|
+
# (c) Copyright 2007-2009 Sun Microsystems, Inc.
|
|
3
3
|
# See the file LICENSES.txt included with the distribution for
|
|
4
4
|
# software license details.
|
|
5
5
|
#++
|
|
@@ -36,7 +36,9 @@ describe Warbler::Task do
|
|
|
36
36
|
@defined_tasks ||= []
|
|
37
37
|
tasks.each do |task|
|
|
38
38
|
unless @defined_tasks.include?(task)
|
|
39
|
-
|
|
39
|
+
meth = "define_#{task}_task"
|
|
40
|
+
meth = "define_#{task}_tasks" unless Warbler::Task.private_instance_methods.include?(meth)
|
|
41
|
+
Warbler::Task.new "warble", @config, meth.to_sym do |t|
|
|
40
42
|
options.each {|k,v| t.send "#{k}=", v }
|
|
41
43
|
end
|
|
42
44
|
@defined_tasks << task
|
|
@@ -438,6 +440,14 @@ describe Warbler::Task do
|
|
|
438
440
|
@config.webxml.booter.should == :rails
|
|
439
441
|
@config.webxml.jruby.max.runtimes.should == 1
|
|
440
442
|
end
|
|
443
|
+
|
|
444
|
+
it "should skip directories that don't exist in config.dirs and print a warning" do
|
|
445
|
+
@config = Warbler::Config.new
|
|
446
|
+
@config.dirs = %w(lib notexist)
|
|
447
|
+
define_tasks "webinf_file"
|
|
448
|
+
Rake.application.lookup("#{@config.staging_dir}/WEB-INF/lib").should_not be_nil
|
|
449
|
+
Rake.application.lookup("#{@config.staging_dir}/WEB-INF/notexist").should be_nil
|
|
450
|
+
end
|
|
441
451
|
end
|
|
442
452
|
|
|
443
453
|
describe "The warbler.rake file" do
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: warbler
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.9.
|
|
4
|
+
version: 0.9.13
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Nick Sieger
|
|
@@ -9,7 +9,7 @@ autorequire:
|
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
11
|
|
|
12
|
-
date:
|
|
12
|
+
date: 2009-05-05 00:00:00 -07:00
|
|
13
13
|
default_executable:
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
@@ -22,7 +22,7 @@ dependencies:
|
|
|
22
22
|
- !ruby/object:Gem::Version
|
|
23
23
|
version: 0.7.3
|
|
24
24
|
version:
|
|
25
|
-
description:
|
|
25
|
+
description: Warbler is a gem to make a .war file out of a Rails, Merb, or Rack-based application. The intent is to provide a minimal, flexible, ruby-like way to bundle up all of your application files for deployment to a Java application server.
|
|
26
26
|
email: nick@nicksieger.com
|
|
27
27
|
executables:
|
|
28
28
|
- warble
|
|
@@ -45,8 +45,8 @@ files:
|
|
|
45
45
|
- generators/warble/templates
|
|
46
46
|
- generators/warble/templates/warble.rb
|
|
47
47
|
- generators/warble/warble_generator.rb
|
|
48
|
-
- lib/jruby-complete-1.
|
|
49
|
-
- lib/jruby-rack-0.9.
|
|
48
|
+
- lib/jruby-complete-1.3.0RC1.jar
|
|
49
|
+
- lib/jruby-rack-0.9.4.jar
|
|
50
50
|
- lib/warbler
|
|
51
51
|
- lib/warbler/config.rb
|
|
52
52
|
- lib/warbler/gems.rb
|
data/lib/jruby-rack-0.9.3.jar
DELETED
|
Binary file
|