Class: Moku::Task::OverlaySites

Inherits:
Task
  • Object
show all
Defined in:
lib/moku/task/overlay_sites.rb

Overview

Install site-specific files into the common files via symlink

Instance Method Summary collapse

Methods inherited from Task

#to_s

Instance Method Details

#call(release) ⇒ Object


13
14
15
16
17
18
19
20
21
22
# File 'lib/moku/task/overlay_sites.rb', line 13

def call(release)
  Sequence.for(
    release.sites.site_names.flat_map do |site_name|
      [
        [Sites::Scope.site(site_name), mkdir_command(site_name)],
        [Sites::Scope.site(site_name), link_command(site_name)]
      ]
    end
  ) {|scope, cmd| release.run(scope, cmd) }
end