cf 4.2.1.rc2 → 4.2.1.rc3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/cf/cli/app/start.rb +2 -2
- data/lib/cf/cli/service/services.rb +10 -13
- data/lib/cf/version.rb +1 -1
- data/spec/cf/cli/app/start_spec.rb +1 -1
- data/spec/cf/cli/service/services_spec.rb +31 -0
- metadata +3 -3
data/lib/cf/cli/app/start.rb
CHANGED
@@ -39,7 +39,7 @@ module CF::App
|
|
39
39
|
|
40
40
|
def start_app(app)
|
41
41
|
log = nil
|
42
|
-
with_progress("
|
42
|
+
with_progress("Preparing to start #{c(app.name, :name)}") do
|
43
43
|
app.start!(true) do |url|
|
44
44
|
log = url
|
45
45
|
end
|
@@ -110,7 +110,7 @@ module CF::App
|
|
110
110
|
indented { print_instances_summary(instances) }
|
111
111
|
|
112
112
|
if all_instances_running?(instances)
|
113
|
-
line "#{c("Push successful! App '#{app.name}' available at http://#{app.
|
113
|
+
line "#{c("Push successful! App '#{app.name}' available at http://#{app.host}.#{app.domain}", :good)}"
|
114
114
|
return
|
115
115
|
end
|
116
116
|
rescue CFoundry::NotStaged
|
@@ -72,21 +72,18 @@ module CF::Service
|
|
72
72
|
table(
|
73
73
|
["name", "service", "provider", "version", "plan", "bound apps"],
|
74
74
|
@services.collect { |i|
|
75
|
+
apps = name_list(i.service_bindings.collect(&:app))
|
75
76
|
plan = i.service_plan
|
76
|
-
service = plan.service
|
77
77
|
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
provider,
|
86
|
-
|
87
|
-
plan.name,
|
88
|
-
apps
|
89
|
-
]
|
78
|
+
unless plan
|
79
|
+
[ c(i.name, :name), "none", "none", "none", "none", apps]
|
80
|
+
else
|
81
|
+
service = plan.service
|
82
|
+
label = service.label
|
83
|
+
version = service.version
|
84
|
+
provider = service.provider
|
85
|
+
[ c(i.name, :name), label, provider, version, plan.name, apps]
|
86
|
+
end
|
90
87
|
})
|
91
88
|
|
92
89
|
end
|
data/lib/cf/version.rb
CHANGED
@@ -37,7 +37,7 @@ module CF
|
|
37
37
|
def self.it_says_application_is_starting
|
38
38
|
it "says that it's starting the application" do
|
39
39
|
execute_start_app
|
40
|
-
expect(output).to say("
|
40
|
+
expect(output).to say("Preparing to start #{app.name}... OK")
|
41
41
|
end
|
42
42
|
end
|
43
43
|
|
@@ -74,6 +74,37 @@ module CF
|
|
74
74
|
|
75
75
|
end
|
76
76
|
|
77
|
+
context "when one of the services does not have a service plan" do
|
78
|
+
let(:service_instances) { [service1, service2]}
|
79
|
+
let(:service2) { build(:service_instance, :service_plan => nil, :service_bindings => [service_binding]) }
|
80
|
+
it 'still produces a table of service' do
|
81
|
+
subject
|
82
|
+
stdout.rewind
|
83
|
+
output = stdout.read
|
84
|
+
|
85
|
+
expect(output).to match /Getting services in the space.*OK/
|
86
|
+
|
87
|
+
expect(output).to match /name\s+service\s+provider\s+version\s+plan\s+bound apps/
|
88
|
+
|
89
|
+
expect(output).to match /service-instance-.+?\s+ # name
|
90
|
+
service-.*?\s+ # service
|
91
|
+
provider.*?\s+ # provider
|
92
|
+
service_version\s+ # version
|
93
|
+
service-plan-.*?\s+ # plan
|
94
|
+
app-name-\d+\s+ # bound apps
|
95
|
+
/x
|
96
|
+
|
97
|
+
expect(output).to match /service-instance-.+?\s+ # name
|
98
|
+
none\s+ # service
|
99
|
+
none\s+ # provider
|
100
|
+
none\s+ # version
|
101
|
+
none\s+ # plan
|
102
|
+
app-name-\d+\s+ # bound apps
|
103
|
+
/x
|
104
|
+
end
|
105
|
+
end
|
106
|
+
|
107
|
+
|
77
108
|
context 'when given --marketplace argument' do
|
78
109
|
it 'lists services on the target' do
|
79
110
|
client.stub(:services => Array.new(3) { build(:service) })
|
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.1.
|
4
|
+
version: 4.2.1.rc3
|
5
5
|
prerelease: 6
|
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-
|
13
|
+
date: 2013-07-13 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: addressable
|
@@ -619,7 +619,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
619
619
|
version: '0'
|
620
620
|
segments:
|
621
621
|
- 0
|
622
|
-
hash:
|
622
|
+
hash: 786991883399052394
|
623
623
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
624
624
|
none: false
|
625
625
|
requirements:
|