Class: RedmineInstaller::Task
- Includes:
- Utils
- Defined in:
- lib/redmine-installer/task.rb
Constant Summary
Constants included from Utils
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
- #down ⇒ Object
-
#initialize(**options) ⇒ Task
constructor
A new instance of Task.
- #run ⇒ Object
- #up ⇒ Object
Methods included from Utils
#class_name, #create_dir, #env_user, #error, #logger, #ok, #pastel, #print_title, #prompt, #run_command
Constructor Details
#initialize(**options) ⇒ Task
Returns a new instance of Task.
7 8 9 10 11 12 13 14 |
# File 'lib/redmine-installer/task.rb', line 7 def initialize(**) @options = OpenStruct.new() logger.info "#{class_name} initialized with #{}" logger.info "RUBY_VERSION: #{RUBY_VERSION}" logger.info "VERSION: #{RedmineInstaller::VERSION}" logger.info "USER: #{env_user}" end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
5 6 7 |
# File 'lib/redmine-installer/task.rb', line 5 def @options end |
Instance Method Details
#down ⇒ Object
33 34 |
# File 'lib/redmine-installer/task.rb', line 33 def down end |
#run ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/redmine-installer/task.rb', line 16 def run up rescue => e @error = e logger.error(e.) logger.error(*e.backtrace) puts pastel.red(e.) down end |
#up ⇒ Object
29 30 31 |
# File 'lib/redmine-installer/task.rb', line 29 def up raise NotImplementedError end |