file-timestamp 1.6.0 → 1.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +6 -14
- data/bin/timestamp +13 -12
- metadata +10 -9
checksums.yaml
CHANGED
@@ -1,15 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
metadata.gz: !binary |-
|
9
|
-
NWY0Yjc1YTJhZDJhNTg4YWQzYTZhZGRkMmMyNDRmMmE1OTJlNjlhY2RkNGQw
|
10
|
-
MDA3NWE2NzA1NzE2YTlmMTBlZmQ4ZGFjODA0NWMyNGNmN2YzMDg2YWQ0ZTU0
|
11
|
-
OTI1YThkODZhYWZlMzM5NDc1ZjMxOGIxZWY0MWVjMzYzYzg0ZDU=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
ZGNiNjg5YzA2ZTNjM2E3MWYwOTQ4NjY2MzlmNGZmMWIwNWU1MWZkOWNjZmM2
|
14
|
-
MjE0ODNmZjg2YTNkM2VkNDBiNmViODc3OGExMjdlMmVkZTZlYzdhMzJmMmI1
|
15
|
-
OGMyOTFmODJhNTdlNmRlOTA5NmMyYmM2OTU2ZTVkZDMyZTkwMjQ=
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: b76e32a991f33c7b087492e7d3df017c8699ab08
|
4
|
+
data.tar.gz: 5f5dee38c6ec6c375a339162ffd446f886c4c805
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: ea36946a4acaf8502d0ecf079a830a6bbb6eecd12004993eb2571bbc26640fcb7c1c133465f14bf8d3156f610dd0adf3d97f3e8a781db30b648870f7700e5032
|
7
|
+
data.tar.gz: 6baf8b064d52ba9b78d4954c8c1530ab74fec93a42250dc8cc0f564f9aca1113546c54fec488531305e315c2776d91320e7f39b7fc17496daa571f032c90da44
|
data/bin/timestamp
CHANGED
@@ -6,7 +6,7 @@ require 'json'
|
|
6
6
|
require 'optparse'
|
7
7
|
require 'digest/md5'
|
8
8
|
|
9
|
-
VERSION = "1.6"
|
9
|
+
VERSION = "1.6.1"
|
10
10
|
|
11
11
|
def collectFileMtime dir, option
|
12
12
|
exclude_ext = option[:exclude_ext]
|
@@ -64,18 +64,19 @@ begin
|
|
64
64
|
OptionParser.new do |opts|
|
65
65
|
opts.banner = <<-EOF
|
66
66
|
file-timestamp #{VERSION}
|
67
|
+
generate file timestamp with JSON format
|
67
68
|
Usage:
|
68
|
-
timestamp [dir]
|
69
|
+
timestamp [dir]
|
69
70
|
EOF
|
70
|
-
opts.on('--pretty', "
|
71
|
-
opts.on('--template <template>', '
|
72
|
-
opts.on("--include-ext x,y,z", Array, "
|
73
|
-
opts.on("--exclude-ext x,y,z", Array, "
|
74
|
-
opts.on("--exclude-dir x,y,z", Array, "
|
75
|
-
opts.on("--seajs", "
|
76
|
-
opts.on("--md5 <length>", "MD5 checksum
|
77
|
-
opts.on("--time_format <format>", '
|
78
|
-
opts.on("--version", "
|
71
|
+
opts.on('--pretty', "format output") { option[:pretty] = true }
|
72
|
+
opts.on('--template <template>', 'content template,use #output# identify content,e.g. --template ";var json=#output#;"') { |template| option[:template] = template}
|
73
|
+
opts.on("--include-ext x,y,z", Array, "include file extension name") { |include_ext| option[:include_ext].concat include_ext }
|
74
|
+
opts.on("--exclude-ext x,y,z", Array, "exclude file extension name") { |exclude_ext| option[:exclude_ext].concat exclude_ext }
|
75
|
+
opts.on("--exclude-dir x,y,z", Array, "exclude directory, default is .svn,.git") { |exclude_dir| option[:exclude_dir].concat exclude_dir }
|
76
|
+
opts.on("--seajs", "use seajs template"){option[:template] = ";define('timestamp', function(require, exports, module) {\n module.exports =#output#\n});" }
|
77
|
+
opts.on("--md5 <length>", "use MD5 checksum instead of datetime"){ |length| option[:md5] = length.to_i }
|
78
|
+
opts.on("--time_format <format>", 'timestamp format string, default is %Y%m%d%H%M%S'){ |format| option[:time_format] = format }
|
79
|
+
opts.on("--version", "show version"){option[:version] = true}
|
79
80
|
|
80
81
|
end.parse!
|
81
82
|
|
@@ -97,7 +98,7 @@ timestamp [dir] 按目录树结构输出指定目录下的所有指定类型文
|
|
97
98
|
end
|
98
99
|
end
|
99
100
|
rescue OptionParser::InvalidOption => e
|
100
|
-
puts "
|
101
|
+
puts "illegal option, show help: #$0 --help "
|
101
102
|
rescue Exception => e
|
102
103
|
puts e.to_s
|
103
104
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: file-timestamp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.6.
|
4
|
+
version: 1.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Zhong Xingdou
|
@@ -10,8 +10,8 @@ bindir: bin
|
|
10
10
|
cert_chain: []
|
11
11
|
date: 2013-10-10 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
|
-
description:
|
14
|
-
|
13
|
+
description: |2
|
14
|
+
generate file timestamp with JSON format
|
15
15
|
email: zhongxingdou@gmail.com
|
16
16
|
executables:
|
17
17
|
- timestamp
|
@@ -19,8 +19,9 @@ extensions: []
|
|
19
19
|
extra_rdoc_files: []
|
20
20
|
files:
|
21
21
|
- bin/timestamp
|
22
|
-
homepage:
|
23
|
-
licenses:
|
22
|
+
homepage: https://github.com/zhongxingdou/file-timestamp
|
23
|
+
licenses:
|
24
|
+
- MIT
|
24
25
|
metadata: {}
|
25
26
|
post_install_message:
|
26
27
|
rdoc_options: []
|
@@ -28,18 +29,18 @@ require_paths:
|
|
28
29
|
- lib
|
29
30
|
required_ruby_version: !ruby/object:Gem::Requirement
|
30
31
|
requirements:
|
31
|
-
- -
|
32
|
+
- - '>='
|
32
33
|
- !ruby/object:Gem::Version
|
33
34
|
version: '0'
|
34
35
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
35
36
|
requirements:
|
36
|
-
- -
|
37
|
+
- - '>='
|
37
38
|
- !ruby/object:Gem::Version
|
38
39
|
version: '0'
|
39
40
|
requirements: []
|
40
41
|
rubyforge_project:
|
41
|
-
rubygems_version: 2.
|
42
|
+
rubygems_version: 2.2.2
|
42
43
|
signing_key:
|
43
44
|
specification_version: 4
|
44
|
-
summary:
|
45
|
+
summary: generate file timestamp with JSON format
|
45
46
|
test_files: []
|