Class: Biran::Config
Instance Attribute Summary collapse
- #app_env ⇒ Object
- #app_setup_blocks ⇒ Object
- #base_dir ⇒ Object
- #base_path ⇒ Object
- #bindings ⇒ Object
- #config_dirname ⇒ Object
- #config_filename ⇒ Object
- #db_config ⇒ Object
- #db_config_filename ⇒ Object
- #local_config_filename ⇒ Object
- #secrets ⇒ Object
- #secrets_filename ⇒ Object
-
#shared_dir ⇒ Object
Returns the value of attribute shared_dir.
- #use_capistrano ⇒ Object
Instance Method Summary collapse
Instance Attribute Details
#app_env ⇒ Object
13 14 15 16 17 |
# File 'lib/biran/config.rb', line 13 def app_env return @app_env if @app_env @app_env = Rails.env if defined? Rails @app_env ||= 'development'.freeze end |
#app_setup_blocks ⇒ Object
65 66 67 |
# File 'lib/biran/config.rb', line 65 def app_setup_blocks @app_setup_blocks ||= %i[app].freeze end |
#base_dir ⇒ Object
19 20 21 |
# File 'lib/biran/config.rb', line 19 def base_dir @base_dir ||= '' end |
#base_path ⇒ Object
73 74 75 76 77 |
# File 'lib/biran/config.rb', line 73 def base_path return @base_path if @base_path @base_path = Rails.root if defined? Rails @base_path ||= './' end |
#bindings ⇒ Object
69 70 71 |
# File 'lib/biran/config.rb', line 69 def bindings @bindings ||= %i[db_config] end |
#config_dirname ⇒ Object
39 40 41 |
# File 'lib/biran/config.rb', line 39 def config_dirname @config_dirname ||= 'config'.freeze end |
#config_filename ⇒ Object
23 24 25 |
# File 'lib/biran/config.rb', line 23 def config_filename @config_filename ||= 'app_config.yml'.freeze end |
#db_config ⇒ Object
57 58 59 |
# File 'lib/biran/config.rb', line 57 def db_config @db_config ||= {} end |
#db_config_filename ⇒ Object
31 32 33 |
# File 'lib/biran/config.rb', line 31 def db_config_filename @db_config_filename ||= 'db_config.yml'.freeze end |
#local_config_filename ⇒ Object
27 28 29 |
# File 'lib/biran/config.rb', line 27 def local_config_filename @local_config_filename ||= 'local_config.yml'.freeze end |
#secrets ⇒ Object
61 62 63 |
# File 'lib/biran/config.rb', line 61 def secrets @secrets ||= {} end |
#secrets_filename ⇒ Object
35 36 37 |
# File 'lib/biran/config.rb', line 35 def secrets_filename @secrets_filename ||= 'secrets.yml'.freeze end |
#shared_dir ⇒ Object
Returns the value of attribute shared_dir.
11 12 13 |
# File 'lib/biran/config.rb', line 11 def shared_dir @shared_dir end |
#use_capistrano ⇒ Object
47 48 49 |
# File 'lib/biran/config.rb', line 47 def use_capistrano @use_capistrano ||= false end |
Instance Method Details
#files_to_generate ⇒ Object
51 52 53 54 55 |
# File 'lib/biran/config.rb', line 51 def files_to_generate { vhost: {extension: '.conf'} } end |
#vhost_public_dirname ⇒ Object
43 44 45 |
# File 'lib/biran/config.rb', line 43 def vhost_public_dirname @vhost_public_dirname ||= 'public'.freeze end |