Class: Gemstash::CLI::Setup
Overview
This implements the command line setup task:
$ gemstash setup
Instance Method Summary collapse
-
#initialize(cli) ⇒ Setup
constructor
A new instance of Setup.
- #run ⇒ Object
Constructor Details
#initialize(cli) ⇒ Setup
Returns a new instance of Setup.
12 13 14 15 |
# File 'lib/gemstash/cli/setup.rb', line 12 def initialize(cli) super @config = {} end |
Instance Method Details
#run ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/gemstash/cli/setup.rb', line 17 def run if setup? && !@cli.[:redo] @cli.say @cli.set_color("Everything is already setup!", :green) return end check_rubygems_version ask_storage ask_cache ask_database ask_protected_fetch ask_timeout check_cache check_storage check_database store_config @cli.say @cli.set_color("You are all setup!", :green) end |