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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 049df1218b2a89e735a4aa6a21b6021f1aa2babf
4
- data.tar.gz: c04ff432b31fb45e1cdf3bb05af3674f07adfc32
3
+ metadata.gz: b8d31231e3af2be10b1a55dfe123b5e2e8b72517
4
+ data.tar.gz: 26c342ab6ba83c993dab33c0fddc383eea4c5e70
5
5
  SHA512:
6
- metadata.gz: 9dff4c196ff43708ae25e5ee2d285e86758a021cba20045d37bb8d7016d21e1644b1b439e657de6de6f8bcb87c974ccd28ae2edf683f2d0658c99ca540554561
7
- data.tar.gz: 8f28a270b70529fbca2862f461c24dee13af86ba5dbb9a13acce7ad6173b9ee7286fc15d6ded6beb6404eb95a5641b7d19aaac8587c47234f55e7f68139b76fb
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, :size, :networks, :kernel].each do |key|
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
@@ -1,3 +1,3 @@
1
1
  module DropletKit
2
- VERSION = "1.1.0"
2
+ VERSION = "1.1.1"
3
3
  end
@@ -32,12 +32,7 @@
32
32
  ],
33
33
  "created_at": "2014-07-29T14:35:36Z"
34
34
  },
35
- "size": {
36
- "slug": "1024mb",
37
- "transfer": 2,
38
- "price_monthly": 10.0,
39
- "price_hourly": 0.01488
40
- },
35
+ "size_slug": "1024mb",
41
36
  "locked": false,
42
37
  "status": "active",
43
38
  "networks": {
@@ -31,12 +31,7 @@
31
31
  ],
32
32
  "created_at": "2014-07-29T14:35:37Z"
33
33
  },
34
- "size": {
35
- "slug": "1024mb",
36
- "transfer": 2,
37
- "price_monthly": 10.0,
38
- "price_hourly": 0.01488
39
- },
34
+ "size_slug": "1024mb",
40
35
  "locked": false,
41
36
  "status": "active",
42
37
  "networks": {
@@ -31,12 +31,7 @@
31
31
  ],
32
32
  "created_at": "2014-07-29T14:35:37Z"
33
33
  },
34
- "size": {
35
- "slug": "1024mb",
36
- "transfer": 2,
37
- "price_monthly": 10.0,
38
- "price_hourly": 0.01488
39
- },
34
+ "size_slug": "1024mb",
40
35
  "locked": false,
41
36
  "status": "active",
42
37
  "networks": {
@@ -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.size).to be_kind_of(DropletKit::Size)
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: droplet_kit
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Ross