Top Level Namespace
Defined Under Namespace
Modules: Mina
Instance Method Summary collapse
- #_all_stages_empty? ⇒ Boolean
- #_argument_included_in_stages?(arg) ⇒ Boolean
- #_default_stage ⇒ Object
- #_default_stages ⇒ Object
- #_file_for_stage(stage_name) ⇒ Object
- #_get_all_stages ⇒ Object
- #_stage_file_exists?(stage_name) ⇒ Boolean
- #_stages_dir ⇒ Object
Instance Method Details
#_all_stages_empty? ⇒ 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
30 31 32 |
# File 'lib/mina/multistage.rb', line 30 def _argument_included_in_stages?(arg) fetch(:all_stages).include?(arg) end |
#_default_stage ⇒ Object
2 3 4 |
# File 'lib/mina/multistage.rb', line 2 def _default_stage fetch(:default_stage, 'staging') end |
#_default_stages ⇒ Object
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_stages ⇒ Object
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
22 23 24 |
# File 'lib/mina/multistage.rb', line 22 def _stage_file_exists?(stage_name) File.exist?(File.(_file_for_stage(stage_name))) end |
#_stages_dir ⇒ Object
10 11 12 |
# File 'lib/mina/multistage.rb', line 10 def _stages_dir fetch(:stages_dir, 'config/deploy') end |