vmc 0.4.0.beta.11 → 0.4.0.beta.12

Sign up to get free protection for your applications and to get access to all the features.
@@ -205,7 +205,7 @@ module VMC
205
205
  names.each do |name|
206
206
  app = client.app(name)
207
207
 
208
- fail "Unknown application." unless app.exists?
208
+ fail "Unknown application '#{name}'" unless app.exists?
209
209
 
210
210
  app = filter(:start_app, app)
211
211
 
@@ -246,7 +246,7 @@ module VMC
246
246
 
247
247
  unless app.exists?
248
248
  s.fail do
249
- err "Unknown application."
249
+ err "Unknown application '#{name}'"
250
250
  end
251
251
  end
252
252
 
@@ -309,8 +309,14 @@ module VMC
309
309
  names = [input(:name, apps.collect(&:name).sort)]
310
310
  end
311
311
 
312
- # TODO: handle invalid app name
313
- to_delete = names.collect { |n| apps.find { |a| a.name == n } }
312
+ to_delete = names.collect do |n|
313
+ if app = apps.find { |a| a.name == n }
314
+ app
315
+ else
316
+ fail "Unknown application '#{n}'"
317
+ end
318
+ end
319
+
314
320
  orphaned = find_orphaned_services(to_delete)
315
321
 
316
322
  to_delete.each do |app|
@@ -409,7 +415,7 @@ module VMC
409
415
  name ||= input(:name)
410
416
 
411
417
  app = client.app(name)
412
- fail "Unknown application." unless app.exists?
418
+ fail "Unknown application '#{name}'" unless app.exists?
413
419
 
414
420
  instances =
415
421
  if input(:all)
@@ -560,7 +566,7 @@ module VMC
560
566
  simple = url.sub(/^https?:\/\/(.*)\/?/i, '\1')
561
567
 
562
568
  app = client.app(name)
563
- fail "Unknown application." unless app.exists?
569
+ fail "Unknown application '#{name}'" unless app.exists?
564
570
 
565
571
  with_progress("Updating #{c(name, :name)}") do |s|
566
572
  unless app.urls.delete(simple)
@@ -590,7 +596,7 @@ module VMC
590
596
  end
591
597
 
592
598
  app = client.app(appname)
593
- fail "Unknown application." unless app.exists?
599
+ fail "Unknown application '#{appname}'" unless app.exists?
594
600
 
595
601
  with_progress("Updating #{c(app.name, :name)}") do
596
602
  app.update!("env" =>
@@ -611,7 +617,7 @@ module VMC
611
617
  flag :restart, :default => true
612
618
  def unset(appname, name)
613
619
  app = client.app(appname)
614
- fail "Unknown application." unless app.exists?
620
+ fail "Unknown application '#{appname}'" unless app.exists?
615
621
 
616
622
  with_progress("Updating #{c(app.name, :name)}") do
617
623
  app.update!("env" =>
@@ -636,7 +642,7 @@ module VMC
636
642
 
637
643
  unless app.exists?
638
644
  s.fail do
639
- err "Unknown application."
645
+ err "Unknown application '#{appname}'"
640
646
  return
641
647
  end
642
648
  end
@@ -1,3 +1,3 @@
1
1
  module VMC
2
- VERSION = "0.4.0.beta.11"
2
+ VERSION = "0.4.0.beta.12"
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: 62196469
4
+ hash: 62196475
5
5
  prerelease: 6
6
6
  segments:
7
7
  - 0
8
8
  - 4
9
9
  - 0
10
10
  - beta
11
- - 11
12
- version: 0.4.0.beta.11
11
+ - 12
12
+ version: 0.4.0.beta.12
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-06-21 00:00:00 Z
20
+ date: 2012-06-27 00:00:00 Z
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency
23
23
  name: json_pure
@@ -281,12 +281,12 @@ dependencies:
281
281
  requirements:
282
282
  - - ~>
283
283
  - !ruby/object:Gem::Version
284
- hash: 17
284
+ hash: 31
285
285
  segments:
286
286
  - 0
287
287
  - 2
288
- - 3
289
- version: 0.2.3
288
+ - 4
289
+ version: 0.2.4
290
290
  type: :runtime
291
291
  version_requirements: *id016
292
292
  description: