Class: Pod::UserInterface::InspectorReporter
- Inherits:
-
Object
- Object
- Pod::UserInterface::InspectorReporter
- Defined in:
- lib/cocoapods/user_interface/inspector_reporter.rb
Overview
Redirects GH-issues delegate callbacks to CocoaPods UI methods.
Instance Method Summary collapse
-
#inspector_could_not_create_report(error, query, inspector) ⇒ void
Called when there have been networking issues in creating the report.
-
#inspector_received_empty_report(_, inspector) ⇒ void
Called once the report has been received, but when there are no issues found.
-
#inspector_started_query(_, inspector) ⇒ void
Called just as the investigation has begun.
-
#inspector_successfully_received_report(report, _) ⇒ void
Called once the inspector has received a report with more than one issue, showing the top 3 issues, and offering a link to see more.
Instance Method Details
#inspector_could_not_create_report(error, query, inspector) ⇒ void
This method returns an undefined value.
Called when there have been networking issues in creating the report.
70 71 72 73 74 75 |
# File 'lib/cocoapods/user_interface/inspector_reporter.rb', line 70 def inspector_could_not_create_report(error, query, inspector) safe_query = URI.escape query UI.puts 'Could not access the GitHub API, you may have better luck via the website.' UI.puts "https://github.com/#{inspector.repo_owner}/#{inspector.repo_name}/search?q=#{safe_query}&type=Issues&utf8=✓" UI.puts "Error: #{error.name}" end |
#inspector_received_empty_report(_, inspector) ⇒ void
This method returns an undefined value.
Called once the report has been received, but when there are no issues found.
52 53 54 55 |
# File 'lib/cocoapods/user_interface/inspector_reporter.rb', line 52 def inspector_received_empty_report(_, inspector) UI.puts 'Found no similar issues. To create a new issue, please visit:' UI.puts "https://github.com/#{inspector.repo_owner}/#{inspector.repo_name}/issues/new" end |
#inspector_started_query(_, inspector) ⇒ void
This method returns an undefined value.
Called just as the investigation has begun. Lets the user know that it’s looking for an issue.
18 19 20 |
# File 'lib/cocoapods/user_interface/inspector_reporter.rb', line 18 def inspector_started_query(_, inspector) UI.puts "Looking for related issues on #{inspector.repo_owner}/#{inspector.repo_name}..." end |
#inspector_successfully_received_report(report, _) ⇒ void
This method returns an undefined value.
Called once the inspector has received a report with more than one issue, showing the top 3 issues, and offering a link to see more.
33 34 35 36 37 38 39 40 |
# File 'lib/cocoapods/user_interface/inspector_reporter.rb', line 33 def inspector_successfully_received_report(report, _) report.issues[0..2].each { |issue| print_issue_full(issue) } if report.issues.count > 3 UI.puts "and #{report.total_results - 3} more at:" UI.puts report.url end end |