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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e3e847132211d478205539daf3e99dc8408054f1
4
- data.tar.gz: f0a4a336c316286b47012f6764734b4cea34812c
3
+ metadata.gz: df0b505ed591aba66b185f603dd49802a9109f8a
4
+ data.tar.gz: 8ed7539ccbdba414b4a59790a47155d15267021d
5
5
  SHA512:
6
- metadata.gz: 413565a36b41732ee23486db582eeb753f4b8caefc0b418df8aac77aeab1e68902540251ef752a5e206add6bcff7f570e76d80a13c4448b982e1accb696efda0
7
- data.tar.gz: 9096cef34d900ff18263dcf4a7ea9f658f30c0cbff9be598f90fa66be351593a082ed88cb734ff1ecee09f718460e5cb45eafc74f4e49ea6c58781c330172b7a
6
+ metadata.gz: 1cb50e45ae496026af9a8d2a655a0441f2dcad88ac6377a6beb03adc4fa9c2e51bd5a8f3f4496a2641028a2580cc46aa5f542cc33901354229223b073fe9fb70
7
+ data.tar.gz: 664f9ef20137fdd2da3b4f50f5f2a01bcc9125493dfed7c88489d4a82b20e982f9c71a9118e9b06761a028613df00953ec9a998a0337dfc5a4cf44bb30dce91d
@@ -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(api_url)
23
+ URI(url)
18
24
  end
19
- end
20
25
 
21
- self.api_url = ENV["DDR_AUX_API_URL"]
26
+ def error(message)
27
+ raise Error, message
28
+ end
29
+ end
22
30
 
23
31
  extend Api
24
32
  end
@@ -0,0 +1,5 @@
1
+ module DdrAux::Client
2
+ class Error < ::StandardError
3
+
4
+ end
5
+ end
@@ -1,5 +1,5 @@
1
1
  module DdrAux
2
2
  module Client
3
- VERSION = "1.2.1"
3
+ VERSION = "1.2.2"
4
4
  end
5
5
  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.1
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-09-18 00:00:00.000000000 Z
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