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
75 76 77 78 79 |
# File 'lib/dkdeploy/constants.rb', line 75 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
33 34 35 |
# File 'lib/dkdeploy/constants.rb', line 33 def application fetch(:application) end |
#assets_path ⇒ String
Assets path
40 41 42 |
# File 'lib/dkdeploy/constants.rb', line 40 def assets_path File.join shared_path, 'assets' end |
#copy_exclude ⇒ Array
Copy exclude pattern
26 27 28 |
# File 'lib/dkdeploy/constants.rb', line 26 def copy_exclude fetch :copy_exclude, [] end |
#copy_source ⇒ String
Copy source path
12 13 14 |
# File 'lib/dkdeploy/constants.rb', line 12 def copy_source fetch :copy_source, '.' end |
#datetime_format ⇒ String
Default timestamp format for database dump files
61 62 63 |
# File 'lib/dkdeploy/constants.rb', line 61 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
68 69 70 |
# File 'lib/dkdeploy/constants.rb', line 68 def default_ignore_tables %w[] end |
#ignore_tables ⇒ String
List of table names to be ignored when dumping from database
84 85 86 |
# File 'lib/dkdeploy/constants.rb', line 84 def ignore_tables default_ignore_tables | additional_ignore_tables end |
#local_database_config_path ⇒ String
File path to local database config file
54 55 56 |
# File 'lib/dkdeploy/constants.rb', line 54 def local_database_config_path File.join 'temp', "db_settings.#{fetch(:stage)}.yaml" end |
#local_dump_path ⇒ String
Local Dump Path
19 20 21 |
# File 'lib/dkdeploy/constants.rb', line 19 def local_dump_path fetch :local_dump_path, 'temp' end |
#remote_database_config_path ⇒ String
File path to remote database config file
47 48 49 |
# File 'lib/dkdeploy/constants.rb', line 47 def remote_database_config_path File.join shared_path, 'config', "db_settings.#{fetch(:stage)}.yaml" end |