Module: LighthouseCLI

Defined in:
lib/lighthouse_cli.rb,
lib/lighthouse_cli/config.rb,
lib/lighthouse_cli/parser.rb,
lib/lighthouse_cli/helpers.rb,
lib/lighthouse_cli/commands.rb,
lib/lighthouse_cli/authenticator.rb

Defined Under Namespace

Modules: Commands, Helpers Classes: Authenticator, Config, Parser

Constant Summary collapse

DEFAULT_CONFIG_PATH =
"Lhcfile"

Class Method Summary collapse

Class Method Details

.bootstrap!Object



14
15
16
17
# File 'lib/lighthouse_cli.rb', line 14

def bootstrap!
  Authenticator.authenticate!
  ::Lighthouse. = Config.
end

.projectObject



19
20
21
22
23
24
25
26
27
28
29
# File 'lib/lighthouse_cli.rb', line 19

def project
  project_name = Config.project
  
  @project ||= if project_name
    ::Lighthouse::Project.find(:all).find{|p| p.name == Config.project}
  else
    nil
  end
  
  @project || (raise RuntimeError.new("Project not found or wasn't configured."))
end