Class: Capsh
- Inherits:
-
Object
- Object
- Capsh
- Defined in:
- lib/capsh.rb
Defined Under Namespace
Modules: Ext
Instance Attribute Summary collapse
-
#cfg ⇒ Object
readonly
Returns the value of attribute cfg.
Instance Method Summary collapse
-
#initialize(hosts, options = {}, cfg = Capistrano::Configuration.new) ⇒ Capsh
constructor
A new instance of Capsh.
- #run ⇒ Object
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, = {}, cfg = Capistrano::Configuration.new) @cfg = cfg cfg.set :ssh_options, { :forward_agent => true, :auth_methods => "publickey" } cfg.extend(Ext) .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
#cfg ⇒ Object (readonly)
Returns the value of attribute cfg.
13 14 15 |
# File 'lib/capsh.rb', line 13 def cfg @cfg end |
Instance Method Details
#run ⇒ Object
27 28 29 |
# File 'lib/capsh.rb', line 27 def run() Capistrano::Shell.run(cfg) end |