Module: AppStack
- Defined in:
- lib/app_stack.rb,
lib/app_stack/app.rb,
lib/app_stack/version.rb,
lib/app_stack/operator.rb,
lib/app_stack/cli_options.rb,
lib/app_stack/compare_list.rb,
lib/app_stack/configuration.rb
Overview
AppStack module
Defined Under Namespace
Modules: ConfigParser Classes: App, CliOptions, CompareFile, Configuration, ParseError
Constant Summary collapse
- DEFAULT_CONF_FILE =
%w[app_stack.yml .app_stack.yml]
- VERSION =
'1.4.3'
Class Method Summary collapse
-
.find_conf_file(directory) ⇒ Object
find configuration file (stackup.yml …) in order prefer the base name of conf-file used for stackup.
-
.options ⇒ Object
Returns the value of attribute options.
-
.stackup!(argv = ARGV) ⇒ Object
handle the execution to main class:.
Class Method Details
.find_conf_file(directory) ⇒ Object
find configuration file (stackup.yml …) in order prefer the base name of conf-file used for stackup
39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/app_stack.rb', line 39 def find_conf_file(directory) conf_files = DEFAULT_CONF_FILE if && .conf_file base_name = File.basename(.conf_file) conf_files.delete(base_name) conf_files.unshift(base_name) end conf_files.each do |f| return File.join(directory, f) if File.exists?(File.join(directory, f)) end nil end |
.options ⇒ Object
Returns the value of attribute options.
24 25 26 |
# File 'lib/app_stack.rb', line 24 def @options end |
.stackup!(argv = ARGV) ⇒ Object
handle the execution to main class:
29 30 31 32 33 |
# File 'lib/app_stack.rb', line 29 def stackup!(argv = ARGV) @options = CliOptions.new(argv) conf_file = .conf_file || find_conf_file('.') App.new(conf_file).stackup! end |