auth_redis_user_connector 0.0.8 → 0.0.9

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
- SHA1:
3
- metadata.gz: c1c25b9e13f3d47048548cea8ee831b7737ebba7
4
- data.tar.gz: f7a6a82bff669848b735ad7a58ed2198992c21eb
2
+ SHA256:
3
+ metadata.gz: a7d4fbf6a0b1516f27ef4af748306c78e9445c8ff39757f666f5204e1ce9e0c4
4
+ data.tar.gz: 2f88b5fd73ab495c39b673dfccc5e14d51b5eb5fa9e8e43f780bffd77eca6a0f
5
5
  SHA512:
6
- metadata.gz: 023ae767e72ddffdecc066ce1c8dfa58f9a142fa9b9253b6671abfb966ebe4bca3d147965e1cee72b1d592ce57bf1b0991df663a5ec987f1b5c44ca9be695cd7
7
- data.tar.gz: d89c8639a3d29559af9c303746614e6b356de0a0127b0094b1739b56d3b16c8e9c1ed7c100e8f56cc5c6a6bc9cf453aa2127fe7b8eebffb852e2f1d609091a2e
6
+ metadata.gz: 6886122e12df5757e124a24b97dff0fcfd7c51227941dd9fb9490b77d50c4d2c3cd8a92aff52cebf930a75c0515cf4e3fa3dcc620e3c3df5088a7385cf17bd91
7
+ data.tar.gz: c857eeda03c916930db3214aaabca4038bfd7e76d5209b72c943b217745a8e1089b192abcb425f41fa164f397782083940923c19441b112ff4f6f900fe1b6171
@@ -4,22 +4,22 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
  require 'auth_redis_user_connector/version'
5
5
 
6
6
  Gem::Specification.new do |spec|
7
- spec.name = "auth_redis_user_connector"
7
+ spec.name = 'auth_redis_user_connector'
8
8
  spec.version = AuthRedisUserConnector::VERSION
9
- spec.authors = ["OpenTeam"]
10
- spec.email = ["developers@openteam.ru"]
9
+ spec.authors = ['OpenTeam']
10
+ spec.email = ['developers@openteam.ru']
11
11
  spec.summary = %q{Auth Redis User Connector.}
12
12
  spec.description = %q{Auth Redis User Connector.}
13
- spec.homepage = "https://github.com/openteam-com"
14
- spec.license = "MIT"
13
+ spec.homepage = 'https://github.com/openteam-com'
14
+ spec.license = 'MIT'
15
15
 
16
16
  spec.files = `git ls-files -z`.split("\x0")
17
17
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
- spec.require_paths = ["lib"]
19
+ spec.require_paths = ['lib']
20
20
 
21
- spec.add_development_dependency "bundler", "~> 1.6"
22
- spec.add_development_dependency "rake"
21
+ spec.add_development_dependency 'bundler', '>= 2.2.33'
22
+ spec.add_development_dependency 'rake'
23
23
 
24
24
  spec.add_dependency 'redis'
25
25
  spec.add_dependency 'hiredis'
@@ -1,10 +1,6 @@
1
1
  require 'redis'
2
2
 
3
3
  class RedisUserConnector
4
- def self.connect(hash)
5
- @connect = hash
6
- end
7
-
8
4
  def self.get(key)
9
5
  connection.hgetall("#{namespace}:#{key}")
10
6
  end
@@ -13,6 +9,10 @@ class RedisUserConnector
13
9
  connection.hmset("#{namespace}:#{key}", *(attrs.flatten))
14
10
  end
15
11
 
12
+ def self.clean(key, field)
13
+ connection.hdel("#{namespace}:#{key}", field)
14
+ end
15
+
16
16
  def self.pub(channel, message)
17
17
  pubsub_connection.publish(channel, message)
18
18
  end
@@ -24,9 +24,11 @@ class RedisUserConnector
24
24
  private
25
25
 
26
26
  def self.connect_options
27
- raise "#{name}: Could not establish connection" if @connect.nil? || @connect.empty?
27
+ connect_options = Settings['redis_user_connector']
28
+
29
+ raise "Error::Settings: <redis_user_connector> is undefined" if connect_options.nil? || connect_options.empty?
28
30
 
29
- @connect.merge :driver => :hiredis
31
+ connect_options.merge :driver => :hiredis
30
32
  end
31
33
 
32
34
  def self.connection
@@ -1,3 +1,3 @@
1
1
  module AuthRedisUserConnector
2
- VERSION = "0.0.8"
2
+ VERSION = '0.0.9'
3
3
  end
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: auth_redis_user_connector
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - OpenTeam
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-09 00:00:00.000000000 Z
11
+ date: 2023-10-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '1.6'
19
+ version: 2.2.33
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '1.6'
26
+ version: 2.2.33
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -101,8 +101,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
101
101
  - !ruby/object:Gem::Version
102
102
  version: '0'
103
103
  requirements: []
104
- rubyforge_project:
105
- rubygems_version: 2.2.2
104
+ rubygems_version: 3.1.2
106
105
  signing_key:
107
106
  specification_version: 4
108
107
  summary: Auth Redis User Connector.