ovh-api 1.0.1 → 1.0.2
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/lib/ovh-api/client.rb +4 -6
- data/lib/ovh-api/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 09ec251cfc3845c59d2ea805bb682de1cdf83d77
|
|
4
|
+
data.tar.gz: d1e8e9dd24eb817ddc6e0f99ef3e45b2b51f6954
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 39c4251f6441ff93d57924ee7c304dccff403d44fb9b4e342565650d87b850521d272395cda0ad5399f42ae8ec848ee3fe3774766254b8663e0b7be914cc9310
|
|
7
|
+
data.tar.gz: 75312cf3524eb10c3cf4b34769aa8349ffc77ef26aca224ac8f8a9bc23f709e6f5baa45c4104ccecd8a54f2a65bf3b75dcf8a78c5f353c5061a1d0a9de296636
|
data/lib/ovh-api/client.rb
CHANGED
|
@@ -14,20 +14,18 @@ module OVHApi
|
|
|
14
14
|
|
|
15
15
|
def initialize(application_key: nil, application_secret: nil, consumer_key: nil)
|
|
16
16
|
begin
|
|
17
|
-
conf = YAML.load_file('config/ovh-api.yml')
|
|
17
|
+
conf = YAML.load_file('./config/ovh-api.yml')
|
|
18
18
|
@application_key = application_key || conf['application_key']
|
|
19
19
|
@application_secret = application_secret || conf['application_secret']
|
|
20
20
|
@consumer_key = consumer_key || conf['consumer_key']
|
|
21
21
|
rescue SystemCallError
|
|
22
|
+
@application_key = application_key
|
|
23
|
+
@application_secret = application_secret
|
|
24
|
+
@consumer_key = consumer_key
|
|
22
25
|
end
|
|
23
26
|
|
|
24
|
-
@application_key = application_key
|
|
25
|
-
@application_secret = application_secret
|
|
26
|
-
@consumer_key = consumer_key
|
|
27
|
-
|
|
28
27
|
raise OVHApiNotConfiguredError.new(
|
|
29
28
|
"Either instantiate Client.new with application_key and application_secret, or create a YAML file in config/ovh-api.yml with those values set") if @application_key.nil? || @application_secret.nil?
|
|
30
|
-
|
|
31
29
|
end
|
|
32
30
|
|
|
33
31
|
# Request a consumer key
|
data/lib/ovh-api/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ovh-api
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Roland Laurès
|
|
@@ -10,7 +10,7 @@ authors:
|
|
|
10
10
|
autorequire:
|
|
11
11
|
bindir: bin
|
|
12
12
|
cert_chain: []
|
|
13
|
-
date: 2017-10-
|
|
13
|
+
date: 2017-10-17 00:00:00.000000000 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: cucumber
|