cf 4.2.10.rc1 → 4.2.10.rc2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/cf/cli/app/push.rb +2 -0
- data/lib/cf/cli/app/start.rb +3 -4
- data/lib/cf/version.rb +1 -1
- data/lib/manifests/plugin.rb +2 -0
- data/spec/cf/cli/app/push_spec.rb +12 -0
- data/spec/cf/cli/app/start_spec.rb +1 -1
- data/spec/manifests/plugin_spec.rb +13 -0
- metadata +3 -3
data/lib/cf/cli/app/push.rb
CHANGED
data/lib/cf/cli/app/start.rb
CHANGED
@@ -28,7 +28,7 @@ module CF::App
|
|
28
28
|
stream_start_log(log) if log
|
29
29
|
check_application(app)
|
30
30
|
|
31
|
-
if app.debug_mode && !quiet?
|
31
|
+
if !app.debug_mode.nil? && app.debug_mode != "none" && !quiet?
|
32
32
|
line
|
33
33
|
invoke :instances, :app => app
|
34
34
|
end
|
@@ -64,14 +64,13 @@ module CF::App
|
|
64
64
|
|
65
65
|
# set app debug mode, ensuring it's valid, and shutting it down
|
66
66
|
def switch_mode(app, mode)
|
67
|
-
mode = nil if mode == "none"
|
68
67
|
mode = "run" if mode == "" # no value given
|
69
68
|
|
70
69
|
return false if app.debug == mode
|
71
70
|
|
72
|
-
if mode
|
71
|
+
if mode == "none"
|
73
72
|
with_progress("Removing debug mode") do
|
74
|
-
app.debug =
|
73
|
+
app.debug = mode
|
75
74
|
app.stop! if app.started?
|
76
75
|
end
|
77
76
|
|
data/lib/cf/version.rb
CHANGED
data/lib/manifests/plugin.rb
CHANGED
@@ -74,6 +74,8 @@ class ManifestsPlugin < CF::App::Base
|
|
74
74
|
return
|
75
75
|
end
|
76
76
|
|
77
|
+
line(c("--path is ignored when using a manifest. Please specify the path in the manifest.", :warning)) if input.has?(:path)
|
78
|
+
|
77
79
|
particular, external = apps_in_manifest(input)
|
78
80
|
|
79
81
|
unless external.empty?
|
@@ -40,6 +40,7 @@ module CF
|
|
40
40
|
before do
|
41
41
|
app.stub(:upload)
|
42
42
|
app.changes = {}
|
43
|
+
push.stub(:warn)
|
43
44
|
end
|
44
45
|
|
45
46
|
subject do
|
@@ -72,6 +73,17 @@ module CF
|
|
72
73
|
subject
|
73
74
|
end
|
74
75
|
|
76
|
+
context "when the app is stopped" do
|
77
|
+
before do
|
78
|
+
app.stub(:started?).and_return(false)
|
79
|
+
end
|
80
|
+
|
81
|
+
it "warns the user" do
|
82
|
+
push.should_receive(:warn).with("\n#{app.name} is currently stopped, start it with 'cf start'")
|
83
|
+
subject
|
84
|
+
end
|
85
|
+
end
|
86
|
+
|
75
87
|
context "when no inputs are given" do
|
76
88
|
let(:inputs) { {} }
|
77
89
|
|
@@ -235,7 +235,7 @@ module CF
|
|
235
235
|
let(:mode) { "none" }
|
236
236
|
|
237
237
|
it "removes the debug mode" do
|
238
|
-
expect { execute_start_app_with_mode }.to change { app.debug }.from("in_debug").to(
|
238
|
+
expect { execute_start_app_with_mode }.to change { app.debug }.from("in_debug").to("none")
|
239
239
|
end
|
240
240
|
end
|
241
241
|
|
@@ -316,6 +316,19 @@ describe ManifestsPlugin do
|
|
316
316
|
end
|
317
317
|
end
|
318
318
|
end
|
319
|
+
|
320
|
+
context "and --path is specified too" do
|
321
|
+
let(:given_hash) { { :path => "/somewhere/else" } }
|
322
|
+
|
323
|
+
it "warns the user that --path will be ignored" do
|
324
|
+
plugin.stub(:line)
|
325
|
+
plugin.stub(:push_with_manifest)
|
326
|
+
|
327
|
+
subject
|
328
|
+
|
329
|
+
expect(plugin).to have_received(:line).with("--path is ignored when using a manifest. Please specify the path in the manifest.")
|
330
|
+
end
|
331
|
+
end
|
319
332
|
end
|
320
333
|
|
321
334
|
context "without a manifest" do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cf
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.2.10.
|
4
|
+
version: 4.2.10.rc2
|
5
5
|
prerelease: 7
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2013-
|
13
|
+
date: 2013-08-02 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: addressable
|
@@ -614,7 +614,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
614
614
|
version: '0'
|
615
615
|
segments:
|
616
616
|
- 0
|
617
|
-
hash: -
|
617
|
+
hash: -1580609269505927435
|
618
618
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
619
619
|
none: false
|
620
620
|
requirements:
|