docman 0.0.19 → 0.0.20

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
  SHA1:
3
- metadata.gz: 5e2b2270da91cbcdc54d9bce217cd8c4969a3cb1
4
- data.tar.gz: 613a17b47d5f2315b4fad66ef188b6225b54e598
3
+ metadata.gz: 2ab28b4d09d14091fa0a8e14cdaebd4c90213448
4
+ data.tar.gz: 52d56c9c9c70599041e70288f5b0a96fe37090b2
5
5
  SHA512:
6
- metadata.gz: 4a7291fbe5463507e8774a3077dd4a35c81719bb726304dc3c94c083ce207ed044db841df96a3d922ce2378519c97dfea6a072c1730ea6513545f618135c4f7e
7
- data.tar.gz: 5cfd599ed2a7edb241a1f5e0a6133b8ec9d243d46c12d1db3fac19f4586d03e9beb08888f890d412dbba37f1f486ca7917a49647a60d0356d544faad7562a4f9
6
+ metadata.gz: c5bc615576cbb21fc0d0d53f26088001fa2dafad22242dafda1e1da3c4c70047ad20c745f5e2139bd08ce2c4ed04f519565ae9b7910a58d2dfd2d45e32a71ed4
7
+ data.tar.gz: 89a71cd7263864e6cebde5b2b687f33ea57b986533e68dcbec20f7ae7982e864676930188fb5a1c7132620d6aae766f5478c27c6b677dc2c557df043390aad67
@@ -151,7 +151,8 @@ module Docman
151
151
  def build_recursive(info = nil)
152
152
  info = info ? info : @docroot_config.structure
153
153
  build_dir(info)
154
- info['children'].sort.map do |key, child|
154
+ info['children'].sort_by!{|a| a['order']}
155
+ info['children'].each do |child|
155
156
  build_recursive(child)
156
157
  end
157
158
  end
@@ -27,7 +27,7 @@ module Docman
27
27
  def structure_build(path, prefix = '', parent = nil)
28
28
  return unless File.file? File.join(path, 'info.yaml')
29
29
 
30
- children = {}
30
+ children = []
31
31
  info = YAML::load_file(File.join(path, 'info.yaml'))
32
32
  @raw_infos[File.basename path] = YAML::load_file(File.join(path, 'info.yaml'))
33
33
  unless info['status'].nil?
@@ -58,7 +58,7 @@ module Docman
58
58
  if File.directory?(full_path)
59
59
  dir_hash = structure_build(full_path, prefix, i)
60
60
  unless dir_hash == nil
61
- children[dir_hash['order']] = dir_hash
61
+ children << dir_hash
62
62
  end
63
63
  end
64
64
  end
@@ -85,7 +85,7 @@ module Docman
85
85
  def set_rebuild_recursive(obj, value)
86
86
  obj.need_rebuild[@state_name] = value
87
87
  if obj.has_key?('children')
88
- obj['children'].values.each do |info|
88
+ obj['children'].each do |info|
89
89
  set_rebuild_recursive(info, value)
90
90
  end
91
91
  end
@@ -1,3 +1,3 @@
1
1
  module Docman
2
- VERSION = "0.0.19"
2
+ VERSION = "0.0.20"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: docman
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.19
4
+ version: 0.0.20
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Tolstikov