fingerprint 1.2.0 → 1.2.3

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.
data/bin/fingerprint CHANGED
@@ -24,8 +24,6 @@ require 'optparse'
24
24
  require 'pathname'
25
25
  require 'fingerprint'
26
26
 
27
- FINGERPRINT_NAME = "._fingerprint"
28
-
29
27
  OPTIONS = {
30
28
  :root => "./",
31
29
  :mode => :scan,
@@ -117,6 +115,11 @@ case (OPTIONS[:mode])
117
115
 
118
116
  input_file = Pathname.new(OPTIONS[:root]) + OPTIONS[:name]
119
117
 
118
+ unless File.exist? input_file
119
+ $stderr.puts "Can't find index #{input_file}. Aborting."
120
+ exit(3)
121
+ end
122
+
120
123
  scanner = Fingerprint::Scanner.scan_paths([OPTIONS[:root]])
121
124
  scanner.output.seek(0)
122
125
 
@@ -110,12 +110,13 @@ module Fingerprint
110
110
  output_dir(path)
111
111
  end
112
112
  else
113
- unless excluded?(path)
114
- checksummed_count += 1
115
- output_file(path)
116
- else
113
+ # Skip anything that isn't a valid file (e.g. pipes, sockets, symlinks).
114
+ if excluded?(path) || File.symlink?(path) || !File.file?(path)
117
115
  excluded_count += 1
118
116
  output_excluded(path)
117
+ else
118
+ checksummed_count += 1
119
+ output_file(path)
119
120
  end
120
121
  end
121
122
  end
@@ -23,7 +23,7 @@ module Fingerprint
23
23
  module VERSION
24
24
  MAJOR = 1
25
25
  MINOR = 2
26
- TINY = 0
26
+ TINY = 3
27
27
 
28
28
  STRING = [MAJOR, MINOR, TINY].join('.')
29
29
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 1
7
7
  - 2
8
- - 0
9
- version: 1.2.0
8
+ - 3
9
+ version: 1.2.3
10
10
  platform: ruby
11
11
  authors:
12
12
  - Samuel Williams
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2011-07-20 00:00:00 +12:00
17
+ date: 2011-07-23 00:00:00 +12:00
18
18
  default_executable: fingerprint
19
19
  dependencies: []
20
20