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::APPENDED_DIRECTORIES_ENTRY_KEY, Avm::Stereotypes::EacWebappBase0::Deploy::DEFAULT_REFERENCE, Avm::Stereotypes::EacWebappBase0::Deploy::JOBS

Instance Attribute Summary

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

#instance, #options

Instance Method Summary collapse

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

#appended_directories, #appended_directories_from_instance_entry, #appended_directories_from_options, #assert_instance_branch, #build_git_commit, #commit_sha1_uncached, #git_deploy, #git_fetch_uncached, #git_reference, #git_reference_found_uncached, #git_remote_hashs_uncached, #git_remote_name, #git_repository_path, #git_uncached, #initialize, #instance_branch, #master_branch, #remote_branch, #request_test, #run, #setup_files_units, #start_banner

Constructor Details

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

Instance Method Details

#assert_databaseObject



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

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

#bundle_installObject



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

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

#compile_assetsObject



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

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

#database_migrateObject



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

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

#restart_tasks_schedulerObject



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

def restart_tasks_scheduler
  infom 'Restarting Tasks Scheduler\'s daemon...'
  instance.bundle('exec', 'tasks_scheduler', 'restart').system!
end

#touch_restart_fileObject



43
44
45
46
47
48
# File 'lib/avm/stereotypes/eac_rails_base0/deploy.rb', line 43

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