digitalocean_c 1.2.0 → 1.2.1
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.
- checksums.yaml +4 -4
- data/README.md +3 -3
- data/digitalocean_c.gemspec +2 -2
- data/lib/{digitalocean.rb → digitalocean_c.rb} +8 -8
- data/lib/digitalocean_c/version.rb +3 -0
- data/spec/{digitalocean → digitalocean_c}/domain_spec.rb +1 -1
- data/spec/{digitalocean → digitalocean_c}/droplet_spec.rb +1 -1
- data/spec/{digitalocean → digitalocean_c}/event_spec.rb +1 -1
- data/spec/{digitalocean → digitalocean_c}/image_spec.rb +1 -1
- data/spec/{digitalocean → digitalocean_c}/integration_spec.rb +2 -2
- data/spec/{digitalocean → digitalocean_c}/record_spec.rb +1 -1
- data/spec/{digitalocean → digitalocean_c}/region_spec.rb +1 -1
- data/spec/{digitalocean → digitalocean_c}/size_spec.rb +1 -1
- data/spec/{digitalocean → digitalocean_c}/ssh_key_spec.rb +1 -1
- data/spec/digitalocean_spec.rb +2 -2
- data/spec/spec_helper.rb +1 -1
- metadata +22 -22
- data/lib/digitalocean/version.rb +0 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 34d2a4fa5cd9416abdda39c5ed031beba742ab7d
|
4
|
+
data.tar.gz: e7230a3c7ca43922fd9175e7ad75e5b5ac5f53e2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8128dc0e1340646014929d01da61db96abead04690113f7382be872735873f6de942a4874b19a13dc07a64e0368378c070a15abb1212800b3d607a58a599c2ef
|
7
|
+
data.tar.gz: 2e657bdc0de78f9a988bce1b081edf6a33e3a78f543cc9be86d7424da2a661abab440235368a53984288cb63908fe654567d50cfa400f428f143a32e2ed9170f
|
data/README.md
CHANGED
@@ -1,11 +1,11 @@
|
|
1
|
-
#
|
1
|
+
# DigitaloceanC Rubygem with Updated Faraday version
|
2
2
|
|
3
3
|

