module Alphonse::Configs::Tasks

Public Instance Methods

branch() click to toggle source
# File lib/alphonse/configs/operation.rb, line 26
def branch
  config[:branch] || 'master'
end
bundle() click to toggle source
# File lib/alphonse/configs/operation.rb, line 76
def bundle
  bundle_install
end
Also aliased as: install_gems
cd()
Alias for: cd_to_path
cd_to_parent_path() click to toggle source
# File lib/alphonse/configs/operation.rb, line 60
def cd_to_parent_path
  "cd #{config[:path]}"
end
cd_to_path() click to toggle source
# File lib/alphonse/configs/operation.rb, line 55
def cd_to_path
  "#{cd_to_parent_path}#{config[:app_name]}"
end
Also aliased as: cd
clone_repository()
Alias for: git_clone
db_migrate() click to toggle source
# File lib/alphonse/configs/operation.rb, line 86
def db_migrate
  rake("db:migrate RAILS_ENV=#{config[:environment]}")
end
Also aliased as: update_database
db_setup() click to toggle source
# File lib/alphonse/configs/operation.rb, line 81
def db_setup
  rake("db:setup RAILS_ENV=#{config[:environment]}")
end
Also aliased as: setup_database
gc()
Alias for: git_clone
git_clone() click to toggle source
# File lib/alphonse/configs/operation.rb, line 70
def git_clone
  "git clone #{repository} #{config[:path]}#{config[:app_name]}"
end
Also aliased as: gc, clone_repository
git_pull() click to toggle source
# File lib/alphonse/configs/operation.rb, line 64
def git_pull
  ["git checkout #{branch} -q", "git pull origin #{branch} -q", "git gc --aggressive"]
end
Also aliased as: gl, update_repository
gl()
Alias for: git_pull
install_gems()
Alias for: bundle
list() click to toggle source

For testing only

# File lib/alphonse/configs/operation.rb, line 21
def list
  "ls -a"
end
Also aliased as: ls
ls()
Alias for: list
mkdir_path() click to toggle source
# File lib/alphonse/configs/operation.rb, line 50
def mkdir_path
  "mkdir -p #{config[:path]}"
end
Also aliased as: setup_directory
repository() click to toggle source
# File lib/alphonse/configs/operation.rb, line 30
def repository
  config[:git_repo]
end
restart_app() click to toggle source
# File lib/alphonse/configs/operation.rb, line 46
def restart_app
  (config[:restart_command] || 'touch tmp/restart.txt')
end
set_path_variable() click to toggle source
# File lib/alphonse/configs/operation.rb, line 34
def set_path_variable
  ["export PATH=#{config[:env_path]}"]
end
setup_database()
Alias for: db_setup
setup_directory()
Alias for: mkdir_path
source_shell_rc() click to toggle source
# File lib/alphonse/configs/operation.rb, line 38
def source_shell_rc
  "source ~/.bashrc"
end
start_app() click to toggle source
# File lib/alphonse/configs/operation.rb, line 42
def start_app
  (config[:start_command] || 'touch tmp/restart.txt')
end
update_database()
Alias for: db_migrate
update_repository()
Alias for: git_pull