boutons 0.3.4 → 0.3.5

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: 52917fc17337ec8cdcdf640306bf5caa41699bcb
4
- data.tar.gz: eeb9181f70128ac69d0bb0e487b6a11e739ffc93
3
+ metadata.gz: 395a488c36000d58f046a462efd3c3f99e948c38
4
+ data.tar.gz: eed04265d3dce468adacfaa3689e8890d93305e4
5
5
  SHA512:
6
- metadata.gz: ef20f8f02bdd568d243ae458df9ec474fce0e486fa19c6fb108dbf0a8834a2f58d0654b2e4ef77fdea4fff3ca3714af889456a8bb46a367aa40f1a37a537f2ad
7
- data.tar.gz: ea4335d516ec2e5cb4ef34d7f96ff6cd8605df7b0b657ec976bd29881446a53d7ebb3d0d2f982769e5efe7e1505d07ee58514c88610eccb0336beaf46fdff5d5
6
+ metadata.gz: 5ad7ce5ff7eeee4004a73fbd9f2283d13f05383cd94980af99ed70a27e929ac31b4b255205130727f84253e9d408fdfbeb9bb039219eb104db4d3eac181b9131
7
+ data.tar.gz: 6f7d5c886d71329a31e353742d3288273f2dae1bac14b8aca8e385c05b62045e8d86dbeed12e774b598e8c9716caa9bed6be7d8122d9cfd4e8a9a777be5c279c
@@ -11,12 +11,12 @@ module Boutons
11
11
  @uri.scheme
12
12
  end
13
13
  def zk_hosts
14
- Boutons::Config.registry.send(service).hosts
14
+ Config.registry.send(service).hosts
15
15
  end
16
16
  def zk
17
17
  begin
18
18
  # return existing, working zookeeper connection
19
- Boutons::Resource.zk
19
+ Resource.zk
20
20
  rescue
21
21
  queue = Queue.new
22
22
  threads = []
@@ -28,16 +28,16 @@ module Boutons
28
28
  end
29
29
  host,zk = queue.pop
30
30
  # set first working host as host arrays
31
- Boutons::Config.registry.zookeeper.hosts = [host]
31
+ Config.registry.zookeeper.hosts = [host]
32
32
  # register connection
33
- Boutons::Resource.add :zk, zk
33
+ Resource.add :zk, zk
34
34
  # Add later connections if there are any
35
35
  Thread.new do
36
36
  threads.each{|t|t.join}
37
37
  host,zk = queue.pop
38
38
  begin
39
39
  zk.ping?
40
- Boutons::Config.registry.zookeeper.hosts << host
40
+ Config.registry.zookeeper.hosts << host
41
41
  rescue Zookeeper::Exceptions::ContinuationTimeoutError
42
42
  nil
43
43
  end
@@ -51,8 +51,8 @@ module Boutons
51
51
  paths << "nerve"
52
52
  paths += @uri.path.split("/")[1..-1].join("/#{@uri.host}/").split("/")
53
53
  paths << "services"
54
- paths.inject([Pathname.new("/")]) do |paths,dir|
55
- paths << paths.last.join(dir)
54
+ paths.inject([Pathname.new("/")]) do |path,dir|
55
+ path << path.last.join(dir)
56
56
  end.map{|p|p.to_s}.reverse.each do |path|
57
57
  return @zk_path = path unless zk.children(path).empty?
58
58
  end
@@ -1,3 +1,3 @@
1
1
  module Boutons
2
- VERSION = "0.3.4"
2
+ VERSION = "0.3.5"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: boutons
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.4
4
+ version: 0.3.5
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-24 00:00:00.000000000 Z
11
+ date: 2015-04-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: synapse