Class: Mina::Application

Inherits:
Rake::Application
  • Object
show all
Includes:
Configuration::DSL
Defined in:
lib/mina/application.rb

Instance Method Summary collapse

Methods included from Configuration::DSL

included

Constructor Details

#initializeApplication


5
6
7
8
# File 'lib/mina/application.rb', line 5

def initialize
  super
  @rakefiles = ['config/deploy.rb', minafile]
end

Instance Method Details

#nameObject


10
11
12
# File 'lib/mina/application.rb', line 10

def name
  'mina'
end

#runObject


14
15
16
17
# File 'lib/mina/application.rb', line 14

def run
  Rake.application = self
  super
end

#sort_options(options) ⇒ Object


19
20
21
22
23
24
25
26
# File 'lib/mina/application.rb', line 19

def sort_options(options)
  not_applicable_to_mina = %w(quiet silent verbose dry-run)
  options.reject! do |(switch, *)|
    switch =~ /--#{Regexp.union(not_applicable_to_mina)}/
  end

  super.push(version, verbose, simulate, debug_configuration_variables)
end

#top_level_tasksObject


28
29
30
31
32
# File 'lib/mina/application.rb', line 28

def top_level_tasks
  return @top_level_tasks if @top_level_tasks.include?('init')
  @top_level_tasks << :debug_configuration_variables
  @top_level_tasks << :run_commands
end