fog-digitalocean 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/fog-digitalocean.gemspec +1 -1
- data/lib/fog/digitalocean/requests/compute/change_kernel.rb +1 -1
- data/lib/fog/digitalocean/requests/compute/convert_to_snapshot.rb +2 -2
- data/lib/fog/digitalocean/requests/compute/detach_volume.rb +4 -4
- data/lib/fog/digitalocean/requests/compute/disable_backups.rb +1 -1
- data/lib/fog/digitalocean/requests/compute/enable_ipv6.rb +1 -1
- data/lib/fog/digitalocean/requests/compute/enable_private_networking.rb +1 -1
- data/lib/fog/digitalocean/requests/compute/get_droplet_action.rb +1 -1
- data/lib/fog/digitalocean/requests/compute/get_image_details.rb +23 -17
- data/lib/fog/digitalocean/requests/compute/list_droplet_actions.rb +1 -1
- data/lib/fog/digitalocean/requests/compute/list_images.rb +4 -2
- data/lib/fog/digitalocean/requests/compute/list_volume_actions.rb +1 -1
- data/lib/fog/digitalocean/requests/compute/password_reset.rb +1 -1
- data/lib/fog/digitalocean/requests/compute/power_cycle.rb +1 -1
- data/lib/fog/digitalocean/requests/compute/power_off.rb +1 -1
- data/lib/fog/digitalocean/requests/compute/power_on.rb +1 -1
- data/lib/fog/digitalocean/requests/compute/reboot_server.rb +1 -1
- data/lib/fog/digitalocean/requests/compute/rebuild.rb +1 -1
- data/lib/fog/digitalocean/requests/compute/rename.rb +1 -1
- data/lib/fog/digitalocean/requests/compute/resize.rb +1 -1
- data/lib/fog/digitalocean/requests/compute/resize_volume.rb +1 -1
- data/lib/fog/digitalocean/requests/compute/restore.rb +1 -1
- data/lib/fog/digitalocean/requests/compute/shutdown.rb +1 -1
- data/lib/fog/digitalocean/requests/compute/snapshot.rb +1 -1
- data/lib/fog/digitalocean/requests/compute/transfer_image.rb +1 -1
- data/lib/fog/digitalocean/requests/compute/upgrade.rb +1 -1
- data/lib/fog/digitalocean/version.rb +1 -1
- metadata +3 -5
- data/bin/fog +0 -78
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 963a92d0264581f90db0dde01e2993275d87f62c
|
4
|
+
data.tar.gz: 0b829c4fe8e3e33dc0b9f3e4985b552f3013d6cf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1e13717d588275a66606e21fe4f4bfceac858a2d956c72fac43e461f380ad196fa11c1c56968196dae5f26854618876bc9c900eab38955f3fe0f01d9e7aa01bb
|
7
|
+
data.tar.gz: 3aa26606dd654a3b677a6da21f489ede3129617b46ee5738bc75df687fc05705b624a3b866067fb494b9f7d77ff278785965f17e05bc2f3908aa5caa8fc9db9a
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,12 @@
|
|
2
2
|
All notable changes to this project will be documented in this file.
|
3
3
|
This project adheres to [Semantic Versioning](http://semver.org/).
|
4
4
|
|
5
|
+
## [0.3.0] - 2017-03-13
|
6
|
+
### Fixed
|
7
|
+
- Removed binary (conflicts with fog/fog, may need alternate solution)
|
8
|
+
- fix get_image_details mock
|
9
|
+
- fix pagination in list_images mock
|
10
|
+
|
5
11
|
## [0.2.0] - 2016-09-28
|
6
12
|
### Added
|
7
13
|
- Volume Support
|
data/fog-digitalocean.gemspec
CHANGED
@@ -36,7 +36,7 @@ Gem::Specification.new do |s|
|
|
36
36
|
s.require_paths = %w[lib]
|
37
37
|
|
38
38
|
## If your gem includes any executables, list them here.
|
39
|
-
s.executables = ["fog"]
|
39
|
+
#s.executables = ["fog"]
|
40
40
|
|
41
41
|
## Specify any RDoc options here. You'll want to add your README and
|
42
42
|
## LICENSE files to the extra_rdoc_files list.
|
@@ -44,8 +44,8 @@ module Fog
|
|
44
44
|
"status" => "in-progress",
|
45
45
|
"type" => "detach_volume",
|
46
46
|
"started_at" => "2015-10-15T17:46:15Z",
|
47
|
-
"completed_at" =>
|
48
|
-
"resource_id" =>
|
47
|
+
"completed_at" => nil,
|
48
|
+
"resource_id" => nil,
|
49
49
|
"resource_type" => "backend",
|
50
50
|
"region" => {
|
51
51
|
"name" => "New York 1",
|
@@ -84,8 +84,8 @@ module Fog
|
|
84
84
|
"status" => "in-progress",
|
85
85
|
"type" => "detach_volume",
|
86
86
|
"started_at" => "2015-10-15T17:46:15Z",
|
87
|
-
"completed_at" =>
|
88
|
-
"resource_id" =>
|
87
|
+
"completed_at" => nil,
|
88
|
+
"resource_id" => nil,
|
89
89
|
"resource_type" => "backend",
|
90
90
|
"region" => {
|
91
91
|
"name" => "New York 1",
|
@@ -13,26 +13,32 @@ module Fog
|
|
13
13
|
|
14
14
|
# noinspection RubyStringKeysInHashInspection
|
15
15
|
class Mock
|
16
|
-
def get_image_details(
|
16
|
+
def get_image_details(id_or_slug)
|
17
17
|
response = Excon::Response.new
|
18
|
-
response.status = 200
|
19
18
|
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
'
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
'
|
30
|
-
'
|
31
|
-
|
32
|
-
|
33
|
-
|
19
|
+
if [7555620, 'nifty-new-snapshot-ubuntu'].include?(id_or_slug)
|
20
|
+
response.status = 200
|
21
|
+
|
22
|
+
response.body = {
|
23
|
+
'image' =>
|
24
|
+
{
|
25
|
+
'id' => 7555620,
|
26
|
+
'name' => 'Nifty New Snapshot',
|
27
|
+
'distribution' => 'Ubuntu',
|
28
|
+
'slug' => 'nifty-new-snapshot-ubuntu',
|
29
|
+
'public' => false,
|
30
|
+
'regions' => [
|
31
|
+
'nyc2',
|
32
|
+
'nyc2'
|
33
|
+
],
|
34
|
+
'created_at' => '2014-11-04T22:23:02Z',
|
35
|
+
'min_disk_size' => 20
|
36
|
+
}
|
34
37
|
}
|
35
|
-
|
38
|
+
else
|
39
|
+
response.status = 404
|
40
|
+
raise(Fog::Compute::DigitalOcean::NotFound.new("Expected([200]) <=> Actual(404 Not Found)"))
|
41
|
+
end
|
36
42
|
|
37
43
|
response
|
38
44
|
end
|
@@ -15,6 +15,8 @@ module Fog
|
|
15
15
|
# noinspection RubyStringKeysInHashInspection
|
16
16
|
class Mock
|
17
17
|
def list_images(filters = {})
|
18
|
+
next_page = (filters[:page] || 1).to_i + 1
|
19
|
+
|
18
20
|
response = Excon::Response.new
|
19
21
|
response.status = 200
|
20
22
|
response.body = {
|
@@ -24,7 +26,7 @@ module Fog
|
|
24
26
|
'id' => 7555620,
|
25
27
|
'name' => 'Nifty New Snapshot',
|
26
28
|
'distribution' => 'Ubuntu',
|
27
|
-
'slug' =>
|
29
|
+
'slug' => 'nifty-new-snapshot-ubuntu',
|
28
30
|
'public' => false,
|
29
31
|
'regions' => %w(nyc2 nyc3),
|
30
32
|
'created_at' => '2014-11-04T22:23:02Z',
|
@@ -35,7 +37,7 @@ module Fog
|
|
35
37
|
'links' => {
|
36
38
|
'pages' => {
|
37
39
|
'last' => 'https://api.digitalocean.com/v2/images?page=56&per_page=1',
|
38
|
-
'next' =>
|
40
|
+
'next' => "https://api.digitalocean.com/v2/images?page=#{next_page}&per_page=1"
|
39
41
|
}
|
40
42
|
},
|
41
43
|
'meta' => {
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fog-digitalocean
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- JJ Asghar
|
@@ -169,8 +169,7 @@ description: DigitalOcean fog provider gem
|
|
169
169
|
email:
|
170
170
|
- jj@chef.io
|
171
171
|
- surajshirvankar@gmail.com
|
172
|
-
executables:
|
173
|
-
- fog
|
172
|
+
executables: []
|
174
173
|
extensions: []
|
175
174
|
extra_rdoc_files:
|
176
175
|
- README.md
|
@@ -190,7 +189,6 @@ files:
|
|
190
189
|
- README.md
|
191
190
|
- RELEASE.md
|
192
191
|
- Rakefile
|
193
|
-
- bin/fog
|
194
192
|
- fog-digitalocean.gemspec
|
195
193
|
- gemfiles/Gemfile-edge
|
196
194
|
- lib/fog/bin/digitalocean.rb
|
@@ -291,7 +289,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
291
289
|
version: '0'
|
292
290
|
requirements: []
|
293
291
|
rubyforge_project:
|
294
|
-
rubygems_version: 2.
|
292
|
+
rubygems_version: 2.5.1
|
295
293
|
signing_key:
|
296
294
|
specification_version: 2
|
297
295
|
summary: DigitalOcean fog provider gem
|
data/bin/fog
DELETED
@@ -1,78 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
require File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib', 'fog'))
|
4
|
-
require 'optparse'
|
5
|
-
require 'irb'
|
6
|
-
require 'yaml'
|
7
|
-
|
8
|
-
options = OptionParser.new do |opts|
|
9
|
-
opts.banner = 'usage: fog [options] CREDENTIAL'
|
10
|
-
|
11
|
-
opts.on('-C', '--credentials-path FILE', 'Path to the credentials file') do |file|
|
12
|
-
Fog.credentials_path = file
|
13
|
-
end
|
14
|
-
|
15
|
-
opts.on_tail('-v', '--version', 'Prints the version') do
|
16
|
-
puts Fog::VERSION
|
17
|
-
exit
|
18
|
-
end
|
19
|
-
|
20
|
-
opts.on_tail('-h', '--help', 'Prints this message') do
|
21
|
-
puts opts
|
22
|
-
exit
|
23
|
-
end
|
24
|
-
end
|
25
|
-
options.parse!
|
26
|
-
|
27
|
-
Fog.credential = ARGV.first ? ARGV.first.to_sym : nil
|
28
|
-
Fog.mock! if ENV['FOG_MOCK']
|
29
|
-
if Fog.credentials.empty?
|
30
|
-
begin
|
31
|
-
Fog::Errors.missing_credentials
|
32
|
-
rescue Fog::Errors::LoadError => error
|
33
|
-
abort error.message
|
34
|
-
end
|
35
|
-
end
|
36
|
-
|
37
|
-
require 'fog/bin'
|
38
|
-
|
39
|
-
providers = Fog.available_providers
|
40
|
-
providers = if providers.length > 1
|
41
|
-
providers[0...-1].join(', ') << ' and ' << providers[-1]
|
42
|
-
else
|
43
|
-
providers.first
|
44
|
-
end
|
45
|
-
|
46
|
-
if ARGV.length > 1
|
47
|
-
|
48
|
-
result = instance_eval(ARGV[1..-1].join(' '))
|
49
|
-
puts(Fog::JSON.encode(result))
|
50
|
-
|
51
|
-
else
|
52
|
-
|
53
|
-
ARGV.clear # Avoid passing args to IRB
|
54
|
-
IRB.setup(nil)
|
55
|
-
@irb = IRB::Irb.new(nil)
|
56
|
-
IRB.conf[:MAIN_CONTEXT] = @irb.context
|
57
|
-
IRB.conf[:PROMPT][:FOG] = IRB.conf[:PROMPT][:SIMPLE].dup
|
58
|
-
IRB.conf[:PROMPT][:FOG][:RETURN] = "%s\n"
|
59
|
-
@irb.context.prompt_mode = :FOG
|
60
|
-
@irb.context.workspace = IRB::WorkSpace.new(binding)
|
61
|
-
|
62
|
-
trap 'INT' do
|
63
|
-
@irb.signal_handle
|
64
|
-
end
|
65
|
-
|
66
|
-
Fog::Formatador.display_line('Welcome to fog interactive!')
|
67
|
-
Fog::Formatador.display_line(":#{Fog.credential} provides #{providers}")
|
68
|
-
providers = Fog.providers
|
69
|
-
|
70
|
-
# FIXME: hacks until we can `include Fog` in bin
|
71
|
-
CDN = Fog::CDN
|
72
|
-
Compute = Fog::Compute
|
73
|
-
DNS = Fog::DNS
|
74
|
-
Storage = Fog::Storage
|
75
|
-
|
76
|
-
catch(:IRB_EXIT) { @irb.eval_input }
|
77
|
-
|
78
|
-
end
|