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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e6c3096bfdfeb9445c63ceec07cbdfa922f12bb5
4
- data.tar.gz: abd97c6f20d52b0400e6f9bc5c4c79f4bbe0febe
3
+ metadata.gz: d8fbce6d1fcddfb3722b441b11bc6b500089c991
4
+ data.tar.gz: 05692f2918f98a56bed99a21e8c671d35ea256dc
5
5
  SHA512:
6
- metadata.gz: da931e7f22cac224bd4ef1cdeae20b6d57c640713a5c1f0ffff9f01fc21872e1ff6b1464b641d9ea04e80c2d065c75359b9ad9b7cac78c5acf835a3d8db00ec4
7
- data.tar.gz: 42ce86462837e8dfbfcc75b0141bdc3bb68f1cda393798401066f5db57d6894895a01a53f793615c75ca707275a6415ef0a75084a1115a9a7fe4a3691495e217
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
- password = mkpasswd
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
@@ -1,3 +1,3 @@
1
1
  module Gratan
2
- VERSION = '0.2.0'
2
+ VERSION = '0.2.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gratan
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Genki Sugawara