ddr-aux-client 1.2.1 → 1.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ddr_aux/client.rb +11 -3
- data/lib/ddr_aux/client/error.rb +5 -0
- data/lib/ddr_aux/client/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: df0b505ed591aba66b185f603dd49802a9109f8a
|
4
|
+
data.tar.gz: 8ed7539ccbdba414b4a59790a47155d15267021d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1cb50e45ae496026af9a8d2a655a0441f2dcad88ac6377a6beb03adc4fa9c2e51bd5a8f3f4496a2641028a2580cc46aa5f542cc33901354229223b073fe9fb70
|
7
|
+
data.tar.gz: 664f9ef20137fdd2da3b4f50f5f2a01bcc9125493dfed7c88489d4a82b20e982f9c71a9118e9b06761a028613df00953ec9a998a0337dfc5a4cf44bb30dce91d
|
data/lib/ddr_aux/client.rb
CHANGED
@@ -2,9 +2,11 @@ require "ddr_aux/client/version"
|
|
2
2
|
|
3
3
|
module DdrAux
|
4
4
|
module Client
|
5
|
+
|
5
6
|
autoload :AdminSet, "ddr_aux/client/admin_set"
|
6
7
|
autoload :Api, "ddr_aux/client/api"
|
7
8
|
autoload :Connection, "ddr_aux/client/connection"
|
9
|
+
autoload :Error, "ddr_aux/client/error"
|
8
10
|
autoload :License, "ddr_aux/client/license"
|
9
11
|
autoload :Model, "ddr_aux/client/model"
|
10
12
|
autoload :Request, "ddr_aux/client/request"
|
@@ -13,12 +15,18 @@ module DdrAux
|
|
13
15
|
class << self
|
14
16
|
attr_accessor :api_url
|
15
17
|
|
18
|
+
def url
|
19
|
+
api_url || ENV["DDR_AUX_API_URL"] || error("DdrAux::Client API URL is not configured.")
|
20
|
+
end
|
21
|
+
|
16
22
|
def uri
|
17
|
-
URI(
|
23
|
+
URI(url)
|
18
24
|
end
|
19
|
-
end
|
20
25
|
|
21
|
-
|
26
|
+
def error(message)
|
27
|
+
raise Error, message
|
28
|
+
end
|
29
|
+
end
|
22
30
|
|
23
31
|
extend Api
|
24
32
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ddr-aux-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Chandek-Stark
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-10-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: hashie
|
@@ -101,6 +101,7 @@ files:
|
|
101
101
|
- lib/ddr_aux/client/admin_set.rb
|
102
102
|
- lib/ddr_aux/client/api.rb
|
103
103
|
- lib/ddr_aux/client/connection.rb
|
104
|
+
- lib/ddr_aux/client/error.rb
|
104
105
|
- lib/ddr_aux/client/license.rb
|
105
106
|
- lib/ddr_aux/client/model.rb
|
106
107
|
- lib/ddr_aux/client/request.rb
|