yak 1.0.5 → 1.0.6.pre
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/yak.rb +12 -7
- metadata +13 -38
data/lib/yak.rb
CHANGED
@@ -29,7 +29,7 @@ require 'session'
|
|
29
29
|
class Yak
|
30
30
|
|
31
31
|
# Version of Yak.
|
32
|
-
VERSION = "1.0.
|
32
|
+
VERSION = "1.0.6.pre"
|
33
33
|
|
34
34
|
# Default config used.
|
35
35
|
DEFAULT_CONFIG = {:session => 30, :bash_completion => true}
|
@@ -44,6 +44,8 @@ class Yak
|
|
44
44
|
# ...
|
45
45
|
|
46
46
|
def self.run argv=ARGV
|
47
|
+
trap("INT") { exit 1 }
|
48
|
+
|
47
49
|
user = `whoami`.chomp
|
48
50
|
|
49
51
|
check_user_setup user
|
@@ -100,10 +102,14 @@ class Yak
|
|
100
102
|
"../script/yak_completion"
|
101
103
|
completion_file = File.expand_path completion_file
|
102
104
|
|
103
|
-
|
104
|
-
|
105
|
+
sudo = "sudo" unless RUBY_PLATFORM =~ /cygwin/
|
106
|
+
success =
|
107
|
+
`#{sudo} cp #{completion_file} #{completion_dir}/. && echo 'true'`.chomp
|
108
|
+
|
109
|
+
if success == "true"
|
110
|
+
$stdout << "\nCopied yak_completion to #{completion_dir}\n\n"
|
105
111
|
else
|
106
|
-
$stderr << "\nError: Could not
|
112
|
+
$stderr << "\nError: Could not copy yak_completion #{completion_dir}\n"
|
107
113
|
$stderr << "If you would like to use yak's bash completion, "
|
108
114
|
$stderr << "make sure to source #{completion_file} in .bashrc\n\n"
|
109
115
|
end
|
@@ -229,7 +235,7 @@ class Yak
|
|
229
235
|
def self.send_to_clipboard string
|
230
236
|
copy_cmd = case RUBY_PLATFORM
|
231
237
|
when /darwin/ then "pbcopy"
|
232
|
-
when /linux/ then "xclip"
|
238
|
+
when /linux/ then "xclip -selection clipboard"
|
233
239
|
when /cygwin/ then "putclip"
|
234
240
|
else
|
235
241
|
$stderr << "No clipboad cmd for platform #{RUBY_PLATFORM}\n"
|
@@ -432,8 +438,7 @@ Retrieved passwords get copied to the clipboard by default.
|
|
432
438
|
# Get the SHA-encrypted password used for encoding data.
|
433
439
|
|
434
440
|
def sha_password
|
435
|
-
|
436
|
-
@password ||= get_password
|
441
|
+
@password ||= data_file_exists? ? get_password : new_password
|
437
442
|
end
|
438
443
|
|
439
444
|
|
metadata
CHANGED
@@ -1,12 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yak
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
prerelease:
|
4
|
+
prerelease: true
|
5
5
|
segments:
|
6
6
|
- 1
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
|
8
|
+
- 6
|
9
|
+
- pre
|
10
|
+
version: 1.0.6.pre
|
10
11
|
platform: ruby
|
11
12
|
authors:
|
12
13
|
- Jeremie Castagna
|
@@ -14,7 +15,7 @@ autorequire:
|
|
14
15
|
bindir: bin
|
15
16
|
cert_chain: []
|
16
17
|
|
17
|
-
date: 2010-02-
|
18
|
+
date: 2010-02-24 00:00:00 -08:00
|
18
19
|
default_executable:
|
19
20
|
dependencies:
|
20
21
|
- !ruby/object:Gem::Dependency
|
@@ -46,7 +47,7 @@ dependencies:
|
|
46
47
|
type: :runtime
|
47
48
|
version_requirements: *id002
|
48
49
|
- !ruby/object:Gem::Dependency
|
49
|
-
name:
|
50
|
+
name: hoe
|
50
51
|
prerelease: false
|
51
52
|
requirement: &id003 !ruby/object:Gem::Requirement
|
52
53
|
requirements:
|
@@ -54,39 +55,11 @@ dependencies:
|
|
54
55
|
- !ruby/object:Gem::Version
|
55
56
|
segments:
|
56
57
|
- 2
|
57
|
-
- 0
|
58
58
|
- 3
|
59
|
-
|
59
|
+
- 3
|
60
|
+
version: 2.3.3
|
60
61
|
type: :development
|
61
62
|
version_requirements: *id003
|
62
|
-
- !ruby/object:Gem::Dependency
|
63
|
-
name: gemcutter
|
64
|
-
prerelease: false
|
65
|
-
requirement: &id004 !ruby/object:Gem::Requirement
|
66
|
-
requirements:
|
67
|
-
- - ">="
|
68
|
-
- !ruby/object:Gem::Version
|
69
|
-
segments:
|
70
|
-
- 0
|
71
|
-
- 4
|
72
|
-
- 1
|
73
|
-
version: 0.4.1
|
74
|
-
type: :development
|
75
|
-
version_requirements: *id004
|
76
|
-
- !ruby/object:Gem::Dependency
|
77
|
-
name: hoe
|
78
|
-
prerelease: false
|
79
|
-
requirement: &id005 !ruby/object:Gem::Requirement
|
80
|
-
requirements:
|
81
|
-
- - ">="
|
82
|
-
- !ruby/object:Gem::Version
|
83
|
-
segments:
|
84
|
-
- 2
|
85
|
-
- 5
|
86
|
-
- 0
|
87
|
-
version: 2.5.0
|
88
|
-
type: :development
|
89
|
-
version_requirements: *id005
|
90
63
|
description: |-
|
91
64
|
Yak is a simple command line app to store and retrieve passwords securely
|
92
65
|
under a master password, and allows one password repository per system user.
|
@@ -128,11 +101,13 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
128
101
|
version: "0"
|
129
102
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
130
103
|
requirements:
|
131
|
-
- - "
|
104
|
+
- - ">"
|
132
105
|
- !ruby/object:Gem::Version
|
133
106
|
segments:
|
134
|
-
-
|
135
|
-
|
107
|
+
- 1
|
108
|
+
- 3
|
109
|
+
- 1
|
110
|
+
version: 1.3.1
|
136
111
|
requirements: []
|
137
112
|
|
138
113
|
rubyforge_project: yak
|