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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 91052eff9e9814c1cc27a445831800d11d006398
4
- data.tar.gz: 33b62541ea35b3d3c89f2dcf8aa313e7e8b30bf2
3
+ metadata.gz: 4c9173d805e33e51cc75649bf98888fe43d1ddf6
4
+ data.tar.gz: cf33596494c2237f9d155b0b3b19695159e04e66
5
5
  SHA512:
6
- metadata.gz: 39380c8eb6144688314dd38263c55c387d2b3e58eb7e283bf6a5130ac04a05fff4345a9673439640868eb00626f92502d2c370944039643886ee15a013ec92f6
7
- data.tar.gz: 54d042c8a5438daba7a1eafd38d19146e18ee1986163543d1499142641992625fcbb1f8f9afabd71516307373d8fb55d400572b4a9046f8dcc6fc6734b798a1c
6
+ metadata.gz: e17d97fee36dec9b46bb7cee8012ceab4cad86f1efab7e5f391597d4b057d4d99bd218a4ff5683474aaba78af0a915f9f3b5ed589bcd424a5cb7c897763fff18
7
+ data.tar.gz: ce56faf8900c3425e55fd480966ee5e39a73fc886eda135156a54c52e2e9f8e08726dd84f695755e911a0aa96fc75f8feff2bb7d83d05f2f5328bd50a98fb951
data/bin/rpass CHANGED
@@ -1,12 +1,12 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
+ require "colorize"
3
4
  require "djinni"
4
5
  require "io/console"
5
6
  require "json"
6
7
  require "optparse"
7
8
  require "pathname"
8
9
  require "rubeepass"
9
- require "string"
10
10
 
11
11
  class RPassExit
12
12
  GOOD = 0
@@ -1,3 +1,4 @@
1
+ require "colorize"
1
2
  require "rexml/document"
2
3
  require "string"
3
4
 
@@ -1,5 +1,5 @@
1
+ require "colorize"
1
2
  require "rexml/document"
2
- require "string"
3
3
 
4
4
  class RubeePass::Group
5
5
  include Comparable
@@ -1,5 +1,5 @@
1
+ require "colorize"
1
2
  require "djinni"
2
- require "string"
3
3
 
4
4
  class CDWish < Djinni::Wish
5
5
  def aliases
@@ -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?)
@@ -1,5 +1,5 @@
1
+ require "colorize"
1
2
  require "djinni"
2
- require "string"
3
3
 
4
4
  class EchoWish < Djinni::Wish
5
5
  def aliases
@@ -1,5 +1,5 @@
1
+ require "colorize"
1
2
  require "djinni"
2
- require "string"
3
3
 
4
4
  class LSWish < Djinni::Wish
5
5
  def aliases
@@ -1,5 +1,5 @@
1
+ require "colorize"
1
2
  require "djinni"
2
- require "string"
3
3
 
4
4
  class ShowAllWish < Djinni::Wish
5
5
  def aliases
@@ -1,5 +1,5 @@
1
+ require "colorize"
1
2
  require "djinni"
2
- require "string"
3
3
 
4
4
  class ShowWish < Djinni::Wish
5
5
  def aliases
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
- # Redefine String class to allow for colorizing, rsplit, and word wrap
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 white
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.1
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-16 00:00:00.000000000 Z
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