new_cfoundry 4.9.0 → 4.9.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3bfc22466bdb9775e0158b58a4ecf048f40eaaaa
4
- data.tar.gz: 644a3ce2d136afde2d0d4a9bbb560f512e840166
3
+ metadata.gz: 4ef42baba30ec4f7dcd67b58882c138c33be49bf
4
+ data.tar.gz: ca8599b0ee42c40c4ae0ec232a713b7331542aa6
5
5
  SHA512:
6
- metadata.gz: 4c92002ef239613b182ba525b90225389e32383af92ffa3847018e4cf68c1548af41c8f26ccc8fcfc2a966c64d6698c853c97a7f48b5d963e793bf240f3b52f8
7
- data.tar.gz: 992dc26336b5e38f3e362719dcdb065c38ef85875baeb12204b5db7ec0d451f0e1a603925dac99fcd73388f24f1854808945bf3b5593eecdbcd426f2b6cdaaa8
6
+ metadata.gz: 155f92eecd6308f7caa4bc436a8203781f74d7f55fd2b6842dc90b312aa81e1440bc9b9899cfe0bb819700ddae88de18ef8b3daa951f92fa734d47e4bcdd2d0a
7
+ data.tar.gz: bfbe03e0b417453219c0d3fd2dd098131cdadfe276c14eedf248d1a31a86716dc13bd77676189d6713f820f3ce185264c5e33a464692165310dc6f53702cbf9a
data/VERSION CHANGED
@@ -1 +1 @@
1
- 4.9.0
1
+ 4.9.1
data/cfoundry.gemspec CHANGED
@@ -19,7 +19,7 @@ Gem::Specification.new do |s|
19
19
  s.require_paths = %w[lib]
20
20
 
21
21
  s.add_dependency "activemodel", "<5.0.0", ">= 3.2.13"
22
- s.add_dependency "cf-uaa-lib", "~> 2.0.0"
22
+ s.add_dependency "cf-uaa-lib", "~> 3.8.0"
23
23
  s.add_dependency "jwt", "~> 1.5"
24
24
  s.add_dependency "multi_json", "~> 1.7"
25
25
  s.add_dependency "multipart-post", "~> 1.1"
@@ -15,13 +15,10 @@ module CFoundry
15
15
  attr_accessor :client_id, :client_secret
16
16
 
17
17
  def_delegators :rest_client, :target, :target=, :token,
18
- :trace, :backtrace, :backtrace=, :log, :log=,
19
- :http_proxy, :http_proxy=, :https_proxy, :https_proxy=
18
+ :trace, :backtrace, :backtrace=, :log, :log=
20
19
 
21
20
  def initialize(target, token = nil, options = {})
22
21
  @rest_client = CFoundry::RestClient.new(target, token)
23
- @rest_client.http_proxy = options[:http_proxy]
24
- @rest_client.https_proxy = options[:https_proxy]
25
22
  self.client_id = options[:client_id]
26
23
  self.client_secret = options[:client_secret]
27
24
  self.trace = false
@@ -36,8 +33,7 @@ module CFoundry
36
33
  if endpoint
37
34
  uaa = CFoundry::UAAClient.new(endpoint,
38
35
  client_id || "cf",
39
- client_secret: client_secret,
40
- http_proxy: http_proxy, https_proxy: https_proxy)
36
+ client_secret: client_secret)
41
37
  uaa.trace = trace
42
38
  uaa.token = token
43
39
  uaa
@@ -38,8 +38,7 @@ module CFoundry
38
38
 
39
39
  attr_reader :target
40
40
 
41
- attr_accessor :trace, :backtrace, :log,
42
- :request_id, :token, :http_proxy, :https_proxy
41
+ attr_accessor :trace, :backtrace, :log, :request_id, :token
43
42
 
44
43
  def initialize(target, token = nil)
45
44
  @target = target
@@ -3,14 +3,12 @@ require "uaa"
3
3
 
4
4
  module CFoundry
5
5
  class UAAClient
6
- attr_accessor :target, :client_id, :client_secret, :token, :trace, :http_proxy, :https_proxy
6
+ attr_accessor :target, :client_id, :client_secret, :token, :trace
7
7
 
8
8
  def initialize(target, client_id = "cf", options = {})
9
9
  @target = target
10
10
  @client_id = client_id
11
11
  @client_secret = options[:client_secret]
12
- @http_proxy = options[:http_proxy]
13
- @https_proxy = options[:https_proxy]
14
12
  @uaa_info_client = uaa_info_client_for(target)
15
13
  end
16
14
 
@@ -95,26 +93,18 @@ module CFoundry
95
93
  private
96
94
 
97
95
  def uaa_info_client_for(url)
