Portals Run and Portals API
Portals API.rb
portals_api.rb
portals_api.rb Ruby file is provides the interface to the portals API. It contains the following Class info: class PortalsAPI @access_token - the instance attribute the access_token provided to the constructor
initialize - constructor that sets access_token
retrieve_portal_status - provides the portal status
start_stop_portal - toggles the portal from started or stopped to the opposite
retrieve_checkedout_patchset - gets the name of the checked out patchset, else false
checkout_patchset - sends the command to checkout a specific patchset
cancel_portal_request - cancels whatever request has been send, if any
private
get_request - uses HTTP GET request to make the calls to the API
Portals Run Command
portals_run
portals_run is a Ruby tool that provides a command line interface to the portals API (via portals_api.rb). Here is the usages for portals_run:
portal_api.rb is an awesome program starts and stops portals
Usage:
portal_api.rb [options]
-a, --accesstoken= Portals Access Token
-p, --portalstat Retrieve portal status
-s, --startportal Start Portal
-t, --stopportal Stop portal
--psstat Retrieve patchset status
-c, --checkoutps= Checkout Patchset xx.xxxxx.x format (default: master)
-u, --user= Portal User (default: rkuss2)
-h, --phost= Portal Host (default: https://portal2-beta.instructure.com/)
-d, --dbcreate Drop and recreate db
-n, --cancelportal Cancel Portal Request
-v, --version Print version and exit
-e, --help Show this message