hula 0.12.0 → 0.13.0

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: 0df6b7a45fa764bd559b5c51138f833f00f25948
4
- data.tar.gz: 33bbca0352b42859e1006428f8314356038be4e9
3
+ metadata.gz: 6fee1e28cab3a4e660f276a9f00438eae658c7db
4
+ data.tar.gz: 43bb95a4e06de67de6496abbbd5a1453b57626cd
5
5
  SHA512:
6
- metadata.gz: 4b352e9f0c465425520b833c9691dced0fd77fb65f187909ded79897b76da39508ddbd0ec7aafca9de1f5775c5e55e18635e9b2cf9a9153af540f5f2bb20fb2c
7
- data.tar.gz: 050f8520509a348ff81961ea223a284e084a487c5332becf3fdb396afc1000c3a60e57f497c6d434e268fcc7d3bafdc3261f8207c83438ba53403921bffe83ff
6
+ metadata.gz: db1ea04312e050770d2cc0404225afcf196155aab82954b368bc80dc80c4fd32b75e1978e5ff6a33318aef16ac4df690385ae565044f9f26057b8a6068f4c293
7
+ data.tar.gz: 525b83c7c3787536f1ccfb053ac51fd91f67015205e44b703f4fc577a19518bc9507816c14163c08d8e3ef77bc0753c3b2c462d7fc626ba3770d7429495d82cc
@@ -48,8 +48,8 @@ module Hula
48
48
  ServiceInstance.new(id: service_instance_id)
49
49
  end
50
50
 
51
- def deprovision_instance(service_instance)
52
- http_deprovision_service(service_instance_id: service_instance.id)
51
+ def deprovision_instance(service_instance, plan)
52
+ http_deprovision_service(service_instance_id: service_instance.id, plan_id: plan.id, service_id: plan.service_id)
53
53
  end
54
54
 
55
55
  def bind_instance(service_instance, binding_id: SecureRandom.uuid)
@@ -90,9 +90,13 @@ module Hula
90
90
  )
91
91
  end
92
92
 
93
- def http_deprovision_service(service_instance_id:)
93
+ def http_deprovision_service(service_instance_id:, plan_id:, service_id:)
94
+ uri = url.dup
95
+ uri.path = uri.path += "/v2/service_instances/#{service_instance_id}"
96
+ params = { :'plan_id' => plan_id, :'service_id' => service_id}
97
+ uri.query = URI.encode_www_form(params)
94
98
  http_client.delete(
95
- url_for("/v2/service_instances/#{service_instance_id}"),
99
+ uri,
96
100
  auth: {
97
101
  username: username,
98
102
  password: password
@@ -45,7 +45,7 @@ module Hula
45
45
  begin
46
46
  block.call(service_instance)
47
47
  ensure
48
- api.deprovision_instance(service_instance)
48
+ api.deprovision_instance(service_instance, plan)
49
49
  end
50
50
  end
51
51
 
@@ -54,7 +54,7 @@ module Hula
54
54
  send_request(request)
55
55
  end
56
56
 
57
- def delete(uri, auth: nil, headers: nil)
57
+ def delete(uri, auth: nil, headers: nil, params: nil)
58
58
  request = Net::HTTP::Delete.new(uri)
59
59
  request.basic_auth auth.fetch(:username), auth.fetch(:password) unless auth.nil?
60
60
  if not headers.nil?
data/lib/hula/version.rb CHANGED
@@ -9,5 +9,5 @@
9
9
  #
10
10
 
11
11
  module Hula
12
- VERSION = '0.12.0'
12
+ VERSION = '0.13.0'
13
13
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hula
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.0
4
+ version: 0.13.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Will Pragnell