bits_service_client 2.3.0.pre.1 → 3.0.0.pre.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e30b0d6ee3c37a2521283288483ca09e1a30e40a
4
- data.tar.gz: d4148e823a57f5dc661048fd355bcebf6301edf5
3
+ metadata.gz: 87a9d6078616a05bab3a25fc7a15397040515cae
4
+ data.tar.gz: 8d7b7f130a0d357a75998b47efea71af35682fab
5
5
  SHA512:
6
- metadata.gz: 742aa7397a69186a4e2c8444e2509443558cfc22c15bbffa8e508d06659bbafe4e784d7a84cc682f416114ea1c161d1daca6d74b63690346939f26acddba358f
7
- data.tar.gz: 7806dc03984f950d9eb9462b4982c7dd33d0b91396e905533cb7ee39eeddb85748cf9b647d76fea069373665b0827780b653472e84b07e6a68398bbbdcb0d239
6
+ metadata.gz: 6ea9389db287a08f509bd56787bde30f068a273ed6d5e84f443cde6525b73480546c978713b1c5d7b2855264900812f79390b9748d3ddb2c56fdf3dd5e6d3386
7
+ data.tar.gz: 9aba745c8ba39c916959871b56f543f1e54172decebe476d54fbf51f31572d7a2b41146dc2d11f6c8f30d14d10dbc1fc672f84be12f8f9b7574676968e25fc0c
@@ -2,12 +2,14 @@
2
2
 
3
3
  module BitsService
4
4
  class ResourcePool
5
- def initialize(endpoint:, request_timeout_in_seconds:, vcap_request_id: '', ca_cert_path: nil)
5
+ def initialize(endpoint:, request_timeout_in_seconds:, vcap_request_id: '', ca_cert_path: nil, username:, password:)
6
6
  @endpoint = URI.parse(endpoint)
7
7
  @request_timeout_in_seconds = request_timeout_in_seconds
8
8
  @vcap_request_id = vcap_request_id
9
9
  @logger = Steno.logger('cc.bits_service_client')
10
10
  @ca_cert_path = ca_cert_path
11
+ @username = username
12
+ @password = password
11
13
  end
12
14
 
13
15
  def matches(resources_json)
@@ -17,7 +19,9 @@ module BitsService
17
19
  end
18
20
 
19
21
  def signed_matches_url()
20
- response = do_request(http_client, Net::HTTP::Get.new('/sign/app_stash/matches?verb=post'), @vcap_request_id)
22
+ req = Net::HTTP::Get.new('/sign/app_stash/matches?verb=post')
23
+ req.basic_auth(@username, @password)
24
+ response = do_request(http_client, req, @vcap_request_id)
21
25
  validate_response_code!(200, response)
22
26
  response.body
23
27
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module BitsServiceClient
4
- VERSION = '2.3.0.pre.1'
4
+ VERSION = '3.0.0.pre.1'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bits_service_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.0.pre.1
4
+ version: 3.0.0.pre.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rizwan Reza
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2018-07-03 00:00:00.000000000 Z
14
+ date: 2018-07-10 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: activesupport