digitalocean 1.0.4 → 1.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -40,10 +40,12 @@ module Digitalocean
40
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
- "all" => "https://api.digitalocean.com/regions/?client_id=[your_client_id]&api_key=[your_api_key]"
43
+ "all" => "https://api.digitalocean.com/regions/?client_id=[your_client_id]&api_key=[your_api_key]",
44
+ "find" => "https://api.digitalocean.com/regions/[region_id]?client_id=[your_client_id]&api_key=[your_api_key]"
44
45
  },
45
46
  "Size" => {
46
- "all" => "https://api.digitalocean.com/sizes/?client_id=[your_client_id]&api_key=[your_api_key]"
47
+ "all" => "https://api.digitalocean.com/sizes/?client_id=[your_client_id]&api_key=[your_api_key]",
48
+ "find" => "https://api.digitalocean.com/sizes/[size_id]?client_id=[your_client_id]&api_key=[your_api_key]"
47
49
  },
48
50
  "SshKey" => {
49
51
  "all" => "https://api.digitalocean.com/ssh_keys/?client_id=[your_client_id]&api_key=[your_api_key]",
@@ -1,3 +1,3 @@
1
1
  module Digitalocean
2
- VERSION = "1.0.4"
2
+ VERSION = "1.0.5"
3
3
  end
@@ -12,4 +12,17 @@ describe Digitalocean::Region do
12
12
  @url.should eq "https://api.digitalocean.com/regions/?client_id=client_id_required&api_key=api_key_required"
13
13
  end
14
14
  end
15
+
16
+ describe "._find" do
17
+ let(:region_id) { "1234" }
18
+
19
+ before do
20
+ @url = subject._find(region_id)
21
+ end
22
+
23
+ it do
24
+ @url.should eq "https://api.digitalocean.com/regions/#{region_id}?client_id=client_id_required&api_key=api_key_required"
25
+ end
26
+ end
27
+
15
28
  end
@@ -12,4 +12,17 @@ describe Digitalocean::Size do
12
12
  @url.should eq "https://api.digitalocean.com/sizes/?client_id=client_id_required&api_key=api_key_required"
13
13
  end
14
14
  end
15
+
16
+ describe "._find" do
17
+ let(:size_id) { "1234" }
18
+
19
+ before do
20
+ @url = subject._find(size_id)
21
+ end
22
+
23
+ it do
24
+ @url.should eq "https://api.digitalocean.com/sizes/#{size_id}?client_id=client_id_required&api_key=api_key_required"
25
+ end
26
+ end
27
+
15
28
  end
@@ -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.4" }
15
+ it { subject::VERSION.should eq "1.0.5" }
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.4
4
+ version: 1.0.5
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-03-27 00:00:00.000000000 Z
13
+ date: 2014-04-08 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: faraday