docman 0.0.65 → 0.0.66

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: 33f00cf073acb991f379c9cdcb00153bd361d27b
4
- data.tar.gz: 30d68453e93bc820c302cb5893455e33cdf0d39c
3
+ metadata.gz: f83c547f24af83fb0ea7f3b1f8e5fa8c0371dd49
4
+ data.tar.gz: d8739853f2f9e9a7737b94c9b1294cb10a75f47b
5
5
  SHA512:
6
- metadata.gz: 4fa740547d9e10e55ef92b8cdddd1d6db38f6a503c7e49882ff1f3873d6dd62df263c7e04b2bcd12f1d30306e85c0906c6c658e4f36425ca5846a35cbb3f8614
7
- data.tar.gz: 8cfcd98adabaca50d66498bed4eb9274152e4f0490b0328cb6b254e76ad26521ff1b8eaf8ea50c4cbc830f73824b6ee519252241c0f79a5e6a67658b4b9d162e
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 = info ? info : @docroot_config.structure
145
+ info = @docroot_config.structure
146
146
  @docroot_config.chain(info).values.each do |item|
147
- #result[item['name']] = item['repo']
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
- result[info['name']] = info['repo'] if info.key?('repo')
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
@@ -1,3 +1,3 @@
1
1
  module Docman
2
- VERSION = "0.0.65"
2
+ VERSION = "0.0.66"
3
3
  end
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.65
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-17 00:00:00.000000000 Z
11
+ date: 2016-06-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler