fingerprint 1.4.0 → 3.2.0

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.
metadata CHANGED
@@ -1,107 +1,158 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fingerprint
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 3.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
8
- autorequire:
8
+ - Glenn Rempe
9
+ autorequire:
9
10
  bindir: bin
10
- cert_chain: []
11
- date: 2013-09-13 00:00:00.000000000 Z
11
+ cert_chain:
12
+ - |
13
+ -----BEGIN CERTIFICATE-----
14
+ MIIEhDCCAuygAwIBAgIBATANBgkqhkiG9w0BAQsFADA3MTUwMwYDVQQDDCxzYW11
15
+ ZWwud2lsbGlhbXMvREM9b3Jpb250cmFuc2Zlci9EQz1jby9EQz1uejAeFw0yMTA4
16
+ MTYwNjMzNDRaFw0yMjA4MTYwNjMzNDRaMDcxNTAzBgNVBAMMLHNhbXVlbC53aWxs
17
+ aWFtcy9EQz1vcmlvbnRyYW5zZmVyL0RDPWNvL0RDPW56MIIBojANBgkqhkiG9w0B
18
+ AQEFAAOCAY8AMIIBigKCAYEAyXLSS/cw+fXJ5e7hi+U/TeChPWeYdwJojDsFY1xr
19
+ xvtqbTTL8gbLHz5LW3QD2nfwCv3qTlw0qI3Ie7a9VMJMbSvgVEGEfQirqIgJXWMj
20
+ eNMDgKsMJtC7u/43abRKx7TCURW3iWyR19NRngsJJmaR51yGGGm2Kfsr+JtKKLtL
21
+ L188Wm3f13KAx7QJU8qyuBnj1/gWem076hzdA7xi1DbrZrch9GCRz62xymJlrJHn
22
+ 9iZEZ7AxrS7vokhMlzSr/XMUihx/8aFKtk+tMLClqxZSmBWIErWdicCGTULXCBNb
23
+ E/mljo4zEVKhlTWpJklMIhr55ZRrSarKFuW7en0+tpJrfsYiAmXMJNi4XAYJH7uL
24
+ rgJuJwSaa/dMz+VmUoo7VKtSfCoOI+6v5/z0sK3oT6sG6ZwyI47DBq2XqNC6tnAj
25
+ w+XmCywiTQrFzMMAvcA7rPI4F0nU1rZId51rOvvfxaONp+wgTi4P8owZLw0/j0m4
26
+ 8C20DYi6EYx4AHDXiLpElWh3AgMBAAGjgZowgZcwCQYDVR0TBAIwADALBgNVHQ8E
27
+ BAMCBLAwHQYDVR0OBBYEFB6ZaeWKxQjGTI+pmz7cKRmMIywwMC4GA1UdEQQnMCWB
28
+ I3NhbXVlbC53aWxsaWFtc0BvcmlvbnRyYW5zZmVyLmNvLm56MC4GA1UdEgQnMCWB
29
+ I3NhbXVlbC53aWxsaWFtc0BvcmlvbnRyYW5zZmVyLmNvLm56MA0GCSqGSIb3DQEB
30
+ CwUAA4IBgQBVoM+pu3dpdUhZM1w051iw5GfiqclAr1Psypf16Tiod/ho//4oAu6T
31
+ 9fj3DPX/acWV9P/FScvqo4Qgv6g4VWO5ZU7z2JmPoTXZtYMunRAmQPFL/gSUc6aK
32
+ vszMHIyhtyzRc6DnfW2AiVOjMBjaYv8xXZc9bduniRVPrLR4J7ozmGLh4o4uJp7w
33
+ x9KCFaR8Lvn/r0oJWJOqb/DMAYI83YeN2Dlt3jpwrsmsONrtC5S3gOUle5afSGos
34
+ bYt5ocnEpKSomR9ZtnCGljds/aeO1Xgpn2r9HHcjwnH346iNrnHmMlC7BtHUFPDg
35
+ Ts92S47PTOXzwPBDsrFiq3VLbRjHSwf8rpqybQBH9MfzxGGxTaETQYOd6b4e4Ag6
36
+ y92abGna0bmIEb4+Tx9rQ10Uijh1POzvr/VTH4bbIPy9FbKrRsIQ24qDbNJRtOpE
37
+ RAOsIl+HOBTb252nx1kIRN5hqQx272AJCbCjKx8egcUQKffFVVCI0nye09v5CK+a
38
+ HiLJ8VOFx6w=
39
+ -----END CERTIFICATE-----
40
+ date: 2022-06-01 00:00:00.000000000 Z
12
41
  dependencies:
