droplet_kit 2.2.1 → 2.2.2

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: 7d52fd141acdb10ae4bcccf04cce073e4467e506
4
- data.tar.gz: c4ad83de7017cbb547d05328c4ddbe8c08531dd0
3
+ metadata.gz: 442cc90ece9663325b28ad919d8534f11e360cca
4
+ data.tar.gz: 3ce822e7463025a31c09e33a082cf6c44415e5d5
5
5
  SHA512:
6
- metadata.gz: 2b2d848da6c6b4deff314c4e318963e72ae40a50dd93dd4f20c274cc979b4b0c94e23e940219e5b727c341ed3a5dd7500f9592b699c08d1696fa43383e7b480e
7
- data.tar.gz: 29a787f8e7d40a061ec91e7dbbe20cd0561d21429ff6017ec419f78a39b1440f25277fd202be565b1ec2f3f306b37207c16b56a3dc4c1684aa4f21d047743a7c
6
+ metadata.gz: 510661c3de70a0159cdb232e79be27e4b756c4d77ff4250e3a85a941175cd12b45fec8ee170237b97ac0499060b60fdd181764e63e5dd6fa1faed5703d8b91d8
7
+ data.tar.gz: 4a8ecdecc3fd11b0adb96331a22c6bff6a5128a22991c896b3a317592712c2cc1cf0ff43b95199137e4559c293f8cc4feb3c9dfd0cbc7974fcecb40a3eb0f961
@@ -1,3 +1,6 @@
1
+ ### Version 2.2.2
2
+ * Fix tag / untag resources request body
3
+
1
4
  ### Version 2.2.1
2
5
  * Relaxed faraday version requirement
3
6
 
data/README.md CHANGED
@@ -336,7 +336,7 @@ Actions supported:
336
336
 
337
337
  * `client.tags.all()`
338
338
  * `client.tags.find(name: 'name')`
339
- * `client.tags.create(tag)
339
+ * `client.tags.create(DropletKit::Tag.new(name: 'name'))`
340
340
  * `client.tags.delete(name: 'name')`
341
341
  * `client.tags.tag_resources(name: 'name', resources: [{ resource_id => 'droplet_id', resource_type: 'droplet' }])`
342
342
  * `client.tags.untag_resources(name 'name', resources: [{ resource_id => 'droplet_id', resource_type: 'droplet' }])`
@@ -419,3 +419,13 @@ Actions supported:
419
419
  3. Commit your changes (`git commit -am 'Add some feature'`)
420
420
  4. Push to the branch (`git push origin my-new-feature`)
421
421
  5. Create a new Pull Request
422
+
423
+ ## Releasing
424
+
425
+ Bump the [version](https://github.com/digitalocean/droplet_kit/blob/master/lib/droplet_kit/version.rb), add all changes
426
+ that are being released to the [CHANGELOG](https://github.com/digitalocean/droplet_kit/blob/master/CHANGELOG.md) and
427
+ if you have already done the rubygems sign in from the account, just run `rake release`, if not continue reading.
428
+
429
+ Find the password on DO's lastpass account (search for rubygems), sign in with the user (run gem `gem push` and it
430
+ will ask you for DO's email and password you found on lastpass), the `gem push` command will fail, ignore. Now just run
431
+ `rake release` and the gem will be pushed to rubygems.
@@ -14,6 +14,8 @@ module DropletKit
14
14
  property :port, scopes: [:read, :create, :update]
15
15
  property :ttl, scopes: [:read, :create, :update]
16
16
  property :weight, scopes: [:read, :create, :update]
17
+ property :flags, scopes: [:read, :create, :update]
18
+ property :tag, scopes: [:read, :create, :update]
17
19
  end
18
20
  end
19
21
  end
@@ -8,5 +8,7 @@ module DropletKit
8
8
  attribute :port
9
9
  attribute :ttl
10
10
  attribute :weight
11
+ attribute :flags
12
+ attribute :tag
11
13
  end
12
- end
14
+ end
@@ -25,13 +25,27 @@ module DropletKit
25
25
 
26
26
  action :tag_resources, 'POST /v2/tags/:name/resources' do
27
27
  verb :post
28
- body { |hash| { resources: hash[:resources] }.to_json }
28
+ body do |hash|
29
+ resources = hash[:resources].map do |resource|
30
+ resource[:resource_id] = resource[:resource_id].to_s
31
+ resource
32
+ end
33
+
34
+ { resources: resources }.to_json
35
+ end
29
36
  handler(204) { |_| true }
30
37
  end
31
38
 
32
39
  action :untag_resources, 'DELETE /v2/tags/:name/resources' do
33
40
  verb :delete
34
- body { |hash| { resources: hash[:resources] }.to_json }
41
+ body do |hash|
42
+ resources = hash[:resources].map do |resource|
43
+ resource[:resource_id] = resource[:resource_id].to_s
44
+ resource
45
+ end
46
+
47
+ { resources: resources }.to_json
48
+ end
35
49
  handler(204) { |_| true }
36
50
  end
37
51
  end
@@ -1,3 +1,3 @@
1
1
  module DropletKit
2
- VERSION = "2.2.1"
2
+ VERSION = "2.2.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: droplet_kit
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.1
4
+ version: 2.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Ross
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-07-24 00:00:00.000000000 Z
11
+ date: 2018-01-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: virtus
@@ -424,7 +424,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
424
424
  version: '0'
425
425
  requirements: []
426
426
  rubyforge_project:
427
- rubygems_version: 2.4.8
427
+ rubygems_version: 2.6.12
428
428
  signing_key:
429
429
  specification_version: 4
430
430
  summary: Droplet Kit is the official Ruby library for DigitalOcean's API