Class: LogicalConstruct::GroundControl::Setup

Inherits:
Mattock::TaskLib
  • Object
show all
Defined in:
lib/logical-construct/ground-control/setup.rb

Instance Method Summary collapse

Instance Method Details

#default_configuration(core) ⇒ Object



13
14
15
16
# File 'lib/logical-construct/ground-control/setup.rb', line 13

def default_configuration(core)
  super
  core.copy_settings_to(self)
end

#default_subtasksObject



38
39
40
41
42
43
44
45
# File 'lib/logical-construct/ground-control/setup.rb', line 38

def default_subtasks
  in_namespace do
    CreateConstructDirectory.new(self)
    build_files = BuildFiles.new(self)
    CopyFiles.new(self, build_files)
    InstallInit.new(self)
  end
end

#defineObject



18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# File 'lib/logical-construct/ground-control/setup.rb', line 18

def define
  in_namespace do
    task :collect, [:address, :platform] do |t, args|
      [:address, :platform].each do |field|
        if args[field].nil?
          fail "Need #{field} for setup"
        end
      end
      remote_server.address = args[:address]
      self.platform = args[:platform]
    end

    task_spine(:collect, :local_setup, :remote_groundwork, :remote_config, :remote_setup)
    task :complete => [:local_setup, :remote_setup]
  end

  desc "Set up a remote server to act as a Construct foundation"
  task root_task,[:address, :platform] => self[:complete]
end