Module: Lokka::Sh::Rake
- Extended by:
- Forkable
- Defined in:
- lib/lokka/sh/rake.rb
Class Method Summary
collapse
Methods included from Forkable
_invoke, after_fork, before_fork, invoke, run_after_fork, run_before_fork
Methods included from Helpers
#lesspipe
Class Method Details
._invoke(line) ⇒ Object
25
26
27
28
29
30
31
32
33
34
|
# File 'lib/lokka/sh/rake.rb', line 25
def _invoke(line)
line ||= 'default'
name, *args = line.split(/\s+/)
args.each do |arg|
env, value = arg.split('=')
next unless env && !env.empty? && value && !value.empty?
ENV[env] = value
end
::Rake.application[name].invoke
end
|
.init ⇒ Object
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
# File 'lib/lokka/sh/rake.rb', line 10
def init
$stdout = StringIO.new
before_fork do
end
after_fork do
end
::Rake.application = ::Rake::Application.new
::Rake.application.init
::Rake.application.load_rakefile
ensure
$stdout = STDOUT
end
|
.task_names ⇒ Object
36
37
38
|
# File 'lib/lokka/sh/rake.rb', line 36
def task_names
::Rake.application.tasks.map{|t| t.name}
end
|