class Cybertron::CLI

CLI class

Public Class Methods

source_root() click to toggle source
# File lib/cybertron/cli.rb, line 25
def self.source_root
  File.expand_path('../templates', __dir__)
end

Public Instance Methods

new(name) click to toggle source
# File lib/cybertron/cli.rb, line 30
def new(name)
  puts "Creating new project: #{name}"
  FileUtils.mkdir_p "#{name}/transforms"
  FileUtils.mkdir_p "#{name}/spec"
  template 'rspec.tt', File.absolute_path("#{name}/.rspec")
  template 'spec_helper.tt',
    File.absolute_path("#{name}/spec/spec_helper.rb")
  template 'Rakefile.tt',
    File.absolute_path("#{name}/Rakefile")
  template 'README.tt',
    File.absolute_path("#{name}/README.md")
end
spec() click to toggle source
# File lib/cybertron/cli.rb, line 21
def spec
  Rake::Task['spec'].invoke
end