vmc 0.4.0.beta.90 → 0.4.0.beta.91

Sign up to get free protection for your applications and to get access to all the features.
@@ -518,12 +518,28 @@ module VMC
518
518
  end
519
519
  rescue CFoundry::NotFound
520
520
  fail "Invalid path #{b(path)} for app #{b(app.name)}"
521
- rescue CFoundry::APIError => e
522
- if e.error_code == 190001
523
- fail e.description
524
- else
525
- raise
521
+ rescue CFoundry::FileError => e
522
+ fail e.description
523
+ end
524
+
525
+ desc "Stream an app's file contents"
526
+ group :apps, :info, :hidden => true
527
+ input :app, :argument => true,
528
+ :desc => "Application to inspect the file of",
529
+ :from_given => by_name("app")
530
+ input :path, :argument => true, :default => "/",
531
+ :desc => "Path of file to stream"
532
+ def tail
533
+ app = input[:app]
534
+ path = input[:path]
535
+
536
+ app.stream_file(*path.split("/")) do |contents|
537
+ print contents
526
538
  end
539
+ rescue CFoundry::NotFound
540
+ fail "Invalid path #{b(path)} for app #{b(app.name)}"
541
+ rescue CFoundry::FileError => e
542
+ fail e.description
527
543
  end
528
544
 
529
545
 
@@ -1,3 +1,3 @@
1
1
  module VMC
2
- VERSION = "0.4.0.beta.90"
2
+ VERSION = "0.4.0.beta.91"
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: 3856864361
4
+ hash: 4072072421
5
5
  prerelease: 6
6
6
  segments:
7
7
  - 0
8
8
  - 4
9
9
  - 0
10
10
  - beta
11
- - 90
12
- version: 0.4.0.beta.90
11
+ - 91
12
+ version: 0.4.0.beta.91
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-11-13 00:00:00 -08:00
20
+ date: 2012-11-15 00:00:00 -08:00
21
21
  default_executable:
22
22
  dependencies:
23
23
  - !ruby/object:Gem::Dependency
@@ -266,12 +266,12 @@ dependencies:
266
266
  requirements:
267
267
  - - ~>
268
268
  - !ruby/object:Gem::Version
269
- hash: 107
269
+ hash: 105
270
270
  segments:
271
271
  - 0
272
272
  - 3
273
- - 60
274
- version: 0.3.60
273
+ - 61
274
+ version: 0.3.61
275
275
  type: :runtime
276
276
  version_requirements: *id015
277
277
  - !ruby/object:Gem::Dependency