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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 001e83927dbcc6a8bbde99e4eca19b904a5344b02f5ab8ad2b1fc63a7e55a24b
4
- data.tar.gz: 67404d3cec0b93c5c2a4fbea8ff01e3e18ea24df2176c6ac4dcaaf6495a97c69
3
+ metadata.gz: a24fbbc39d5a5d420a7b67713292409a71aae25b72484c9af7f261af3b1f952f
4
+ data.tar.gz: 8e33e3dd2579ee7ef0c3c56144b2cc2beecb68784e20c60b73ea1f8bb1adc9fb
5
5
  SHA512:
6
- metadata.gz: 64ed16618d5d1bdd857b1cf1739b59f9964e90ce315437cc0e5dbe995e87b258dcfbde302cdd5f47233f95b8b55324801af65884b6aef1fd6b5e72b6a62295ed
7
- data.tar.gz: d0ab3ede67051850dada5596979063397a875f1a25655acd5242f0ffe5899fefe30a71605c26fe437bfb451dc49c7a3bff518b006392834d3885ac72bd7b62e3
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
- puts 'file: ' + file.inspect if @debug
89
- return if Time.parse(@dx.last_modified) >= (file[:mtime])
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
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dir-to-xml
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.5
4
+ version: 1.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
metadata.gz.sig CHANGED
Binary file