Module: Dkdeploy::Constants
- Defined in:
- lib/dkdeploy/constants.rb
Overview
Global static methods
Instance Method Summary collapse
-
#additional_ignore_tables ⇒ Array
List of table names to be ignored when dumping from database defined via Capistrano variable or environment variable.
-
#application ⇒ String
Application name.
-
#assets_path ⇒ String
Assets path.
-
#copy_exclude ⇒ Array
Copy exclude pattern.
-
#copy_source ⇒ String
Copy source path.
-
#datetime_format ⇒ String
Default timestamp format for database dump files.
-
#default_ignore_tables ⇒ String
List of table names to be ignored by default when dumping from database.
-
#ignore_tables ⇒ String
List of table names to be ignored when dumping from database.
-
#local_database_config_path ⇒ String
File path to local database config file.
-
#local_dump_path ⇒ String
Local Dump Path.
-
#remote_database_config_path ⇒ String
File path to remote database config file.
Instance Method Details
#additional_ignore_tables ⇒ Array
List of table names to be ignored when dumping from database defined via Capistrano variable or environment variable
77 78 79 80 81 |
# File 'lib/dkdeploy/constants.rb', line 77 def additional_ignore_tables env_array_list = ENV.fetch('ADDITIONAL_IGNORE_TABLES', '').split ' ' cap_array_list = fetch(:additional_ignore_tables, []) env_array_list | cap_array_list end |
#application ⇒ String
Application name
35 36 37 |
# File 'lib/dkdeploy/constants.rb', line 35 def application fetch(:application) end |
#assets_path ⇒ String
Assets path
42 43 44 |
# File 'lib/dkdeploy/constants.rb', line 42 def assets_path File.join shared_path, 'assets' end |
#copy_exclude ⇒ Array
Copy exclude pattern
28 29 30 |
# File 'lib/dkdeploy/constants.rb', line 28 def copy_exclude fetch :copy_exclude, [] end |
#copy_source ⇒ String
Copy source path
14 15 16 |
# File 'lib/dkdeploy/constants.rb', line 14 def copy_source fetch :copy_source, '.' end |
#datetime_format ⇒ String
Default timestamp format for database dump files
63 64 65 |
# File 'lib/dkdeploy/constants.rb', line 63 def datetime_format '%Y-%m-%d_%H-%M' end |
#default_ignore_tables ⇒ String
List of table names to be ignored by default when dumping from database
70 71 72 |
# File 'lib/dkdeploy/constants.rb', line 70 def default_ignore_tables %w[] end |
#ignore_tables ⇒ String
List of table names to be ignored when dumping from database
86 87 88 |
# File 'lib/dkdeploy/constants.rb', line 86 def ignore_tables default_ignore_tables | additional_ignore_tables end |
#local_database_config_path ⇒ String
File path to local database config file
56 57 58 |
# File 'lib/dkdeploy/constants.rb', line 56 def local_database_config_path File.join 'temp', "db_settings.#{fetch(:stage)}.yaml" end |
#local_dump_path ⇒ String
Local Dump Path
21 22 23 |
# File 'lib/dkdeploy/constants.rb', line 21 def local_dump_path fetch :local_dump_path, 'temp' end |
#remote_database_config_path ⇒ String
File path to remote database config file
49 50 51 |
# File 'lib/dkdeploy/constants.rb', line 49 def remote_database_config_path File.join shared_path, 'config', "db_settings.#{fetch(:stage)}.yaml" end |