Class: Yolo::Formatters::ErrorFormatter

Inherits:
XcodeBuild::Formatters::ProgressFormatter
  • Object
show all
Defined in:
lib/yolo/formatters/error_formatter.rb

Overview

Outputs formatted error messages to the console

Author:

  • Alex Fish

Instance Method Summary collapse

Instance Method Details

#coverage_directory_errorObject

Outputs a red string stating that the required directory paths are missing



15
16
17
# File 'lib/yolo/formatters/error_formatter.rb', line 15

def coverage_directory_error
  puts red("Aborting coverage calculation, coverage requires a build path and output directory")
end

#deploy_failed(error) ⇒ Object

Outputs a red string stating that there was an issue deploying the ipa

Parameters:

  • error (String)

    The error string



45
46
47
# File 'lib/yolo/formatters/error_formatter.rb', line 45

def deploy_failed(error)
  puts red("There was a problem deploying the ipa: #{error}")
end

#deployment_class_error(klass) ⇒ Object

Outputs a red string stating the the deployment class is invalid

Parameters:

  • klass (String)

    The deployment class name



37
38
39
# File 'lib/yolo/formatters/error_formatter.rb', line 37

def deployment_class_error(klass)
  puts red("#{klass} is not a valid Class in the Deployment module")
end

#github_upload_failed(error) ⇒ Object

Outputs a red string stating that there was an issue deploying the bundle to github

Parameters:

  • error (String)

    The error string



53
54
55
# File 'lib/yolo/formatters/error_formatter.rb', line 53

def github_upload_failed(error)
  puts red("There was a problem deploying the bundle to github: #{error}")
end

#info_plist_not_foundObject

Outputs a red string stating that the info.plist file could not be found



22
23
24
# File 'lib/yolo/formatters/error_formatter.rb', line 22

def info_plist_not_found
  puts red("Can't locate Info.plist, is it in your project root?")
end

#missing_email_detailsObject

Outputs a red string stating that email notification failed because of missing details



81
82
83
# File 'lib/yolo/formatters/error_formatter.rb', line 81

def missing_email_details
  puts red("Can't send mail notification, missing details")
end

#no_api_tokenObject

Outputs a red string stating that no API token is defined



67
68
69
# File 'lib/yolo/formatters/error_formatter.rb', line 67

def no_api_token
  puts red("No API token is defined in config.yml")
end

#no_deploy_urlObject

Outputs a red string stating that no deploy URL was found in the config file



60
61
62
# File 'lib/yolo/formatters/error_formatter.rb', line 60

def no_deploy_url
  puts red("No deploy url found, please specify one in ~/.yolo/config.yml")
end

#no_github_releaseObject

Outputs a red string stating that there was a problem creating a github release



95
96
97
# File 'lib/yolo/formatters/error_formatter.rb', line 95

def no_github_release
  puts red("There was a problem creating the release, maybe the tag already exists")
end

#no_github_tokenObject

Outputs a red string stating that the github token is missing in config



88
89
90
# File 'lib/yolo/formatters/error_formatter.rb', line 88

def no_github_token
  puts red("No Github token found, please specify one in ~/.yolo/config.yml ")
end

#no_notes(notes) ⇒ Object

Outputs a red string stating that a release notes file could not be found

Parameters:

  • notes (String)

    The path which should contain a notes file



103
104
105
# File 'lib/yolo/formatters/error_formatter.rb', line 103

def no_notes(notes)
  puts red("No release notes found in the current directory: #{notes}")
end

#no_team_tokenObject

Outputs a red string stating that no team token is defined



74
75
76
# File 'lib/yolo/formatters/error_formatter.rb', line 74

def no_team_token
  puts red("No team token is defined in config.yml")
end

#run_setupObject

Outputs a red string stating that setup is required



29
30
31
# File 'lib/yolo/formatters/error_formatter.rb', line 29

def run_setup
  puts red("Setup required, running rake yolo:setup")
end