class Object

Public Instance Methods

_all_stages_empty?() click to toggle source
# File lib/mina/proteus.rb, line 13
def _all_stages_empty?
  !fetch(:all_stages, nil)
end
_app_file_in_stage_exists?(stage_name, app_name) click to toggle source
# File lib/mina/proteus.rb, line 45
def _app_file_in_stage_exists?(stage_name, app_name)
  File.exists?(File.join(_stages_dir, stage_name, "#{app_name}.rb"))
end
_apps_empty?() click to toggle source
# File lib/mina/proteus.rb, line 41
def _apps_empty?
  !fetch(:all_apps, nil)
end
_argument_included_in_apps?(arg) click to toggle source
# File lib/mina/proteus.rb, line 57
def _argument_included_in_apps?(arg)
  fetch(:all_apps).include?(arg)
end
_argument_included_in_stages?(arg) click to toggle source
# File lib/mina/proteus.rb, line 53
def _argument_included_in_stages?(arg)
  fetch(:all_stages).include?(arg)
end
_default_apps() click to toggle source
# File lib/mina/proteus.rb, line 29
def _default_apps
  fetch(:hanami_apps)
end
_default_stage() click to toggle source
# File lib/mina/proteus.rb, line 1
def _default_stage
  fetch(:default_stage, 'staging')
end
_default_stages() click to toggle source
# File lib/mina/proteus.rb, line 5
def _default_stages
  fetch(:stages, %w(staging production))
end
_file_for_app_in_stage(stage_name, app_name) click to toggle source
# File lib/mina/proteus.rb, line 49
def _file_for_app_in_stage(stage_name, app_name)
  File.join(_stages_dir, stage_name, "#{app_name}.rb")
end
_file_for_stage(stage_name) click to toggle source
# File lib/mina/proteus.rb, line 17
def _file_for_stage(stage_name)
  File.join(_stages_dir, "#{stage_name}.rb")
end
_get_all_apps() click to toggle source
# File lib/mina/proteus.rb, line 33
def _get_all_apps
  apps = []
  _get_all_stages.each do |stage|
    apps << Dir["#{_stages_dir}/#{stage}/*.rb"].reject{ |file| File.basename(file, '.rb') == stage }.reduce([]) { |all_apps, file| all_apps << File.basename(file, '.rb') }
  end
  apps.flatten.uniq
end
_get_all_stages() click to toggle source
# File lib/mina/proteus.rb, line 25
def _get_all_stages
  Dir["#{_stages_dir}/*.rb"].reduce([]) { |all_stages, file| all_stages << File.basename(file, '.rb') }
end
_stage_file_exists?(stage_name) click to toggle source
# File lib/mina/proteus.rb, line 21
def _stage_file_exists?(stage_name)
  File.exists?(File.expand_path(_file_for_stage(stage_name)))
end
_stages_dir() click to toggle source
# File lib/mina/proteus.rb, line 9
def _stages_dir
  fetch(:stages_dir, 'config/deploy')
end