droplet_kit 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (98) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +22 -0
  3. data/.rspec +2 -0
  4. data/Gemfile +4 -0
  5. data/LICENSE.txt +22 -0
  6. data/README.md +70 -0
  7. data/Rakefile +2 -0
  8. data/droplet_kit.gemspec +33 -0
  9. data/lib/droplet_kit.rb +63 -0
  10. data/lib/droplet_kit/client.rb +58 -0
  11. data/lib/droplet_kit/mappings/action_mapping.rb +19 -0
  12. data/lib/droplet_kit/mappings/backup_mapping.rb +19 -0
  13. data/lib/droplet_kit/mappings/domain_mapping.rb +15 -0
  14. data/lib/droplet_kit/mappings/domain_record_mapping.rb +18 -0
  15. data/lib/droplet_kit/mappings/droplet_mapping.rb +38 -0
  16. data/lib/droplet_kit/mappings/error_mapping.rb +19 -0
  17. data/lib/droplet_kit/mappings/image_action_mapping.rb +19 -0
  18. data/lib/droplet_kit/mappings/image_mapping.rb +17 -0
  19. data/lib/droplet_kit/mappings/kernel_mapping.rb +14 -0
  20. data/lib/droplet_kit/mappings/network_detail_mapping.rb +15 -0
  21. data/lib/droplet_kit/mappings/network_mapping.rb +12 -0
  22. data/lib/droplet_kit/mappings/region_mapping.rb +16 -0
  23. data/lib/droplet_kit/mappings/size_mapping.rb +15 -0
  24. data/lib/droplet_kit/mappings/snapshot_mapping.rb +19 -0
  25. data/lib/droplet_kit/mappings/ssh_key_mapping.rb +17 -0
  26. data/lib/droplet_kit/models/action.rb +12 -0
  27. data/lib/droplet_kit/models/backup.rb +12 -0
  28. data/lib/droplet_kit/models/base_model.rb +13 -0
  29. data/lib/droplet_kit/models/domain.rb +10 -0
  30. data/lib/droplet_kit/models/domain_record.rb +11 -0
  31. data/lib/droplet_kit/models/droplet.rb +15 -0
  32. data/lib/droplet_kit/models/image.rb +10 -0
  33. data/lib/droplet_kit/models/image_action.rb +12 -0
  34. data/lib/droplet_kit/models/kernel.rb +7 -0
  35. data/lib/droplet_kit/models/meta_information.rb +14 -0
  36. data/lib/droplet_kit/models/network.rb +4 -0
  37. data/lib/droplet_kit/models/network_hash.rb +4 -0
  38. data/lib/droplet_kit/models/pagination_information.rb +17 -0
  39. data/lib/droplet_kit/models/region.rb +9 -0
  40. data/lib/droplet_kit/models/size.rb +8 -0
  41. data/lib/droplet_kit/models/snapshot.rb +12 -0
  42. data/lib/droplet_kit/models/ssh_key.rb +8 -0
  43. data/lib/droplet_kit/paginated_resource.rb +71 -0
  44. data/lib/droplet_kit/resources/action_resource.rb +17 -0
  45. data/lib/droplet_kit/resources/domain_record_resource.rb +31 -0
  46. data/lib/droplet_kit/resources/domain_resource.rb +26 -0
  47. data/lib/droplet_kit/resources/droplet_action_resource.rb +49 -0
  48. data/lib/droplet_kit/resources/droplet_resource.rb +44 -0
  49. data/lib/droplet_kit/resources/image_action_resource.rb +14 -0
  50. data/lib/droplet_kit/resources/image_resource.rb +26 -0
  51. data/lib/droplet_kit/resources/region_resource.rb +13 -0
  52. data/lib/droplet_kit/resources/size_resource.rb +13 -0
  53. data/lib/droplet_kit/resources/ssh_key_resource.rb +26 -0
  54. data/lib/droplet_kit/version.rb +3 -0
  55. data/spec/fixtures/actions/all.json +17 -0
  56. data/spec/fixtures/actions/find.json +12 -0
  57. data/spec/fixtures/domain_records/all.json +52 -0
  58. data/spec/fixtures/domain_records/create.json +11 -0
  59. data/spec/fixtures/domain_records/find.json +11 -0
  60. data/spec/fixtures/domain_records/update.json +11 -0
  61. data/spec/fixtures/domains/all.json +12 -0
  62. data/spec/fixtures/domains/create.json +7 -0
  63. data/spec/fixtures/domains/find.json +7 -0
  64. data/spec/fixtures/droplets/all.json +84 -0
  65. data/spec/fixtures/droplets/create.json +79 -0
  66. data/spec/fixtures/droplets/find.json +79 -0
  67. data/spec/fixtures/droplets/list_actions.json +17 -0
  68. data/spec/fixtures/droplets/list_backups.json +18 -0
  69. data/spec/fixtures/droplets/list_kernels.json +17 -0
  70. data/spec/fixtures/droplets/list_snapshots.json +18 -0
  71. data/spec/fixtures/image_actions/create.json +12 -0
  72. data/spec/fixtures/image_actions/find.json +12 -0
  73. data/spec/fixtures/images/all.json +29 -0
  74. data/spec/fixtures/images/find.json +13 -0
  75. data/spec/fixtures/regions/all.json +47 -0
  76. data/spec/fixtures/sizes/all.json +35 -0
  77. data/spec/fixtures/ssh_keys/all.json +13 -0
  78. data/spec/fixtures/ssh_keys/create.json +8 -0
  79. data/spec/fixtures/ssh_keys/find.json +8 -0
  80. data/spec/fixtures/ssh_keys/update.json +8 -0
  81. data/spec/lib/droplet_kit/client_spec.rb +22 -0
  82. data/spec/lib/droplet_kit/paginated_resource_spec.rb +69 -0
  83. data/spec/lib/droplet_kit/resources/action_resource_spec.rb +26 -0
  84. data/spec/lib/droplet_kit/resources/domain_record_resource_spec.rb +83 -0
  85. data/spec/lib/droplet_kit/resources/domain_resource_spec.rb +53 -0
  86. data/spec/lib/droplet_kit/resources/droplet_action_resource_spec.rb +150 -0
  87. data/spec/lib/droplet_kit/resources/droplet_resource_spec.rb +194 -0
  88. data/spec/lib/droplet_kit/resources/image_action_resource_spec.rb +45 -0
  89. data/spec/lib/droplet_kit/resources/image_resource_spec.rb +56 -0
  90. data/spec/lib/droplet_kit/resources/region_resource_spec.rb +16 -0
  91. data/spec/lib/droplet_kit/resources/size_resource_spec.rb +16 -0
  92. data/spec/lib/droplet_kit/resources/ssh_key_resource_spec.rb +80 -0
  93. data/spec/spec_helper.rb +11 -0
  94. data/spec/support/fake_server.rb +4 -0
  95. data/spec/support/null_hash_load.rb +9 -0
  96. data/spec/support/request_stub_helpers.rb +9 -0
  97. data/spec/support/resource_context.rb +4 -0
  98. metadata +309 -0
