auth_manager 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/auth_manager/add/add.rb +10 -0
- data/lib/auth_manager/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d82e648bc36a09ed97c642107200d61274fcdcaf
|
4
|
+
data.tar.gz: 667d2179e19911d1a7912fd3e519b4e217539375
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c1905bb61805123c4fc156b81bca20d8d884341eb69210ac4d5b450bf239574520d73e879d8a27406ee4e7bffe21e6740de6c0706195ba630ff16f297c3ddd81
|
7
|
+
data.tar.gz: 10dc82a07b862085be82c8c8b17df89d3fff79b99e4ee058091816a4febaf7029f5746b89feee88332b3ecc5be02a0f3924f8259db454f44984ce14682fb9101
|
data/lib/auth_manager/add/add.rb
CHANGED
@@ -13,7 +13,17 @@ class Add < AuthManager::Validation
|
|
13
13
|
|
14
14
|
private
|
15
15
|
|
16
|
+
def available_login?(param, liste)
|
17
|
+
all = @redis.smembers(liste)
|
18
|
+
all.each do |member|
|
19
|
+
member_json = JSON.parse(member)
|
20
|
+
param_json = JSON.parse(param)
|
21
|
+
member_json['login'] == param_json['login'] ? false : true
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
16
25
|
def save_this(liste, params)
|
26
|
+
available_login?(params, liste)
|
17
27
|
@redis.sadd(liste, params)
|
18
28
|
end
|
19
29
|
|
data/lib/auth_manager/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: auth_manager
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- atacraft && fabira
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-05-
|
11
|
+
date: 2014-05-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|