Class: Veye::Github::Delete
- Inherits:
-
BaseExecutor
- Object
- BaseExecutor
- Veye::Github::Delete
- Defined in:
- lib/veye/github/delete.rb
Overview
Delete class include methods to cleanup projects imported from Github
Class Method Summary collapse
- .delete_repo(api_key, repo_name, branch = 'master', options = {}) ⇒ Object
- .show_result(response) ⇒ Object
Methods inherited from BaseExecutor
catch_request_error, filter_dependencies, get_formatter, process_dependencies, show_bulk_dependencies, show_dependencies, show_message, show_results, sort_dependencies_by_upgrade_complexity, valid_response?
Methods included from FormatHelpers
#format_exists?, #formats_attached?, #supported_format?
Class Method Details
.delete_repo(api_key, repo_name, branch = 'master', options = {}) ⇒ Object
7 8 9 10 |
# File 'lib/veye/github/delete.rb', line 7 def self.delete_repo(api_key, repo_name, branch = 'master', = {}) response = Veye::API::Github.delete_repo(api_key, repo_name, branch) show_result(response) end |
.show_result(response) ⇒ Object
12 13 14 15 16 17 18 19 20 |
# File 'lib/veye/github/delete.rb', line 12 def self.show_result(response) if response.success printf "Deleted\n".color(:green) else printf("Cant delete - %s\n%s\n", response..color(:red), response.data['error']) end end |