Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

rename task to kumade:before_asset_compilation

  • Loading branch information...
commit 691e456bdd3e7d54180d9e34423a07c6b0163311 1 parent 2a5aef4
@nickrivadeneira nickrivadeneira authored
View
4 README.md
@@ -140,8 +140,8 @@ Tested against:
Want to run a task before bundling your assets on deploy? In your rails app's rake tasks, drop in:
``` ruby
-namespace :deploy do
- task :assets do
+namespace :kumade do
+ task :before_asset_compilation do
puts "This runs before assets are committed and pushed to the remote"
end
end
View
12 features/kumade_without_jammit.feature
@@ -16,25 +16,25 @@ Feature: Kumade without jammit
Scenario: Run custom task if it exists
Given I write to "Rakefile" with:
"""
- namespace :deploy do
- task :assets do
+ namespace :kumade do
+ task :before_asset_compilation do
puts 'Hi!'
end
end
"""
When I run kumade with "pretend-staging"
- Then the output should contain "Running deploy:assets task"
+ Then the output should contain "Running kumade:before_asset_compilation task"
And the output should contain "Hi!"
Scenario: Don't run rake task in pretend mode
Given I write to "Rakefile" with:
"""
- namespace :deploy do
- task :assets do
+ namespace :kumade do
+ task :before_asset_compilation do
puts 'Hi!'
end
end
"""
When I run kumade with "pretend-staging -p"
- Then the output should contain "Running deploy:assets task"
+ Then the output should contain "Running kumade:before_asset_compilation task"
And the output should not contain "Hi!"
View
10 lib/kumade/deployer.rb
@@ -72,8 +72,8 @@ def ensure_clean_git
def package_assets
package_with_jammit if jammit_installed?
- package_with_more if more_installed?
- invoke_custom_task if custom_task?
+ package_with_more if more_installed?
+ invoke_custom_task if custom_task?
end
def package_with_jammit
@@ -111,8 +111,8 @@ def package_with_more
end
def invoke_custom_task
- success "Running deploy:assets task"
- Rake::Task["deploy:assets"].invoke unless pretending
+ success "Running kumade:before_asset_compilation task"
+ Rake::Task["kumade:before_asset_compilation"].invoke unless pretending
end
def git_add_and_commit_all_assets_in(dir)
@@ -154,7 +154,7 @@ def more_installed?
def custom_task?
load("Rakefile") if File.exist?("Rakefile")
- Rake::Task.task_defined?("deploy:assets")
+ Rake::Task.task_defined?("kumade:before_asset_compilation")
end
def git_dirty?
View
6 spec/kumade/deployer_spec.rb
@@ -297,7 +297,7 @@
let(:task) { stub('task', :invoke => nil) }
it "calls deploy task" do
- Rake::Task.should_receive(:[]).with("deploy:assets")
+ Rake::Task.should_receive(:[]).with("kumade:before_asset_compilation")
task.should_receive(:invoke)
subject.invoke_custom_task
end
@@ -451,8 +451,8 @@ class More
end
it "returns true if it task found" do
- namespace :deploy do
- task :assets do
+ namespace :kumade do
+ task :before_asset_compilation do
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.