cfoundry 0.3.18 → 0.3.19

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,14 +2,13 @@ require "cfoundry/baseclient"
2
2
 
3
3
  module CFoundry
4
4
  class UAAClient < BaseClient
5
- attr_accessor :target, :client_id, :scope, :redirect_uri, :token, :trace
5
+ attr_accessor :target, :client_id, :redirect_uri, :token, :trace
6
6
 
7
7
  def initialize(
8
8
  target = "https://uaa.cloudfoundry.com",
9
9
  client_id = "vmc")
10
10
  @target = target
11
11
  @client_id = client_id
12
- @scope = ["read"]
13
12
  @redirect_uri = "http://uaa.cloudfoundry.com/redirect/vmc"
14
13
  end
15
14
 
@@ -20,7 +19,6 @@ module CFoundry
20
19
  def authorize(credentials)
21
20
  query = {
22
21
  :client_id => @client_id,
23
- :scope => Array(@scope).join(" "),
24
22
  :response_type => "token",
25
23
  :redirect_uri => @redirect_uri
26
24
  }
@@ -268,7 +268,11 @@ module CFoundry::V1
268
268
  end
269
269
 
270
270
  def env=(hash)
271
- self.env_array = hash.collect { |k, v| "#{k}=#{v}" }
271
+ unless hash.is_a?(Array)
272
+ hash = hash.collect { |k, v| "#{k}=#{v}" }
273
+ end
274
+
275
+ self.env_array = hash
272
276
  end
273
277
 
274
278
  def services
@@ -402,9 +406,9 @@ module CFoundry::V1
402
406
  def put(what, where, path)
403
407
  if path.size == 1
404
408
  where[path.last] = what
405
- elsif name = path.shift
409
+ elsif name = path.first
406
410
  where[name] ||= {}
407
- put(what, where[name], path)
411
+ put(what, where[name], path[1..-1])
408
412
  end
409
413
 
410
414
  nil
@@ -1,4 +1,4 @@
1
1
  module CFoundry # :nodoc:
2
2
  # CFoundry library version number.
3
- VERSION = "0.3.18"
3
+ VERSION = "0.3.19"
4
4
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cfoundry
3
3
  version: !ruby/object:Gem::Version
4
- hash: 55
4
+ hash: 53
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
- - 18
10
- version: 0.3.18
9
+ - 19
10
+ version: 0.3.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-07-30 00:00:00 Z
18
+ date: 2012-08-06 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: rest-client