dir-to-xml 1.0.5 → 1.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/dir-to-xml.rb +11 -5
- metadata +1 -1
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a24fbbc39d5a5d420a7b67713292409a71aae25b72484c9af7f261af3b1f952f
|
4
|
+
data.tar.gz: 8e33e3dd2579ee7ef0c3c56144b2cc2beecb68784e20c60b73ea1f8bb1adc9fb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c45dfed7498b83d0918456d4deb47570cec2f6ab63e27baf0cc26f815927a161a783d3278f6ad5bb421f7d199f9332ea42fd3e9afa10c8ba1c4bd17838785ca6
|
7
|
+
data.tar.gz: 0dc2bdf0cc9483abf4f0ec8fc4f33c48a2d64e9e30cc1b281383c1bb3f9586b7aa4bd5db3459fed4a205e1b9c05954bdaa6629c416f78e357fbe543e4261a154
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/dir-to-xml.rb
CHANGED
@@ -85,12 +85,18 @@ class DirToXML
|
|
85
85
|
puts 'nothing to do' if @debug
|
86
86
|
|
87
87
|
file = a2.max_by {|x| x[:mtime]}
|
88
|
-
|
89
|
-
|
88
|
+
|
89
|
+
if @debug then
|
90
|
+
puts 'file: ' + file.inspect
|
91
|
+
puts 'd1: ' + Time.parse(@dx.last_modified).inspect
|
92
|
+
puts 'd2: ' + (file[:mtime]).inspect
|
93
|
+
end
|
94
|
+
|
95
|
+
return if Time.parse(@dx.last_modified) >= file[:mtime]
|
90
96
|
|
91
97
|
end
|
92
98
|
|
93
|
-
|
99
|
+
puts 'stage 2'
|
94
100
|
|
95
101
|
if @dx and @dx.respond_to? :last_modified then
|
96
102
|
|
@@ -99,7 +105,7 @@ class DirToXML
|
|
99
105
|
t = Time.parse(@dx.last_modified)
|
100
106
|
|
101
107
|
# find the most recently modified cur_files
|
102
|
-
recent = a2.select {|x| x[:mtime] > t }.map {|x| x[:name]} \
|
108
|
+
recent = a2.select {|x| Time.parse(x[:mtime]) > t }.map {|x| x[:name]} \
|
103
109
|
- %w(dir.xml dir.json)
|
104
110
|
|
105
111
|
# is it a new file or recently modified?
|
@@ -238,7 +244,7 @@ class DirToXML
|
|
238
244
|
|
239
245
|
def dxify(a)
|
240
246
|
|
241
|
-
@dx.last_modified = Time.now.to_s if @dx.respond_to :last_modified
|
247
|
+
@dx.last_modified = Time.now.to_s if @dx.respond_to? :last_modified
|
242
248
|
@dx.import a
|
243
249
|
@dx.save File.join(@path, @index)
|
244
250
|
|
metadata
CHANGED
metadata.gz.sig
CHANGED
Binary file
|