Class: Tane::Commands::Init

Inherits:
Base
  • Object
show all
Defined in:
lib/tane/commands/init.rb

Class Method Summary collapse

Methods inherited from Base

fire

Methods included from Helpers

included

Class Method Details

.help_textObject



18
19
20
21
22
23
24
25
26
# File 'lib/tane/commands/init.rb', line 18

def help_text
  <<-EOL
Usage:

tane init

Creates a `.cloudfuji` directory within the directory of the rails application. That holds all the config that enables you to run applications and commands in a Cloudfuji environment. It also deploys a development application on Cloudfuji that allows your local application to use resources on the Cloudfuji platform.
EOL
end

.process(args) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
16
# File 'lib/tane/commands/init.rb', line 4

def process(args)
  verbose_say("authenticating you...")
  authenticate_user
  verbose_say("done!")
  if in_rails_dir?
    verbose_say("In a rails directory, tane initializing...")
    Tane::Helpers::Init.initialize_app
    verbose_say("finished initializing!")
  else
    term.say("You have to be in the local rails app's root directory when running `tane init`")
    exit 1
  end
end