13
42
  - !ruby/object:Gem::Dependency
14
- name: bundler
43
+ name: build-files
15
44
  requirement: !ruby/object:Gem::Requirement
16
45
  requirements:
17
- - - ~>
46
+ - - "~>"
18
47
  - !ruby/object:Gem::Version
19
- version: '1.3'
20
- type: :development
48
+ version: '1.2'
49
+ type: :runtime
21
50
  prerelease: false
22
51
  version_requirements: !ruby/object:Gem::Requirement
23
52
  requirements:
24
- - - ~>
53
+ - - "~>"
25
54
  - !ruby/object:Gem::Version
26
- version: '1.3'
55
+ version: '1.2'
27
56
  - !ruby/object:Gem::Dependency
28
- name: rake
57
+ name: samovar
58
+ requirement: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - "~>"
61
+ - !ruby/object:Gem::Version
62
+ version: '2.0'
63
+ type: :runtime
64
+ prerelease: false
65
+ version_requirements: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - "~>"
68
+ - !ruby/object:Gem::Version
69
+ version: '2.0'
70
+ - !ruby/object:Gem::Dependency
71
+ name: bundler
29
72
  requirement: !ruby/object:Gem::Requirement
30
73
  requirements:
31
- - - '>='
74
+ - - ">="
32
75
  - !ruby/object:Gem::Version
33
76
  version: '0'
34
77
  type: :development
35
78
  prerelease: false
36
79
  version_requirements: !ruby/object:Gem::Requirement
37
80
  requirements:
38
- - - '>='
81
+ - - ">="
39
82
  - !ruby/object:Gem::Version
40
83
  version: '0'
41
84
  - !ruby/object:Gem::Dependency
42
- name: lockfile
85
+ name: covered
43
86
  requirement: !ruby/object:Gem::Requirement
44
87
  requirements:
45
- - - '>='
88
+ - - ">="
46
89
  - !ruby/object:Gem::Version
47
90
  version: '0'
48
- type: :runtime
91
+ type: :development
49
92
  prerelease: false
50
93
  version_requirements: !ruby/object:Gem::Requirement
51
94
  requirements:
52
- - - '>='
95
+ - - ">="
53
96
  - !ruby/object:Gem::Version
54
97
  version: '0'
55
- description: "\t\tFingerprint is a general purpose data integrity tool that uses cryptographic
56
- hashes to detect changes in files and directory trees. The fingerprint command scans
57
- a directory tree and generates a fingerprint file containing the names and cryptographic
58
- hashes of the files in the tree. This snapshot can be later used to generate a list
59
- of files that have been created, deleted or modified. If so much as a single bit
60
- in the file data has changed, Fingerprint will detect it.\n"
98
+ - !ruby/object:Gem::Dependency
99
+ name: rspec
100
+ requirement: !ruby/object:Gem::Requirement
101
+ requirements:
102
+ - - "~>"
103
+ - !ruby/object:Gem::Version
104
+ version: '3.4'
105
+ type: :development
106
+ prerelease: false
107
+ version_requirements: !ruby/object:Gem::Requirement
108
+ requirements:
109
+ - - "~>"
110
+ - !ruby/object:Gem::Version
111
+ version: '3.4'
112
+ description:
61
113
  email:
62
- - samuel.williams@oriontransfer.co.nz
63
114
  executables:
64
115
  - fingerprint
65
- - fingerprint-diff
66
116
  extensions: []
67
117
  extra_rdoc_files: []
68
118
  files:
69
- - Gemfile
70
- - README.md
71
119
  - bin/fingerprint
72
- - bin/fingerprint-diff
73
- - fingerprint.gemspec
74
120
  - lib/fingerprint.rb
75
121
  - lib/fingerprint/checker.rb
