af 0.5.0.beta.9 → 0.5.0.beta.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NjMzNDgyZjlkNDJhMzExY2ViNTA3YzkzODFjMTNlZDJmYWQ0MTMyYQ==
4
+ ZDk1NDE1ZjhjNWU3YThiMDlmMDEzYzRlYTlmZmI5MTE3ZWE1OWZhYg==
5
5
  data.tar.gz: !binary |-
6
- ZjQ4ZjgyM2U3NDBhYmE4MDAyZDU4OTQwMWE5OTUxYmNjNjJkMDVjZQ==
6
+ YzE5NmZmMzhkYTVlNjkyNTZjYTIzZjY3ODg5YzAyZTdjNTZhOTg5Zg==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- OTRhNmFmOTJjMDdmMWUzYWY1Yjc5NWRjMjc1MGJlMWVjOWJhNmJhYjVhNzJi
10
- ZmM2NGZmN2M5MzliNDFhZGZlOGJiZDFiZWNiZDlmZjcwMzAxMzE0MDE2M2U3
11
- YTE0ZDgzOTE2NzRmODIzNTRiNDc1NjBhYTY3NzM0ZmUxZjgxYjc=
9
+ MjgyODYwNjQyZGEyZDkxYmQwZDFlM2YzNjk3MTE5MzE0NjAwNWI4ODgzNTUy
10
+ ZmJkODBmMWI4YTEzNGE4MGNjZDI3OTM1ZWYwYjEzNmNiM2Y5NDEyOTZhNWM1
11
+ Njg5ODdiZDFlZTJhMWRlZDgzYWFkNTA3ZTNkNDVkZWE1ODEwZmI=
12
12
  data.tar.gz: !binary |-
13
- NDNkMTMzMDY5ZGNiNTdhYzQ0ODFkMzgxZTdjNjY4ZGViZTcyM2IwNTE3YTAx
14
- MTJjNTZjNTBkNjA0ZGMzMDdmZDMzYmIyNGE1ZGVlMzhhNDQ1MjU1N2ZkMzFk
15
- ZDc4NjkwNWY2ODgxNzcwMjNmN2I2NmFjY2YxOGJlOTMwYmQxM2I=
13
+ YmI3ZmYwZWE3NDhjMGE2YWU1N2RiMDg0OWVhYmUzYTIyNjdiYmNlYWU0NTdj
14
+ YWU1MWUwYWI0OGFkODNmNmQ3YWU4ZjBkY2MxMzcwYWViZmZlMzhiZjU5MDUx
15
+ MDM1NGI0MDQyMTVkNWVhMjdmNjM4MjEwNTFiYWVlNzA5MjNiYTM=
data/lib/af/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module AF
2
- VERSION = "0.5.0.beta.9".freeze
2
+ VERSION = "0.5.0.beta.10".freeze
3
3
  end
data/lib/vmc/cli.rb CHANGED
@@ -65,8 +65,12 @@ module VMC
65
65
  end
66
66
  end
67
67
 
68
+ def target_exists
69
+ File.exists? target_file
70
+ end
71
+
68
72
  def check_target
69
- unless File.exists? target_file
73
+ unless target_exists
70
74
  fail "Please select a target with 'af target'."
71
75
  end
72
76
  end
@@ -394,7 +398,7 @@ module VMC
394
398
  end
395
399
 
396
400
  def client(target = client_target)
397
- return @@client if defined?(@@client) && @@client
401
+ return @@client if defined?(@@client) && @@client && @@client.target == target
398
402
  return unless target
399
403
 
400
404
  info = target_info(target)
@@ -67,7 +67,7 @@ module VMC::App
67
67
  def create_app(inputs)
68
68
  app = client.app
69
69
 
70
- inputs.each { |key, value| puts key; app.send(:"#{key}=", value) unless value.nil? }
70
+ inputs.each { |key, value| app.send(:"#{key}=", value) unless value.nil? }
71
71
 
72
72
  app = filter(:create_app, app)
73
73
 
@@ -72,6 +72,10 @@ module VMC::Start
72
72
 
73
73
  private
74
74
 
75
+ def precondition
76
+ check_target
77
+ end
78
+
75
79
  def ask_prompts(credentials, prompts)
76
80
  prompts.each do |name, meta|
77
81
  type, label = meta
@@ -14,8 +14,12 @@ module VMC::Start
14
14
  def target
15
15
  unless input.has?(:url) || input.has?(:organization) || \
16
16
  input.has?(:space)
17
- display_target
18
- display_org_and_space unless quiet?
17
+ if target_exists
18
+ display_target
19
+ display_org_and_space unless quiet?
20
+ else
21
+ fail "No target is set."
22
+ end
19
23
  return
20
24
  end
21
25
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: af
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0.beta.9
4
+ version: 0.5.0.beta.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cloud Foundry Team
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-03-14 00:00:00.000000000 Z
12
+ date: 2013-04-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json_pure
@@ -95,20 +95,6 @@ dependencies:
95
95
  - - ~>
96
96
  - !ruby/object:Gem::Version
97
97
  version: '0.5'
98
- - !ruby/object:Gem::Dependency
99
- name: manifests-vmc-plugin
100
- requirement: !ruby/object:Gem::Requirement
101
- requirements:
102
- - - ~>
103
- - !ruby/object:Gem::Version
104
- version: '0.6'
105
- type: :runtime
106
- prerelease: false
107
- version_requirements: !ruby/object:Gem::Requirement
108
- requirements:
109
- - - ~>
110
- - !ruby/object:Gem::Version
111
- version: '0.6'
112
98
  - !ruby/object:Gem::Dependency
113
99
  name: appfog-tunnel-vmc-plugin
114
100
  requirement: !ruby/object:Gem::Requirement