credentialias-helper 0.1.0 → 0.1.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/Gemfile +1 -2
- data/lib/credentialias/helper/config.rb +4 -10
- data/lib/credentialias/helper/server.rb +3 -2
- data/lib/credentialias/helper/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: 9adaf1d0cf519e5184b988262e28f7ebae266fdc
|
|
4
|
+
data.tar.gz: d93d3a036487b6f95033c50453f985c23c947bc3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: eee55f80fd1ce68f19a80449af44e4fb76f47f36405e8293e20c191a9dbaa7faff0141d94ca730f5e93380508c25a85fc3d0b04bad25f57c8e12cd7937b3780f
|
|
7
|
+
data.tar.gz: 9f7f208f965e5eb08b72c3c06807c3315cbbaa6f856c21a040656583c546aaf38abe3c7ed8238ad864107c8094d0717bd8a40e8c1bb4dd404d8b9087f83010b1
|
data/Gemfile
CHANGED
|
@@ -4,18 +4,12 @@ module Credentialias
|
|
|
4
4
|
module Helper
|
|
5
5
|
class Config
|
|
6
6
|
API_VERSION = 1
|
|
7
|
+
ENDPOINT = "credentialias"
|
|
7
8
|
class << self
|
|
8
|
-
def config
|
|
9
|
-
{
|
|
10
|
-
"services" => {
|
|
11
|
-
"api" => [
|
|
12
|
-
"zookeeper+http:///nerve/credentialias/api#/health"
|
|
13
|
-
]
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
end
|
|
17
9
|
def configure
|
|
18
|
-
Boutons::Config.
|
|
10
|
+
table = Boutons::Config.services.instance_variable_get "@table"
|
|
11
|
+
table[Credentialias::Helper::Config::ENDPOINT.to_sym] = ["zookeeper+http:///nerve/credentialias/api#/health"]
|
|
12
|
+
Boutons::Config.services.instance_variable_set "@table", table
|
|
19
13
|
end
|
|
20
14
|
end
|
|
21
15
|
end
|
|
@@ -8,13 +8,14 @@ module Credentialias
|
|
|
8
8
|
class << self
|
|
9
9
|
def connect
|
|
10
10
|
Config.configure
|
|
11
|
-
Boutons.
|
|
11
|
+
Boutons.send Credentialias::Helper::Config::ENDPOINT
|
|
12
|
+
10.times{ get("/health").code == 200 and break rescue sleep 0.1 }
|
|
12
13
|
Unirest.default_header('X-Credentialias-API',Credentialias::Helper::Config::API_VERSION)
|
|
13
14
|
Unirest.default_header('Accept','application/json')
|
|
14
15
|
Unirest.default_header('Content-Type','application/json')
|
|
15
16
|
end
|
|
16
17
|
def backend
|
|
17
|
-
@backend ||= Boutons.
|
|
18
|
+
@backend ||= Boutons.send Credentialias::Helper::Config::ENDPOINT
|
|
18
19
|
end
|
|
19
20
|
def get path
|
|
20
21
|
Unirest.get url path
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: credentialias-helper
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Mathias Kaufmann
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-04-
|
|
11
|
+
date: 2015-04-28 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: boutons
|