Permalink
Browse files

Cleaning compiled .class files after making the jar

  • Loading branch information...
1 parent d53b69e commit 808041b11d92b3434bc98bf847579c3d0a41172c @nicksieger nicksieger committed Nov 11, 2010
Showing with 9 additions and 0 deletions.
  1. +3 −0 lib/warbler/task.rb
  2. +6 −0 spec/warbler/task_spec.rb
View
@@ -106,6 +106,9 @@ def define_clean_task
def define_compiled_task
task "compiled" do
jar.compile(config)
+ task @name do
+ rm_f config.compiled_ruby_files.map {|f| f.sub(/\.rb$/, '.class') }
+ end
end
end
@@ -106,6 +106,12 @@ def run_task(t)
end
end
+ it "should delete .class files after finishing the jar" do
+ config.features << "compiled"
+ silence { run_task "warble" }
+ File.exist?('app/helpers/application_helper.class').should be_false
+ end
+
it "should process symlinks by storing a file in the archive that has the same contents as the source" do
File.open("config/special.txt", "wb") {|f| f << "special"}
Dir.chdir("config") { ln_s "special.txt", "link.txt" }

0 comments on commit 808041b

Please sign in to comment.