vmcu 0.3.18.beta.1 → 0.3.18.beta.2

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.
Files changed (3) hide show
  1. data/lib/cli/version.rb +1 -1
  2. data/lib/vmc/client.rb +6 -0
  3. metadata +2 -2
@@ -2,6 +2,6 @@ module VMC
2
2
  module Cli
3
3
  # This version number is used as the RubyGem release version.
4
4
  # The internal VMC version number is VMC::VERSION.
5
- VERSION = '0.3.18.beta.1'
5
+ VERSION = '0.3.18.beta.2'
6
6
  end
7
7
  end
@@ -492,6 +492,11 @@ class VMC::Client
492
492
  headers['PROXY-USER'] = @proxy if @proxy
493
493
  headers['CloudTeam'] = @cloud_team if @cloud_team
494
494
  headers['ProxyRealm'] = @proxy_realm if @proxy_realm
495
+
496
+ if @via_uhuru_cloud && path.index("..") != 0 && @cloud_team == nil
497
+ raise TargetError, "Cloud team is not set. Use `vmcu cloud-team` to set the cloud team."
498
+ end
499
+
495
500
  path = "cf/" + path if @via_uhuru_cloud
496
501
 
497
502
  if content_type
@@ -508,6 +513,7 @@ class VMC::Client
508
513
  if request_failed?(status)
509
514
  # FIXME, old cc returned 400 on not found for file access
510
515
  err = (status == 404 || status == 400) ? NotFound : TargetError
516
+ err = AuthError if @via_uhuru_cloud && status == 401
511
517
  raise err, parse_error_message(status, body)
512
518
  else
513
519
  return status, body, response_headers
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vmcu
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.18.beta.1
4
+ version: 0.3.18.beta.2
5
5
  prerelease: 7
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-05-21 00:00:00.000000000 Z
12
+ date: 2012-05-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json_pure