Class: Capsh

Inherits:
Object
  • Object
show all
Defined in:
lib/capsh.rb

Defined Under Namespace

Modules: Ext

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(hosts, options = {}, cfg = Capistrano::Configuration.new) ⇒ Capsh

Returns a new instance of Capsh.



15
16
17
18
19
20
21
22
23
24
25
# File 'lib/capsh.rb', line 15

def initialize(hosts, options = {}, cfg = Capistrano::Configuration.new)
  @cfg = cfg
  cfg.set :ssh_options, { :forward_agent => true, :auth_methods => "publickey" }
  cfg.extend(Ext)
  options.each do |k, v|
    cfg.set(k, v)
  end
  cfg.role :app, *hosts    
  cfg.task :a_fake_caph_task do
  end
end

Instance Attribute Details

#cfgObject (readonly)

Returns the value of attribute cfg.



13
14
15
# File 'lib/capsh.rb', line 13

def cfg
  @cfg
end

Instance Method Details

#runObject



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

def run()
  Capistrano::Shell.run(cfg)
end