summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSaku Ytti <saku@ytti.fi>2014-08-12 16:08:21 +0300
committerSaku Ytti <saku@ytti.fi>2014-08-12 16:08:21 +0300
commitef1735ffdadb10371036989b10756d341b64d292 (patch)
tree99550575f7d4028166d35fae02d2dfa47e410d77
parent583f96832185d695c4cdb99fe36b5de1033f433c (diff)
Support type_as_directory for git output
If set to true, repo will have directory matching model type, instead of new repo.
-rw-r--r--lib/oxidized/output/git.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/oxidized/output/git.rb b/lib/oxidized/output/git.rb
index df76da3..2b86f3f 100644
--- a/lib/oxidized/output/git.rb
+++ b/lib/oxidized/output/git.rb
@@ -34,6 +34,10 @@ class Git < Output
outputs.type(type).each do |output|
(type_cfg << output; next) if not output.name
type_file = file + '--' + output.name
+ if @cfg.type_as_directory?
+ type_file = type + '/' + type_file
+ type_repo = repo
+ end
update type_repo, type_file, output
end
update type_repo, file, type_cfg unless type_cfg.empty?