dircrawl 0.0.13 → 0.0.14
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 +4 -4
- data/lib/dircrawl.rb +18 -17
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 99a04d217d2ae8f295d5e7b71d702019128fa888
|
4
|
+
data.tar.gz: 27c211fce81a7649ac03c77158c25889b42a47ad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 092d8f4d0f1456bc83c9176ad82853f03b6272414881e946e12ed85730831434600ab1a59efe52ac4c55dcf2096ffb392ebf1ebc3ddb3583be01a3c55f2b23cf
|
7
|
+
data.tar.gz: 661c0f676837b758e827a34060ce599dfe62f6bd211d206a0caca87078c4ba378009ec6c47253d30df0cad9f7a8e35feff620a0f4ed8471fca132d7f354dbd36
|
data/lib/dircrawl.rb
CHANGED
@@ -60,29 +60,30 @@ class DirCrawl
|
|
60
60
|
|
61
61
|
begin
|
62
62
|
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
63
|
+
# Check if processed file exists
|
64
|
+
# Skip processing (if yes)
|
65
|
+
if !File.exist?(get_write_dir(dir, file))
|
66
|
+
|
67
|
+
# Process Extras
|
68
|
+
if @extras_block != ""
|
69
|
+
extras = @extras_block.call(@output_dir+"/")
|
70
|
+
end
|
71
|
+
|
72
|
+
# Now Process Main
|
73
|
+
processed = @process_block.call(dir+"/"+file, *args)
|
74
|
+
else
|
75
|
+
puts "Processed file exists, skipping"
|
76
|
+
puts " " + dir + "/" + file
|
77
|
+
processed = File.read(get_write_dir(dir, file))
|
78
|
+
end
|
79
79
|
|
80
80
|
rescue Exception => e # really catch any failures
|
81
81
|
report_status("Error on file "+file+": "+e.to_s)
|
82
82
|
if @failure_mode == "debug"
|
83
83
|
binding.pry
|
84
84
|
elsif @failure_mode == "log"
|
85
|
-
|
85
|
+
error_file = dir + "/" + file + "\n"
|
86
|
+
IO.write(@output_dir+"/error_log.txt", error_file, mode: 'a')
|
86
87
|
end
|
87
88
|
end
|
88
89
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dircrawl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- M. C. McGrath
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2017-01-19 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: Run block on all files in dir
|
15
15
|
email: shidash@shidash.com
|