cf 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -110,8 +110,13 @@ module CF
110
110
  end
111
111
  end
112
112
 
113
- desc "target URL", "Set target cloud"
114
- def target(url)
113
+ desc "target [URL]", "Set or display the current target cloud"
114
+ def target(url = nil)
115
+ if url.nil?
116
+ display_target
117
+ return
118
+ end
119
+
115
120
  target = sane_target_url(url)
116
121
  display = c(target.sub(/https?:\/\//, ""), :blue)
117
122
  with_progress("Setting target to #{display}") do
@@ -132,7 +137,7 @@ module CF
132
137
  # TODO: implement new authentication scheme
133
138
  def login(email = nil)
134
139
  unless simple_output?
135
- puts "Target: #{c(client_target, :blue)}"
140
+ display_target
136
141
  puts ""
137
142
  end
138
143
 
@@ -209,6 +214,10 @@ module CF
209
214
 
210
215
  puts "" unless simple_output?
211
216
 
217
+ if services.empty? and !simple_output?
218
+ puts "No services."
219
+ end
220
+
212
221
  services.each do |s|
213
222
  display_service(s)
214
223
  end
@@ -245,5 +254,13 @@ module CF
245
254
  puts " admin?: #{c(u.admin?, u.admin? ? :green : :red)}"
246
255
  end
247
256
  end
257
+
258
+ def display_target
259
+ if simple_output?
260
+ puts client.target
261
+ else
262
+ puts "Target: #{c(client.target, :blue)}"
263
+ end
264
+ end
248
265
  end
249
266
  end
@@ -12,6 +12,12 @@ module CF
12
12
  client.apps
13
13
  end
14
14
 
15
+ if apps.empty? and !simple_output?
16
+ puts ""
17
+ puts "No applications."
18
+ return
19
+ end
20
+
15
21
  apps.each.with_index do |a, num|
16
22
  display_app(a)
17
23
  end
@@ -1,3 +1,3 @@
1
1
  module CF
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
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: 0.1.1
4
+ version: 0.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-04-05 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: interact
16
- requirement: &70351813071560 !ruby/object:Gem::Requirement
16
+ requirement: &70204736023380 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 0.4.1
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70351813071560
24
+ version_requirements: *70204736023380
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: json_pure
27
- requirement: &70351813071060 !ruby/object:Gem::Requirement
27
+ requirement: &70204736022880 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 1.6.5
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70351813071060
35
+ version_requirements: *70204736022880
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: cfoundry
38
- requirement: &70351813070600 !ruby/object:Gem::Requirement
38
+ requirement: &70204736022420 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: 0.1.0
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *70351813070600
46
+ version_requirements: *70204736022420
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: thor
49
- requirement: &70351813070140 !ruby/object:Gem::Requirement
49
+ requirement: &70204736021940 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
@@ -54,7 +54,7 @@ dependencies:
54
54
  version: 0.14.6
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *70351813070140
57
+ version_requirements: *70204736021940
58
58
  description:
59
59
  email:
60
60
  - asuraci@vmware.com