watership 0.9.0pre → 0.9.0pre2

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: af4e4c123875a9ec4bed6e1245ceb48024df628e
4
- data.tar.gz: 8730ce20f09f1fe7ffdd4045af210e90622c9814
3
+ metadata.gz: ab2aa84c3b1fc75f0d40c4dbc584a62f77d15dcd
4
+ data.tar.gz: e470d7772c919cb3e9cc66471e1508af63da9816
5
5
  SHA512:
6
- metadata.gz: cac3ffbf712948c61604af1bf4dd1d4941d9bc9e08fac2f59dd550a3a20f36f6aaf24accff0a749b14790468cb8c3bb30cbeea7e56314d023ee2d7d9b093d2d9
7
- data.tar.gz: 0ed76325b78f98ac060695eefebf6720bd589f55990c738566390e2a42154a7b4fea060325f2e1322d08343aa616c7c2a7aeacc536a06a0e8562506060187984
6
+ metadata.gz: 4b312c70595fca078dd5d642be1f81dd4cd978ddedad51bf2627208939a2ae04f8964beb1f74201874925676ce1e3f63d1d98deaf6a2b0d08d2bcba18ab009c2
7
+ data.tar.gz: c4f84bac066267b2d55343e0500628825e557298ddf95f38717e57561027ae857e3478a9f214eef9e3330b8b0ce0a9294a5c50cc9008beeffe61c4e54dfad910
@@ -1,3 +1,3 @@
1
1
  module Watership
2
- VERSION = '0.9.0pre'
2
+ VERSION = '0.9.0pre2'
3
3
  end
data/lib/watership.rb CHANGED
@@ -38,6 +38,16 @@ module Watership
38
38
  end
39
39
  end
40
40
 
41
+ def self.close(name)
42
+ if name == :all
43
+ registered.each do |(name, client)|
44
+ client.close
45
+ end
46
+ else
47
+ registered.fetch(name).close
48
+ end
49
+ end
50
+
41
51
  def self.logger=(logger)
42
52
  @logger = logger
43
53
  end
@@ -92,9 +102,13 @@ module Watership
92
102
  Thread.current[:"watership_#{self.object_id}"] ||= {}
93
103
  end
94
104
 
95
- def reconnect
105
+ def close
96
106
  clear_channel
97
107
  clear_connection
108
+ end
109
+
110
+ def reconnect
111
+ close
98
112
  create_channel
99
113
  true
100
114
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: watership
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0pre
4
+ version: 0.9.0pre2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Scofield
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-31 00:00:00.000000000 Z
11
+ date: 2014-11-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler