Class: Avm::Stereotypes::EacRailsBase0::Deploy

Inherits:
Avm::Stereotypes::EacWebappBase0::Deploy show all
Defined in:
lib/avm/stereotypes/eac_rails_base0/deploy.rb

Constant Summary

Constants inherited from Avm::Stereotypes::EacWebappBase0::Deploy

Avm::Stereotypes::EacWebappBase0::Deploy::JOBS

Instance Attribute Summary

Attributes inherited from Avm::Stereotypes::EacWebappBase0::Deploy

#git_reference, #instance

Instance Method Summary collapse

Methods inherited from Avm::Stereotypes::EacWebappBase0::Deploy

#assert_instance_branch, #commit_sha1_uncached, #git_deploy, #git_fetch_uncached, #git_reference_found_uncached, #git_remote_hashs_uncached, #git_remote_name, #git_repository_path, #git_uncached, #initialize, #instance_branch, #master_branch, #remote_branch, #run, #setup_files_units, #start_banner

Constructor Details

This class inherits a constructor from Avm::Stereotypes::EacWebappBase0::Deploy

Instance Method Details

#assert_databaseObject



17
18
19
20
# File 'lib/avm/stereotypes/eac_rails_base0/deploy.rb', line 17

def assert_database
  infom 'Asserting database...'
  instance.rake('db:create').system!
end

#bundle_installObject



22
23
24
25
# File 'lib/avm/stereotypes/eac_rails_base0/deploy.rb', line 22

def bundle_install
  infom 'Running "bundle install"...'
  instance.bundle('install').system!
end

#compile_assetsObject



27
28
29
30
# File 'lib/avm/stereotypes/eac_rails_base0/deploy.rb', line 27

def compile_assets
  infom 'Compiling assets...'
  instance.rake('assets:clean', 'assets:precompile').system!
end

#database_migrateObject



32
33
34
35
# File 'lib/avm/stereotypes/eac_rails_base0/deploy.rb', line 32

def database_migrate
  infom 'Running database migrations...'
  instance.rake('db:migrate').system!
end

#touch_restart_fileObject



37
38
39
40
41
42
# File 'lib/avm/stereotypes/eac_rails_base0/deploy.rb', line 37

def touch_restart_file
  infom 'Touching restart file...'
  instance.host_env.command(
    'touch', ::File.join(instance.read_entry(:fs_path), 'tmp', 'restart.txt')
  ).system!
end