droplet_kit 3.0.0 → 3.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/droplet_kit/client.rb +3 -2
- data/lib/droplet_kit/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 1944c1540b19d56a895786ab498a1811b6f0acab6bb9c136a8366f897b7f1420
|
4
|
+
data.tar.gz: 131f51d35309d532579f839baedb67be191ab6d4e66dedc646eb8cffa4454f46
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 43572d65104453a129590ea4cbf27dfad83e1ea4cd60e1e0acddbe13b4e8527a2aabcad10237dd782c37f34a443d715e414a61eac0dc5a6dfca847698532e3ef
|
7
|
+
data.tar.gz: 5adef19eb548d5cc98d35be4df097a5367268df9fdd5f2009a87370a2ef434f0bedc102d11b4a1a2fc7bbba9bd7caff9844f3e00e06481710c5a39e8ee498f27
|
data/lib/droplet_kit/client.rb
CHANGED
@@ -6,10 +6,11 @@ module DropletKit
|
|
6
6
|
DEFAULT_TIMEOUT = 120
|
7
7
|
DIGITALOCEAN_API = 'https://api.digitalocean.com'
|
8
8
|
|
9
|
-
attr_reader :access_token, :
|
9
|
+
attr_reader :access_token, :api_url, :open_timeout, :timeout, :user_agent
|
10
10
|
|
11
11
|
def initialize(options = {})
|
12
12
|
@access_token = options.with_indifferent_access[:access_token]
|
13
|
+
@api_url = options.with_indifferent_access[:api_url] || DIGITALOCEAN_API
|
13
14
|
@open_timeout = options.with_indifferent_access[:open_timeout] || DEFAULT_OPEN_TIMEOUT
|
14
15
|
@timeout = options.with_indifferent_access[:timeout] || DEFAULT_TIMEOUT
|
15
16
|
@user_agent = options.with_indifferent_access[:user_agent]
|
@@ -74,7 +75,7 @@ module DropletKit
|
|
74
75
|
|
75
76
|
def connection_options
|
76
77
|
{
|
77
|
-
url:
|
78
|
+
url: @api_url,
|
78
79
|
headers: {
|
79
80
|
content_type: 'application/json',
|
80
81
|
authorization: "Bearer #{access_token}",
|
data/lib/droplet_kit/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: droplet_kit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robert Ross
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-06-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: virtus
|
@@ -314,8 +314,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
314
314
|
- !ruby/object:Gem::Version
|
315
315
|
version: '0'
|
316
316
|
requirements: []
|
317
|
-
|
318
|
-
rubygems_version: 2.6.14
|
317
|
+
rubygems_version: 3.0.3
|
319
318
|
signing_key:
|
320
319
|
specification_version: 4
|
321
320
|
summary: Droplet Kit is the official Ruby library for DigitalOcean's API
|