Permalink
Browse files

invoke custom task before jammit

  • Loading branch information...
1 parent 691e456 commit e613c2987c8f4fbcdd2dfa2e75860fb5e536acfe @nickrivadeneira nickrivadeneira committed Aug 19, 2011
Showing with 13 additions and 1 deletion.
  1. +12 −0 features/kumade_executable.feature
  2. +1 −1 lib/kumade/deployer.rb
View
12 features/kumade_executable.feature
@@ -84,3 +84,15 @@ Feature: Kumade executable
Scenario: Jammit packager runs if Jammit is installed
When I run kumade with "pretend-staging"
Then the output from "bundle exec kumade pretend-staging" should contain "==> ! Error: Jammit::MissingConfiguration"
+
+ Scenario: Run custom task before jammit
+ Given I write to "Rakefile" with:
+ """
+ namespace :kumade do
+ task :before_asset_compilation do
+ puts 'Hi!'
+ end
+ end
+ """
+ When I run kumade with "pretend-staging -p"
+ Then the output should match /kumade:before_asset_compilation.*Packaged assets with Jammit/
View
2 lib/kumade/deployer.rb
@@ -71,9 +71,9 @@ def ensure_clean_git
end
def package_assets
+ invoke_custom_task if custom_task?
package_with_jammit if jammit_installed?
package_with_more if more_installed?
- invoke_custom_task if custom_task?
end
def package_with_jammit

0 comments on commit e613c29

Please sign in to comment.