|
4
4
|
|
5
5
|
### The easiest and most complete rubygem for [DigitalOcean](https://www.digitalocean.com).
|
6
6
|
|
7
|
-
[](https://travis-ci.org/merqlove/digitalocean_c)
|
8
|
+
[](http://badge.fury.io/rb/digitalocean_c)
|
9
9
|
|
10
10
|
```ruby
|
11
11
|
Digitalocean.client_id = "your_client_id"
|
data/digitalocean_c.gemspec
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
2
|
lib = File.expand_path('../lib', __FILE__)
|
3
3
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require '
|
4
|
+
require 'digitalocean_c/version'
|
5
5
|
|
6
6
|
Gem::Specification.new do |gem|
|
7
7
|
gem.name = "digitalocean_c"
|
8
|
-
gem.version =
|
8
|
+
gem.version = DigitaloceanC::VERSION
|
9
9
|
gem.authors = ["scottmotte", "sergiocampama"]
|
10
10
|
gem.email = ["scott@scottmotte.com", "sergiocampama@gmail.com"]
|
11
11
|
gem.description = %q{Ruby bindings for the Digital Ocean API.}
|
@@ -1,9 +1,9 @@
|
|
1
1
|
require "faraday"
|
2
2
|
require "faraday_middleware"
|
3
3
|
require "recursive-open-struct"
|
4
|
-
require "
|
4
|
+
require "digitalocean_c/version"
|
5
5
|
|
6
|
-
module
|
6
|
+
module DigitaloceanC
|
7
7
|
extend self
|
8
8
|
|
9
9
|
DEFINITIONS = {
|
@@ -74,19 +74,19 @@ module Digitalocean
|
|
74
74
|
post_query = parts[1]
|
75
75
|
|
76
76
|
singleton.send :define_method, "_#{method_name}" do |*args|
|
77
|
-
pre_query_for_method =
|
78
|
-
post_query_for_method =
|
77
|
+
pre_query_for_method = DigitaloceanC.process_standard_args_from_part(pre_query, args)
|
78
|
+
post_query_for_method = DigitaloceanC.process_hash_args_from_part(post_query, args)
|
79
79
|
|
80
80
|
[pre_query_for_method, post_query_for_method].join("?")
|
81
81
|
end
|
82
82
|
|
83
83
|
singleton.send :define_method, method_name do |*args|
|
84
|
-
|
84
|
+
DigitaloceanC.request_and_respond send("_#{method_name}", *args)
|
85
85
|
end
|
86
86
|
end
|
87
87
|
end
|
88
88
|
|
89
|
-
|
89
|
+
DigitaloceanC.const_set(resource_name, resource_class)
|
90
90
|
end
|
91
91
|
|
92
92
|
def request=(request)
|
@@ -138,7 +138,7 @@ module Digitalocean
|
|
138
138
|
end
|
139
139
|
|
140
140
|
def request_and_respond(url)
|
141
|
-
resp =
|
141
|
+
resp = DigitaloceanC.request.get url
|
142
142
|
hash = RecursiveOpenStruct.new(resp.body, :recurse_over_arrays => true)
|
143
143
|
|
144
144
|
hash
|
@@ -207,7 +207,7 @@ module Digitalocean
|
|
207
207
|
:ssl => {:verify => verify_ssl}
|
208
208
|
}
|
209
209
|
|
210
|
-
|
210
|
+
DigitaloceanC.request = ::Faraday::Connection.new(options) do |builder|
|
211
211
|
builder.use ::Faraday::Request::UrlEncoded
|
212
212
|
builder.use ::FaradayMiddleware::ParseJson
|
213
213
|
builder.use ::FaradayMiddleware::FollowRedirects
|
@@ -1,9 +1,9 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
describe "integrations" do
|
4
|
-
subject(:region) {
|
4
|
+
subject(:region) { DigitaloceanC::Region }
|
5
5
|
|
6
|
-
before {
|
6
|
+
before { DigitaloceanC.send(:setup_request!) }
|
7
7
|
|
8
8
|
it "makes a real call" do
|
9
9
|
regions = region.all
|
data/spec/digitalocean_spec.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
|
-
describe
|
3
|
+
describe DigitaloceanC do
|
4
4
|
subject(:digitalocean) { described_class }
|
5
5
|
|
6
6
|
before do
|
@@ -19,7 +19,7 @@ describe Digitalocean do
|
|
19
19
|
its(:api_key) { should eq "api_key_required" }
|
20
20
|
its(:verify_ssl) { should eq true }
|
21
21
|
|
22
|
-
it { digitalocean::VERSION.should eq "1.2.
|
22
|
+
it { digitalocean::VERSION.should eq "1.2.1" }
|
23
23
|
end
|
24
24
|
|
25
25
|
describe "setting values" do
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: digitalocean_c
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- scottmotte
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-05-
|
12
|
+
date: 2015-05-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: faraday
|
@@ -141,17 +141,17 @@ files:
|
|
141
141
|
- digitalocean-rubygem.jpg
|
142
142
|
- digitalocean_c.gemspec
|
143
143
|
- example.png
|
144
|
-
- lib/
|
145
|
-
- lib/
|
146
|
-
- spec/
|
147
|
-
- spec/
|
148
|
-
- spec/
|
149
|
-
- spec/
|
150
|
-
- spec/
|
151
|
-
- spec/
|
152
|
-
- spec/
|
153
|
-
- spec/
|
154
|
-
- spec/
|
144
|
+
- lib/digitalocean_c.rb
|
145
|
+
- lib/digitalocean_c/version.rb
|
146
|
+
- spec/digitalocean_c/domain_spec.rb
|
147
|
+
- spec/digitalocean_c/droplet_spec.rb
|
148
|
+
- spec/digitalocean_c/event_spec.rb
|
149
|
+
- spec/digitalocean_c/image_spec.rb
|
150
|
+
- spec/digitalocean_c/integration_spec.rb
|
151
|
+
- spec/digitalocean_c/record_spec.rb
|
152
|
+
- spec/digitalocean_c/region_spec.rb
|
153
|
+
- spec/digitalocean_c/size_spec.rb
|
154
|
+
- spec/digitalocean_c/ssh_key_spec.rb
|
155
155
|
- spec/digitalocean_spec.rb
|
156
156
|
- spec/spec_helper.rb
|
157
157
|
homepage: http://github.com/merqlove/digitalocean_c
|
@@ -178,14 +178,14 @@ signing_key:
|
|
178
178
|
specification_version: 4
|
179
179
|
summary: Ruby bindings for the Digital Ocean API.
|
180
180
|
test_files:
|
181
|
-
- spec/
|
182
|
-
- spec/
|
183
|
-
- spec/
|
184
|
-
- spec/
|
185
|
-
- spec/
|
186
|
-
- spec/
|
187
|
-
- spec/
|
188
|
-
- spec/
|
189
|
-
- spec/
|
181
|
+
- spec/digitalocean_c/domain_spec.rb
|
182
|
+
- spec/digitalocean_c/droplet_spec.rb
|
183
|
+
- spec/digitalocean_c/event_spec.rb
|
184
|
+
- spec/digitalocean_c/image_spec.rb
|
185
|
+
- spec/digitalocean_c/integration_spec.rb
|
186
|
+
- spec/digitalocean_c/record_spec.rb
|
187
|
+
- spec/digitalocean_c/region_spec.rb
|
188
|
+
- spec/digitalocean_c/size_spec.rb
|
189
|
+
- spec/digitalocean_c/ssh_key_spec.rb
|
190
190
|
- spec/digitalocean_spec.rb
|
191
191
|
- spec/spec_helper.rb
|
data/lib/digitalocean/version.rb
DELETED