class Google::Cloud::Gemserver::CLI

# CLI

The command line interface which provides methods to interact with a gemserver and deploy it to a given Google Cloud Platform project.

Public Class Methods

start(args = ARGV) click to toggle source
Calls superclass method
# File lib/google/cloud/gemserver/cli.rb, line 41
def self.start args = ARGV
  Configuration.new.gen_config
  super
end

Public Instance Methods

config() click to toggle source

Displays the configuration used by the currently deployed gemserver.

# File lib/google/cloud/gemserver/cli.rb, line 146
desc "config", "Displays the config the current deployed gemserver is"\
  " using (if one is running)"
create() click to toggle source

Creates a gemserver app and deploys it to a Google Cloud Platform project. An existing Google Cloud Platform project must be provided through the –use-proj option and an existing Cloud SQL instance may be provided through the –use-inst option, otherwise a new one will be created.

# File lib/google/cloud/gemserver/cli.rb, line 61
desc "create", "Creates and deploys the gem server then starts it"
create_key() click to toggle source

Creates a key used for installing or pushing gems to the given gemserver with given permissions provided with the –permissions option. By default, a key with all permissions is created.

# File lib/google/cloud/gemserver/cli.rb, line 112
desc "create_key", "Creates an authentication key"
delete() click to toggle source

Deletes a given gemserver provided by the –use-proj option. This deletes the Google Cloud Platform project, all associated Cloud SQL instances, and all Cloud Storage buckets.

# File lib/google/cloud/gemserver/cli.rb, line 100
desc "delete", "Delete a given gemserver"
delete_key() click to toggle source

Deletes a given key provided by the –key option from the given gemserver.

# File lib/google/cloud/gemserver/cli.rb, line 130
desc "delete_key", "Deletes a given key"
gen_config() click to toggle source
# File lib/google/cloud/gemserver/cli.rb, line 168
def gen_config
  Configuration.new.gen_config
end
prepare() click to toggle source

Retrieves a Google Cloud Platform instance and informs the user to enable necessary APIs for that project. Also creates a Cloud SQL instance if one was not provided with the –use-inst option.

# File lib/google/cloud/gemserver/cli.rb, line 75
desc "prepare", "Uses a project on Google Cloud Platform and deploys"\
  " a gemserver to it."
start() click to toggle source

Starts the gemserver by starting up gemstash.

# File lib/google/cloud/gemserver/cli.rb, line 48
desc "start", "Starts the gem server. This will be run automatically" \
  " after a deploy. Running this locally will start the gemserver "\
  "locally"
stats() click to toggle source

Displays statistics on the given gemserver such as private gems, cached gems, gemserver creation time, etc.

# File lib/google/cloud/gemserver/cli.rb, line 155
desc "stats", "Displays statistics on the given gemserver"
update() click to toggle source

Updates the gemserver on Google Cloud Platform to the latest version of the gemserver installed on the user's system.

# File lib/google/cloud/gemserver/cli.rb, line 89
desc "update", "Redeploys the gemserver with the current config file" \
  " and google-cloud-gemserver gem version (a deploy must have " \
  "succeeded for 'update' to work."