fog-digitalocean 0.1.0 → 0.2.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 +14 -2
- data/README.md +1 -2
- data/lib/fog/bin/digitalocean.rb +30 -0
- data/lib/fog/digitalocean/compute.rb +27 -15
- data/lib/fog/digitalocean/models/compute/volume.rb +15 -0
- data/lib/fog/digitalocean/models/compute/volumes.rb +42 -0
- data/lib/fog/digitalocean/requests/compute/attach_volume.rb +122 -0
- data/lib/fog/digitalocean/requests/compute/create_server.rb +2 -0
- data/lib/fog/digitalocean/requests/compute/create_volume.rb +50 -0
- data/lib/fog/digitalocean/requests/compute/destroy_volume.rb +32 -0
- data/lib/fog/digitalocean/requests/compute/detach_volume.rb +121 -0
- data/lib/fog/digitalocean/requests/compute/get_image_details.rb +1 -1
- data/lib/fog/digitalocean/requests/compute/get_volume_details.rb +60 -0
- data/lib/fog/digitalocean/requests/compute/list_volume_actions.rb +64 -0
- data/lib/fog/digitalocean/requests/compute/list_volumes.rb +64 -0
- data/lib/fog/digitalocean/requests/compute/resize_volume.rb +65 -0
- data/lib/fog/digitalocean/version.rb +1 -1
- data/tests/digitalocean/requests/compute/attach_volume_tests.rb +10 -0
- data/tests/digitalocean/requests/compute/create_volume_tests.rb +10 -0
- data/tests/digitalocean/requests/{compute_v2 → compute}/list_ssh_keys_tests.rb +2 -2
- data/tests/digitalocean/requests/compute/list_volumes_tests.rb +23 -0
- metadata +21 -136
- data/benchs/each_provider.sh +0 -6
- data/benchs/each_service.sh +0 -6
- data/benchs/fog_vs.rb +0 -106
- data/benchs/load_times.rb +0 -37
- data/benchs/params.rb +0 -43
- data/benchs/parse_vs_push.rb +0 -67
- data/spec/fog/account_spec.rb +0 -14
- data/spec/fog/billing_spec.rb +0 -14
- data/spec/fog/bin/atmos_spec.rb +0 -33
- data/spec/fog/bin/aws_spec.rb +0 -98
- data/spec/fog/bin/baremetalcloud_spec.rb +0 -33
- data/spec/fog/bin/bluebox_spec.rb +0 -55
- data/spec/fog/bin/brightbox_spec.rb +0 -30
- data/spec/fog/bin/clodo_spec.rb +0 -9
- data/spec/fog/bin/cloudsigma_spec.rb +0 -9
- data/spec/fog/bin/cloudstack_spec.rb +0 -9
- data/spec/fog/bin/digitalocean_spec.rb +0 -9
- data/spec/fog/bin/dnsimple_spec.rb +0 -9
- data/spec/fog/bin/dnsmadeeasy_spec.rb +0 -9
- data/spec/fog/bin/dreamhost_spec.rb +0 -9
- data/spec/fog/bin/dynect_spec.rb +0 -9
- data/spec/fog/bin/ecloud_spec.rb +0 -10
- data/spec/fog/bin/fogdocker_spec.rb +0 -10
- data/spec/fog/bin/glesys_spec.rb +0 -10
- data/spec/fog/bin/gogrid_spec.rb +0 -10
- data/spec/fog/bin/google_spec.rb +0 -10
- data/spec/fog/bin/ibm_spec.rb +0 -10
- data/spec/fog/bin/internetarchive_spec.rb +0 -10
- data/spec/fog/bin/joyent_spec.rb +0 -10
- data/spec/fog/bin/linode_spec.rb +0 -10
- data/spec/fog/bin/local_spec.rb +0 -10
- data/spec/fog/bin/ninefold_spec.rb +0 -10
- data/spec/fog/bin/opennebula_spec.rb +0 -10
- data/spec/fog/bin/openstack_spec.rb +0 -10
- data/spec/fog/bin/openvz_spec.rb +0 -10
- data/spec/fog/bin/ovirt_spec.rb +0 -10
- data/spec/fog/bin/powerdns_spec.rb +0 -9
- data/spec/fog/bin/profitbricks_spec.rb +0 -10
- data/spec/fog/bin/rackspace_spec.rb +0 -10
- data/spec/fog/bin/rage4_spec.rb +0 -10
- data/spec/fog/bin/riakcs_spec.rb +0 -10
- data/spec/fog/bin/sakuracloud_spec.rb +0 -10
- data/spec/fog/bin/serverlove_spec.rb +0 -10
- data/spec/fog/bin/softlayer_spec.rb +0 -10
- data/spec/fog/bin/stormondemand_spec.rb +0 -10
- data/spec/fog/bin/vcloud_spec.rb +0 -10
- data/spec/fog/bin/vclouddirector_spec.rb +0 -10
- data/spec/fog/bin/vmfusion_spec.rb +0 -10
- data/spec/fog/bin/voxel_spec.rb +0 -10
- data/spec/fog/bin/vsphere_spec.rb +0 -10
- data/spec/fog/bin/xenserver_spec.rb +0 -10
- data/spec/fog/bin/zerigo_spec.rb +0 -10
- data/spec/fog/bin_spec.rb +0 -161
- data/spec/fog/cdn_spec.rb +0 -14
- data/spec/fog/compute_spec.rb +0 -19
- data/spec/fog/dns_spec.rb +0 -19
- data/spec/fog/identity_spec.rb +0 -14
- data/spec/fog/image_spec.rb +0 -14
- data/spec/fog/metering_spec.rb +0 -14
- data/spec/fog/monitoring_spec.rb +0 -14
- data/spec/fog/network_spec.rb +0 -14
- data/spec/fog/orchestration_spec.rb +0 -14
- data/spec/fog/storage_spec.rb +0 -14
- data/spec/fog/support_spec.rb +0 -14
- data/spec/fog/volume_spec.rb +0 -14
- data/spec/fog/vpn_spec.rb +0 -14
- data/spec/fog/xml/connection_spec.rb +0 -33
- data/spec/helpers/bin.rb +0 -34
- data/spec/spec_helper.rb +0 -18
data/spec/fog/vpn_spec.rb
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
require "spec_helper"
|
2
|
-
|
3
|
-
describe Fog::VPN do
|
4
|
-
Fog::VPN.providers.each do |provider|
|
5
|
-
describe "when #{provider} is passed with no available credentials" do
|
6
|
-
it "returns ArgumentError" do
|
7
|
-
# Stub credentials so you still see errors where the tester really has credentials
|
8
|
-
Fog.stub :credentials, {} do
|
9
|
-
assert_raises(ArgumentError) { Fog::VPN[provider] }
|
10
|
-
end
|
11
|
-
end
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|
@@ -1,33 +0,0 @@
|
|
1
|
-
require "spec_helper"
|
2
|
-
|
3
|
-
# @note This is going to be part of fog-xml eventually
|
4
|
-
describe Fog::XML::Connection do
|
5
|
-
before do
|
6
|
-
@connection = Fog::XML::Connection.new("http://localhost")
|
7
|
-
end
|
8
|
-
|
9
|
-
after do
|
10
|
-
Excon.stubs.clear
|
11
|
-
end
|
12
|
-
|
13
|
-
it "responds to #request" do
|
14
|
-
assert_respond_to @connection, :request
|
15
|
-
end
|
16
|
-
|
17
|
-
describe "when request is passed a parser" do
|
18
|
-
it "returns the body after parsing" do
|
19
|
-
@parser = Fog::ToHashDocument.new
|
20
|
-
Excon.stub({}, { :status => 200, :body => "<xml></xml>" })
|
21
|
-
response = @connection.request(:parser => @parser, :mock => true)
|
22
|
-
assert_equal({ :xml => "" }, response.body)
|
23
|
-
end
|
24
|
-
end
|
25
|
-
|
26
|
-
describe "when request excludes a parser" do
|
27
|
-
it "returns the response body without change" do
|
28
|
-
Excon.stub({}, { :status => 200, :body => "<xml></xml>" })
|
29
|
-
response = @connection.request(:mock => true)
|
30
|
-
assert_equal("<xml></xml>", response.body)
|
31
|
-
end
|
32
|
-
end
|
33
|
-
end
|
data/spec/helpers/bin.rb
DELETED
@@ -1,34 +0,0 @@
|
|
1
|
-
module Fog
|
2
|
-
module BinSpec
|
3
|
-
extend Minitest::Spec::DSL
|
4
|
-
|
5
|
-
it "responds to available?" do
|
6
|
-
assert_respond_to subject, :available?
|
7
|
-
end
|
8
|
-
|
9
|
-
it "responds to class_for" do
|
10
|
-
assert_respond_to subject, :class_for
|
11
|
-
end
|
12
|
-
|
13
|
-
it "#class_for raises ArgumentError for unknown services" do
|
14
|
-
assert_raises(ArgumentError) { subject.class_for(:unknown) }
|
15
|
-
end
|
16
|
-
|
17
|
-
it "responds to collections" do
|
18
|
-
skip if subject == ::Google
|
19
|
-
assert_respond_to subject, :collections
|
20
|
-
end
|
21
|
-
|
22
|
-
it "responds to []" do
|
23
|
-
assert_respond_to subject, :[]
|
24
|
-
end
|
25
|
-
|
26
|
-
it "#[] when unknown service is passed raises ArgumentError" do
|
27
|
-
assert_raises(ArgumentError) { subject[:bad_service] }
|
28
|
-
end
|
29
|
-
|
30
|
-
it "responds to services" do
|
31
|
-
assert_respond_to subject, :services
|
32
|
-
end
|
33
|
-
end
|
34
|
-
end
|
data/spec/spec_helper.rb
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
require 'coveralls'
|
2
|
-
Coveralls.wear!
|
3
|
-
|
4
|
-
if ENV["COVERAGE"]
|
5
|
-
require "simplecov"
|
6
|
-
|
7
|
-
SimpleCov.start do
|
8
|
-
add_filter "/spec/"
|
9
|
-
end
|
10
|
-
end
|
11
|
-
|
12
|
-
require "minitest/autorun"
|
13
|
-
require "minitest/spec"
|
14
|
-
require "minitest/stub_const"
|
15
|
-
|
16
|
-
$LOAD_PATH.unshift "lib"
|
17
|
-
|
18
|
-
require "fog/digitalocean"
|