Class: RailsPushAndMigrate::Dokku

Inherits:
Base
  • Object
show all
Defined in:
lib/rails-push-and-migrate/dokku.rb

Instance Attribute Summary

Attributes inherited from Base

#branch, #remote

Instance Method Summary collapse

Methods inherited from Base

#assets_changed?, #diff_files, #git_push_cmd, #has_migration?, #initialize, #print_and_execute, #print_and_execute!, #remote_branch, #run, #with_named_repo

Constructor Details

This class inherits a constructor from RailsPushAndMigrate::Base

Instance Method Details

#dokku_pathObject



5
6
7
# File 'lib/rails-push-and-migrate/dokku.rb', line 5

def dokku_path
  File.expand_path("../../../bin/dokku_client.sh", __FILE__)
end

#migrate_cmdObject



9
10
11
12
13
14
# File 'lib/rails-push-and-migrate/dokku.rb', line 9

def migrate_cmd
  cmds = [
    "git remote add dokku #{remote}",
    "#{dokku_path} run rake db:migrate"
  ].join(" && ")
end