rubeepass 0.3.6 → 0.3.7
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/bin/rpass +1 -0
- data/lib/rubeepass.rb +23 -18
- 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: 2ad974e27286aa2e613e6bfe2e487f6b24401133
|
4
|
+
data.tar.gz: 1ddf8983150a4470e4e71c6fc7c9625e5bc64c59
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7865dfba1ae5a9929cbe3b66364058a711e32dfa98c85e376cc08e7e7dd20abbcd5b1d55bb575b46acc2b215edfdf238ae5bac011b89f45ee4945ff4086dcc5b
|
7
|
+
data.tar.gz: 93a8a8ed4b402606c0b78ab84917aa640130f187455b5214b45597ca3d6b022984975f766c40239b5e389a68adbb32f08e99ab03bfd9d050e052130ecd20d678
|
data/bin/rpass
CHANGED
data/lib/rubeepass.rb
CHANGED
@@ -66,21 +66,20 @@ class RubeePass
|
|
66
66
|
@thread.kill if (@thread)
|
67
67
|
@thread = Thread.new do
|
68
68
|
sleep time
|
69
|
-
copy_to_clipboard("")
|
69
|
+
copy_to_clipboard("", false)
|
70
70
|
end
|
71
71
|
end
|
72
72
|
|
73
|
-
def copy_to_clipboard(string)
|
73
|
+
def copy_to_clipboard(string, err = true)
|
74
74
|
string = "" if (string.nil?)
|
75
75
|
if (OS::Underlying.windows?)
|
76
|
-
puts "Your OS is not currently supported!"
|
76
|
+
puts "Your OS is not currently supported!" if (err)
|
77
77
|
return
|
78
78
|
end
|
79
79
|
|
80
80
|
echo = ScoobyDoo.where_are_you("echo")
|
81
81
|
|
82
82
|
if (OS.mac?)
|
83
|
-
string = "" if (string.nil?)
|
84
83
|
pbcopy = ScoobyDoo.where_are_you("pbcopy")
|
85
84
|
rn = ScoobyDoo.where_are_you("reattach-to-user-namespace")
|
86
85
|
|
@@ -93,29 +92,35 @@ class RubeePass
|
|
93
92
|
if (cp)
|
94
93
|
system("#{echo} -n #{string.shellescape} | #{cp}")
|
95
94
|
else
|
96
|
-
|
95
|
+
if (err)
|
96
|
+
puts "Please install reattach-to-user-namespace!"
|
97
|
+
end
|
97
98
|
return
|
98
99
|
end
|
99
100
|
elsif (OS.posix?)
|
100
|
-
string = " \x7F" if (string.empty?)
|
101
101
|
xclip = ScoobyDoo.where_are_you("xclip")
|
102
102
|
xsel = ScoobyDoo.where_are_you("xsel")
|
103
103
|
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
104
|
+
["clipboard", "primary", "secondary"].each do |sel|
|
105
|
+
cp = nil
|
106
|
+
if (xclip)
|
107
|
+
# string = " \x7F" if (string.empty?)
|
108
|
+
cp = "xclip -i -selection #{sel}"
|
109
|
+
elsif (xsel)
|
110
|
+
cp = "xsel -i --#{sel}"
|
111
|
+
end
|
110
112
|
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
113
|
+
if (cp)
|
114
|
+
system("#{echo} -n #{string.shellescape} | #{cp}")
|
115
|
+
else
|
116
|
+
if (err)
|
117
|
+
puts "Please install either xclip or xsel!"
|
118
|
+
end
|
119
|
+
return
|
120
|
+
end
|
116
121
|
end
|
117
122
|
else
|
118
|
-
puts "Your OS is not currently supported!"
|
123
|
+
puts "Your OS is not currently supported!" if (err)
|
119
124
|
return
|
120
125
|
end
|
121
126
|
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.3.
|
4
|
+
version: 0.3.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miles Whittaker
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-12-
|
11
|
+
date: 2015-12-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|