Class: Application::Remote

Inherits:
Base
  • Object
show all
Defined in:
lib/capistrano-db-pull/application.rb

Instance Attribute Summary

Attributes inherited from Base

#capistrano, #config

Instance Method Summary collapse

Methods inherited from Base

#adapter, #database, #mysql?, #postgresql?, #sqlite3?

Constructor Details

#initialize(instance, stage) ⇒ Remote

Returns a new instance of Remote.



31
32
33
34
35
36
# File 'lib/capistrano-db-pull/application.rb', line 31

def initialize(instance, stage)
  super(instance)
  config = @capistrano.capture(
      "cat #{@capstrano.current_path}/config/database.yml")
  @config = YAML.load(ERB.new(config).result)[stage.to_s]
end