droplet_kit 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/droplet_kit/mappings/droplet_mapping.rb +1 -1
- data/lib/droplet_kit/models/droplet.rb +2 -1
- data/lib/droplet_kit/version.rb +1 -1
- data/spec/fixtures/droplets/all.json +1 -6
- data/spec/fixtures/droplets/create.json +1 -6
- data/spec/fixtures/droplets/find.json +1 -6
- data/spec/lib/droplet_kit/resources/droplet_resource_spec.rb +1 -5
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b8d31231e3af2be10b1a55dfe123b5e2e8b72517
|
4
|
+
data.tar.gz: 26c342ab6ba83c993dab33c0fddc383eea4c5e70
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f86c214072f2b056efbd9eac7bf0a0d026a3aba1df7d7bc381fcfdf21a49a9c7938345624071e57ac2e5aa8fe2b70b75edd9123ebbbbaf127a6b526a48575630
|
7
|
+
data.tar.gz: 9ca7632532e88953369de900f8be54489c02688684694a5ff0035bd26cd740bdcf230342c8b401e277d67ac1607d15520cc9a9ae0dba021f78e153b9019aab57
|
@@ -18,10 +18,10 @@ module DropletKit
|
|
18
18
|
property :snapshot_ids, scopes: [:read]
|
19
19
|
property :action_ids, scopes: [:read]
|
20
20
|
property :features, scopes: [:read]
|
21
|
+
property :size_slug, scopes: [:read]
|
21
22
|
|
22
23
|
property :region, scopes: [:read], include: RegionMapping
|
23
24
|
property :image, scopes: [:read], include: ImageMapping
|
24
|
-
property :size, scopes: [:read], include: SizeMapping
|
25
25
|
property :networks, scopes: [:read], include: NetworkMapping
|
26
26
|
property :kernel, scopes: [:read], include: KernelMapping
|
27
27
|
|
@@ -2,13 +2,14 @@ module DropletKit
|
|
2
2
|
class Droplet < BaseModel
|
3
3
|
[:id, :name, :memory, :vcpus, :disk, :locked, :created_at,
|
4
4
|
:status, :backup_ids, :snapshot_ids, :action_ids, :features,
|
5
|
-
:region, :image, :
|
5
|
+
:region, :image, :networks, :kernel, :size_slug].each do |key|
|
6
6
|
attribute(key)
|
7
7
|
end
|
8
8
|
|
9
9
|
# Used for creates
|
10
10
|
attribute :ssh_keys
|
11
11
|
attribute :backups
|
12
|
+
attribute :size
|
12
13
|
attribute :ipv6
|
13
14
|
attribute :user_data
|
14
15
|
attribute :private_networking
|
data/lib/droplet_kit/version.rb
CHANGED
@@ -34,11 +34,7 @@ RSpec.describe DropletKit::DropletResource do
|
|
34
34
|
expect(droplet.image.public).to eq(true)
|
35
35
|
expect(droplet.image.regions).to include('nyc1')
|
36
36
|
|
37
|
-
expect(droplet.
|
38
|
-
expect(droplet.size.slug).to eq("1024mb")
|
39
|
-
expect(droplet.size.transfer).to eq(2)
|
40
|
-
expect(droplet.size.price_monthly).to eq(10.0)
|
41
|
-
expect(droplet.size.price_hourly).to eq(0.01488)
|
37
|
+
expect(droplet.size_slug).to eq("1024mb")
|
42
38
|
|
43
39
|
expect(droplet.networks).to be_kind_of(DropletKit::NetworkHash)
|
44
40
|
private_v4_network = droplet.networks.v4.first
|