Permalink
Browse files

package db/ dir + include *file-s (e.g. Rakefile) by default

exclude tmp/cache since it might contain (compiled) assets
  • Loading branch information...
1 parent 49e4eaa commit 1853d1fedfbb708cccec1ef7c81321f8c7c032b7 @kares kares committed Dec 28, 2012
Showing with 5 additions and 4 deletions.
  1. +3 −2 lib/warbler/config.rb
  2. +1 −1 spec/warbler/config_spec.rb
  3. +1 −1 warble.rb
View
@@ -14,7 +14,7 @@ module Warbler
class Config
include RakeHelper
- TOP_DIRS = %w(app config lib log vendor)
+ TOP_DIRS = %w(app db config lib log script vendor)
FILE = "config/warble.rb"
BUILD_GEMS = %w(warbler rake rcov)
@@ -158,7 +158,7 @@ def initialize(warbler_home = WARBLER_HOME)
@warbler_templates = "#{WARBLER_HOME}/lib/warbler/templates"
@features = Set.new
@dirs = TOP_DIRS.select {|d| File.directory?(d)}
- @includes = FileList[]
+ @includes = FileList['*file'] # [r/R]akefile gets included
@excludes = FileList[]
@java_libs = FileList[]
@java_classes = FileList[]
@@ -180,6 +180,7 @@ def initialize(warbler_home = WARBLER_HOME)
@compiled_ruby_files ||= FileList[*@dirs.map {|d| "#{d}/**/*.rb"}]
@excludes += ["tmp/war", "tmp/war/**/*"] if File.directory?("tmp/war")
+ @excludes += ["tmp/cache/**/*"] if File.directory?("tmp/cache")
@excludes += warbler_vendor_excludes(warbler_home)
@excludes += FileList["**/*.log"] if @exclude_logs
end
@@ -32,7 +32,7 @@
it "should have suitable default values" do
config = Warbler::Config.new
config.dirs.should include(*Warbler::Config::TOP_DIRS.select{|d| File.directory?(d)})
- config.includes.should be_empty
+ config.excludes.should be_empty
config.java_libs.should_not be_empty
config.jar_name.size.should > 0
config.webxml.should be_kind_of(OpenStruct)
View
@@ -11,7 +11,7 @@
# config.features = %w(gemjar)
# Application directories to be included in the webapp.
- config.dirs = %w(app config lib log vendor tmp)
+ config.dirs = %w(app config db lib log vendor tmp)
# Additional files/directories to include, above those in config.dirs
# config.includes = FileList["db"]

0 comments on commit 1853d1f

Please sign in to comment.