thieve 0.1.0 → 0.1.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9de5bc6aa2ca34e66cfc680f9f4f82ff12b32528
4
- data.tar.gz: fccccdb67a5393b0367feb04f67179e4206e990d
3
+ metadata.gz: 6a0a42fa7ab28a1c66e47e29d27d0284e7c75af7
4
+ data.tar.gz: 93818b030afc91075e424f8204ca6eabcd8dffd4
5
5
  SHA512:
6
- metadata.gz: a06e491e0ccf98c1de44e5b8735aca3d8fc877e7420338f1db15fcd57d24aaba8e0f4246e9fe945b2e5f04f8c275c00a26021c9477445d67551dd5a822b4ae6d
7
- data.tar.gz: 87fbcbe90eb592f8ffa029db2c70e87fedc2ef9f74333588ef65401bbf078591333d57cdc5ca2514c42ca5fbb74635798761e8b966dd8fe4013a4420ce2f341e
6
+ metadata.gz: f584c709d4e70eeec62e0324972fe14f422e26a80785069c507d670b71a486f74b1ce7b2651f36be326c903b840523782b3067f21398c4cf7293370ef298a09e
7
+ data.tar.gz: 862fa6f666a25dcfc0fc0aacb6fd5275e847d39e441214013f82789317a6b2db0b731388b4aae0faa94c9652bc463732099d1c2771af21eb305ae0b166887e06
data/bin/thieve CHANGED
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
+ require "colorize"
3
4
  require "io/wait"
4
5
  require "optparse"
5
6
  require "string"
@@ -108,9 +109,13 @@ rescue Thieve::Error => e
108
109
  puts e.message
109
110
  exit ThieveExit::EXCEPTION
110
111
  rescue Exception => e
111
- $stderr.puts "Oops! Looks like an error has occured! Maybe the " \
112
- "message below will help. If not, you can use the " \
113
- "--verbose flag to get a backtrace.".word_wrap
112
+ $stderr.puts "Oops! Looks like an error has occured! If the " \
113
+ "error persists, file a bug at:".word_wrap
114
+ $stderr.puts
115
+ $stderr.puts " https://gitlab.com/mjwhitta/thieve/issues"
116
+ $stderr.puts
117
+ $stderr.puts "Maybe the message below will help. If not, you " \
118
+ "can use the --verbose flag to get a backtrace.".word_wrap
114
119
 
115
120
  $stderr.puts e.message.white.on_red
116
121
  if (options["verbose"])
@@ -0,0 +1,5 @@
1
+ class Thieve::Error::ExecutableNotFound < Thieve::Error
2
+ def initialize(exe)
3
+ super("Please install #{exe}")
4
+ end
5
+ end
data/lib/thieve/error.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  class Thieve::Error < RuntimeError
2
2
  end
3
3
 
4
- # require "thieve/error/executable_not_found_error"
4
+ require "thieve/error/executable_not_found"
data/lib/thieve.rb CHANGED
@@ -2,6 +2,7 @@ require "colorize"
2
2
  require "io/wait"
3
3
  require "json"
4
4
  require "pathname"
5
+ require "scoobydoo"
5
6
 
6
7
  class Thieve
7
8
  attr_accessor :loot
@@ -99,6 +100,10 @@ class Thieve
99
100
  end
100
101
 
101
102
  def initialize(colorize = false)
103
+ if (ScoobyDoo.where_are_you("gpg").nil?)
104
+ raise Thieve::Error::ExecutableNotFound.new("gpg")
105
+ end
106
+
102
107
  @colorize = colorize
103
108
  @loot = Hash.new
104
109
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thieve
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miles Whittaker
@@ -30,8 +30,28 @@ dependencies:
30
30
  - - ">="
31
31
  - !ruby/object:Gem::Version
32
32
  version: 0.7.7
33
- description: This ruby gem will extract, fingerprint, and match-up keys and/or certs
34
- from source code trees.
33
+ - !ruby/object:Gem::Dependency
34
+ name: scoobydoo
35
+ requirement: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - "~>"
38
+ - !ruby/object:Gem::Version
39
+ version: '0.1'
40
+ - - ">="
41
+ - !ruby/object:Gem::Version
42
+ version: 0.1.1
43
+ type: :runtime
44
+ prerelease: false
45
+ version_requirements: !ruby/object:Gem::Requirement
46
+ requirements:
47
+ - - "~>"
48
+ - !ruby/object:Gem::Version
49
+ version: '0.1'
50
+ - - ">="
51
+ - !ruby/object:Gem::Version
52
+ version: 0.1.1
53
+ description: This ruby gem searches through provided directories, looking for private/public
54
+ keys and certs. Then extracts, fingerprints, and attempts to match keys with certs.
35
55
  email: mjwhitta@gmail.com
36
56
  executables:
37
57
  - thieve
@@ -42,6 +62,7 @@ files:
42
62
  - lib/string.rb
43
63
  - lib/thieve.rb
44
64
  - lib/thieve/error.rb
65
+ - lib/thieve/error/executable_not_found.rb
45
66
  - lib/thieve/key_info.rb
46
67
  homepage: https://mjwhitta.github.io/thieve
47
68
  licenses:
@@ -66,5 +87,5 @@ rubyforge_project:
66
87
  rubygems_version: 2.5.1
67
88
  signing_key:
68
89
  specification_version: 4
69
- summary: Extract, fingerprint, and match-up keys and/or certs
90
+ summary: Steal keys/certs
70
91
  test_files: []