module Octokit::EnterpriseManagementConsoleClient::ManagementConsole
Methods for the Enterprise Management Console API
@see developer.github.com/v3/enterprise-admin/management_console/
Public Instance Methods
Get information about the Enterprise installation
@return [Sawyer::Resource] The installation information
# File lib/octokit/enterprise_management_console_client/management_console.rb, line 51 def config_status get "/setup/api/configcheck", password_hash end
Modify the Enterprise settings
@param settings [Hash] A hash configuration of the new settings
@return [nil]
# File lib/octokit/enterprise_management_console_client/management_console.rb, line 69 def edit_settings(settings) queries = password_hash queries[:query][:settings] = "#{settings.to_json}" put "/setup/api/settings", queries end
Get information about the Enterprise maintenance status
@return [Sawyer::Resource] The maintenance status
# File lib/octokit/enterprise_management_console_client/management_console.rb, line 78 def maintenance_status get "/setup/api/maintenance", password_hash end
Start (or turn off) the Enterprise maintenance mode
@param maintenance [Hash] A hash configuration of the maintenance settings @return [nil]
# File lib/octokit/enterprise_management_console_client/management_console.rb, line 87 def set_maintenance_status(maintenance) queries = password_hash queries[:query][:maintenance] = "#{maintenance.to_json}" post "/setup/api/maintenance", queries end
Get information about the Enterprise installation
@return [Sawyer::Resource] The settings
# File lib/octokit/enterprise_management_console_client/management_console.rb, line 59 def settings get "/setup/api/settings", password_hash end
Start a configuration process.
@return nil
# File lib/octokit/enterprise_management_console_client/management_console.rb, line 30 def start_configuration post "/setup/api/configure", password_hash end
Upgrade an Enterprise installation
@param license [String] The path to your .ghl license file.
@return nil
# File lib/octokit/enterprise_management_console_client/management_console.rb, line 39 def upgrade(license) conn = faraday_configuration params = { } params[:license] = Faraday::UploadIO.new(license, 'binary') params[:api_key] = @management_console_password @last_response = conn.post("/setup/api/upgrade", params) end
Uploads a license for the first time
@param license [String] The path to your .ghl license file. @param settings [Hash] A hash configuration of the initial settings.
@see http: //git.io/j5NT @return nil
# File lib/octokit/enterprise_management_console_client/management_console.rb, line 16 def upload_license(license, settings = nil) conn = faraday_configuration params = { } params[:license] = Faraday::UploadIO.new(license, 'binary') params[:password] = @management_console_password params[:settings] = "#{settings.to_json}" unless settings.nil? @last_response = conn.post("/setup/api/start", params) end