rubeepass 0.4.1 → 0.4.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 +1 -1
- data/lib/rubeepass/entry.rb +1 -0
- data/lib/rubeepass/group.rb +1 -1
- data/lib/rubeepass/wish/cd_wish.rb +1 -1
- data/lib/rubeepass/wish/copy_wish.rb +6 -1
- data/lib/rubeepass/wish/echo_wish.rb +1 -1
- data/lib/rubeepass/wish/ls_wish.rb +1 -1
- data/lib/rubeepass/wish/show_all_wish.rb +1 -1
- data/lib/rubeepass/wish/show_wish.rb +1 -1
- data/lib/rubeepass.rb +3 -0
- data/lib/string.rb +2 -38
- metadata +22 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4c9173d805e33e51cc75649bf98888fe43d1ddf6
|
4
|
+
data.tar.gz: cf33596494c2237f9d155b0b3b19695159e04e66
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e17d97fee36dec9b46bb7cee8012ceab4cad86f1efab7e5f391597d4b057d4d99bd218a4ff5683474aaba78af0a915f9f3b5ed589bcd424a5cb7c897763fff18
|
7
|
+
data.tar.gz: ce56faf8900c3425e55fd480966ee5e39a73fc886eda135156a54c52e2e9f8e08726dd84f695755e911a0aa96fc75f8feff2bb7d83d05f2f5328bd50a98fb951
|
data/bin/rpass
CHANGED
data/lib/rubeepass/entry.rb
CHANGED
data/lib/rubeepass/group.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
+
require "colorize"
|
1
2
|
require "djinni"
|
2
|
-
require "string"
|
3
3
|
|
4
4
|
class CopyWish < Djinni::Wish
|
5
5
|
def aliases
|
@@ -22,6 +22,11 @@ class CopyWish < Djinni::Wish
|
|
22
22
|
return
|
23
23
|
end
|
24
24
|
|
25
|
+
if (ENV["DISPLAY"].nil? || ENV["DISPLAY"].empty?)
|
26
|
+
puts "DISPLAY not set!"
|
27
|
+
return
|
28
|
+
end
|
29
|
+
|
25
30
|
keepass = djinni_env["keepass"]
|
26
31
|
cwd = djinni_env["cwd"]
|
27
32
|
args = cwd.path if (args.nil? || args.empty?)
|
data/lib/rubeepass.rb
CHANGED
@@ -5,6 +5,7 @@ require "os"
|
|
5
5
|
require "rexml/document"
|
6
6
|
require "scoobydoo"
|
7
7
|
require "shellwords"
|
8
|
+
require "string"
|
8
9
|
require "uri"
|
9
10
|
require "zlib"
|
10
11
|
|
@@ -78,6 +79,8 @@ class RubeePass
|
|
78
79
|
return
|
79
80
|
end
|
80
81
|
|
82
|
+
return if (ENV["DISPLAY"].nil? || ENV["DISPLAY"].empty?)
|
83
|
+
|
81
84
|
echo = ScoobyDoo.where_are_you("echo")
|
82
85
|
|
83
86
|
if (OS.mac?)
|
data/lib/string.rb
CHANGED
@@ -1,21 +1,5 @@
|
|
1
|
-
#
|
1
|
+
# Modify String class to allow for rsplit and word wrap
|
2
2
|
class String
|
3
|
-
def black
|
4
|
-
return colorize(30)
|
5
|
-
end
|
6
|
-
|
7
|
-
def blue
|
8
|
-
return colorize(34)
|
9
|
-
end
|
10
|
-
|
11
|
-
def colorize(color)
|
12
|
-
return "\e[#{color}m#{self}\e[0m"
|
13
|
-
end
|
14
|
-
|
15
|
-
def cyan
|
16
|
-
return colorize(36)
|
17
|
-
end
|
18
|
-
|
19
3
|
def fix
|
20
4
|
# Fix unicode (I think???)
|
21
5
|
# Apparently sometimes length and bytesize don't always agree.
|
@@ -27,33 +11,13 @@ class String
|
|
27
11
|
return self
|
28
12
|
end
|
29
13
|
|
30
|
-
def green
|
31
|
-
return colorize(32)
|
32
|
-
end
|
33
|
-
|
34
|
-
def purple
|
35
|
-
return colorize(35)
|
36
|
-
end
|
37
|
-
|
38
|
-
def red
|
39
|
-
return colorize(31)
|
40
|
-
end
|
41
|
-
|
42
14
|
def rsplit(pattern)
|
43
15
|
ret = rpartition(pattern)
|
44
16
|
ret.delete_at(1)
|
45
17
|
return ret
|
46
18
|
end
|
47
19
|
|
48
|
-
def
|
49
|
-
return colorize(37)
|
50
|
-
end
|
51
|
-
|
52
|
-
def word_wrap(width = 70)
|
20
|
+
def word_wrap(width = 80)
|
53
21
|
return scan(/\S.{0,#{width}}\S(?=\s|$)|\S+/).join("\n")
|
54
22
|
end
|
55
|
-
|
56
|
-
def yellow
|
57
|
-
return colorize(33)
|
58
|
-
end
|
59
23
|
end
|
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: 0.4.
|
4
|
+
version: 0.4.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-02-
|
11
|
+
date: 2016-02-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|
@@ -50,6 +50,26 @@ dependencies:
|
|
50
50
|
- - ">="
|
51
51
|
- !ruby/object:Gem::Version
|
52
52
|
version: 10.4.2
|
53
|
+
- !ruby/object:Gem::Dependency
|
54
|
+
name: colorize
|
55
|
+
requirement: !ruby/object:Gem::Requirement
|
56
|
+
requirements:
|
57
|
+
- - "~>"
|
58
|
+
- !ruby/object:Gem::Version
|
59
|
+
version: '0.7'
|
60
|
+
- - ">="
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: 0.7.7
|
63
|
+
type: :runtime
|
64
|
+
prerelease: false
|
65
|
+
version_requirements: !ruby/object:Gem::Requirement
|
66
|
+
requirements:
|
67
|
+
- - "~>"
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '0.7'
|
70
|
+
- - ">="
|
71
|
+
- !ruby/object:Gem::Version
|
72
|
+
version: 0.7.7
|
53
73
|
- !ruby/object:Gem::Dependency
|
54
74
|
name: djinni
|
55
75
|
requirement: !ruby/object:Gem::Requirement
|