122
+ - lib/fingerprint/checksums.rb
123
+ - lib/fingerprint/command.rb
124
+ - lib/fingerprint/command/analyze.rb
125
+ - lib/fingerprint/command/compare.rb
126
+ - lib/fingerprint/command/duplicates.rb
127
+ - lib/fingerprint/command/scan.rb
128
+ - lib/fingerprint/command/verify.rb
129
+ - lib/fingerprint/find.rb
76
130
  - lib/fingerprint/record.rb
77
131
  - lib/fingerprint/scanner.rb
78
132
  - lib/fingerprint/version.rb
79
- - rakefile.rb
80
- - test/test_fingerprint.rb
81
- homepage: http://www.codeotaku.com/projects/fingerprint
133
+ homepage: https://github.com/ioquatix/fingerprint
82
134
  licenses:
83
135
  - MIT
84
- metadata: {}
85
- post_install_message:
136
+ metadata:
137
+ funding_uri: https://github.com/sponsors/ioquatix/
138
+ post_install_message:
86
139
  rdoc_options: []
87
140
  require_paths:
88
141
  - lib
89
142
  required_ruby_version: !ruby/object:Gem::Requirement
90
143
  requirements:
91
- - - '>='
144
+ - - ">="
92
145
  - !ruby/object:Gem::Version
93
- version: '0'
146
+ version: '2.5'
94
147
  required_rubygems_version: !ruby/object:Gem::Requirement
95
148
  requirements:
96
- - - '>='
149
+ - - ">="
97
150
  - !ruby/object:Gem::Version
98
151
  version: '0'
99
152
  requirements: []
100
- rubyforge_project:
101
- rubygems_version: 2.0.6
102
- signing_key:
153
+ rubygems_version: 3.3.7
154
+ signing_key:
103
155
  specification_version: 4
104
156
  summary: Fingerprint is a tool for creating checksums of entire directory structures,
105
157
  and comparing them for inconsistencies.
