Class: Boothby::Toolbox

Inherits:
Object
  • Object
show all
Defined in:
lib/boothby/maintenance.rb

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.root=(value) ⇒ Object (writeonly)

Sets the attribute root

Parameters:

  • value

    the value to set the attribute root to.



9
10
11
# File 'lib/boothby/maintenance.rb', line 9

def root=(value)
  @root = value
end

Class Method Details

.setup_applicationObject



12
13
14
15
16
17
18
19
20
# File 'lib/boothby/maintenance.rb', line 12

def self.setup_application
  FileUtils.chdir(app_dir) do
    copy_example_files
    install_dependencies
    rake_task('db:prepare', 'db:test:prepare', label: 'Preparing database')
    rake_task('log:clear', 'tmp:clear', label: 'Cleaning old files')
    rake_task('restart', label: 'Restarting application server')
  end
end

.update_applicationObject



22
23
24
25
26
27
28
29
30
# File 'lib/boothby/maintenance.rb', line 22

def self.update_application
  FileUtils.chdir(app_dir) do
    copy_example_files
    install_dependencies
    rake_task('db:migrate', label: 'Updating database')
    rake_task('log:clear', 'tmp:clear', label: 'Cleaning old files')
    rake_task('restart', label: 'Restarting application server')
  end
end

.upgrade_applicationObject



32
33
34
35
36
37
38
39
40
# File 'lib/boothby/maintenance.rb', line 32

def self.upgrade_application
  FileUtils.chdir(app_dir) do
    copy_example_files
    install_dependencies
    rake_task('db:migrate', label: 'Updating database')
    rake_task('log:clear', 'tmp:clear', label: 'Cleaning old files')
    rake_task('restart', label: 'Restarting application server')
  end
end