Class: Bashly::Settings
- Inherits:
-
Object
- Object
- Bashly::Settings
- Extended by:
- AssetHelper
- Defined in:
- lib/bashly/settings.rb
Class Attribute Summary collapse
- .commands_dir ⇒ Object
- .compact_short_flags ⇒ Object
- .config_path ⇒ Object
- .conjoined_flag_args ⇒ Object
- .lib_dir ⇒ Object
- .partials_extension ⇒ Object
- .show_examples_on_error ⇒ Object
- .source_dir ⇒ Object
- .strict ⇒ Object
- .tab_indent ⇒ Object
- .target_dir ⇒ Object
- .usage_colors ⇒ Object
Class Method Summary collapse
- .env ⇒ Object
- .env=(value) ⇒ Object
- .full_lib_dir ⇒ Object
- .production? ⇒ Boolean
- .strict_string ⇒ Object
Methods included from AssetHelper
Class Attribute Details
.commands_dir ⇒ Object
21 22 23 |
# File 'lib/bashly/settings.rb', line 21 def commands_dir @commands_dir ||= get :commands_dir end |
.compact_short_flags ⇒ Object
25 26 27 |
# File 'lib/bashly/settings.rb', line 25 def compact_short_flags @compact_short_flags ||= get :compact_short_flags end |
.config_path ⇒ Object
33 34 35 |
# File 'lib/bashly/settings.rb', line 33 def config_path @config_path ||= get(:config_path) % { source_dir: source_dir } end |
.conjoined_flag_args ⇒ Object
29 30 31 |
# File 'lib/bashly/settings.rb', line 29 def conjoined_flag_args @conjoined_flag_args ||= get :conjoined_flag_args end |
.lib_dir ⇒ Object
49 50 51 |
# File 'lib/bashly/settings.rb', line 49 def lib_dir @lib_dir ||= get :lib_dir end |
.partials_extension ⇒ Object
53 54 55 |
# File 'lib/bashly/settings.rb', line 53 def partials_extension @partials_extension ||= get :partials_extension end |
.show_examples_on_error ⇒ Object
61 62 63 |
# File 'lib/bashly/settings.rb', line 61 def show_examples_on_error @show_examples_on_error ||= get :show_examples_on_error end |
.source_dir ⇒ Object
65 66 67 |
# File 'lib/bashly/settings.rb', line 65 def source_dir @source_dir ||= get :source_dir end |
.strict ⇒ Object
69 70 71 |
# File 'lib/bashly/settings.rb', line 69 def strict @strict ||= get :strict end |
.tab_indent ⇒ Object
83 84 85 |
# File 'lib/bashly/settings.rb', line 83 def tab_indent @tab_indent ||= get :tab_indent end |
.target_dir ⇒ Object
87 88 89 |
# File 'lib/bashly/settings.rb', line 87 def target_dir @target_dir ||= get :target_dir end |
.usage_colors ⇒ Object
91 92 93 |
# File 'lib/bashly/settings.rb', line 91 def usage_colors @usage_colors ||= get :usage_colors end |
Class Method Details
.env ⇒ Object
37 38 39 |
# File 'lib/bashly/settings.rb', line 37 def env @env ||= get(:env)&.to_sym end |
.env=(value) ⇒ Object
41 42 43 |
# File 'lib/bashly/settings.rb', line 41 def env=(value) @env = value&.to_sym end |
.full_lib_dir ⇒ Object
45 46 47 |
# File 'lib/bashly/settings.rb', line 45 def full_lib_dir "#{source_dir}/#{lib_dir}" end |
.production? ⇒ Boolean
57 58 59 |
# File 'lib/bashly/settings.rb', line 57 def production? env == :production end |
.strict_string ⇒ Object
73 74 75 76 77 78 79 80 81 |
# File 'lib/bashly/settings.rb', line 73 def strict_string if strict.is_a? String strict elsif strict 'set -euo pipefail' else 'set -e' end end |