Class: SozoMagento2::Info::Info

Inherits:
Object
  • Object
show all
Includes:
Capistrano::Doctor::OutputHelpers
Defined in:
lib/capistrano/sozo_magento2/info.rb

Overview

Class to out key information at the end of the deploy:check command

Instance Method Summary collapse

Constructor Details

#initialize(env = Capistrano::Configuration.env) ⇒ Info

Initialize the class with access to env data



24
25
26
# File 'lib/capistrano/sozo_magento2/info.rb', line 24

def initialize(env=Capistrano::Configuration.env)
    @env = env
end

Instance Method Details

#callObject

Output the key information in the CLI



29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# File 'lib/capistrano/sozo_magento2/info.rb', line 29

def call
    title("Deployment Info")

    values = inspect_all_values

    table(values.keys.sort_by(&:to_s)) do |key, row|
        row.yellow if values[key] == "\"production\""
        row << key.inspect
        row << ''
        row << values[key]
    end
    
    puts("")
    warning("Make sure you check these values before deploying!")
    puts("")
end