kumade 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/features/kumade_executable.feature +0 -1
- data/lib/kumade/deployer.rb +0 -11
- data/lib/kumade/version.rb +1 -1
- data/spec/kumade/deployer_spec.rb +0 -25
- metadata +1 -1
data/lib/kumade/deployer.rb
CHANGED
@@ -22,7 +22,6 @@ module Kumade
|
|
22
22
|
|
23
23
|
def pre_deploy
|
24
24
|
ensure_clean_git
|
25
|
-
ensure_rake_passes
|
26
25
|
package_assets
|
27
26
|
git_push('origin')
|
28
27
|
end
|
@@ -74,16 +73,6 @@ module Kumade
|
|
74
73
|
end
|
75
74
|
end
|
76
75
|
|
77
|
-
def ensure_rake_passes
|
78
|
-
if default_task_exists?
|
79
|
-
if rake_succeeded?
|
80
|
-
success("Rake passed")
|
81
|
-
else
|
82
|
-
error("Cannot deploy: tests did not pass")
|
83
|
-
end
|
84
|
-
end
|
85
|
-
end
|
86
|
-
|
87
76
|
def package_assets
|
88
77
|
package_with_jammit if jammit_installed?
|
89
78
|
package_with_more if more_installed?
|
data/lib/kumade/version.rb
CHANGED
@@ -6,7 +6,6 @@ describe Kumade::Deployer, "#pre_deploy" do
|
|
6
6
|
it "calls the correct methods in order" do
|
7
7
|
%w(
|
8
8
|
ensure_clean_git
|
9
|
-
ensure_rake_passes
|
10
9
|
package_assets
|
11
10
|
git_push
|
12
11
|
).each do |task|
|
@@ -19,7 +18,6 @@ describe Kumade::Deployer, "#pre_deploy" do
|
|
19
18
|
it "pushes to origin" do
|
20
19
|
%w(
|
21
20
|
ensure_clean_git
|
22
|
-
ensure_rake_passes
|
23
21
|
package_assets
|
24
22
|
).each do |task|
|
25
23
|
subject.stub(task)
|
@@ -181,29 +179,6 @@ describe Kumade::Deployer, "#ensure_clean_git" do
|
|
181
179
|
end
|
182
180
|
end
|
183
181
|
|
184
|
-
describe Kumade::Deployer, "#ensure_rake_passes" do
|
185
|
-
context "with a default task" do
|
186
|
-
before do
|
187
|
-
subject.stub(:default_task_exists? => true)
|
188
|
-
end
|
189
|
-
|
190
|
-
it "prints a success message if the default task succeeds" do
|
191
|
-
subject.stub(:rake_succeeded? => true)
|
192
|
-
subject.should_not_receive(:error)
|
193
|
-
subject.should_receive(:success).with("Rake passed")
|
194
|
-
|
195
|
-
subject.ensure_rake_passes
|
196
|
-
end
|
197
|
-
|
198
|
-
it "prints an error if the default task failse" do
|
199
|
-
subject.stub(:rake_succeeded? => false)
|
200
|
-
subject.should_receive(:error).with("Cannot deploy: tests did not pass")
|
201
|
-
|
202
|
-
subject.ensure_rake_passes
|
203
|
-
end
|
204
|
-
end
|
205
|
-
end
|
206
|
-
|
207
182
|
describe Kumade::Deployer, "#default_task_exists?" do
|
208
183
|
it "returns true because a default task does exist" do
|
209
184
|
subject.default_task_exists?.should be_true
|