Skip to content

Commit

Permalink
- Updated documentation
Browse files Browse the repository at this point in the history
- Split debug:files task into debug:includes and debug:excludes


git-svn-id: http://svn.caldersphere.net/svn/main/rubyforge/warbler/trunk@150 b03c2d0b-2f10-0410-a2f9-fc8001506dfa
  • Loading branch information
nicksieger committed Sep 5, 2007
1 parent b6d4524 commit 31b4d13
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 5 deletions.
8 changes: 8 additions & 0 deletions History.txt
@@ -1,3 +1,11 @@
== 0.9.1

* Bundle Bouncy Castle JCE provider so that Digests work properly. See LICENSES.txt for details of
the distribution.
* Add rake >= 0.7.3 as a dependency in the gem specification.
* Add debug tasks: war:debug, war:debug:gems, war:debug:public, war:debug:app, war:debug:includes,
war:debug:excludes, war:debug:java_libs gives you a breakdown of what Warbler expects to package.

== 0.9

* Birthday! Warbler is a gem to make a .war file out of a Rails project. The intent is to provide a
Expand Down
9 changes: 9 additions & 0 deletions README.txt
Expand Up @@ -71,6 +71,15 @@ Java web applications are configured mainly through this file, and Warbler creat

For more information on configuration, see Warbler::Config.

=== Troubleshooting

If Warbler isn't packaging the files you were expecting, there are several debug tasks available to give you more insight into what's going on.

* <tt>war:debug</tt> prints a YAML dump of the current configuration
* <tt>war:debug:X</tt> prints a list of files that Warbler will include during that stage of
assembly. Valid values of <tt>X</tt> are <tt>app, java_libs, gems, public, includes,
excludes</tt>.

== Caveats

Warbler requires that RAILS_ROOT will effectively be set to /WEB-INF when running inside the war, while the application public files will be in the root directory. The purpose is to make the application structure match the Java webapp archive structure, where WEB-INF is a protected directory not visible to the web server. Because of this change, features of Rails that expect the public assets directory to live in RAILS_ROOT/public may not function properly. However, we feel that the added security of conforming to the webapp structure is worth these minor inconveniences.
Expand Down
14 changes: 9 additions & 5 deletions lib/warbler/task.rb
Expand Up @@ -154,8 +154,8 @@ def define_jar_task
def define_debug_task
with_namespace_and_config do |name, config|
task "debug" do
require 'pp'
pp config
require 'yaml'
puts YAML::dump(config)
end
end
end
Expand All @@ -174,9 +174,13 @@ def define_webinf_file_tasks
define_file_task(f, "#{@config.staging_dir}/WEB-INF/#{f}")
end
target_files += define_java_libs_task
task "#@name:debug:files" do
puts "included", *files.include
puts "excluded", *files.exclude
task "#@name:debug:includes" do
puts "", "included files:"
puts *files.include
end
task "#@name:debug:excludes" do
puts "", "excluded files:"
puts *files.exclude
end
target_files
end
Expand Down

0 comments on commit 31b4d13

Please sign in to comment.