hula 0.14.0 → 0.15.0

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: 0b4c38be76de983b5aaac31968971f1adab49693
4
- data.tar.gz: 4d2e150bf75735b6ad6acf12d8a2da6f59806db7
3
+ metadata.gz: 31671440948f1801936a9394af3f22ccfaced9fe
4
+ data.tar.gz: 8e4587450e77afdf7d942a9d4ded08ae3701da57
5
5
  SHA512:
6
- metadata.gz: c2da7c1a0d091c6a03c06e3fff8f3c6424e21b71bd37eab7b367bf6ecacce0cd91445ffce55509410b1458d4522fb91926fc8a52c9059e855e70631a71010b17
7
- data.tar.gz: 31421bf4cf6bf5ba0b56321a0335111e1096855043c26f6746fb5d177bdfb09fc634de85f5ae816ff8e40fb2656dd27fdecda380d3297eedf0757fc868c15a20
6
+ metadata.gz: 75350ad0d834e37077fdfd98e035a6dc2db32dd5c5a83f8c0058a72318a1de10e5e5e8dfc0e7a5f17082e108ba8fc0f6a01a5b10cce4c83ea4f7db8dcce689ba
7
+ data.tar.gz: c813d1a928d5e6c2301ca9b814f476b2ae55443fd39e846210d0569a6b83e88431605b5f24e27c715df4a5d4bef6e280393abd35878a831f8577064cb6255943
@@ -67,10 +67,12 @@ module Hula
67
67
  )
68
68
  end
69
69
 
70
- def unbind_instance(instance_binding)
70
+ def unbind_instance(instance_binding, plan)
71
71
  http_unbind_instance(
72
72
  service_instance_id: instance_binding.service_instance.id,
73
- binding_id: instance_binding.id
73
+ binding_id: instance_binding.id,
74
+ service_id: plan.service_id,
75
+ plan_id: plan.id
74
76
  )
75
77
  end
76
78
 
@@ -119,9 +121,14 @@ module Hula
119
121
  )
120
122
  end
121
123
 
122
- def http_unbind_instance(service_instance_id:, binding_id:)
124
+ def http_unbind_instance(service_instance_id:, binding_id:, service_id:, plan_id:)
125
+ uri = url.dup
126
+ uri.path = uri.path += "/v2/service_instances/#{service_instance_id}/service_bindings/#{binding_id}"
127
+ params = { :'plan_id' => plan_id, :'service_id' => service_id}
128
+ uri.query = URI.encode_www_form(params)
129
+
123
130
  http_client.delete(
124
- url_for("/v2/service_instances/#{service_instance_id}/service_bindings/#{binding_id}"),
131
+ uri,
125
132
  auth: { username: username, password: password },
126
133
  headers: { 'X-Broker-Api-Version': @broker_api_version }
127
134
  )
@@ -58,7 +58,7 @@ module Hula
58
58
  begin
59
59
  block.call(binding, service_instance)
60
60
  ensure
61
- api.unbind_instance(binding)
61
+ api.unbind_instance(binding, plan)
62
62
  sleep 1
63
63
  end
64
64
  end
data/lib/hula/version.rb CHANGED
@@ -9,5 +9,5 @@
9
9
  #
10
10
 
11
11
  module Hula
12
- VERSION = '0.14.0'
12
+ VERSION = '0.15.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.14.0
4
+ version: 0.15.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Will Pragnell