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
- .private_reveal_key ⇒ 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
22 23 24 |
# File 'lib/bashly/settings.rb', line 22 def commands_dir @commands_dir ||= get :commands_dir end |
.compact_short_flags ⇒ Object
26 27 28 |
# File 'lib/bashly/settings.rb', line 26 def compact_short_flags @compact_short_flags ||= get :compact_short_flags end |
.config_path ⇒ Object
34 35 36 |
# File 'lib/bashly/settings.rb', line 34 def config_path @config_path ||= get(:config_path) % { source_dir: source_dir } end |
.conjoined_flag_args ⇒ Object
30 31 32 |
# File 'lib/bashly/settings.rb', line 30 def conjoined_flag_args @conjoined_flag_args ||= get :conjoined_flag_args end |
.lib_dir ⇒ Object
50 51 52 |
# File 'lib/bashly/settings.rb', line 50 def lib_dir @lib_dir ||= get :lib_dir end |
.partials_extension ⇒ Object
54 55 56 |
# File 'lib/bashly/settings.rb', line 54 def partials_extension @partials_extension ||= get :partials_extension end |
.private_reveal_key ⇒ Object
58 59 60 |
# File 'lib/bashly/settings.rb', line 58 def private_reveal_key @private_reveal_key ||= get :private_reveal_key end |
.show_examples_on_error ⇒ Object
66 67 68 |
# File 'lib/bashly/settings.rb', line 66 def show_examples_on_error @show_examples_on_error ||= get :show_examples_on_error end |
.source_dir ⇒ Object
70 71 72 |
# File 'lib/bashly/settings.rb', line 70 def source_dir @source_dir ||= get :source_dir end |
.strict ⇒ Object
74 75 76 |
# File 'lib/bashly/settings.rb', line 74 def strict @strict ||= get :strict end |
.tab_indent ⇒ Object
88 89 90 |
# File 'lib/bashly/settings.rb', line 88 def tab_indent @tab_indent ||= get :tab_indent end |
.target_dir ⇒ Object
92 93 94 |
# File 'lib/bashly/settings.rb', line 92 def target_dir @target_dir ||= get :target_dir end |
.usage_colors ⇒ Object
96 97 98 |
# File 'lib/bashly/settings.rb', line 96 def usage_colors @usage_colors ||= get :usage_colors end |
Class Method Details
.env ⇒ Object
38 39 40 |
# File 'lib/bashly/settings.rb', line 38 def env @env ||= get(:env)&.to_sym end |
.env=(value) ⇒ Object
42 43 44 |
# File 'lib/bashly/settings.rb', line 42 def env=(value) @env = value&.to_sym end |
.full_lib_dir ⇒ Object
46 47 48 |
# File 'lib/bashly/settings.rb', line 46 def full_lib_dir "#{source_dir}/#{lib_dir}" end |
.production? ⇒ Boolean
62 63 64 |
# File 'lib/bashly/settings.rb', line 62 def production? env == :production end |
.strict_string ⇒ Object
78 79 80 81 82 83 84 85 86 |
# File 'lib/bashly/settings.rb', line 78 def strict_string if strict.is_a? String strict elsif strict 'set -euo pipefail' else 'set -e' end end |