auth_redis_user_connector 0.0.5 → 0.0.6

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: d5bbda805648f419b5770145daaedca819fda5d7
4
- data.tar.gz: 7e5adf43cc49ec45afee6fa3b29f7863330230c4
3
+ metadata.gz: 2cabdfdf2d64aeaf17890626b9458884e45b297f
4
+ data.tar.gz: 2bd53589ad2789ef35e0ca3e2dcf0623011bd411
5
5
  SHA512:
6
- metadata.gz: 98f4ec1c22085508424e3a1ba3f6ec50b98cf36ddec2b5f17a00c282efc7ef4693d0b6c80f96ed5265c9fcd29922172c0547181d6a6c9bf620dc461f088190b0
7
- data.tar.gz: e4eef0a25773e6faa3acf949bea33b50f506db60c4a96ff3e841eee599cf9f4ac40f49a81cb4c7c5f90505cdb029513c17b30e462be42d5f47b2715ef07b0f39
6
+ metadata.gz: 1af14c9f2f14db2454bce3f5ce488286e701bb3a419f29763eecd7ab29699e1991e99610775ae9422a33fe402ee1def0228f6fa576c8a2370a56d1a1efee78c7
7
+ data.tar.gz: 14c45100410610b287e913bfc100a9f36d2dee20b081a9b4997615bb619bb02068ca1f04ad860b5dfc8be1505580573d11955d6a611bdf1963815be2935fd879
@@ -13,6 +13,14 @@ class RedisUserConnector
13
13
  connection.hmset("#{namespace}:#{key}", *(attrs.flatten))
14
14
  end
15
15
 
16
+ def self.pub(channel, message)
17
+ connection.publish(channel, message)
18
+ end
19
+
20
+ def self.sub(channel, &block)
21
+ connection.subscribe(channel, &block)
22
+ end
23
+
16
24
  private
17
25
 
18
26
  def self.connect_options
@@ -0,0 +1,13 @@
1
+ module AuthRedisUserConnector
2
+ class UserNotFound < StandardError
3
+ attr_accessor :id
4
+
5
+ def initialize(id)
6
+ @id = id
7
+ end
8
+
9
+ def message
10
+ "#{self.class.name}: User with #@id not found"
11
+ end
12
+ end
13
+ end
@@ -1,3 +1,3 @@
1
1
  module AuthRedisUserConnector
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: auth_redis_user_connector
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - OpenTeam
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-18 00:00:00.000000000 Z
11
+ date: 2014-09-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -81,6 +81,7 @@ files:
81
81
  - auth_redis_user_connector.gemspec
82
82
  - lib/auth_redis_user_connector.rb
83
83
  - lib/auth_redis_user_connector/redis_user_connector.rb
84
+ - lib/auth_redis_user_connector/user_not_found_error.rb
84
85
  - lib/auth_redis_user_connector/version.rb
85
86
  homepage: https://github.com/openteam-com
86
87
  licenses: