Class: MarketplaceKit::Services::Logger
- Inherits:
-
Object
- Object
- MarketplaceKit::Services::Logger
- Defined in:
- lib/marketplace_kit/services/logger.rb
Instance Method Summary collapse
- #api_error(message, details) ⇒ Object
- #ask_for_email ⇒ Object
- #ask_for_password ⇒ Object
- #compressing_folder ⇒ Object
- #deploy_started ⇒ Object
- #json_error(source) ⇒ Object
- #pull_started ⇒ Object
- #redirect_tip ⇒ Object
- #request_backup ⇒ Object
- #sending_zip ⇒ Object
- #standard_error(error) ⇒ Object
- #sync_command_started ⇒ Object
- #sync_done ⇒ Object
- #sync_updating(file_path) ⇒ Object
- #wait_for_backup_finish ⇒ Object
- #wait_for_deploy_finish ⇒ Object
Instance Method Details
#api_error(message, details) ⇒ Object
63 64 65 66 67 68 69 |
# File 'lib/marketplace_kit/services/logger.rb', line 63 def api_error(, details) puts '```'.red puts "Builder error: #{message}".red puts 'Details:' puts details puts '```'.red end |
#ask_for_email ⇒ Object
44 45 46 |
# File 'lib/marketplace_kit/services/logger.rb', line 44 def ask_for_email puts 'Enter your email' end |
#ask_for_password ⇒ Object
48 49 50 |
# File 'lib/marketplace_kit/services/logger.rb', line 48 def ask_for_password puts 'Enter your password' end |
#compressing_folder ⇒ Object
8 9 10 |
# File 'lib/marketplace_kit/services/logger.rb', line 8 def compressing_folder puts 'Compressing marketplace_builder folder'.yellow end |
#deploy_started ⇒ Object
4 5 6 |
# File 'lib/marketplace_kit/services/logger.rb', line 4 def deploy_started puts 'Deploy command started!'.green end |
#json_error(source) ⇒ Object
56 57 58 59 60 61 |
# File 'lib/marketplace_kit/services/logger.rb', line 56 def json_error(source) puts '```'.red puts 'Error while parsing JSON'.red puts "Raw body:\n#{source}" puts '```'.red end |
#pull_started ⇒ Object
20 21 22 |
# File 'lib/marketplace_kit/services/logger.rb', line 20 def pull_started puts 'Pull command started!'.green end |
#redirect_tip ⇒ Object
52 53 54 |
# File 'lib/marketplace_kit/services/logger.rb', line 52 def redirect_tip puts 'Server returned redirect code (possible a wrong domain in config file?)'.yellow end |
#request_backup ⇒ Object
24 25 26 |
# File 'lib/marketplace_kit/services/logger.rb', line 24 def request_backup puts 'Requesting system backup...'.yellow end |
#sending_zip ⇒ Object
12 13 14 |
# File 'lib/marketplace_kit/services/logger.rb', line 12 def sending_zip puts 'Sending zip to the server'.yellow end |
#standard_error(error) ⇒ Object
71 72 73 74 75 |
# File 'lib/marketplace_kit/services/logger.rb', line 71 def standard_error(error) puts '```'.red puts "Error: #{error.message} (#{error.class})".red puts '```'.red end |
#sync_command_started ⇒ Object
32 33 34 |
# File 'lib/marketplace_kit/services/logger.rb', line 32 def sync_command_started puts 'Sync mode enabled'.green end |
#sync_done ⇒ Object
40 41 42 |
# File 'lib/marketplace_kit/services/logger.rb', line 40 def sync_done puts 'Done!'.green end |
#sync_updating(file_path) ⇒ Object
36 37 38 |
# File 'lib/marketplace_kit/services/logger.rb', line 36 def sync_updating(file_path) puts "Updating: #{file_path}".green end |
#wait_for_backup_finish ⇒ Object
28 29 30 |
# File 'lib/marketplace_kit/services/logger.rb', line 28 def wait_for_backup_finish puts 'Waiting for backup to finish'.yellow end |
#wait_for_deploy_finish ⇒ Object
16 17 18 |
# File 'lib/marketplace_kit/services/logger.rb', line 16 def wait_for_deploy_finish puts 'Waiting for deploy to finish'.yellow end |