nicksieger-warbler 0.9.12 → 0.9.13
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +8 -0
- data/Manifest.txt +35 -0
- data/README.txt +51 -48
- data/Rakefile +11 -10
- 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 +10 -3
- data/lib/warbler/version.rb +1 -1
- data/spec/warbler/task_spec.rb +12 -2
- metadata +14 -15
- 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
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
History.txt
|
2
|
+
Manifest.txt
|
3
|
+
README.txt
|
4
|
+
LICENSES.txt
|
5
|
+
Rakefile
|
6
|
+
web.xml.erb
|
7
|
+
bin/warble
|
8
|
+
generators/warble
|
9
|
+
generators/warble/templates
|
10
|
+
generators/warble/templates/warble.rb
|
11
|
+
generators/warble/warble_generator.rb
|
12
|
+
lib/jruby-complete-1.3.0RC1.jar
|
13
|
+
lib/jruby-rack-0.9.4.jar
|
14
|
+
lib/warbler
|
15
|
+
lib/warbler/config.rb
|
16
|
+
lib/warbler/gems.rb
|
17
|
+
lib/warbler/task.rb
|
18
|
+
lib/warbler/version.rb
|
19
|
+
lib/warbler.rb
|
20
|
+
spec/sample/app/controllers/application.rb
|
21
|
+
spec/sample/app/helpers/application_helper.rb
|
22
|
+
spec/sample/config/boot.rb
|
23
|
+
spec/sample/config/environment.rb
|
24
|
+
spec/sample/config/environments/development.rb
|
25
|
+
spec/sample/config/environments/production.rb
|
26
|
+
spec/sample/config/environments/test.rb
|
27
|
+
spec/sample/config/initializers/inflections.rb
|
28
|
+
spec/sample/config/initializers/mime_types.rb
|
29
|
+
spec/sample/config/initializers/new_rails_defaults.rb
|
30
|
+
spec/sample/config/routes.rb
|
31
|
+
spec/spec_helper.rb
|
32
|
+
spec/warbler/config_spec.rb
|
33
|
+
spec/warbler/gems_spec.rb
|
34
|
+
spec/warbler/task_spec.rb
|
35
|
+
tasks/warbler.rake
|
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
@@ -8,17 +8,17 @@ begin
|
|
8
8
|
File.open("Manifest.txt", "w") {|f| MANIFEST.each {|n| f << "#{n}\n"} }
|
9
9
|
require 'hoe'
|
10
10
|
require File.dirname(__FILE__) + '/lib/warbler/version'
|
11
|
-
hoe = Hoe.
|
11
|
+
hoe = Hoe.spec("warbler") do |p|
|
12
|
+
p.version = Warbler::VERSION
|
12
13
|
p.rubyforge_name = "caldersphere"
|
13
14
|
p.url = "http://caldersphere.rubyforge.org/warbler"
|
14
15
|
p.author = "Nick Sieger"
|
15
16
|
p.email = "nick@nicksieger.com"
|
16
17
|
p.summary = "Warbler chirpily constructs .war files of your Rails applications."
|
17
18
|
p.changes = p.paragraphs_of('History.txt', 0..1).join("\n\n")
|
18
|
-
p.description = p.paragraphs_of('README.txt',
|
19
|
+
p.description = p.paragraphs_of('README.txt', 1...2).join("\n\n")
|
19
20
|
p.extra_deps << ['rake', '>= 0.7.3']
|
20
21
|
p.test_globs = ["spec/**/*_spec.rb"]
|
21
|
-
p.rdoc_pattern = /\.(rb|txt)/
|
22
22
|
end
|
23
23
|
hoe.spec.files = MANIFEST
|
24
24
|
hoe.spec.dependencies.delete_if { |dep| dep.name == "hoe" }
|
@@ -34,8 +34,13 @@ end
|
|
34
34
|
# Hoe insists on setting task :default => :test
|
35
35
|
# !@#$ no easy way to empty the default list of prerequisites
|
36
36
|
Rake::Task['default'].send :instance_variable_set, "@prerequisites", FileList[]
|
37
|
+
Rake::Task['default'].send :instance_variable_set, "@actions", []
|
37
38
|
|
38
|
-
|
39
|
+
if defined?(JRUBY_VERSION)
|
40
|
+
task :default => :spec
|
41
|
+
else
|
42
|
+
task :default => :rcov_verify
|
43
|
+
end
|
39
44
|
|
40
45
|
Spec::Rake::SpecTask.new do |t|
|
41
46
|
t.spec_opts ||= []
|
@@ -44,15 +49,11 @@ end
|
|
44
49
|
|
45
50
|
Spec::Rake::SpecTask.new("spec:rcov") do |t|
|
46
51
|
t.rcov = true
|
47
|
-
t.rcov_opts << '--exclude gems/*'
|
48
52
|
end
|
49
53
|
|
50
54
|
# so we don't confuse autotest
|
51
|
-
RCov::VerifyTask.new(:
|
55
|
+
RCov::VerifyTask.new(:rcov_verify) do |t|
|
52
56
|
t.threshold = 100
|
53
57
|
end
|
54
58
|
|
55
|
-
task "spec:rcov"
|
56
|
-
rm_f "Manifest.txt"
|
57
|
-
end
|
58
|
-
task :rcov => "spec:rcov"
|
59
|
+
task :rcov_verify => "spec:rcov"
|
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}/**/*"})]
|
@@ -292,6 +296,9 @@ module Warbler
|
|
292
296
|
fail "gem '#{gem}' not installed" if matched.empty?
|
293
297
|
spec = matched.last
|
294
298
|
|
299
|
+
# skip gems with no load path
|
300
|
+
return if spec.loaded_from == ""
|
301
|
+
|
295
302
|
gem_name = "#{spec.name}-#{spec.version}"
|
296
303
|
unless spec.platform.nil? || spec.platform == Gem::Platform::RUBY
|
297
304
|
[spec.platform, spec.original_platform].each do |p|
|
@@ -318,7 +325,7 @@ module Warbler
|
|
318
325
|
|
319
326
|
task gem_unpack_task_name => [dest.pathmap("%d")] do |t|
|
320
327
|
require 'rubygems/installer'
|
321
|
-
Gem::Installer.new(src).unpack(dest)
|
328
|
+
Gem::Installer.new(src, :unpack => true).unpack(dest)
|
322
329
|
end
|
323
330
|
|
324
331
|
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: nicksieger-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,11 +9,12 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date:
|
12
|
+
date: 2009-06-01 00:00:00 -07:00
|
13
13
|
default_executable: warble
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rake
|
17
|
+
type: :runtime
|
17
18
|
version_requirement:
|
18
19
|
version_requirements: !ruby/object:Gem::Requirement
|
19
20
|
requirements:
|
@@ -21,7 +22,7 @@ dependencies:
|
|
21
22
|
- !ruby/object:Gem::Version
|
22
23
|
version: 0.7.3
|
23
24
|
version:
|
24
|
-
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.
|
25
26
|
email: nick@nicksieger.com
|
26
27
|
executables:
|
27
28
|
- warble
|
@@ -40,36 +41,34 @@ files:
|
|
40
41
|
- Rakefile
|
41
42
|
- web.xml.erb
|
42
43
|
- bin/warble
|
43
|
-
- generators/warble
|
44
|
-
- generators/warble/templates
|
45
|
-
- generators/warble/templates/warble.rb
|
46
44
|
- generators/warble/warble_generator.rb
|
47
|
-
-
|
48
|
-
- lib/jruby-
|
49
|
-
- lib/
|
45
|
+
- generators/warble/templates/warble.rb
|
46
|
+
- lib/jruby-complete-1.3.0RC1.jar
|
47
|
+
- lib/jruby-rack-0.9.4.jar
|
48
|
+
- lib/warbler.rb
|
50
49
|
- lib/warbler/config.rb
|
51
50
|
- lib/warbler/gems.rb
|
52
51
|
- lib/warbler/task.rb
|
53
52
|
- lib/warbler/version.rb
|
54
|
-
-
|
53
|
+
- spec/spec_helper.rb
|
55
54
|
- spec/sample/app/controllers/application.rb
|
56
55
|
- spec/sample/app/helpers/application_helper.rb
|
57
56
|
- spec/sample/config/boot.rb
|
58
57
|
- spec/sample/config/environment.rb
|
58
|
+
- spec/sample/config/routes.rb
|
59
59
|
- spec/sample/config/environments/development.rb
|
60
60
|
- spec/sample/config/environments/production.rb
|
61
61
|
- spec/sample/config/environments/test.rb
|
62
62
|
- spec/sample/config/initializers/inflections.rb
|
63
63
|
- spec/sample/config/initializers/mime_types.rb
|
64
64
|
- spec/sample/config/initializers/new_rails_defaults.rb
|
65
|
-
- spec/sample/config/routes.rb
|
66
|
-
- spec/spec_helper.rb
|
67
65
|
- spec/warbler/config_spec.rb
|
68
66
|
- spec/warbler/gems_spec.rb
|
69
67
|
- spec/warbler/task_spec.rb
|
70
68
|
- tasks/warbler.rake
|
71
|
-
has_rdoc:
|
69
|
+
has_rdoc: false
|
72
70
|
homepage: http://caldersphere.rubyforge.org/warbler
|
71
|
+
licenses:
|
73
72
|
post_install_message:
|
74
73
|
rdoc_options:
|
75
74
|
- --main
|
@@ -91,9 +90,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
91
90
|
requirements: []
|
92
91
|
|
93
92
|
rubyforge_project: caldersphere
|
94
|
-
rubygems_version: 1.
|
93
|
+
rubygems_version: 1.3.5
|
95
94
|
signing_key:
|
96
|
-
specification_version:
|
95
|
+
specification_version: 3
|
97
96
|
summary: Warbler chirpily constructs .war files of your Rails applications.
|
98
97
|
test_files:
|
99
98
|
- spec/warbler/config_spec.rb
|
data/lib/jruby-rack-0.9.3.jar
DELETED
Binary file
|