rubeepass 0.1.1 → 0.1.2
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/lib/rubeepass.rb +10 -4
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: abe38f261905a7621be6738e64e28b20898e092c
|
4
|
+
data.tar.gz: 4da29b094e19fcfbaab0f9e6b553a263615c06e1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 500bf5533738d8db41ad428289d93948bea52141ec0e1fc1bafb3896d7cc3a7523ad13f60343d7c2e97e2a037240665e445cbbe999ec0ff23f9c68c32691e9bb
|
7
|
+
data.tar.gz: 1cff2527401f526cec0bd5d8dc36b99b46bdc361d1d9e3f88ed27c085163f4fe01e507ce4ce3f22016d2ca84e921802453e792884231675d658e543bcbe82e66
|
data/lib/rubeepass.rb
CHANGED
@@ -71,11 +71,16 @@ class RubeePass
|
|
71
71
|
end
|
72
72
|
|
73
73
|
def copy_to_clipboard(string)
|
74
|
-
string = "
|
74
|
+
string = "" if (string.nil?)
|
75
75
|
if (OS::Underlying.windows?)
|
76
76
|
puts "Your OS is not currently supported!"
|
77
77
|
return
|
78
|
-
|
78
|
+
end
|
79
|
+
|
80
|
+
echo = ScoobyDoo.where_are_you("echo")
|
81
|
+
|
82
|
+
if (OS.mac?)
|
83
|
+
string = "" if (string.nil?)
|
79
84
|
pbcopy = ScoobyDoo.where_are_you("pbcopy")
|
80
85
|
rn = ScoobyDoo.where_are_you("reattach-to-user-namespace")
|
81
86
|
|
@@ -86,12 +91,13 @@ class RubeePass
|
|
86
91
|
end
|
87
92
|
|
88
93
|
if (cp)
|
89
|
-
system("echo #{string.shellescape} | #{cp}")
|
94
|
+
system("#{echo} -n #{string.shellescape} | #{cp}")
|
90
95
|
else
|
91
96
|
puts "Please install reattach-to-user-namespace!"
|
92
97
|
return
|
93
98
|
end
|
94
99
|
elsif (OS.posix?)
|
100
|
+
string = " \x7F" if (string.empty?)
|
95
101
|
xclip = ScoobyDoo.where_are_you("xclip")
|
96
102
|
xsel = ScoobyDoo.where_are_you("xsel")
|
97
103
|
|
@@ -103,7 +109,7 @@ class RubeePass
|
|
103
109
|
end
|
104
110
|
|
105
111
|
if (cp)
|
106
|
-
system("echo #{string.shellescape} | #{cp}")
|
112
|
+
system("#{echo} -n #{string.shellescape} | #{cp}")
|
107
113
|
else
|
108
114
|
puts "Please install either xclip or xsel!"
|
109
115
|
return
|