Skip to content

Commit

Permalink
Fix creation of shared directories to work for paths with parent/child
Browse files Browse the repository at this point in the history
  • Loading branch information
technicalpickles authored and Rails Machine committed Dec 12, 2012
1 parent 0e5afad commit e44652a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/moonshine/manifest/rails/rails.rb
Expand Up @@ -161,8 +161,10 @@ def rails_directories
"#{configuration[:deploy_to]}/releases"
]
if configuration[:shared_children].is_a?(Array)
shared_dirs = configuration[:shared_children].map { |d| "#{configuration[:deploy_to]}/shared/#{d}" }
dirs += shared_dirs
shared_children_with_parents = configuration[:shared_children].map do |d|
d.split("/").inject([]) {|these_dirs, dir| these_dirs.empty? ? [dir] : these_dirs << "#{these_dirs.last}/#{dir}" }
end.flatten
dirs += shared_children_with_parents.map {|d| "#{configuration[:deploy_to]}/shared/#{d}" }
end

if configuration[:app_symlinks].is_a?(Array)
Expand Down

0 comments on commit e44652a

Please sign in to comment.