53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
|
# File 'lib/logical-construct/ground-control/setup/build-files.rb', line 53
def define
rakefile = nil
initd = nil
in_namespace do
directory target_dir
gemfile = ConfigBuilder.new(self) do |task|
task.base_name = "Gemfile"
end
Mattock::BundleCommandTask.new(:standalone => gemfile.target_path) do |bundle_build|
bundle_build.command = (
cmd("cd", target_dir) &
cmd("bundle", "install"){|bundler|
bundler.options << "--standalone"
bundler.options << "--binstubs=bin"
})
end
rakefile = ConfigBuilder.new(self) do |task|
task.base_name = "Rakefile"
end
initd = ConfigBuilder.new(self) do |task|
task.base_name = "construct.init.d"
task.[:construct_dir] = construct_dir
task.[:platform] = platform
end
end
desc "Template files to be created on the remote server"
task root_task => [rakefile.target_path] + in_namespace(:standalone)
task root_task => [initd.target_path] + in_namespace(:standalone)
task :local_setup => root_task
end
|