@@ -0,0 +1,45 @@
1
+ require 'spec_helper'
2
+
3
+ RSpec.describe DropletKit::ImageActionResource do
4
+ subject(:resource) { described_class.new(connection) }
5
+ include_context 'resources'
6
+
7
+ describe '#transfer' do
8
+ it 'sends a transfer request for an image' do
9
+ request = stub_do_api('/v2/images/449676391/actions').with(
10
+ body: { type: 'transfer', region: 'sfo1' }.to_json
11
+ ).to_return(body: api_fixture('image_actions/create'), status: 201)
12
+
13
+ action = resource.transfer(image_id: 449676391, region: 'sfo1')
14
+
15
+ expect(request).to have_been_made
16
+
17
+ expect(action).to be_kind_of(DropletKit::ImageAction)
18
+ expect(action.id).to eq(23)
19
+ expect(action.status).to eq("in-progress")
20
+ expect(action.type).to eq("transfer")
21
+ expect(action.started_at).to eq("2014-08-05T15:15:28Z")
22
+ expect(action.completed_at).to eq(nil)
23
+ expect(action.resource_id).to eq(449676391)
24
+ expect(action.resource_type).to eq("image")
25
+ expect(action.region).to eq("nyc1")
26
+ end
27
+ end
28
+
29
+ describe '#find' do
30
+ it 'returns a single action' do
31
+ stub_do_api('/v2/images/449676391/actions/23').to_return(body: api_fixture('image_actions/find'))
32
+ action = resource.find(image_id: 449676391, id: 23)
33
+
34
+ expect(action).to be_kind_of(DropletKit::ImageAction)
35
+ expect(action.id).to eq(23)
36
+ expect(action.status).to eq("in-progress")
37
+ expect(action.type).to eq("transfer")
38
+ expect(action.started_at).to eq("2014-08-05T15:15:28Z")
39
+ expect(action.completed_at).to eq(nil)
40
+ expect(action.resource_id).to eq(449676391)
41
+ expect(action.resource_type).to eq("image")
42
+ expect(action.region).to eq("nyc1")
43
+ end
44
+ end
45
+ end
@@ -0,0 +1,56 @@
1
+ require 'spec_helper'
2
+
3
+ RSpec.describe DropletKit::ImageResource do
4
+ subject(:resource) { described_class.new(connection) }
5
+ include_context 'resources'
6
+
7
+ describe '#all' do
8
+ it 'returns all of the images' do
9
+ images_json = api_fixture('images/all')
10
+ stub_do_api('/v2/images', :get).to_return(body: images_json)
11
+ expected_images = DropletKit::ImageMapping.extract_collection images_json, :read
12
+
13
+ expect(resource.all).to eq(expected_images)
14
+ end
15
+ end
16
+
17
+ describe '#find' do
18
+ it 'returns a singular image' do
19
+ stub_do_api('/v2/images/146', :get).to_return(body: api_fixture('images/find'))
20
+ image = resource.find(id: 146)
21
+
22
+ expect(image.id).to eq(146)
23
+ expect(image.name).to eq("Ubuntu 13.04")
24
+ expect(image.distribution).to eq(nil)
25
+ expect(image.slug).to eq(nil)
26
+ expect(image.public).to eq(false)
27
+ expect(image.regions).to eq(["region--1"])
28
+ end
29
+ end
30
+
31
+ describe '#delete' do
32
+ it 'deletes an image' do
33
+ request = stub_do_api('/v2/images/146', :delete).to_return(body: '', status: 204)
34
+ resource.delete(id: 146)
35
+ expect(request).to have_been_made
36
+ end
37
+ end
38
+
39
+ describe '#update' do
40
+ it 'updates an image' do
41
+ image = DropletKit::Image.new(name: 'new-name')
42
+ as_hash = DropletKit::ImageMapping.representation_for(:update, image, NullHashLoad)
43
+ expect(as_hash[:name]).to eq('new-name')
44
+
45
+ request = stub_do_api('/v2/images/146', :put).with(
46
+ body: DropletKit::ImageMapping.representation_for(:update, image)
47
+ ).to_return(body: api_fixture('images/find'))
48
+
49
+ image = resource.update(image, id: 146)
50
+ expect(request).to have_been_made
51
+
52
+ expect(image).to be_kind_of(DropletKit::Image)
53
+ expect(image.id).to eq(146)
54
+ end
55
+ end
56
+ end
@@ -0,0 +1,16 @@
1
+ require 'spec_helper'
2
+
3
+ RSpec.describe DropletKit::RegionResource do
4
+ subject(:resource) { described_class.new(connection) }
5
+ include_context 'resources'
6
+
7
+ describe '#all' do
8
+ it 'returns a collection of regions' do
9
+ body = api_fixture('regions/all')
10
+ stub_do_api('/v2/regions').to_return(body: body)
11
+ expected = DropletKit::RegionMapping.extract_collection(body, :read)
12
+
13
+ expect(resource.all).to eq(expected)
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,16 @@
1
+ require 'spec_helper'
2
+
3
+ RSpec.describe DropletKit::SizeResource do
4
+ subject(:resource) { described_class.new(connection) }
5
+ include_context 'resources'
6
+
7
+ describe '#all' do
8
+ it 'returns a collection of regions' do
9
+ body = api_fixture('sizes/all')
10
+ stub_do_api('/v2/sizes').to_return(body: body)
11
+ expected = DropletKit::SizeMapping.extract_collection(body, :read)
12
+
13
+ expect(resource.all).to eq(expected)
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,80 @@
1
+ require 'spec_helper'
2
+
3
+ RSpec.describe DropletKit::SSHKeyResource do
4
+ subject(:resource) { described_class.new(connection) }
5
+ include_context 'resources'
6
+
7
+ describe '#all' do
8
+ it 'returns a list of ssh keys' do
9
+ stub_do_api('/v2/account/keys').to_return(body: api_fixture('ssh_keys/all'))
10
+ ssh_keys = resource.all
11
+
12
+ expect(ssh_keys).to all(be_kind_of(DropletKit::SSHKey))
13
+
14
+ expect(ssh_keys.first.id).to eq(1)
15
+ expect(ssh_keys.first.fingerprint).to eq("f5:d1:78:ed:28:72:5f:e1:ac:94:fd:1f:e0:a3:48:6d")
16
+ expect(ssh_keys.first.public_key).to eq("ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAQQDGk5V68BJ4P3Ereh779Vi/Ft2qs/rbXrcjKLGo6zsyeyFUE0svJUpRDEJvFSf8RlezKx1/1ulJu9+kZsxRiUKn example")
17
+ expect(ssh_keys.first.name).to eq("Example Key")
18
+ end
19
+ end
20
+
21
+ describe '#create' do
22
+ it 'creates a ssh key in the users account' do
23
+ ssh_key = DropletKit::SSHKey.new(name: 'Example Key', public_key: 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAQQDbW5JSFLg70Z0/MNNUncNgfxnrHfjBSlWzyF3e+3tNLUVgGagZISnzF4Y03/aS79aiCmbd4vCEcxyB4Wxtpddh example')
24
+
25
+ request = stub_do_api('/v2/account/keys', :post).with(
26
+ body: DropletKit::SSHKeyMapping.representation_for(:create, ssh_key)
27
+ ).to_return(body: api_fixture('ssh_keys/create'), status: 201)
28
+
29
+ created_key = resource.create(ssh_key)
30
+
31
+ expect(request).to have_been_made
32
+
33
+ expect(created_key).to be_kind_of(DropletKit::SSHKey)
34
+
35
+ expect(created_key.id).to eq(2)
36
+ expect(created_key.fingerprint).to eq("bf:3a:82:fc:4a:25:0b:a3:23:97:fb:4e:e4:88:e1:0e")
37
+ expect(created_key.public_key).to eq("ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAQQDbW5JSFLg70Z0/MNNUncNgfxnrHfjBSlWzyF3e+3tNLUVgGagZISnzF4Y03/aS79aiCmbd4vCEcxyB4Wxtpddh example")
38
+ expect(created_key.name).to eq("Example Key")
39
+ end
40
+ end
41
+
42
+ describe '#find' do
43
+ it 'returns a single ssh key record' do
44
+ stub_do_api('/v2/account/keys/123').to_return(body: api_fixture('ssh_keys/find'))
45
+ ssh_key = resource.find(id: 123)
46
+ expect(ssh_key.id).to eq(3)
47
+ expect(ssh_key.fingerprint).to eq("32:af:23:06:21:fb:e6:5b:d3:cc:7f:b7:00:0f:79:aa")
48
+ expect(ssh_key.public_key).to eq("ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAQQDZEgsAbWmQF+f8TU3F4fCg4yjVzdKudQbbhGb+qRKP5ju4Yo0Zzneia+oFm4bfzG+ydxUlOlbzq+Tpoj+INFv5 example")
49
+ expect(ssh_key.name).to eq("Example Key")
50
+ end
51
+ end
52
+
53
+ describe '#update' do
54
+ it 'updates the SSH key' do
55
+ ssh_key = DropletKit::SSHKey.new(name: 'Example Key')
56
+
57
+ request = stub_do_api('/v2/account/keys/123', :put).with(
58
+ body: DropletKit::SSHKeyMapping.representation_for(:update, ssh_key)
59
+ ).to_return(body: api_fixture('ssh_keys/update'), status: 200)
60
+
61
+ updated_key = resource.update(ssh_key, id: 123)
62
+
63
+ expect(request).to have_been_made
64
+
65
+ expect(updated_key.id).to eq(123)
66
+ expect(updated_key.fingerprint).to eq("32:af:23:06:21:fb:e6:5b:d3:cc:7f:b7:00:0f:79:aa")
67
+ expect(updated_key.public_key).to eq("ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAQQDZEgsAbWmQF+f8TU3F4fCg4yjVzdKudQbbhGb+qRKP5ju4Yo0Zzneia+oFm4bfzG+ydxUlOlbzq+Tpoj+INFv5 example")
68
+ expect(updated_key.name).to eq("Example Key")
69
+ end
70
+ end
71
+
72
+ describe '#delete' do
73
+ it 'deletes an SSH key' do
74
+ request = stub_do_api('/v2/account/keys/123', :delete).to_return(status: 204)
75
+ resource.delete(id: 123)
76
+
77
+ expect(request).to have_been_made
78
+ end
79
+ end
80
+ end
@@ -0,0 +1,11 @@
1
+ require 'droplet_kit'
2
+ require 'webmock/rspec'
3
+
4
+ Dir['./spec/support/**/*.rb'].each do |file|
5
+ require file
6
+ end
7
+
8
+ RSpec.configure do |config|
9
+ config.order = :random
10
+ config.include RequestStubHelpers
11
+ end
@@ -0,0 +1,4 @@
1
+ require 'sinatra/base'
2
+
3
+ class FakeServer < Sinatra::Base
4
+ end
@@ -0,0 +1,9 @@
1
+ class NullHashLoad
2
+ def self.load(hash)
3
+ hash
4
+ end
5
+
6
+ def self.dump(hash)
7
+ hash
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ module RequestStubHelpers
2
+ def stub_do_api(path, verb = :any)
3
+ stub_request(verb, %r[#{DropletKit::Client::DIGITALOCEAN_API}#{path}])
4
+ end
5
+
6
+ def api_fixture(fixture_name)
7
+ Pathname.new('./spec/fixtures/').join("#{fixture_name}.json").read
8
+ end
9
+ end
@@ -0,0 +1,4 @@
1
+ shared_context 'resources' do
2
+ let(:client) { DropletKit::Client.new(access_token: 'bunk-token') }
3
+ let(:connection) { client.connection }
4
+ end
metadata ADDED
@@ -0,0 +1,309 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: droplet_kit
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Robert Ross
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-08-08 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: virtus
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ~>
18
+ - !ruby/object:Gem::Version
19
+ version: 1.0.3
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ~>
25
+ - !ruby/object:Gem::Version
26
+ version: 1.0.3
27
+ - !ruby/object:Gem::Dependency
28
+ name: resource_kit
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ~>
32
+ - !ruby/object:Gem::Version
33
+ version: 0.0.5
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ~>
39
+ - !ruby/object:Gem::Version
40
+ version: 0.0.5
41
+ - !ruby/object:Gem::Dependency
42
+ name: kartograph
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ~>
46
+ - !ruby/object:Gem::Version
47
+ version: 0.0.5
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ~>
53
+ - !ruby/object:Gem::Version
54
+ version: 0.0.5
55
+ - !ruby/object:Gem::Dependency
56
+ name: bundler
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ~>
60
+ - !ruby/object:Gem::Version
61
+ version: '1.6'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ~>
67
+ - !ruby/object:Gem::Version
68
+ version: '1.6'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rake
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - '>='
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - '>='
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: rspec
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ~>
88
+ - !ruby/object:Gem::Version
89
+ version: 3.0.0
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ~>
95
+ - !ruby/object:Gem::Version
96
+ version: 3.0.0
97
+ - !ruby/object:Gem::Dependency
98
+ name: pry
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - '>='
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - '>='
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: sinatra
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ~>
116
+ - !ruby/object:Gem::Version
117
+ version: '1.4'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ~>
123
+ - !ruby/object:Gem::Version
124
+ version: '1.4'
125
+ - !ruby/object:Gem::Dependency
126
+ name: webmock
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ~>
130
+ - !ruby/object:Gem::Version
131
+ version: '1.18'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ~>
137
+ - !ruby/object:Gem::Version
138
+ version: '1.18'
139
+ description: Droplet Kit is the official Ruby library for Digital Ocean's API
140
+ email:
141
+ - rross@digitalocean.com
142
+ executables: []
143
+ extensions: []
144
+ extra_rdoc_files: []
145
+ files:
146
+ - .gitignore
147
+ - .rspec
148
+ - Gemfile
149
+ - LICENSE.txt
150
+ - README.md
151
+ - Rakefile
152
+ - droplet_kit.gemspec
153
+ - lib/droplet_kit.rb
154
+ - lib/droplet_kit/client.rb
155
+ - lib/droplet_kit/mappings/action_mapping.rb
156
+ - lib/droplet_kit/mappings/backup_mapping.rb
157
+ - lib/droplet_kit/mappings/domain_mapping.rb
158
+ - lib/droplet_kit/mappings/domain_record_mapping.rb
159
+ - lib/droplet_kit/mappings/droplet_mapping.rb
160
+ - lib/droplet_kit/mappings/error_mapping.rb
161
+ - lib/droplet_kit/mappings/image_action_mapping.rb
162
+ - lib/droplet_kit/mappings/image_mapping.rb
163
+ - lib/droplet_kit/mappings/kernel_mapping.rb
164
+ - lib/droplet_kit/mappings/network_detail_mapping.rb
165
+ - lib/droplet_kit/mappings/network_mapping.rb
166
+ - lib/droplet_kit/mappings/region_mapping.rb
167
+ - lib/droplet_kit/mappings/size_mapping.rb
168
+ - lib/droplet_kit/mappings/snapshot_mapping.rb
169
+ - lib/droplet_kit/mappings/ssh_key_mapping.rb
170
+ - lib/droplet_kit/models/action.rb
171
+ - lib/droplet_kit/models/backup.rb
172
+ - lib/droplet_kit/models/base_model.rb
173
+ - lib/droplet_kit/models/domain.rb
174
+ - lib/droplet_kit/models/domain_record.rb
175
+ - lib/droplet_kit/models/droplet.rb
176
+ - lib/droplet_kit/models/image.rb
177
+ - lib/droplet_kit/models/image_action.rb
178
+ - lib/droplet_kit/models/kernel.rb
179
+ - lib/droplet_kit/models/meta_information.rb
180
+ - lib/droplet_kit/models/network.rb
181
+ - lib/droplet_kit/models/network_hash.rb
182
+ - lib/droplet_kit/models/pagination_information.rb
183
+ - lib/droplet_kit/models/region.rb
184
+ - lib/droplet_kit/models/size.rb
185
+ - lib/droplet_kit/models/snapshot.rb
186
+ - lib/droplet_kit/models/ssh_key.rb
187
+ - lib/droplet_kit/paginated_resource.rb
188
+ - lib/droplet_kit/resources/action_resource.rb
189
+ - lib/droplet_kit/resources/domain_record_resource.rb
190
+ - lib/droplet_kit/resources/domain_resource.rb
191
+ - lib/droplet_kit/resources/droplet_action_resource.rb
192
+ - lib/droplet_kit/resources/droplet_resource.rb
193
+ - lib/droplet_kit/resources/image_action_resource.rb
194
+ - lib/droplet_kit/resources/image_resource.rb
195
+ - lib/droplet_kit/resources/region_resource.rb
196
+ - lib/droplet_kit/resources/size_resource.rb
197
+ - lib/droplet_kit/resources/ssh_key_resource.rb
198
+ - lib/droplet_kit/version.rb
199
+ - spec/fixtures/actions/all.json
200
+ - spec/fixtures/actions/find.json
201
+ - spec/fixtures/domain_records/all.json
202
+ - spec/fixtures/domain_records/create.json
203
+ - spec/fixtures/domain_records/find.json
204
+ - spec/fixtures/domain_records/update.json
205
+ - spec/fixtures/domains/all.json
206
+ - spec/fixtures/domains/create.json
207
+ - spec/fixtures/domains/find.json
208
+ - spec/fixtures/droplets/all.json
209
+ - spec/fixtures/droplets/create.json
210
+ - spec/fixtures/droplets/find.json
211
+ - spec/fixtures/droplets/list_actions.json
212
+ - spec/fixtures/droplets/list_backups.json
213
+ - spec/fixtures/droplets/list_kernels.json
214
+ - spec/fixtures/droplets/list_snapshots.json
215
+ - spec/fixtures/image_actions/create.json
216
+ - spec/fixtures/image_actions/find.json
217
+ - spec/fixtures/images/all.json
218
+ - spec/fixtures/images/find.json
219
+ - spec/fixtures/regions/all.json
220
+ - spec/fixtures/sizes/all.json
221
+ - spec/fixtures/ssh_keys/all.json
222
+ - spec/fixtures/ssh_keys/create.json
223
+ - spec/fixtures/ssh_keys/find.json
224
+ - spec/fixtures/ssh_keys/update.json
225
+ - spec/lib/droplet_kit/client_spec.rb
226
+ - spec/lib/droplet_kit/paginated_resource_spec.rb
227
+ - spec/lib/droplet_kit/resources/action_resource_spec.rb
228
+ - spec/lib/droplet_kit/resources/domain_record_resource_spec.rb
229
+ - spec/lib/droplet_kit/resources/domain_resource_spec.rb
230
+ - spec/lib/droplet_kit/resources/droplet_action_resource_spec.rb
231
+ - spec/lib/droplet_kit/resources/droplet_resource_spec.rb
232
+ - spec/lib/droplet_kit/resources/image_action_resource_spec.rb
233
+ - spec/lib/droplet_kit/resources/image_resource_spec.rb
234
+ - spec/lib/droplet_kit/resources/region_resource_spec.rb
235
+ - spec/lib/droplet_kit/resources/size_resource_spec.rb
236
+ - spec/lib/droplet_kit/resources/ssh_key_resource_spec.rb
237
+ - spec/spec_helper.rb
238
+ - spec/support/fake_server.rb
239
+ - spec/support/null_hash_load.rb
240
+ - spec/support/request_stub_helpers.rb
241
+ - spec/support/resource_context.rb
242
+ homepage: ''
243
+ licenses:
244
+ - MIT
245
+ metadata: {}
246
+ post_install_message:
247
+ rdoc_options: []
248
+ require_paths:
249
+ - lib
250
+ required_ruby_version: !ruby/object:Gem::Requirement
251
+ requirements:
252
+ - - '>='
253
+ - !ruby/object:Gem::Version
254
+ version: '0'
255
+ required_rubygems_version: !ruby/object:Gem::Requirement
256
+ requirements:
257
+ - - '>='
258
+ - !ruby/object:Gem::Version
259
+ version: '0'
260
+ requirements: []
261
+ rubyforge_project:
262
+ rubygems_version: 2.2.2
263
+ signing_key:
264
+ specification_version: 4
265
+ summary: Droplet Kit is the official Ruby library for Digital Ocean's API
266
+ test_files:
267
+ - spec/fixtures/actions/all.json
268
+ - spec/fixtures/actions/find.json
269
+ - spec/fixtures/domain_records/all.json
270
+ - spec/fixtures/domain_records/create.json
271
+ - spec/fixtures/domain_records/find.json
272
+ - spec/fixtures/domain_records/update.json
273
+ - spec/fixtures/domains/all.json
274
+ - spec/fixtures/domains/create.json
275
+ - spec/fixtures/domains/find.json
276
+ - spec/fixtures/droplets/all.json
277
+ - spec/fixtures/droplets/create.json
278
+ - spec/fixtures/droplets/find.json
279
+ - spec/fixtures/droplets/list_actions.json
280
+ - spec/fixtures/droplets/list_backups.json
281
+ - spec/fixtures/droplets/list_kernels.json
282
+ - spec/fixtures/droplets/list_snapshots.json
283
+ - spec/fixtures/image_actions/create.json
284
+ - spec/fixtures/image_actions/find.json
285
+ - spec/fixtures/images/all.json
286
+ - spec/fixtures/images/find.json
287
+ - spec/fixtures/regions/all.json
288
+ - spec/fixtures/sizes/all.json
289
+ - spec/fixtures/ssh_keys/all.json
290
+ - spec/fixtures/ssh_keys/create.json
291
+ - spec/fixtures/ssh_keys/find.json
292
+ - spec/fixtures/ssh_keys/update.json
293
+ - spec/lib/droplet_kit/client_spec.rb
294
+ - spec/lib/droplet_kit/paginated_resource_spec.rb
295
+ - spec/lib/droplet_kit/resources/action_resource_spec.rb
296
+ - spec/lib/droplet_kit/resources/domain_record_resource_spec.rb
297
+ - spec/lib/droplet_kit/resources/domain_resource_spec.rb
298
+ - spec/lib/droplet_kit/resources/droplet_action_resource_spec.rb
299
+ - spec/lib/droplet_kit/resources/droplet_resource_spec.rb
300
+ - spec/lib/droplet_kit/resources/image_action_resource_spec.rb
301
+ - spec/lib/droplet_kit/resources/image_resource_spec.rb
302
+ - spec/lib/droplet_kit/resources/region_resource_spec.rb
303
+ - spec/lib/droplet_kit/resources/size_resource_spec.rb
304
+ - spec/lib/droplet_kit/resources/ssh_key_resource_spec.rb
305
+ - spec/spec_helper.rb
306
+ - spec/support/fake_server.rb
307
+ - spec/support/null_hash_load.rb
308
+ - spec/support/request_stub_helpers.rb
309
+ - spec/support/resource_context.rb