106
- test_files:
107
- - test/test_fingerprint.rb
158
+ test_files: []
metadata.gz.sig ADDED
@@ -0,0 +1,4 @@
1
+ I�B�J[N5&u1��?:<�j��b8�x �"�4�iquؙ�(�|��D �S!�I����8E�h�(���/K�MI��9"~���B����@g����Wm���@Qㅐ6�J?�XM��z�
2
+ �"M�@&��V �i�Ֆ⨷�Y�
3
+ Ʀ
4
+ �PJ�!�uV3|���N����5���]���'sL��x(9Ίs��`��� z��a��6�aUM�����L�.�����ϵ��%��S��'֊��a&����,���~��^�:���Ɋ9}R��KM5��q'h�h��ɳ���:LT�å����^Zͦe��d)w������lc��b��ܽe������? DA��G� 
data/Gemfile DELETED
@@ -1,4 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- # Specify your gem's dependencies in fingerprint.gemspec
4
- gemspec
data/README.md DELETED
@@ -1,73 +0,0 @@
1
- # Fingerprint
2
-
3
- Fingerprint is primarily a command line tool to compare directory structures on
4
- disk. It also provides a programmatic interface for this procedure.
5
-
6
- Because Fingerprint produces output to `IO` like structures, it is easy to transmit
7
- this data across a network, or store it for later use. As an example, it could be
8
- used to check the integrity of a remote backup.
9
-
10
- For examples and documentation please see the main [project page][1].
11
-
12
- [1]: http://www.codeotaku.com/projects/fingerprint/index
13
-
14
- ## Installation
15
-
16
- Add this line to your application's Gemfile:
17
-
18
- gem 'fingerprint'
19
-
20
- And then execute:
21
-
22
- $ bundle
23
-
24
- Or install it yourself as:
25
-
26
- $ gem install fingerprint
27
-
28
- ## Usage
29
-
30
- Please refer to the [online documentation][http://www.codeotaku.com/projects/fingerprint/documentation/introduction].
31
-
32
- ## Todo
33
-
34
- * Command line option to show files that have been created (e.g. don't exist in master fingerprint).
35
- * Command line option to show files that have changed but have the same modified time (hardware corrutpion).
36
- * Command line option to check fingerprint files based on checksums, e.g. duplicate files, unique files, over a set of directories.
37
- * Command line tool for extracting duplicate and unique files over a set of directories?
38
- * Supporting tools for signing fingerprints easily.
39
- * Support indexing specific files as well as whole directories (maybe?).
40
- * Support general filenames for `--archive`, e.g. along with `-n`, maybe support a file called `index.fingerprint` by default: improved visibility for end user.
41
- * Because fingerprint is currently IO bound in terms of performance, single-threaded checksumming is fine, but for SSD and other fast storage, it might be possible to improve speed somewhat by using a map-reduce style approach.
42
-
43
- ## Contributing
44
-
45
- 1. Fork it
46
- 2. Create your feature branch (`git checkout -b my-new-feature`)
47
- 3. Commit your changes (`git commit -am 'Add some feature'`)
48
- 4. Push to the branch (`git push origin my-new-feature`)
49
- 5. Create new Pull Request
50
-
51
- ## License
52
-
53
- Released under the MIT license.
54
-
55
- Copyright, 2012, by [Samuel G. D. Williams](http://www.codeotaku.com/samuel-williams).
56
-
57
- Permission is hereby granted, free of charge, to any person obtaining a copy
58
- of this software and associated documentation files (the "Software"), to deal
59
- in the Software without restriction, including without limitation the rights
60
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
61
- copies of the Software, and to permit persons to whom the Software is
62
- furnished to do so, subject to the following conditions:
63
-
64
- The above copyright notice and this permission notice shall be included in
65
- all copies or substantial portions of the Software.
66
-
67
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
68
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
69
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
70
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
71
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
72
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
73
- THE SOFTWARE.
data/bin/fingerprint-diff DELETED
@@ -1,145 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- # Copyright (c) 2011 Samuel G. D. Williams. <http://www.oriontransfer.co.nz>
4
- #
5
- # Permission is hereby granted, free of charge, to any person obtaining a copy
6
- # of this software and associated documentation files (the "Software"), to deal
7
- # in the Software without restriction, including without limitation the rights
8
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- # copies of the Software, and to permit persons to whom the Software is
10
- # furnished to do so, subject to the following conditions:
11
- #
12
- # The above copyright notice and this permission notice shall be included in
13
- # all copies or substantial portions of the Software.
14
- #
15
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- # THE SOFTWARE.
22
-
23
- require 'optparse'
24
- require 'pathname'
25
- require 'fingerprint'
26
- require 'lockfile'
27
- require 'fileutils'
28
-
29
- OPTIONS = {
30
- :mode => nil,
31
- :output => $stdout,
32
- :verbose => false,
33
- :force => false,
34
- :extended => false,
35
- :inverse => false
36
- }
37
-
38
- $options = nil
39
-
40
- ARGV.options do |o|
41
- $options = o
42
-
43
- script_name = File.basename($0)
44
-
45
- o.banner = "Usage: #{script_name} [options] [path]"
46
- o.define_head "This script is used to calculate the differences between two fingerprints."
47
-
48
- o.separator ""
49
- o.separator "Set operations between fingerprints:"
50
-
51
- o.on("--duplicates", "Calculate files in copy that already exist in master") do |master, copy|
52
- OPTIONS[:mode] = :duplicates
53
- end
54
-
55
- o.separator ""
56
- o.separator "Output manipulation:"
57
-
58
- o.on("-o [output-path]", String, "Write the fingerprint output to the given file.") do |path|
59
- OPTIONS[:output] = File.open(path, "w")
60
- end
61
-
62
- o.on("--verbose", "Verbose output, include additional details in the file transcript.") do
63
- OPTIONS[:verbose] = true
64
- end
65
-
66
- o.on("--progress", "Print percentage progress to standard error.") do
67
- OPTIONS[:progress] = true
68
- end
69
-
70
- o.on("--inverse", "Show the inverse of the selected operation.") do
71
- OPTIONS[:inverse] = true
72
- end
73
-
74
- o.separator ""
75
- o.separator "Help and Copyright information:"
76
-
77
- o.on_tail("--copy", "Display copyright and warranty information") do
78
- $stderr.puts "#{script_name} v#{Fingerprint::VERSION::STRING}. Copyright (c) 2011 Samuel Williams."
79
- $stderr.puts "This software is released under the MIT license and comes with ABSOLUTELY NO WARRANTY."
80
- $stderr.puts "See http://www.oriontransfer.co.nz/ for more information."
81
- exit
82
- end
83
-
84
- o.on_tail("-h", "--help", "Show this help message.") do
85
- $stderr.puts o
86
- exit
87
- end
88
- end.parse!
89
-
90
- case (OPTIONS[:mode])
91
- when :duplicates
92
- options = OPTIONS.dup
93
-
94
- include Fingerprint
95
-
96
- duplicates_recordset = RecordSet.new
97
- results = RecordSetPrinter.new(duplicates_recordset, OPTIONS[:output])
98
-
99
- master_file_path = ARGV.shift
100
- File.open(master_file_path) do |master_file|
101
- master_recordset = RecordSet.new
102
- master_recordset.parse(master_file)
103
-
104
- ignore_similar = false
105
-
106
- copy_file_paths = ARGV
107
- if copy_file_paths.size == 0
108
- copy_file_paths = [master_file_path]
109
- ignore_similar = true
110
- end
111
-
112
- copy_file_paths.each do |copy_file_path|
113
- File.open(copy_file_path) do |copy_file|
114
- copy_recordset = RecordSet.new
115
- copy_recordset.parse(copy_file)
116
-
117
- copy_recordset.records.each do |record|
118
- record.metadata['fingerprint'] = copy_file_path
119
- # We need to see if the record exists in the master
120
-
121
- if OPTIONS[:verbose]
122
- $stderr.puts "Checking #{record.inspect}"
123
- end
124
-
125
- main_record = master_recordset.find_by_key(record)
126
-
127
- # If we are scanning the same index, don't print out every file, just those that are duplicates within the single file.
128
- if ignore_similar && main_record && (main_record.path == record.path)
129
- main_record = nil
130
- end
131
-
132
- if main_record
133
- record.metadata['original.path'] = main_record.path
134
- record.metadata['original.fingerprint'] = master_file_path
135
- results << record if !OPTIONS[:inverse]
136
- else
137
- results << record if OPTIONS[:inverse]
138
- end
139
- end
140
- end
141
- end
142
- end
143
- else
144
- puts $options
145
- end
data/fingerprint.gemspec DELETED
@@ -1,27 +0,0 @@
1
- # coding: utf-8
2
- lib = File.expand_path('../lib', __FILE__)
3
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require 'fingerprint/version'
5
-
6
- Gem::Specification.new do |spec|
7
- spec.name = "fingerprint"
8
- spec.version = Fingerprint::VERSION
9
- spec.authors = ["Samuel Williams"]
10
- spec.email = ["samuel.williams@oriontransfer.co.nz"]
11
- spec.description = <<-EOF
12
- Fingerprint is a general purpose data integrity tool that uses cryptographic hashes to detect changes in files and directory trees. The fingerprint command scans a directory tree and generates a fingerprint file containing the names and cryptographic hashes of the files in the tree. This snapshot can be later used to generate a list of files that have been created, deleted or modified. If so much as a single bit in the file data has changed, Fingerprint will detect it.
13
- EOF
14
- spec.summary = "Fingerprint is a tool for creating checksums of entire directory structures, and comparing them for inconsistencies."
15
- spec.homepage = "http://www.codeotaku.com/projects/fingerprint"
16
- spec.license = "MIT"
17
-
18
- spec.files = `git ls-files`.split($/)
19
- spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
20
- spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
21
- spec.require_paths = ["lib"]
22
-
23
- spec.add_development_dependency "bundler", "~> 1.3"
24
- spec.add_development_dependency "rake"
25
-
26
- spec.add_dependency "lockfile"
27
- end
data/rakefile.rb DELETED
@@ -1,9 +0,0 @@
1
- require "bundler/gem_tasks"
2
- require "rake/testtask"
3
-
4
- Rake::TestTask.new do |t|
5
- t.libs << 'test'
6
- end
7
-
8
- desc "Run tests"
9
- task :default => :test