rubeepass 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/rubeepass.rb +10 -4
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d0d57a82495844ad825a16e50870940d62a2f67d
4
- data.tar.gz: 0824857cd914ec4d4b8b39f3f4384fd92f3ec65e
3
+ metadata.gz: abe38f261905a7621be6738e64e28b20898e092c
4
+ data.tar.gz: 4da29b094e19fcfbaab0f9e6b553a263615c06e1
5
5
  SHA512:
6
- metadata.gz: 0dac864aea481644421ccfa24edb580e391d11883eec6ee74a6eaf27353b2be5d7a2f1a79a5b526bfb30fbd5651535ec0974433478d694b32bc335ea982363f2
7
- data.tar.gz: 41e331ec51c58df22c38a75b1b3f6c2ef31330f5484c1e41ade1ffe8f0c953da0754b927731f4e3d953d86bee1ee1d00b82b152a6d4280048d9414663a0ee899
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 = " \x7F" if (string.nil? || string.empty?)
74
+ string = "" if (string.nil?)
75
75
  if (OS::Underlying.windows?)
76
76
  puts "Your OS is not currently supported!"
77
77
  return
78
- elsif (OS.mac?)
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubeepass
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miles Whittaker