kumade 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -140,8 +140,8 @@ Tested against:
140
140
  Want to run a task before bundling your assets on deploy? In your rails app's rake tasks, drop in:
141
141
 
142
142
  ``` ruby
143
- namespace :deploy do
144
- task :assets do
143
+ namespace :kumade do
144
+ task :before_asset_compilation do
145
145
  puts "This runs before assets are committed and pushed to the remote"
146
146
  end
147
147
  end
@@ -84,3 +84,15 @@ Feature: Kumade executable
84
84
  Scenario: Jammit packager runs if Jammit is installed
85
85
  When I run kumade with "pretend-staging"
86
86
  Then the output from "bundle exec kumade pretend-staging" should contain "==> ! Error: Jammit::MissingConfiguration"
87
+
88
+ Scenario: Run custom task before jammit
89
+ Given I write to "Rakefile" with:
90
+ """
91
+ namespace :kumade do
92
+ task :before_asset_compilation do
93
+ puts 'Hi!'
94
+ end
95
+ end
96
+ """
97
+ When I run kumade with "pretend-staging -p"
98
+ Then the output should match /kumade:before_asset_compilation.*Packaged assets with Jammit/
@@ -16,25 +16,25 @@ Feature: Kumade without jammit
16
16
  Scenario: Run custom task if it exists
17
17
  Given I write to "Rakefile" with:
18
18
  """
19
- namespace :deploy do
20
- task :assets do
19
+ namespace :kumade do
20
+ task :before_asset_compilation do
21
21
  puts 'Hi!'
22
22
  end
23
23
  end
24
24
  """
25
25
  When I run kumade with "pretend-staging"
26
- Then the output should contain "Running deploy:assets task"
26
+ Then the output should contain "Running kumade:before_asset_compilation task"
27
27
  And the output should contain "Hi!"
28
28
 
29
29
  Scenario: Don't run rake task in pretend mode
30
30
  Given I write to "Rakefile" with:
31
31
  """
32
- namespace :deploy do
33
- task :assets do
32
+ namespace :kumade do
33
+ task :before_asset_compilation do
34
34
  puts 'Hi!'
35
35
  end
36
36
  end
37
37
  """
38
38
  When I run kumade with "pretend-staging -p"
39
- Then the output should contain "Running deploy:assets task"
39
+ Then the output should contain "Running kumade:before_asset_compilation task"
40
40
  And the output should not contain "Hi!"
@@ -71,9 +71,9 @@ module Kumade
71
71
  end
72
72
 
73
73
  def package_assets
74
+ invoke_custom_task if custom_task?
74
75
  package_with_jammit if jammit_installed?
75
- package_with_more if more_installed?
76
- invoke_custom_task if custom_task?
76
+ package_with_more if more_installed?
77
77
  end
78
78
 
79
79
  def package_with_jammit
@@ -111,8 +111,8 @@ module Kumade
111
111
  end
112
112
 
113
113
  def invoke_custom_task
114
- success "Running deploy:assets task"
115
- Rake::Task["deploy:assets"].invoke unless pretending
114
+ success "Running kumade:before_asset_compilation task"
115
+ Rake::Task["kumade:before_asset_compilation"].invoke unless pretending
116
116
  end
117
117
 
118
118
  def git_add_and_commit_all_assets_in(dir)
@@ -154,7 +154,7 @@ module Kumade
154
154
 
155
155
  def custom_task?
156
156
  load("Rakefile") if File.exist?("Rakefile")
157
- Rake::Task.task_defined?("deploy:assets")
157
+ Rake::Task.task_defined?("kumade:before_asset_compilation")
158
158
  end
159
159
 
160
160
  def git_dirty?
@@ -1,3 +1,3 @@
1
1
  module Kumade
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
@@ -297,7 +297,7 @@ describe Kumade::Deployer, "#invoke_custom_task" do
297
297
  let(:task) { stub('task', :invoke => nil) }
298
298
 
299
299
  it "calls deploy task" do
300
- Rake::Task.should_receive(:[]).with("deploy:assets")
300
+ Rake::Task.should_receive(:[]).with("kumade:before_asset_compilation")
301
301
  task.should_receive(:invoke)
302
302
  subject.invoke_custom_task
303
303
  end
@@ -451,8 +451,8 @@ describe Kumade::Deployer, "#custom_task?" do
451
451
  end
452
452
 
453
453
  it "returns true if it task found" do
454
- namespace :deploy do
455
- task :assets do
454
+ namespace :kumade do
455
+ task :before_asset_compilation do
456
456
 
457
457
  end
458
458
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kumade
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -14,7 +14,7 @@ date: 2011-08-19 00:00:00.000000000Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: heroku
17
- requirement: &2152636140 !ruby/object:Gem::Requirement
17
+ requirement: &2152458640 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ~>
@@ -22,10 +22,10 @@ dependencies:
22
22
  version: '2.0'
23
23
  type: :runtime
24
24
  prerelease: false
25
- version_requirements: *2152636140
25
+ version_requirements: *2152458640
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: thor
28
- requirement: &2152635640 !ruby/object:Gem::Requirement
28
+ requirement: &2152458140 !ruby/object:Gem::Requirement
29
29
  none: false
30
30
  requirements:
31
31
  - - ~>
@@ -33,10 +33,10 @@ dependencies:
33
33
  version: '0.14'
34
34
  type: :runtime
35
35
  prerelease: false
36
- version_requirements: *2152635640
36
+ version_requirements: *2152458140
37
37
  - !ruby/object:Gem::Dependency
38
38
  name: rake
39
- requirement: &2152635180 !ruby/object:Gem::Requirement
39
+ requirement: &2152457680 !ruby/object:Gem::Requirement
40
40
  none: false
41
41
  requirements:
42
42
  - - ~>
@@ -44,10 +44,10 @@ dependencies:
44
44
  version: 0.8.7
45
45
  type: :development
46
46
  prerelease: false
47
- version_requirements: *2152635180
47
+ version_requirements: *2152457680
48
48
  - !ruby/object:Gem::Dependency
49
49
  name: rspec
50
- requirement: &2152634720 !ruby/object:Gem::Requirement
50
+ requirement: &2152457220 !ruby/object:Gem::Requirement
51
51
  none: false
52
52
  requirements:
53
53
  - - ~>
@@ -55,10 +55,10 @@ dependencies:
55
55
  version: 2.6.0
56
56
  type: :development
57
57
  prerelease: false
58
- version_requirements: *2152634720
58
+ version_requirements: *2152457220
59
59
  - !ruby/object:Gem::Dependency
60
60
  name: cucumber
61
- requirement: &2152634260 !ruby/object:Gem::Requirement
61
+ requirement: &2152456760 !ruby/object:Gem::Requirement
62
62
  none: false
63
63
  requirements:
64
64
  - - ~>
@@ -66,10 +66,10 @@ dependencies:
66
66
  version: 1.0.2
67
67
  type: :development
68
68
  prerelease: false
69
- version_requirements: *2152634260
69
+ version_requirements: *2152456760
70
70
  - !ruby/object:Gem::Dependency
71
71
  name: aruba
72
- requirement: &2152633800 !ruby/object:Gem::Requirement
72
+ requirement: &2152456300 !ruby/object:Gem::Requirement
73
73
  none: false
74
74
  requirements:
75
75
  - - ~>
@@ -77,10 +77,10 @@ dependencies:
77
77
  version: 0.4.3
78
78
  type: :development
79
79
  prerelease: false
80
- version_requirements: *2152633800
80
+ version_requirements: *2152456300
81
81
  - !ruby/object:Gem::Dependency
82
82
  name: jammit
83
- requirement: &2152633340 !ruby/object:Gem::Requirement
83
+ requirement: &2152455840 !ruby/object:Gem::Requirement
84
84
  none: false
85
85
  requirements:
86
86
  - - ~>
@@ -88,7 +88,7 @@ dependencies:
88
88
  version: 0.6.3
89
89
  type: :development
90
90
  prerelease: false
91
- version_requirements: *2152633340
91
+ version_requirements: *2152455840
92
92
  description: Simple rake tasks for deploying to Heroku
93
93
  email:
94
94
  - gabe@thoughtbot.com
@@ -137,7 +137,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
137
137
  version: '0'
138
138
  segments:
139
139
  - 0
140
- hash: -616977314755429055
140
+ hash: -2894600274935515438
141
141
  required_rubygems_version: !ruby/object:Gem::Requirement
142
142
  none: false
143
143
  requirements:
@@ -146,7 +146,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
146
146
  version: '0'
147
147
  segments:
148
148
  - 0
149
- hash: -616977314755429055
149
+ hash: -2894600274935515438
150
150
  requirements: []
151
151
  rubyforge_project:
152
152
  rubygems_version: 1.8.6