dir-to-xml 1.2.1 → 1.2.2

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: 5a981066889af6ae5fe3c1b95af1fe1b11847441f0e7be318f394311293bd583
4
- data.tar.gz: 3e930b643d528dced500e2352bd778524d481feca645a51a0b79f2057161eea3
3
+ metadata.gz: 68fb3b092b29f78ba022f7ed82bcb492de8371abcbfbeffb96b68d5dce547838
4
+ data.tar.gz: e30e9f017e10760e9b6df95f56fd3984edf86c6d0f94794b465d5c0de7492dc1
5
5
  SHA512:
6
- metadata.gz: a215864766564c3e9c3fbf21665933fa2ab6c22a390472b9998a80e069188486292b94dbf596884301d7abc530190bb4ee27a7ffebbab4284999e31aa9abe623
7
- data.tar.gz: a452a6224daab6a70a97852e6741d5ea1db20ba5f08b58a55bcff64bb0a5b55abbc974ccc20e026a65577f5ebadd8aaf52c7ccb961908df1f9acd31ed0d70a4a
6
+ metadata.gz: eaac7e5cd9fabbd8e36c447fcf1476da286e5d38aa529cf49ef49bb4c92e70f3ec7f826754e4c90efb758d722eb130a13c23274aa8f3f6d021206284e6f1cea1
7
+ data.tar.gz: 6b40bb4b36f1a3873cea22cfd0246952d4d83a1000140f1472f0b75316611d5f8a101b30a04dc96bf663bb13f8eefc7ab5783697ee47f1074a97409fd1093ba4
checksums.yaml.gz.sig CHANGED
Binary file
data/lib/dir-to-xml.rb CHANGED
@@ -164,7 +164,7 @@ class DirToXML
164
164
  else
165
165
 
166
166
  @dx = new_index(records)
167
- find_latest(records)
167
+ find_latest(records) if records.any?
168
168
 
169
169
  end
170
170
 
@@ -198,6 +198,8 @@ class DirToXML
198
198
  @latest_file[:path] = @path
199
199
  puts ':@latest_file: ' + @latest_file.inspect if @debug
200
200
 
201
+ return unless @recursive
202
+
201
203
  puts 'before directories()' if @debug
202
204
  dir_list = directories()
203
205
  puts 'dir_list: ' + dir_list.inspect if @debug
@@ -208,7 +210,7 @@ class DirToXML
208
210
 
209
211
  puts 'dir: ' + dir.inspect if @debug
210
212
  dtx2 = DirToXML.new(File.join(@path, dir), index: @index,
211
- recursive: true, verbose: false, debug: @debug)
213
+ recursive: @recursive, verbose: false, debug: @debug)
212
214
  [dir, dtx2.latest_file]
213
215
 
214
216
  end.reject {|_,latest| latest.nil? }.sort_by {|_, x| x[:mtime]}.last
@@ -262,7 +264,7 @@ class DirToXML
262
264
  dx.title = 'Index of ' + @path
263
265
  dx.file_path = @path
264
266
  dx.last_modified = Time.now
265
- dx.import records.reverse
267
+ dx.import records.reverse if records.any?
266
268
  dx.save File.join(@path, @index)
267
269
 
268
270
  return dx
data.tar.gz.sig CHANGED
Binary file
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.2.1
4
+ version: 1.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -35,7 +35,7 @@ cert_chain:
35
35
  m7hEq9GAsvYejQNMhcxlvi+e70d3QiEg+2SVsBHaUGURzv0LjycCOjOaUxQA5swC
36
36
  JKGINad8xoEL7XIDoO6EnBcY
37
37
  -----END CERTIFICATE-----
38
- date: 2022-02-21 00:00:00.000000000 Z
38
+ date: 2022-03-06 00:00:00.000000000 Z
39
39
  dependencies:
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: dxlite
metadata.gz.sig CHANGED
@@ -1,3 +1 @@
1
- �S�������7Թd�m������;���/4�;�y' �=���;�� �ߪ1YZ�7Q�
2
- zXx���1��.]]D4������ʔc�V#uO$Yn0r|�'�)�d4z����N��ڑ�1_<��M��O%��!��o3���oV�'�N�$�*�؜��Z��C=<4J�VX�P��2�@k��a���KlZ
3
- �J�?��O���8#F�WUuE\V�ͅnͩm�*gv=�9�q�X���+f���%�/iF�2$��n�:�)�oo�|�C�xT�A����08�!P�,�AIW� O�0��9%�MȨ��U�l,I�5H9��� /T(mO�_�����+�[��X�/��ҭ���֙RJ�& ���'�x�)� ޼���a�������
1
+ ��mQT>Ђ ��H��