dir-to-xml 1.0.6 → 1.0.7

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: a24fbbc39d5a5d420a7b67713292409a71aae25b72484c9af7f261af3b1f952f
4
- data.tar.gz: 8e33e3dd2579ee7ef0c3c56144b2cc2beecb68784e20c60b73ea1f8bb1adc9fb
3
+ metadata.gz: a3383c2c66c62fb7de0316da47639a9416de37ac18907c12dbba947603237ffa
4
+ data.tar.gz: 5886daf349f5ac8b0fa13c1ddaa37cf76890a7a8a9117de5495f01642f2fe516
5
5
  SHA512:
6
- metadata.gz: c45dfed7498b83d0918456d4deb47570cec2f6ab63e27baf0cc26f815927a161a783d3278f6ad5bb421f7d199f9332ea42fd3e9afa10c8ba1c4bd17838785ca6
7
- data.tar.gz: 0dc2bdf0cc9483abf4f0ec8fc4f33c48a2d64e9e30cc1b281383c1bb3f9586b7aa4bd5db3459fed4a205e1b9c05954bdaa6629c416f78e357fbe543e4261a154
6
+ metadata.gz: 978914ab049ad0660a667295c63bf994f26358fd975e10fbd7390a063322caee77a30d645bfc672598da58b8d3ed87385412dda8643d18809b55424669513c75
7
+ data.tar.gz: ce2768f88448e621d886f01aadc6964b16a1d9deab82879482e56d95e72dec36d724cc6a557e0b05b376e69e22b88a136624cff7b3536b39fdc7b8513edc46b9
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
Binary file
data/lib/dir-to-xml.rb CHANGED
@@ -105,7 +105,7 @@ class DirToXML
105
105
  t = Time.parse(@dx.last_modified)
106
106
 
107
107
  # find the most recently modified cur_files
108
- recent = a2.select {|x| Time.parse(x[:mtime]) > t }.map {|x| x[:name]} \
108
+ recent = a2.select {|x| x[:mtime] > t }.map {|x| x[:name]} \
109
109
  - %w(dir.xml dir.json)
110
110
 
111
111
  # is it a new file or recently modified?
@@ -195,6 +195,8 @@ class DirToXML
195
195
 
196
196
  def select_by_ext(ext, &blk)
197
197
 
198
+ @a = @dx.to_a unless @a
199
+
198
200
  @object = ext != '*' ? @a.select{|x| x[:ext][/#{ext}$/]} : @a
199
201
  return if @object.empty?
200
202
 
@@ -207,7 +209,7 @@ class DirToXML
207
209
  def sort_by(sym)
208
210
 
209
211
  puts 'inside sort_by' if @debug
210
- procs = [[:mtime, lambda{|obj| obj.sort_by{|x| x[:mtime]}}]]
212
+ procs = [[:mtime, lambda{|obj| obj.sort_by{|x| Time.parse(x[:mtime])}}]]
211
213
  proc1 = procs.assoc(sym).last
212
214
 
213
215
  puts '@object: ' + @object.inspect if @debug
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.6
4
+ version: 1.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -35,7 +35,7 @@ cert_chain:
35
35
  YSREEphg3phQsU9LV4Dlc2Id4gB3W+//c1Ek6TFieKoVemKMkbtB1lgqsEpTCfwh
36
36
  oNUg84DlSmZ2z9LKagBVAlDy
37
37
  -----END CERTIFICATE-----
38
- date: 2021-02-01 00:00:00.000000000 Z
38
+ date: 2021-02-21 00:00:00.000000000 Z
39
39
  dependencies:
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: dxlite
metadata.gz.sig CHANGED
Binary file