Class: Application::Remote
- Defined in:
- lib/capistrano-db-pull/application.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(instance, stage) ⇒ Remote
constructor
A new instance of Remote.
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 |