droplet_kit 2.2.1 → 2.2.2
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 +4 -4
- data/CHANGELOG.md +3 -0
- data/README.md +11 -1
- data/lib/droplet_kit/mappings/domain_record_mapping.rb +2 -0
- data/lib/droplet_kit/models/domain_record.rb +3 -1
- data/lib/droplet_kit/resources/tag_resource.rb +16 -2
- data/lib/droplet_kit/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 442cc90ece9663325b28ad919d8534f11e360cca
|
4
|
+
data.tar.gz: 3ce822e7463025a31c09e33a082cf6c44415e5d5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 510661c3de70a0159cdb232e79be27e4b756c4d77ff4250e3a85a941175cd12b45fec8ee170237b97ac0499060b60fdd181764e63e5dd6fa1faed5703d8b91d8
|
7
|
+
data.tar.gz: 4a8ecdecc3fd11b0adb96331a22c6bff6a5128a22991c896b3a317592712c2cc1cf0ff43b95199137e4559c293f8cc4feb3c9dfd0cbc7974fcecb40a3eb0f961
|
data/CHANGELOG.md
CHANGED
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(
|
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
|
@@ -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
|
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
|
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
|
data/lib/droplet_kit/version.rb
CHANGED
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.
|
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:
|
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.
|
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
|