rubeepass 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/rpass +5 -2
- data/lib/rubeepass/group.rb +1 -1
- data/lib/rubeepass/wish/cd_wish.rb +1 -1
- data/lib/rubeepass/wish/copy_wish.rb +2 -2
- data/lib/rubeepass/wish/echo_wish.rb +2 -2
- data/lib/rubeepass/wish/ls_wish.rb +1 -1
- data/lib/rubeepass/wish/show_wish.rb +2 -2
- data/lib/rubeepass.rb +0 -1
- metadata +6 -7
- data/lib/string.rb +0 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8226617f8abe2bfe0a9b92d5f650785bd68fac14
|
4
|
+
data.tar.gz: 81e0391b37f439830a284063771d5dccc6af4d04
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1922e8c6defb427f2c581ed28c20a9e51f53630e6c96b8f4554bc3e31b9db27315e440ab918017b2b0e02476840b5e424e9dd674fcad9ec71cdcbb7d1b551227
|
7
|
+
data.tar.gz: 5308e20223253ead6b627d078894765a7dbd1970ab16a67f82e5f443a579eca04796a3ed8a417c5503cdd6b60065251859d7a4a463ba5d846956f9b31b8af474
|
data/bin/rpass
CHANGED
@@ -68,6 +68,8 @@ def parse(args)
|
|
68
68
|
options["verbose"] = false
|
69
69
|
|
70
70
|
parser = OptionParser.new do |opts|
|
71
|
+
opts.summary_width = 24
|
72
|
+
|
71
73
|
opts.banner = "Usage: #{File.basename($0)} [OPTIONS] [kdbx]"
|
72
74
|
|
73
75
|
opts.on(
|
@@ -284,12 +286,13 @@ rescue RubeePass::Error => e
|
|
284
286
|
rescue Exception => e
|
285
287
|
$stderr.puts
|
286
288
|
$stderr.puts "Oops! Looks like an error has occured! If the " \
|
287
|
-
"error persists, file a bug at:"
|
289
|
+
"error persists, file a bug at:"
|
288
290
|
$stderr.puts
|
289
291
|
$stderr.puts " https://gitlab.com/mjwhitta/rubeepass/issues"
|
290
292
|
$stderr.puts
|
291
293
|
$stderr.puts "Maybe the message below will help. If not, you " \
|
292
|
-
"can use the --verbose flag to get
|
294
|
+
"can use the --verbose flag to get"
|
295
|
+
$stderr.puts "a backtrace."
|
293
296
|
|
294
297
|
$stderr.puts e.message.white.on_red
|
295
298
|
if (options["verbose"])
|
data/lib/rubeepass/group.rb
CHANGED
@@ -123,7 +123,7 @@ class RubeePass::Group
|
|
123
123
|
|
124
124
|
search = @path if (search.nil? || search.empty?)
|
125
125
|
search = @keepass.absolute_path(search, @path)
|
126
|
-
path, target = search.
|
126
|
+
path, found, target = search.rpartition("/")
|
127
127
|
|
128
128
|
new_cwd = find_group(path)
|
129
129
|
return [[], []] if (new_cwd.nil?)
|
@@ -31,7 +31,7 @@ class CopyWish < Djinni::Wish
|
|
31
31
|
cwd = djinni_env["cwd"]
|
32
32
|
|
33
33
|
path = keepass.absolute_path(path, cwd.path)
|
34
|
-
path, target = path.
|
34
|
+
path, found, target = path.rpartition("/")
|
35
35
|
new_cwd = keepass.find_group(path)
|
36
36
|
timeout = djinni_env["clipboard_timeout"]
|
37
37
|
|
@@ -97,7 +97,7 @@ class CopyWish < Djinni::Wish
|
|
97
97
|
append = "/"
|
98
98
|
append = "" if (groups.empty?)
|
99
99
|
|
100
|
-
return [completions, path.
|
100
|
+
return [completions, path.rpartition("/")[-1], append]
|
101
101
|
end
|
102
102
|
|
103
103
|
def usage
|
@@ -31,7 +31,7 @@ class EchoWish < Djinni::Wish
|
|
31
31
|
cwd = djinni_env["cwd"]
|
32
32
|
|
33
33
|
path = keepass.absolute_path(path, cwd.path)
|
34
|
-
path, target = path.
|
34
|
+
path, found, target = path.rpartition("/")
|
35
35
|
new_cwd = keepass.find_group(path)
|
36
36
|
|
37
37
|
if (new_cwd.nil? || !new_cwd.has_entry?(target))
|
@@ -87,7 +87,7 @@ class EchoWish < Djinni::Wish
|
|
87
87
|
append = "/"
|
88
88
|
append = "" if (groups.empty?)
|
89
89
|
|
90
|
-
return [completions, path.
|
90
|
+
return [completions, path.rpartition("/")[-1], append]
|
91
91
|
end
|
92
92
|
|
93
93
|
def usage
|
@@ -15,7 +15,7 @@ class ShowWish < Djinni::Wish
|
|
15
15
|
|
16
16
|
args = cwd.path if (args.empty?)
|
17
17
|
path = keepass.absolute_path(args, cwd.path)
|
18
|
-
path, target = path.
|
18
|
+
path, found, target = path.rpartition("/")
|
19
19
|
new_cwd = keepass.find_group(path)
|
20
20
|
|
21
21
|
if (new_cwd.nil?)
|
@@ -68,7 +68,7 @@ class ShowWish < Djinni::Wish
|
|
68
68
|
append = "/"
|
69
69
|
append = "" if (groups.empty?)
|
70
70
|
|
71
|
-
return [completions, input.
|
71
|
+
return [completions, input.rpartition("/")[-1], append]
|
72
72
|
end
|
73
73
|
|
74
74
|
def usage
|
data/lib/rubeepass.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubeepass
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miles Whittaker
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-03-
|
11
|
+
date: 2016-03-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|
@@ -79,7 +79,7 @@ dependencies:
|
|
79
79
|
version: '2.0'
|
80
80
|
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 2.0.
|
82
|
+
version: 2.0.1
|
83
83
|
type: :runtime
|
84
84
|
prerelease: false
|
85
85
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -89,7 +89,7 @@ dependencies:
|
|
89
89
|
version: '2.0'
|
90
90
|
- - ">="
|
91
91
|
- !ruby/object:Gem::Version
|
92
|
-
version: 2.0.
|
92
|
+
version: 2.0.1
|
93
93
|
- !ruby/object:Gem::Dependency
|
94
94
|
name: json_config
|
95
95
|
requirement: !ruby/object:Gem::Requirement
|
@@ -159,7 +159,7 @@ dependencies:
|
|
159
159
|
version: '0.1'
|
160
160
|
- - ">="
|
161
161
|
- !ruby/object:Gem::Version
|
162
|
-
version: 0.1.
|
162
|
+
version: 0.1.4
|
163
163
|
type: :runtime
|
164
164
|
prerelease: false
|
165
165
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -169,7 +169,7 @@ dependencies:
|
|
169
169
|
version: '0.1'
|
170
170
|
- - ">="
|
171
171
|
- !ruby/object:Gem::Version
|
172
|
-
version: 0.1.
|
172
|
+
version: 0.1.4
|
173
173
|
description: Ruby KeePass 2.x implementation. Currently it is read-only.
|
174
174
|
email: mjwhitta@gmail.com
|
175
175
|
executables:
|
@@ -201,7 +201,6 @@ files:
|
|
201
201
|
- lib/rubeepass/wish/ls_wish.rb
|
202
202
|
- lib/rubeepass/wish/pwd_wish.rb
|
203
203
|
- lib/rubeepass/wish/show_wish.rb
|
204
|
-
- lib/string.rb
|
205
204
|
homepage: https://mjwhitta.github.io/rubeepass
|
206
205
|
licenses:
|
207
206
|
- GPL-3.0
|
data/lib/string.rb
DELETED
@@ -1,12 +0,0 @@
|
|
1
|
-
# Modify String class to allow for rsplit and word wrap
|
2
|
-
class String
|
3
|
-
def rsplit(pattern)
|
4
|
-
ret = rpartition(pattern)
|
5
|
-
ret.delete_at(1)
|
6
|
-
return ret
|
7
|
-
end
|
8
|
-
|
9
|
-
def word_wrap(width = 80)
|
10
|
-
return scan(/\S.{0,#{width}}\S(?=\s|$)|\S+/).join("\n")
|
11
|
-
end
|
12
|
-
end
|