digitalocean 1.0.2 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -10,8 +10,8 @@ module Digitalocean
10
10
  "Domain" => {
11
11
  "all" => "https://api.digitalocean.com/domains?client_id=[your_client_id]&api_key=[your_api_key]",
12
12
  "find" => "https://api.digitalocean.com/domains/[domain_id]?client_id=[your_client_id]&api_key=[your_api_key]",
13
- "create" => "https://api.digitalocean.com/domains/new?client_id=[your_client_id]&api_key=[your_api_key]&name=[domain]&ip_address=[ip_address]",
14
- "destroy" => "https://api.digitalocean.com/domains/[domain_id]/destroy?client_id=[your_client_id]&api_key=[your_api_key]"
13
+ "create" => "https://api.digitalocean.com/domains/new?client_id=[your_client_id]&api_key=[your_api_key]&name=[domain]&ip_address=[ip_address]",
14
+ "destroy" => "https://api.digitalocean.com/domains/[domain_id]/destroy?client_id=[your_client_id]&api_key=[your_api_key]"
15
15
  },
16
16
  "Droplet" => {
17
17
  "all" => "https://api.digitalocean.com/droplets/?client_id=[your_client_id]&api_key=[your_api_key]",
@@ -23,21 +23,21 @@ module Digitalocean
23
23
  "power_off" => "https://api.digitalocean.com/droplets/[droplet_id]/power_off/?client_id=[your_client_id]&api_key=[your_api_key]",
24
24
  "power_on" => "https://api.digitalocean.com/droplets/[droplet_id]/power_on/?client_id=[your_client_id]&api_key=[your_api_key]",
25
25
  "snapshot" => "https://api.digitalocean.com/droplets/[droplet_id]/snapshot/?name=[snapshot_name]&client_id=[your_client_id]&api_key=[your_api_key]",
26
- "create" => "https://api.digitalocean.com/droplets/new?client_id=[your_client_id]&api_key=[your_api_key]&name=[droplet_name]&size_id=[size_id]&image_id=[image_id]&region_id=[region_id]&ssh_key_ids=[ssh_key_ids]", # unique case that is not copy/paste
26
+ "create" => "https://api.digitalocean.com/droplets/new?client_id=[your_client_id]&api_key=[your_api_key]&name=[droplet_name]&size_id=[size_id]&image_id=[image_id]&region_id=[region_id]&ssh_key_ids=[ssh_key_ids]&private_networking=[private_networking]&backups_enabled=[backups_enabled]", # unique case that is not copy/paste
27
27
  "destroy" => "https://api.digitalocean.com/droplets/[droplet_id]/destroy/?client_id=[your_client_id]&api_key=[your_api_key]"
28
28
  },
29
29
  "Image" => {
30
30
  "all" => "https://api.digitalocean.com/images/?client_id=[your_client_id]&api_key=[your_api_key]",
31
31
  "find" => "https://api.digitalocean.com/images/[image_id]/?client_id=[your_client_id]&api_key=[your_api_key]",
32
32
  "destroy" => "https://api.digitalocean.com/images/[image_id]/destroy/?client_id=[your_client_id]&api_key=[your_api_key]",
33
- "transfer" => "https://api.digitalocean.com/images/[image_id]/transfer/?client_id=[your_client_id]&api_key=[your_api_key]&region_id=[region_id]"
33
+ "transfer" => "https://api.digitalocean.com/images/[image_id]/transfer/?client_id=[your_client_id]&api_key=[your_api_key]&region_id=[region_id]"
34
34
  },
35
35
  "Record" => {
36
36
  "all" => "https://api.digitalocean.com/domains/[domain_id]/records?client_id=[your_client_id]&api_key=[your_api_key]",
37
37
  "find" => "https://api.digitalocean.com/domains/[domain_id]/records/[record_id]?client_id=[your_client_id]&api_key=[your_api_key]",
38
38
  "create" => "https://api.digitalocean.com/domains/[domain_id]/records/new?client_id=[your_client_id]&api_key=[your_api_key]&record_type=[record_type]&data=[data]",
39
39
  "edit" => "https://api.digitalocean.com/domains/[domain_id]/records/[record_id]/edit?client_id=[your_client_id]&api_key=[your_api_key]",
40
- "destroy" => "https://api.digitalocean.com/domains/[domain_id]/records/[record_id]/destroy?client_id=[your_client_id]&api_key=[your_api_key]"
40
+ "destroy" => "https://api.digitalocean.com/domains/[domain_id]/records/[record_id]/destroy?client_id=[your_client_id]&api_key=[your_api_key]"
41
41
  },
42
42
  "Region" => {
43
43
  "all" => "https://api.digitalocean.com/regions/?client_id=[your_client_id]&api_key=[your_api_key]"
@@ -80,7 +80,7 @@ module Digitalocean
80
80
  end
81
81
  end
82
82
 
83
- Digitalocean.const_set(resource_name, resource_class)
83
+ Digitalocean.const_set(resource_name, resource_class)
84
84
  end
85
85
 
86
86
  def request=(request)
@@ -161,7 +161,7 @@ module Digitalocean
161
161
  if parts.length > 1
162
162
  hash.each do |key, value|
163
163
  query_setter = "#{key}="
164
- query_arg_index = parts.index query_setter
164
+ query_arg_index = parts.index query_setter
165
165
  query_arg_index = parts.index "&#{query_setter}" if !query_arg_index # handle case of ampersand
166
166
 
167
167
  if query_arg_index != nil
@@ -1,3 +1,3 @@
1
1
  module Digitalocean
2
- VERSION = "1.0.2"
2
+ VERSION = "1.0.3"
3
3
  end
@@ -123,7 +123,7 @@ describe Digitalocean::Droplet do
123
123
  end
124
124
 
125
125
  it do
126
- @url.should eq "https://api.digitalocean.com/droplets/new?client_id=client_id_required&api_key=api_key_required&name=#{name}&size_id=#{size_id}&image_id=#{image_id}&region_id=#{region_id}&ssh_key_ids=#{ssh_key_ids}"
126
+ @url.should eq "https://api.digitalocean.com/droplets/new?client_id=client_id_required&api_key=api_key_required&name=#{name}&size_id=#{size_id}&image_id=#{image_id}&region_id=#{region_id}&ssh_key_ids=#{ssh_key_ids}&private_networking=private_networking&backups_enabled=backups_enabled"
127
127
  end
128
128
  end
129
129
 
@@ -12,7 +12,7 @@ describe Digitalocean do
12
12
  it { subject.api_endpoint.should eq "https://api.digitalocean.com" }
13
13
  it { subject.client_id.should eq "client_id_required" }
14
14
  it { subject.api_key.should eq "api_key_required" }
15
- it { subject::VERSION.should eq "1.0.2" }
15
+ it { subject::VERSION.should eq "1.0.3" }
16
16
  end
17
17
 
18
18
  describe "setting values" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: digitalocean
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2014-02-12 00:00:00.000000000 Z
13
+ date: 2014-03-26 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: faraday