vmc 0.4.0.beta.63 → 0.4.0.beta.64

Sign up to get free protection for your applications and to get access to all the features.
@@ -171,6 +171,22 @@ module VMC
171
171
  input[:verbose]
172
172
  end
173
173
 
174
+ def user_colors
175
+ return @user_colors if @user_colors
176
+
177
+ colors = File.expand_path(COLORS_FILE)
178
+
179
+ @user_colors = super.dup
180
+
181
+ if File.exists?(colors)
182
+ YAML.load_file(colors).each do |k, v|
183
+ @user_colors[k.to_sym] = v.to_sym
184
+ end
185
+ end
186
+
187
+ @user_colors
188
+ end
189
+
174
190
  def err(msg, status = 1)
175
191
  if quiet?
176
192
  $stderr.puts(msg)
@@ -933,7 +933,7 @@ module VMC
933
933
 
934
934
  if input[:create_services] && !force?
935
935
  while true
936
- invoke :create_service, :app => app
936
+ invoke :create_service, { :app => app }, :plan => :interact
937
937
  break unless ask "Create another service?", :default => false
938
938
  end
939
939
  end
@@ -85,14 +85,14 @@ module VMC
85
85
  ask "Name?", :default => "#{service.label}-#{random}"
86
86
  }
87
87
  input(:plan, :desc => "Service plan",
88
+ :default => proc { |plans|
89
+ plans.find { |p| p.name == "D100" } ||
90
+ interact
91
+ },
88
92
  :from_given => find_by_name_insensitive("plan")) { |plans|
89
- if d100 = plans.find { |p| p.name == "D100" }
90
- d100
91
- else
92
- ask "Which plan?", :choices => plans.sort_by(&:name),
93
- :display => proc { |p| "#{p.name}: #{p.description}" },
94
- :complete => proc(&:name)
95
- end
93
+ ask "Which plan?", :choices => plans.sort_by(&:name),
94
+ :display => proc { |p| "#{p.name}: #{p.description}" },
95
+ :complete => proc(&:name)
96
96
  }
97
97
  input :provider, :desc => "Service provider"
98
98
  input :version, :desc => "Service version"
@@ -1,3 +1,3 @@
1
1
  module VMC
2
- VERSION = "0.4.0.beta.63"
2
+ VERSION = "0.4.0.beta.64"
3
3
  end
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vmc
3
3
  version: !ruby/object:Gem::Version
4
- hash: -33416758
4
+ hash: -3047156276
5
5
  prerelease: 6
6
6
  segments:
7
7
  - 0
8
8
  - 4
9
9
  - 0
10
10
  - beta
11
- - 63
12
- version: 0.4.0.beta.63
11
+ - 64
12
+ version: 0.4.0.beta.64
13
13
  platform: ruby
14
14
  authors:
15
15
  - VMware
@@ -17,7 +17,7 @@ autorequire:
17
17
  bindir: bin
18
18
  cert_chain: []
19
19
 
20
- date: 2012-10-05 00:00:00 Z
20
+ date: 2012-10-09 00:00:00 Z
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency
23
23
  name: json_pure
@@ -297,12 +297,12 @@ dependencies:
297
297
  requirements:
298
298
  - - ~>
299
299
  - !ruby/object:Gem::Version
300
- hash: 17
300
+ hash: 23
301
301
  segments:
302
302
  - 0
303
- - 1
304
- - 5
305
- version: 0.1.5
303
+ - 2
304
+ - 0
305
+ version: 0.2.0
306
306
  type: :runtime
307
307
  version_requirements: *id017
308
308
  - !ruby/object:Gem::Dependency