module Capistrano::SqliteReuse::Helpers

Public Instance Methods

adapter_type() click to toggle source
# File lib/capistrano/sqlite-reuse/helpers.rb, line 17
def adapter_type
  return fetch(:adapter_type)
end
check_adapter_error() click to toggle source
# File lib/capistrano/sqlite-reuse/helpers.rb, line 21
def check_adapter_error
  return "Error - not '#{adapter_type}' adpater type in '#{fetch(:database_yml_local_path)}'.  May want to remove this gem."
end
check_config_exist_error() click to toggle source
# File lib/capistrano/sqlite-reuse/helpers.rb, line 25
def check_config_exist_error
  return "Error - '#{fetch(:rails_env)}' config does not exist in '#{fetch(:database_yml_local_path)}'. Please populate it."
end
database_location() click to toggle source
# File lib/capistrano/sqlite-reuse/helpers.rb, line 13
def database_location
  return local_database_yml()['database']
end
local_database_yml(env = fetch(:rails_env)) click to toggle source
# File lib/capistrano/sqlite-reuse/helpers.rb, line 6
def local_database_yml(env = fetch(:rails_env))
  env = env.to_s
  @local_database_yml ||= YAML.load_file(database_yml_local_path)

  return @local_database_yml[env]
end