Class: Google::Cloud::Gemserver::CLI
- Inherits:
-
Thor
- Object
- Thor
- Google::Cloud::Gemserver::CLI
- Defined in:
- lib/google/cloud/gemserver/cli.rb,
lib/google/cloud/gemserver/cli/server.rb,
lib/google/cloud/gemserver/cli/project.rb,
lib/google/cloud/gemserver/cli/request.rb,
lib/google/cloud/gemserver/cli/cloud_sql.rb
Overview
CLI
The command line interface which provides methods to interact with a gemserver and deploy it to a given Google Cloud Platform project.
Defined Under Namespace
Classes: CloudSQL, Error, Project, Request, Server
Class Method Summary collapse
Instance Method Summary collapse
-
#config ⇒ Object
Displays the configuration used by the currently deployed gemserver.
-
#create ⇒ Object
Creates a gemserver app and deploys it to a Google Cloud Platform project.
-
#create_key ⇒ Object
Creates a key used for installing or pushing gems to the given gemserver with given permissions provided with the --permissions option.
-
#delete ⇒ Object
Deletes a given gemserver provided by the --use-proj option.
-
#delete_key ⇒ Object
Deletes a given key provided by the --key option from the given gemserver.
- #gen_config ⇒ Object
-
#prepare ⇒ Object
Retrieves a Google Cloud Platform instance and informs the user to enable necessary APIs for that project.
-
#start ⇒ Object
Starts the gemserver by starting up gemstash.
-
#stats ⇒ Object
Displays statistics on the given gemserver such as private gems, cached gems, gemserver creation time, etc.
-
#update ⇒ Object
Updates the gemserver on Google Cloud Platform to the latest version of the gemserver installed on the user's system.
Class Method Details
.start(args = ARGV) ⇒ Object
41 42 43 44 |
# File 'lib/google/cloud/gemserver/cli.rb', line 41 def self.start args = ARGV Configuration.new.gen_config super end |
Instance Method Details
#config ⇒ Object
Displays the configuration used by the currently deployed gemserver.
146 147 |
# 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 ⇒ Object
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.
61 |
# File 'lib/google/cloud/gemserver/cli.rb', line 61 desc "create", "Creates and deploys the gem server then starts it" |
#create_key ⇒ Object
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.
112 |
# File 'lib/google/cloud/gemserver/cli.rb', line 112 desc "create_key", "Creates an authentication key" |
#delete ⇒ Object
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.
100 |
# File 'lib/google/cloud/gemserver/cli.rb', line 100 desc "delete", "Delete a given gemserver" |
#delete_key ⇒ Object
Deletes a given key provided by the --key option from the given gemserver.
130 |
# File 'lib/google/cloud/gemserver/cli.rb', line 130 desc "delete_key", "Deletes a given key" |
#gen_config ⇒ Object
168 169 170 |
# File 'lib/google/cloud/gemserver/cli.rb', line 168 def gen_config Configuration.new.gen_config end |
#prepare ⇒ Object
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.
75 76 |
# 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 ⇒ Object
Starts the gemserver by starting up gemstash.
48 49 50 |
# 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 ⇒ Object
Displays statistics on the given gemserver such as private gems, cached gems, gemserver creation time, etc.
155 |
# File 'lib/google/cloud/gemserver/cli.rb', line 155 desc "stats", "Displays statistics on the given gemserver" |
#update ⇒ Object
Updates the gemserver on Google Cloud Platform to the latest version of the gemserver installed on the user's system.
89 90 91 |
# 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." |