manifests-vmc-plugin 0.4.18 → 0.4.19

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.
@@ -273,14 +273,15 @@ module VMCManifests
273
273
 
274
274
  def ask_to_save(input, app)
275
275
  return if manifest_file
276
+ return unless ask("Save configuration?", :default => false)
276
277
 
277
- if ask("Save configuration?", :default => false)
278
- with_progress("Saving to #{c("manifest.yml", :name)}") do
279
- File.open("manifest.yml", "w") do |io|
280
- YAML.dump(
281
- { "applications" => [meta] },
282
- io)
283
- end
278
+ manifest = create_manifest_for(app, input[:path])
279
+
280
+ with_progress("Saving to #{c("manifest.yml", :name)}") do
281
+ File.open("manifest.yml", "w") do |io|
282
+ YAML.dump(
283
+ { "applications" => [manifest] },
284
+ io)
284
285
  end
285
286
  end
286
287
  end
@@ -308,7 +309,7 @@ module VMCManifests
308
309
  def setup_services(app, info)
309
310
  return if !info[:services] || info[:services].empty?
310
311
 
311
- services = client.services
312
+ offerings = client.services
312
313
 
313
314
  to_bind = []
314
315
 
@@ -318,16 +319,16 @@ module VMCManifests
318
319
  if instance = client.service_instance_by_name(name)
319
320
  to_bind << instance
320
321
  else
321
- service = services.find { |s|
322
- s.label == (svc[:label] || svc[:type] || svc[:vendor]) &&
323
- (!svc[:version] || s.version == svc[:version]) &&
324
- (s.provider == (svc[:provider] || "core"))
322
+ offering = offerings.find { |o|
323
+ o.label == (svc[:label] || svc[:type] || svc[:vendor]) &&
324
+ (!svc[:version] || o.version == svc[:version]) &&
325
+ (o.provider == (svc[:provider] || "core"))
325
326
  }
326
327
 
327
- fail "Unknown service: #{svc.inspect}." unless service
328
+ fail "Unknown service offering: #{svc.inspect}." unless offering
328
329
 
329
330
  if v2?
330
- plan = service.service_plans.find { |p|
331
+ plan = offering.service_plans.find { |p|
331
332
  p.name == (svc[:plan] || "D100")
332
333
  }
333
334
 
@@ -336,17 +337,15 @@ module VMCManifests
336
337
 
337
338
  invoke :create_service,
338
339
  :name => name,
339
- :service => service,
340
+ :offering => offering,
340
341
  :plan => plan,
341
342
  :app => app
342
343
  end
343
344
  end
344
345
 
345
- to_bind.each do |i|
346
+ to_bind.each do |s|
346
347
  # TODO: splat
347
- invoke :bind_service,
348
- :app => app,
349
- :instance => i
348
+ invoke :bind_service, :app => app, :service => s
350
349
  end
351
350
  end
352
351
 
@@ -1,3 +1,3 @@
1
1
  module VMCManifests
2
- VERSION = "0.4.18".freeze
2
+ VERSION = "0.4.19".freeze
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: manifests-vmc-plugin
3
3
  version: !ruby/object:Gem::Version
4
- hash: 43
4
+ hash: 41
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 4
9
- - 18
10
- version: 0.4.18
9
+ - 19
10
+ version: 0.4.19
11
11
  platform: ruby
12
12
  authors:
13
13
  - Alex Suraci
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-12-14 00:00:00 -08:00
18
+ date: 2012-12-15 00:00:00 -08:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency