docman 0.0.65 → 0.0.66
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/application.rb +15 -6
- 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: f83c547f24af83fb0ea7f3b1f8e5fa8c0371dd49
|
4
|
+
data.tar.gz: d8739853f2f9e9a7737b94c9b1294cb10a75f47b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ce1048afa037032f4662dfb6d7b4db06146b3f94724193694f7ee01474840965a0c544c3b8bb3f242e736de15ba20d7766c2b90f3f70694c0b601ee5253d06b8
|
7
|
+
data.tar.gz: f033ffa55f073b08d1793322e756c2090b30e84de043efebb037a07ca428f7228df59ebb0798e736a5381774d075873978bd6d8aa9134223e5f3d95c5f76b73c
|
data/lib/application.rb
CHANGED
@@ -142,21 +142,30 @@ module Docman
|
|
142
142
|
result = {}
|
143
143
|
with_rescue(false) do
|
144
144
|
@docroot_config = DocrootConfig.new(@workspace_dir, deploy_target)
|
145
|
-
info =
|
145
|
+
info = @docroot_config.structure
|
146
146
|
@docroot_config.chain(info).values.each do |item|
|
147
|
-
|
148
|
-
result.merge! info_recursive(item)
|
147
|
+
result.merge! info_recursive(item, command)
|
149
148
|
end
|
150
149
|
end
|
151
150
|
File.open(file, 'w') {|f| f.write result.to_json}
|
152
151
|
result
|
153
152
|
end
|
154
153
|
|
155
|
-
def info_recursive(info)
|
154
|
+
def info_recursive(info, command)
|
156
155
|
result = {}
|
157
|
-
|
156
|
+
case command
|
157
|
+
when 'list'
|
158
|
+
result[info['name']] = info['repo'] if info.key?('repo')
|
159
|
+
when 'full'
|
160
|
+
info_clone = info.clone
|
161
|
+
info_clone.delete('docroot_config')
|
162
|
+
info_clone.delete('children')
|
163
|
+
info_clone.delete('parent')
|
164
|
+
info_clone.delete('root')
|
165
|
+
result[info['name']] = info_clone
|
166
|
+
end
|
158
167
|
info['children'].each do |child|
|
159
|
-
result.merge! info_recursive(child)
|
168
|
+
result.merge! info_recursive(child, command)
|
160
169
|
end
|
161
170
|
result
|
162
171
|
end
|
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.66
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexander Tolstikov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-04
|
11
|
+
date: 2016-06-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|