Class: Grably::GrablyCLI

Inherits:
Thor
  • Object
show all
Defined in:
lib/grably/cli.rb

Overview

Grably CLI tool. Gives access to basic grably commands. Allowing to fetch basic infromation about build configuration, grably version and much more in the future.

Instance Method Summary collapse

Instance Method Details

#configObject



31
32
33
34
35
36
# File 'lib/grably/cli.rb', line 31

def config
  app = Rake.application
  ENV[Grably::ENV_PROFILE_KEY] = options[:profile]
  app.load_rakefile
  Grably.config.pretty_print
end

#exec(*tasks) ⇒ Object



17
18
19
# File 'lib/grably/cli.rb', line 17

def exec(*tasks)
  Rake.application.run(tasks + ["mp=#{options[:profile]}"])
end

#tasksObject



23
24
25
26
27
# File 'lib/grably/cli.rb', line 23

def tasks
  args = %w(-T)
  args << '-A' if options[:all]
  Rake.application.run(args)
end

#versionObject



39
40
41
42
# File 'lib/grably/cli.rb', line 39

def version
  puts "grably v. #{Grably.version}"
  exit 1
end