98
- CF::UAA::Info.new(url,
99
- :symbolize_keys => true,
100
- :http_proxy => http_proxy,
101
- :https_proxy => https_proxy
102
- )
96
+ CF::UAA::Info.new(url, :symbolize_keys => true)
103
97
  end
104
98
 
105
99
  def token_issuer
106
- @token_issuer ||= CF::UAA::TokenIssuer.new(target, client_id, client_secret,
107
- :symbolize_keys => true,
108
- :http_proxy => @http_proxy,
109
- :https_proxy => @https_proxy
110
- )
100
+ @token_issuer ||= CF::UAA::TokenIssuer.new(target, client_id, client_secret, :symbolize_keys => true)
111
101
  @token_issuer.logger.level = @trace ? Logger::Severity::TRACE : 1
112
102
  @token_issuer
113
103
  end
114
104
 
115
105
  def scim
116
106
  auth_header = token && token.auth_header
117
- scim = CF::UAA::Scim.new(uaa_url, auth_header, :symbolize_keys => true, :http_proxy => @http_proxy, :https_proxy => @https_proxy)
107
+ scim = CF::UAA::Scim.new(uaa_url, auth_header, :symbolize_keys => true)
118
108
  scim.logger.level = @trace ? Logger::Severity::TRACE : 1
119
109
  scim
120
110
  end
@@ -18,8 +18,8 @@ module CFoundry::V2
18
18
  # [Space] Currently targeted space.
19
19
  attr_accessor :current_space
20
20
 
21
- def_delegators :@base, :target, :target=, :token, :token=, :http_proxy, :http_proxy=,
22
- :https_proxy, :https_proxy=, :trace, :trace=, :log, :log=, :info
21
+ def_delegators :@base, :target, :target=, :token, :token=,
22
+ :trace, :trace=, :log, :log=, :info
23
23
 
24
24
  # Create a new Client for interfacing with the given target.
25
25
  #
@@ -135,22 +135,6 @@ describe CFoundry::BaseClient do
135
135
  expect(subject.uaa.target).to eq "foo"
136
136
  end
137
137
  end
138
-
139
- context "when proxy is set" do
140
- before do
141
- subject.http_proxy = 'http-proxy.example.com'
142
- subject.https_proxy = 'https-proxy.example.com'
143
- end
144
-
145
- it "passes the proxy to the uaa client" do
146
- allow(CFoundry::UAAClient).to receive(:new).and_call_original
147
- subject.uaa
148
- expect(CFoundry::UAAClient).to have_received(:new).with(anything, anything, hash_including(
149
- http_proxy: 'http-proxy.example.com',
150
- https_proxy: 'https-proxy.example.com'
151
- ))
152
- end
153
- end
154
138
  end
155
139
 
156
140
  describe "#token=" do
@@ -25,17 +25,6 @@ EOF
25
25
  end
26
26
  end
27
27
 
28
- describe '#initialize' do
29
- it "passes proxy info to the UAA info client" do
30
- allow(CF::UAA::Info).to receive(:new)
31
- CFoundry::UAAClient.new(target, 'cf', http_proxy: 'http-proxy.example.com', https_proxy: 'https-proxy.example.com')
32
- expect(CF::UAA::Info).to have_received(:new).with(anything, hash_including(
33
- http_proxy: 'http-proxy.example.com',
34
- https_proxy: 'https-proxy.example.com'
35
- ))
36
- end
37
- end
38
-
39
28
  describe '#prompts' do
40
29
  subject { uaa.prompts }
41
30
 
@@ -382,14 +371,11 @@ EOF
382
371
 
383
372
  it "passes proxy info to the token issuer" do
384
373
  allow(CF::UAA::TokenIssuer).to receive(:new).and_call_original
385
- uaa.http_proxy = 'http-proxy.example.com'
386
- uaa.https_proxy = 'https-proxy.example.com'
387
374
 
388
375
  uaa.send(:token_issuer)
389
376
 
390
377
  expect(CF::UAA::TokenIssuer).to have_received(:new).with(anything, anything, anything, hash_including(
391
- http_proxy: 'http-proxy.example.com',
392
- https_proxy: 'https-proxy.example.com'
378
+ symbolize_keys: true
393
379
  ))
394
380
  end
395
381
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: new_cfoundry
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.9.0
4
+ version: 4.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - CI-Platform-Team
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-03-08 00:00:00.000000000 Z
12
+ date: 2017-04-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activemodel
@@ -37,14 +37,14 @@ dependencies:
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 2.0.0
40
+ version: 3.8.0
41
41
  type: :runtime
42
42
  prerelease: false
43
43
  version_requirements: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 2.0.0
47
+ version: 3.8.0
48
48
  - !ruby/object:Gem::Dependency
49
49
  name: jwt
50
50
  requirement: !ruby/object:Gem::Requirement