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.
Files changed (92) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +14 -2
  3. data/README.md +1 -2
  4. data/lib/fog/bin/digitalocean.rb +30 -0
  5. data/lib/fog/digitalocean/compute.rb +27 -15
  6. data/lib/fog/digitalocean/models/compute/volume.rb +15 -0
  7. data/lib/fog/digitalocean/models/compute/volumes.rb +42 -0
  8. data/lib/fog/digitalocean/requests/compute/attach_volume.rb +122 -0
  9. data/lib/fog/digitalocean/requests/compute/create_server.rb +2 -0
  10. data/lib/fog/digitalocean/requests/compute/create_volume.rb +50 -0
  11. data/lib/fog/digitalocean/requests/compute/destroy_volume.rb +32 -0
  12. data/lib/fog/digitalocean/requests/compute/detach_volume.rb +121 -0
  13. data/lib/fog/digitalocean/requests/compute/get_image_details.rb +1 -1
  14. data/lib/fog/digitalocean/requests/compute/get_volume_details.rb +60 -0
  15. data/lib/fog/digitalocean/requests/compute/list_volume_actions.rb +64 -0
  16. data/lib/fog/digitalocean/requests/compute/list_volumes.rb +64 -0
  17. data/lib/fog/digitalocean/requests/compute/resize_volume.rb +65 -0
  18. data/lib/fog/digitalocean/version.rb +1 -1
  19. data/tests/digitalocean/requests/compute/attach_volume_tests.rb +10 -0
  20. data/tests/digitalocean/requests/compute/create_volume_tests.rb +10 -0
  21. data/tests/digitalocean/requests/{compute_v2 → compute}/list_ssh_keys_tests.rb +2 -2
  22. data/tests/digitalocean/requests/compute/list_volumes_tests.rb +23 -0
  23. metadata +21 -136
  24. data/benchs/each_provider.sh +0 -6
  25. data/benchs/each_service.sh +0 -6
  26. data/benchs/fog_vs.rb +0 -106
  27. data/benchs/load_times.rb +0 -37
  28. data/benchs/params.rb +0 -43
  29. data/benchs/parse_vs_push.rb +0 -67
  30. data/spec/fog/account_spec.rb +0 -14
  31. data/spec/fog/billing_spec.rb +0 -14
  32. data/spec/fog/bin/atmos_spec.rb +0 -33
  33. data/spec/fog/bin/aws_spec.rb +0 -98
  34. data/spec/fog/bin/baremetalcloud_spec.rb +0 -33
  35. data/spec/fog/bin/bluebox_spec.rb +0 -55
  36. data/spec/fog/bin/brightbox_spec.rb +0 -30
  37. data/spec/fog/bin/clodo_spec.rb +0 -9
  38. data/spec/fog/bin/cloudsigma_spec.rb +0 -9
  39. data/spec/fog/bin/cloudstack_spec.rb +0 -9
  40. data/spec/fog/bin/digitalocean_spec.rb +0 -9
  41. data/spec/fog/bin/dnsimple_spec.rb +0 -9
  42. data/spec/fog/bin/dnsmadeeasy_spec.rb +0 -9
  43. data/spec/fog/bin/dreamhost_spec.rb +0 -9
  44. data/spec/fog/bin/dynect_spec.rb +0 -9
  45. data/spec/fog/bin/ecloud_spec.rb +0 -10
  46. data/spec/fog/bin/fogdocker_spec.rb +0 -10
  47. data/spec/fog/bin/glesys_spec.rb +0 -10
  48. data/spec/fog/bin/gogrid_spec.rb +0 -10
  49. data/spec/fog/bin/google_spec.rb +0 -10
  50. data/spec/fog/bin/ibm_spec.rb +0 -10
  51. data/spec/fog/bin/internetarchive_spec.rb +0 -10
  52. data/spec/fog/bin/joyent_spec.rb +0 -10
  53. data/spec/fog/bin/linode_spec.rb +0 -10
  54. data/spec/fog/bin/local_spec.rb +0 -10
  55. data/spec/fog/bin/ninefold_spec.rb +0 -10
  56. data/spec/fog/bin/opennebula_spec.rb +0 -10
  57. data/spec/fog/bin/openstack_spec.rb +0 -10
  58. data/spec/fog/bin/openvz_spec.rb +0 -10
  59. data/spec/fog/bin/ovirt_spec.rb +0 -10
  60. data/spec/fog/bin/powerdns_spec.rb +0 -9
  61. data/spec/fog/bin/profitbricks_spec.rb +0 -10
  62. data/spec/fog/bin/rackspace_spec.rb +0 -10
  63. data/spec/fog/bin/rage4_spec.rb +0 -10
  64. data/spec/fog/bin/riakcs_spec.rb +0 -10
  65. data/spec/fog/bin/sakuracloud_spec.rb +0 -10
  66. data/spec/fog/bin/serverlove_spec.rb +0 -10
  67. data/spec/fog/bin/softlayer_spec.rb +0 -10
  68. data/spec/fog/bin/stormondemand_spec.rb +0 -10
  69. data/spec/fog/bin/vcloud_spec.rb +0 -10
  70. data/spec/fog/bin/vclouddirector_spec.rb +0 -10
  71. data/spec/fog/bin/vmfusion_spec.rb +0 -10
  72. data/spec/fog/bin/voxel_spec.rb +0 -10
  73. data/spec/fog/bin/vsphere_spec.rb +0 -10
  74. data/spec/fog/bin/xenserver_spec.rb +0 -10
  75. data/spec/fog/bin/zerigo_spec.rb +0 -10
  76. data/spec/fog/bin_spec.rb +0 -161
  77. data/spec/fog/cdn_spec.rb +0 -14
  78. data/spec/fog/compute_spec.rb +0 -19
  79. data/spec/fog/dns_spec.rb +0 -19
  80. data/spec/fog/identity_spec.rb +0 -14
  81. data/spec/fog/image_spec.rb +0 -14
  82. data/spec/fog/metering_spec.rb +0 -14
  83. data/spec/fog/monitoring_spec.rb +0 -14
  84. data/spec/fog/network_spec.rb +0 -14
  85. data/spec/fog/orchestration_spec.rb +0 -14
  86. data/spec/fog/storage_spec.rb +0 -14
  87. data/spec/fog/support_spec.rb +0 -14
  88. data/spec/fog/volume_spec.rb +0 -14
  89. data/spec/fog/vpn_spec.rb +0 -14
  90. data/spec/fog/xml/connection_spec.rb +0 -33
  91. data/spec/helpers/bin.rb +0 -34
  92. data/spec/spec_helper.rb +0 -18
@@ -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
@@ -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
@@ -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"