docman 0.0.86 → 0.0.87
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/lib/docman/docroot_config.rb +14 -14
- data/lib/docman/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 03255c785f6091860d96ade58f4fedb79a90e202
|
4
|
+
data.tar.gz: 8a286ef146bfce8751c0bfdf9174dd11d51c9699
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6106b522056fa9001c4fcdd12a05c11c66d69857167d6faa4f500e1f1aa522e41085acc91e1c7237bade6d127f3ae83d0a187d474d645e330708cac4ca0e3848
|
7
|
+
data.tar.gz: '042814f4d6a523fb8d50f613859bc8baa053d667b5d6f51123d5b51096fec6e4aff37795997d2394478886c4dcb6ea94d71c4f0eac3fa22093a97e8d05b8c568'
|
data/.gitignore
CHANGED
@@ -45,7 +45,7 @@ module Docman
|
|
45
45
|
if File.directory? master_file
|
46
46
|
@structure = structure_build(File.join(@docroot_config_dir, 'master'))
|
47
47
|
else
|
48
|
-
@structure = structure_build_from_config_file(
|
48
|
+
@structure = structure_build_from_config_file(Docman::Application.instance.config)
|
49
49
|
end
|
50
50
|
end
|
51
51
|
|
@@ -56,12 +56,17 @@ module Docman
|
|
56
56
|
GitUtil.update @docroot_config_dir, "#{options} #{branch.strip}"
|
57
57
|
end
|
58
58
|
|
59
|
-
def structure_build_from_config_file(
|
60
|
-
config = Docman::Application.instance.config
|
59
|
+
def structure_build_from_config_file(config, prefix = '', parent = nil, parent_key = 'master')
|
61
60
|
return if config['components'][parent_key].nil?
|
62
61
|
children = []
|
63
62
|
|
64
63
|
info = config['components'][parent_key]
|
64
|
+
|
65
|
+
children_components_config = nil
|
66
|
+
unless info['components'].nil?
|
67
|
+
children_components_config = {'components' => info.delete('components')}
|
68
|
+
end
|
69
|
+
|
65
70
|
@raw_infos[parent_key] = info
|
66
71
|
|
67
72
|
unless info['status'].nil?
|
@@ -70,7 +75,7 @@ module Docman
|
|
70
75
|
|
71
76
|
name = parent_key
|
72
77
|
prefix = prefix.size > 0 ? File.join(prefix, name) : name
|
73
|
-
info['full_path'] =
|
78
|
+
info['full_path'] = @docroot_config_dir
|
74
79
|
info['docroot_config'] = self
|
75
80
|
info['build_path'] = prefix
|
76
81
|
info['full_build_path'] = File.join(@docroot_dir, prefix)
|
@@ -91,16 +96,11 @@ module Docman
|
|
91
96
|
|
92
97
|
@names[name.to_s] = i
|
93
98
|
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
# unless dir_hash == nil
|
100
|
-
# children << dir_hash
|
101
|
-
# end
|
102
|
-
# end
|
103
|
-
# end
|
99
|
+
unless children_components_config.nil?
|
100
|
+
children_components_config['components'].each {|name, config|
|
101
|
+
children << structure_build_from_config_file(children_components_config, prefix, i, name)
|
102
|
+
}
|
103
|
+
end
|
104
104
|
i
|
105
105
|
end
|
106
106
|
|
data/lib/docman/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: docman
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.87
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexander Tolstikov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-12-
|
11
|
+
date: 2017-12-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|