Class: Chaindrive::Command::CLI

Inherits:
Thor
  • Object
show all
Defined in:
lib/chaindrive/command.rb

Overview

Entry point for the command-line interface of the application.

Instance Method Summary collapse

Instance Method Details

#envObject



27
28
29
30
# File 'lib/chaindrive/command.rb', line 27

def env
  environment = Environment.new(opts)
  puts environment.inspect
end

#initObject



16
17
18
19
20
21
22
23
24
# File 'lib/chaindrive/command.rb', line 16

def init
  if File.exists?('Gearfile')
    Chaindrive.logger.error "Gearfile already exists at '#{Dir.pwd}'"
    exit 1
  end

  Chaindrive.logger.info "Writing Gearfile to '#{Dir.pwd}'"
  FileUtils.cp(File.expand_path('templates/Gearfile', __FILE__), 'Gearfile')
end