shhh 1.6.4 → 1.6.5

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: d631ceb60ef17845e368b02a7e945245bc547f9f
4
- data.tar.gz: e34a0ab7746f04d9ffb3da3469248a242fcb5a40
3
+ metadata.gz: f0dbd7d3e5bcbeafe77c1b0c1bc9b65a43cd1e5e
4
+ data.tar.gz: 0826054665ac7542bf8fb8db7c2c6266e04723e1
5
5
  SHA512:
6
- metadata.gz: 423a1b4c83204f67d41261b628b29965c1f102f3e542c2ffb5e00e4235073c87471d7c4ed44e6e8608f88bb38c4ec03686abae647303c39508d48d0b8f5705d8
7
- data.tar.gz: 46e5e760fad9a81312614d53bd6cdae611463ee2e9b7c334f2f1f8a8c9db521ee8f8c9d3a4dbf018499fd6ef812f56e8adc23f2dbce7a9aafdb9cabe39b2f853
6
+ metadata.gz: f726a8afd274a478fd3c439a5758c810db1ca28aeef380d9961ee670a822284f72b7b836c5e0b743a9be83f871d3c281f276e71157f8b0ec636f30dd00bd34cc
7
+ data.tar.gz: 417a3995ac55bc82a00d3398d37be3202c85a41c19dfcffbf5c3801c094db74e02a09bc3052f8a9f293371e23d2abae24f5b3729e2cc47e00eef05f068427364
@@ -1,27 +1,32 @@
1
1
  require 'coin'
2
2
  require 'digest'
3
3
  require 'singleton'
4
- # # configure the URI that the DRb server runs on (defaults to druby://localhost:PORT)
5
-
6
4
 
7
5
  module Shhh
8
6
  module App
7
+ #
8
+ # +Cache+ looks like a hash, but is a singleton, and provides
9
+ # access to the shared across processes Cache.
10
+ #
11
+ # The current implementation is based on DRb, which creates a
12
+ # server process that then manages the data structure.
13
+ #
9
14
  class Cache
10
-
11
15
  include Singleton
12
16
 
13
17
  class << self
18
+ def cache
19
+ self.instance
20
+ end
21
+
14
22
  def configure
23
+ # configure the URI that the DRb server runs on
15
24
  Coin.uri = 'druby://127.0.0.1:24924'
16
25
  end
17
26
  end
18
27
 
19
28
  self.configure
20
29
 
21
- def md5(string)
22
- Digest::MD5.base64digest(string)
23
- end
24
-
25
30
  def [] (key)
26
31
  Coin.read(md5(key))
27
32
  end
@@ -29,6 +34,13 @@ module Shhh
29
34
  def []=(key, value)
30
35
  Coin.write(md5(key), value)
31
36
  end
37
+
38
+ private
39
+
40
+ def md5(string)
41
+ Digest::MD5.base64digest(string)
42
+ end
43
+
32
44
  end
33
45
  end
34
46
  end
@@ -1,3 +1,5 @@
1
+ require 'shhh/app/short_name'
2
+ require 'shhh/app/commands'
1
3
  require 'active_support/inflector'
2
4
  module Shhh
3
5
  module App
data/lib/shhh/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Shhh
2
- VERSION = '1.6.4'
2
+ VERSION = '1.6.5'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shhh
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.4
4
+ version: 1.6.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Konstantin Gredeskoul
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-08-23 00:00:00.000000000 Z
11
+ date: 2016-09-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: require_dir