Module: Mina::Ssh

Defined in:
lib/mina/ssh.rb,
lib/mina/ssh/version.rb

Constant Summary collapse

STAGES_DIR =
'config/deploy'.freeze
VERSION =
'0.1.0'.freeze

Class Method Summary collapse

Class Method Details

.connect!Object



10
11
12
13
14
15
# File 'lib/mina/ssh.rb', line 10

def connect!
  user = variable.name
  domain = variable.domain

  exec("ssh #{user}@#{domain}")
end

.load_environment_config(environment) ⇒ Object



19
20
21
# File 'lib/mina/ssh.rb', line 19

def load_environment_config(environment)
  load "#{STAGES_DIR}/#{environment}.rb"
end

.variableObject



27
28
29
# File 'lib/mina/ssh.rb', line 27

def variable
  @variable ||= OpenStruct.new(Mina::Configuration.instance.variables)
end