Top Level Namespace

Defined Under Namespace

Modules: Mina

Instance Method Summary collapse

Instance Method Details

#_all_stages_empty?Boolean

Returns:

  • (Boolean)


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

def _all_stages_empty?
  !fetch(:all_stages, nil)
end

#_argument_included_in_stages?(arg) ⇒ Boolean

Returns:

  • (Boolean)


30
31
32
# File 'lib/mina/multistage.rb', line 30

def _argument_included_in_stages?(arg)
  fetch(:all_stages).include?(arg)
end

#_default_stageObject



2
3
4
# File 'lib/mina/multistage.rb', line 2

def _default_stage
  fetch(:default_stage, 'staging')
end

#_default_stagesObject



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

def _default_stages
  fetch(:stages, %w(staging production))
end

#_file_for_stage(stage_name) ⇒ Object



18
19
20
# File 'lib/mina/multistage.rb', line 18

def _file_for_stage(stage_name)
  File.join(_stages_dir, "#{stage_name}.rb")
end

#_get_all_stagesObject



26
27
28
# File 'lib/mina/multistage.rb', line 26

def _get_all_stages
  Dir["#{_stages_dir}/*.rb"].reduce([]) { |all_stages, file| all_stages << File.basename(file, '.rb') }
end

#_stage_file_exists?(stage_name) ⇒ Boolean

Returns:

  • (Boolean)


22
23
24
# File 'lib/mina/multistage.rb', line 22

def _stage_file_exists?(stage_name)
  File.exist?(File.expand_path(_file_for_stage(stage_name)))
end

#_stages_dirObject



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

def _stages_dir
  fetch(:stages_dir, 'config/deploy')
end