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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bc76e6926c7b56ca52ca9de2d051a64f14eadc15
4
- data.tar.gz: e8b98962a206e96bf7762b54ac27e49edf454d93
3
+ metadata.gz: 9adaf1d0cf519e5184b988262e28f7ebae266fdc
4
+ data.tar.gz: d93d3a036487b6f95033c50453f985c23c947bc3
5
5
  SHA512:
6
- metadata.gz: 45003fac20653ba4be9aed56440a379b1245ca6b74d067942edc7569f4215caecb33543d4ae30cc2e4248188e90e0ba996d0c734551c707eb70d741ecbeb9718
7
- data.tar.gz: 607949450e2c1f8c6e00a02fb725f30906ccc1f486ede51f2407f35199c3a18ee49c5c19e8e5403ddbde667322cdca07ead202fd1f40473c9acc2a7dbb2024ad
6
+ metadata.gz: eee55f80fd1ce68f19a80449af44e4fb76f47f36405e8293e20c191a9dbaa7faff0141d94ca730f5e93380508c25a85fc3d0b04bad25f57c8e12cd7937b3780f
7
+ data.tar.gz: 9f7f208f965e5eb08b72c3c06807c3315cbbaa6f856c21a040656583c546aaf38abe3c7ed8238ad864107c8094d0717bd8a40e8c1bb4dd404d8b9087f83010b1
data/Gemfile CHANGED
@@ -1,5 +1,4 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in credentialias-helper.gemspec
4
- gemspec
5
- # gem "boutons", path: "/Users/steigr/Documents/Hobby/Ruby/boutons"
4
+ gemspec
@@ -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.config(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.api
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.api
18
+ @backend ||= Boutons.send Credentialias::Helper::Config::ENDPOINT
18
19
  end
19
20
  def get path
20
21
  Unirest.get url path
@@ -1,5 +1,5 @@
1
1
  module Credentialias
2
2
  module Helper
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
4
4
  end
5
5
  end
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.0
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-27 00:00:00.000000000 Z
11
+ date: 2015-04-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: boutons