lib/application.rb in docman-0.0.67 vs lib/application.rb in docman-0.0.68
- old
+ new
@@ -140,11 +140,19 @@
def info(command, file, options = false)
result = {}
with_rescue(false) do
@docroot_config = DocrootConfig.new(@workspace_dir, deploy_target)
- if (command == 'states')
- result = Docman::Application.instance.config['deploy_targets']['git_target']['states']
+ if (command == 'full')
+ result['states'] = Docman::Application.instance.config['deploy_targets']['git_target']['states']
+ result['environments'] = Docman::Application.instance.config['environments']
+
+ projects = {}
+ info = @docroot_config.structure
+ @docroot_config.chain(info).values.each do |item|
+ projects.merge! info_recursive(item, command)
+ end
+ result['projects'] = projects
else
info = @docroot_config.structure
@docroot_config.chain(info).values.each do |item|
result.merge! info_recursive(item, command)
end