Class: Flydata::Command::Setup
- Includes:
- Helpers
- Defined in:
- lib/flydata/command/setup.rb
Constant Summary collapse
- LOG_PATH_EXAMPLES =
%w(/var/log/httpd/access_log /var/log/apache2/access.log /var/log/httpd-access.log /var/log/apache2/access_log /var/log/messages /var/log/maillog /var/log/mysql/error.log /home/*/deploy/shared/log/*.log)- OTHER =
'-- None of above --'- ENTER_TABLE_NAME =
'-- Create a table on Redshift from your logs --'
Instance Method Summary collapse
Methods included from Helpers
development?, flydata_api_host_file, flydata_conf_file, flydata_home_directory, format_menu_list, home_directory, parse_command, print_usage, to_command_class
Methods inherited from Base
#ask_input_table_name, #ask_yes_no, #choose_one, #flydata, #initialize, #newline, #register_crontab, #retrieve_data_entries, #separator
Constructor Details
This class inherits a constructor from Flydata::Command::Base
Instance Method Details
#initial_run ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/flydata/command/setup.rb', line 19 def initial_run run do puts shown = show_registered_redshift_entries if shown Flydata::Command::Sender.new.stop true else _run end end puts print_usage puts "Completed setup of FlyData!" end |
#run(&block) ⇒ Object
35 36 37 38 39 |
# File 'lib/flydata/command/setup.rb', line 35 def run(&block) Flydata::Command::Login.new.run unless flydata.credentials.authenticated? ret = block_given? ? yield : _run Flydata::Command::Sender.new.restart if ret end |