cf 4.1.5.rc3 → 4.1.5.rc4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 254907a2729b959a99b14ede16060567f9e97cfb
4
- data.tar.gz: b08033676ccba00d1eab75e8c9981c1d002133d2
3
+ metadata.gz: eeeab88cd5d4fe615841147f7951e324a24cba11
4
+ data.tar.gz: 9974b6699cd3dc29a66774fd7cc782741d41bc25
5
5
  SHA512:
6
- metadata.gz: 356b0451113f2e1dfe185fe97411272302ce0e9f8d061d37bd65b2e4e1af0608edb665fb0daf3f1f1976062144fc5009465681433947719eae088477440f66e9
7
- data.tar.gz: 6865a4f6f0256bc4bbf6f3f1e7980ec8d936e44a328bbf5e4407f9edd8e1c82b34bcff52679b06f1004b9436ad5cd517d3cba6d3b6d2f1eb9489840a89ff5acf
6
+ metadata.gz: 66e8bb42bfdf140307ad90600b6b58ffa91ff3bee947ed34ea7c7bb6d1d1287580e0239288a9f698ba702957a09d2d49f6cd7928f923c03d41e91e8abd1eeaa8
7
+ data.tar.gz: a91890e75b606f9826e3848b6c49f50d94d8c0232c3cad7f256e7fdc3a9bfd93981325d7462a8341d27ab38be36900a19e8540bb1c3497f36eb0692838458e6b
@@ -91,15 +91,16 @@ module CF::App
91
91
  return
92
92
  end
93
93
 
94
- line "Checking #{c(app.name, :name)}..."
94
+ print("Checking status of app '#{c(app.name, :name)}'...")
95
95
 
96
96
  seconds = 0
97
+ @first_time_after_staging_succeeded = true
97
98
 
98
99
  begin
99
100
  instances = []
100
101
  while true
101
102
  if any_instance_flapping?(instances) || seconds == APP_CHECK_LIMIT
102
- err "Application failed to start."
103
+ err "Push unsuccessful."
103
104
  return
104
105
  end
105
106
 
@@ -109,11 +110,11 @@ module CF::App
109
110
  indented { print_instances_summary(instances) }
110
111
 
111
112
  if all_instances_running?(instances)
112
- line "#{c("OK", :good)}"
113
+ line "#{c("Push successful! App '#{app.name}' available at #{app.name}.#{app.domain}", :good)}"
113
114
  return
114
115
  end
115
116
  rescue CFoundry::NotStaged
116
- line "Staging in progress..."
117
+ print (".")
117
118
  end
118
119
 
119
120
  sleep 1
@@ -133,6 +134,12 @@ module CF::App
133
134
  end
134
135
 
135
136
  def print_instances_summary(instances)
137
+
138
+ if @first_time_after_staging_succeeded
139
+ line
140
+ @first_time_after_staging_succeeded = false
141
+ end
142
+
136
143
  counts = Hash.new { 0 }
137
144
  instances.each do |i|
138
145
  counts[i.state] += 1
@@ -148,8 +155,8 @@ module CF::App
148
155
  total = instances.count
149
156
  running = counts["RUNNING"].to_s.rjust(total.to_s.size)
150
157
 
151
- ratio = "#{running}#{d("/")}#{total} instances:"
152
- line "#{ratio} #{states.join(", ")}"
158
+ ratio = "#{running}#{d(" of ")}#{total} instances running"
159
+ line "#{ratio} (#{states.join(", ")})"
153
160
  end
154
161
  end
155
162
  end
@@ -1,3 +1,3 @@
1
1
  module CF
2
- VERSION = "4.1.5.rc3".freeze
2
+ VERSION = "4.1.5.rc4".freeze
3
3
  end
@@ -9,6 +9,9 @@ module CF
9
9
  before do
10
10
  stub_client_and_precondition
11
11
  client.stub(:apps).and_return([app])
12
+
13
+ app.stub(:host).and_return("some_host")
14
+ app.stub(:domain).and_return("some_domain")
12
15
  end
13
16
 
14
17
  def execute_start_app
@@ -80,7 +83,7 @@ module CF
80
83
 
81
84
  it "says app is started" do
82
85
  execute_start_app
83
- expect(output).to say("Checking #{app.name}...")
86
+ expect(output).to say("Checking status of app '#{app.name}'...")
84
87
  expect(output).to say("1 running, 1 down")
85
88
  expect(output).to say("2 running")
86
89
  end
@@ -93,7 +96,7 @@ module CF
93
96
 
94
97
  it "says the app failed to stage" do
95
98
  execute_start_app
96
- expect(output).to say("Checking #{app.name}...")
99
+ expect(output).to say("Checking status of app '#{app.name}'...")
97
100
  expect(error_output).to say("Application failed to stage")
98
101
  expect(output).to_not say(/\d (running|down|flapping)/)
99
102
  end
@@ -112,8 +115,7 @@ module CF
112
115
 
113
116
  it "keeps polling" do
114
117
  execute_start_app
115
- expect(output).to say("Checking #{app.name}...")
116
- expect(output).to say("Staging in progress...")
118
+ expect(output).to say("Checking status of app '#{app.name}'...")
117
119
  expect(output).to say("2 running")
118
120
  end
119
121
  end
@@ -127,10 +129,10 @@ module CF
127
129
 
128
130
  it "says app failed to start" do
129
131
  execute_start_app
130
- expect(output).to say("Checking #{app.name}...")
132
+ expect(output).to say("Checking status of app '#{app.name}'...")
131
133
  expect(output).to say("1 running, 1 down")
132
134
  expect(output).to say("1 starting, 1 flapping")
133
- expect(error_output).to say("Application failed to start")
135
+ expect(error_output).to say("Push unsuccessful.")
134
136
  end
135
137
  end
136
138
  end
@@ -95,9 +95,10 @@ if ENV["CF_V2_RUN_INTEGRATION"]
95
95
 
96
96
  expect(runner).to say "Uploading #{app}... OK", 180
97
97
  expect(runner).to say "Starting #{app}... OK", 180
98
- expect(runner).to say "Checking #{app}...", 180
99
- expect(runner).to say "1/1 instances"
100
- expect(runner).to say "OK", 30
98
+ expect(runner).to say "Checking status of app '#{app}'...", 180
99
+ expect(runner).to say "0 of 1 instances running (1 starting)"
100
+ expect(runner).to say "1 of 1 instances running"
101
+ expect(runner).to say "Push successful! App '#{app}' available at #{app}.a1-app.cf-app.com", 30
101
102
  end
102
103
  end
103
104
 
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.1.5.rc3
4
+ version: 4.1.5.rc4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cloud Foundry Team