gratan 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/gratan/identifier/auto.rb +9 -1
- data/lib/gratan/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d8fbce6d1fcddfb3722b441b11bc6b500089c991
|
4
|
+
data.tar.gz: 05692f2918f98a56bed99a21e8c671d35ea256dc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1032b20e24aa7b4b7013c59030c1ccab35b5cc85797c72d12638b3b6adf0d03af4255f1dc8b86715347d1151efd98212daa3cf95f248277b8b4774ccc29998ac
|
7
|
+
data.tar.gz: 45e14af6d95c94753faf7c976e42176cb4ede9ff948d35383ad1edbedf8c6d718c28b085e5ef3f079846531a86218d5edeb6d4ebfeeb51bef37654027fcd0886
|
@@ -9,10 +9,18 @@ class Gratan::Identifier::Auto
|
|
9
9
|
@output = open(output, 'w')
|
10
10
|
end
|
11
11
|
end
|
12
|
+
|
13
|
+
@cache = {}
|
12
14
|
end
|
13
15
|
|
14
16
|
def identify(user, host)
|
15
|
-
|
17
|
+
if @cache[user]
|
18
|
+
password = @cache[user]
|
19
|
+
else
|
20
|
+
password = mkpasswd
|
21
|
+
@cache[user] = password
|
22
|
+
end
|
23
|
+
|
16
24
|
puts_password(user, host, password)
|
17
25
|
password
|
18
26
|
end
|
data/lib/gratan/version.rb
CHANGED