humpass 0.2.3 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/exe/humpass +11 -1
- data/lib/humpass.rb +7 -2
- data/lib/humpass/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: 8943546f925cbf21e0616e9476c37151ab791272
|
4
|
+
data.tar.gz: bb7f50fe7dfbe2748fa2715428c588cd17b8bd6b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9a5d0c5f6495fd70fd9b8e650cd46abe55b7953a317e275b2d0152a96cec81d1da24cf6ccdc06f1394016f98ac40565ad2e010f2c89c9f7dab95a50583a8de46
|
7
|
+
data.tar.gz: ec9f34aeaa0a7ba0d8cd37e3c1bb4ee59f0d34ea32ff48374236a72cc57d0f2b58dc265dbdb91015041cb6d16e13bfd08d507e56cb534464a54cc1cff05d120b
|
data/exe/humpass
CHANGED
@@ -17,10 +17,15 @@ OptionParser.new do |opts|
|
|
17
17
|
options[:database_path] = path
|
18
18
|
end
|
19
19
|
|
20
|
-
opts.on("-c","--createpass [PLACE]", "Generates a password for a place") do |place|
|
20
|
+
opts.on("-c","--createpass [PLACE]", "Generates a random password for a place") do |place|
|
21
21
|
options[:place] = place
|
22
22
|
end
|
23
23
|
|
24
|
+
opts.on("-s","--setpass [PLACE,PASSWORD]", Array, "Generates a random password for a place") do |place, pass|
|
25
|
+
options[:set_place] = place
|
26
|
+
options[:set_pass] = pass
|
27
|
+
end
|
28
|
+
|
24
29
|
opts.on("-g","--getepass [PLACE]", "Gets password from place") do |place|
|
25
30
|
options[:get_pass] = place
|
26
31
|
end
|
@@ -53,6 +58,11 @@ if options.has_key?(:place)
|
|
53
58
|
print "#{options[:place]}: #{Humpass.generate_password(options[:place])}\n"
|
54
59
|
end
|
55
60
|
|
61
|
+
if options.has_key?(:set_place)
|
62
|
+
Clipboard.copy(Humpass.set_password(options[:set_place], options[:set_pass]))
|
63
|
+
print "Password for #{options[:set_place]} is in clipboard.\n"
|
64
|
+
end
|
65
|
+
|
56
66
|
if options.has_key?(:get_pass)
|
57
67
|
password = Humpass.get_password(options[:get_pass])
|
58
68
|
if password.class.eql?(NilClass)
|
data/lib/humpass.rb
CHANGED
@@ -16,6 +16,11 @@ module Humpass
|
|
16
16
|
password
|
17
17
|
end
|
18
18
|
|
19
|
+
def self.set_password(place, password)
|
20
|
+
Humpass.data_structure.add_password(place, password)
|
21
|
+
password
|
22
|
+
end
|
23
|
+
|
19
24
|
def self.get_password(place)
|
20
25
|
Humpass.data_structure.get_password(place)
|
21
26
|
end
|
@@ -30,6 +35,6 @@ module Humpass
|
|
30
35
|
end
|
31
36
|
|
32
37
|
# Humpass.configure do |config|
|
33
|
-
# config.master_password = '
|
34
|
-
# config.database_path = '
|
38
|
+
# config.master_password = 'Takalinda1985'
|
39
|
+
# config.database_path = '~/Google\ Drive/humpass.dat'
|
35
40
|
# end
|
data/lib/humpass/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: humpass
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gabriel Hamdan
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-12-
|
11
|
+
date: 2017-12-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|