Module: Marionetta::RakeHelper

Extended by:
RakeHelper
Includes:
Rake::DSL
Included in:
RakeHelper
Defined in:
lib/marionetta/rake_helper.rb

Instance Method Summary collapse

Instance Method Details

#install_group_task(group, manipulation, task_deps = []) ⇒ Object



24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# File 'lib/marionetta/rake_helper.rb', line 24

def install_group_task(group, manipulation, task_deps = [])
  groups = [group]

  group.groups.each do |g|
    groups << g
  end

  manipulator, method_name = manipulation

  groups.each do |g|
    class_name = manipulator.name.split('::').last.downcase
    task_desc = task_desc(g, class_name, method_name)
    task_name = task_name(g, class_name, method_name)

    desc(task_desc)
    task(task_name => task_deps) do
      g.manipulate_each_server(manipulator, method_name)
    end
  end
end

#install_group_tasks(group) ⇒ Object



16
17
18
19
20
21
22
# File 'lib/marionetta/rake_helper.rb', line 16

def install_group_tasks(group)
  install_group_tasks_for(group)

  group.groups.each do |g|
    install_group_tasks_for(g)
  end
end