Class: Omnibus::CLI

Inherits:
Omnibus::Command::Base show all
Defined in:
lib/omnibus/cli.rb

Defined Under Namespace

Classes: Runner

Instance Method Summary collapse

Methods inherited from Omnibus::Command::Base

dispatch, #help, #initialize

Methods included from Logging

included

Constructor Details

This class inherits a constructor from Omnibus::Command::Base

Instance Method Details

#build(name) ⇒ Object


65
66
67
68
69
70
# File 'lib/omnibus/cli.rb', line 65

def build(name)
  project = Project.load(name)

  say("Building #{project.name} #{project.build_version}...")
  project.build_me
end

#listObject


102
103
104
105
106
107
108
109
110
111
# File 'lib/omnibus/cli.rb', line 102

def list
  if Omnibus.projects.empty?
    say('There are no Omnibus projects!')
  else
    say('Omnibus projects:')
    Omnibus.projects.sort.each do |project|
      say("  * #{project.name} (#{project.build_version})")
    end
  end
end

#versionObject


127
128
129
# File 'lib/omnibus/cli.rb', line 127

def version
  say("Omnibus v#{Omnibus::VERSION}")
end