md5check 1.0.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.
- data/bin/md5check +31 -0
- metadata +49 -0
data/bin/md5check
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
require 'digest/md5'
|
3
|
+
require 'optparse'
|
4
|
+
|
5
|
+
options = {}
|
6
|
+
opt = OptionParser.new do |opts|
|
7
|
+
opts.banner = "Usage: md5check [options]"
|
8
|
+
|
9
|
+
opts.separator ""
|
10
|
+
opts.separator "Specific options:"
|
11
|
+
|
12
|
+
opts.on_tail("-f", "--file FILE", "Specify file(required).") do |file|
|
13
|
+
options[:file] = file
|
14
|
+
end
|
15
|
+
|
16
|
+
opts.separator ""
|
17
|
+
opts.separator "Common options:"
|
18
|
+
|
19
|
+
opts.on_tail("-v", "--version", "Show version") do
|
20
|
+
puts '1.0.0'
|
21
|
+
exit
|
22
|
+
end
|
23
|
+
|
24
|
+
opts.on_tail("-h", "--help", "Show this message") do
|
25
|
+
puts opts
|
26
|
+
exit
|
27
|
+
end
|
28
|
+
end
|
29
|
+
opt.parse!
|
30
|
+
|
31
|
+
puts options[:file]? (Digest::MD5.file options[:file]).hexdigest : opt.help
|
metadata
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: md5check
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- cuihq
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2014-03-18 00:00:00.000000000 Z
|
13
|
+
dependencies: []
|
14
|
+
description: This is a digital certificates tool!
|
15
|
+
email: cuihaiqin@google.com
|
16
|
+
executables:
|
17
|
+
- md5check
|
18
|
+
extensions: []
|
19
|
+
extra_rdoc_files: []
|
20
|
+
files:
|
21
|
+
- !binary |-
|
22
|
+
YmluL21kNWNoZWNr
|
23
|
+
homepage: https://github.com/cuihq/md5check
|
24
|
+
licenses:
|
25
|
+
- MIT
|
26
|
+
post_install_message:
|
27
|
+
rdoc_options: []
|
28
|
+
require_paths:
|
29
|
+
- lib
|
30
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
31
|
+
none: false
|
32
|
+
requirements:
|
33
|
+
- - ! '>='
|
34
|
+
- !ruby/object:Gem::Version
|
35
|
+
version: '0'
|
36
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
37
|
+
none: false
|
38
|
+
requirements:
|
39
|
+
- - ! '>='
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: '0'
|
42
|
+
requirements: []
|
43
|
+
rubyforge_project:
|
44
|
+
rubygems_version: 1.8.24
|
45
|
+
signing_key:
|
46
|
+
specification_version: 3
|
47
|
+
summary: This is a digital certificates tool!
|
48
|
+
test_files: []
|
49
|
+
has_rdoc:
|