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.
@@ -54,6 +54,8 @@ module CF::App
54
54
  apply_changes(app)
55
55
  display_changes(app)
56
56
  commit_changes(app)
57
+
58
+ warn "\n#{c(app.name, :name)} is currently stopped, start it with 'cf start'" unless app.started?
57
59
  end
58
60
 
59
61
  def setup_new_app(path)
@@ -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.nil?
71
+ if mode == "none"
73
72
  with_progress("Removing debug mode") do
74
- app.debug = nil
73
+ app.debug = mode
75
74
  app.stop! if app.started?
76
75
  end
77
76
 
data/lib/cf/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module CF
2
- VERSION = "4.2.10.rc1".freeze
2
+ VERSION = "4.2.10.rc2".freeze
3
3
  end
@@ -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(nil)
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.rc1
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-07-31 00:00:00.000000000 Z
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: -1557605910592806796
617
+ hash: -1580609269505927435
618
618
  required_rubygems_version: !ruby/object:Gem::Requirement
619
619
  none: false
620
620
  requirements: