Class: Cybertron::CLI
- Inherits:
-
Thor
- Object
- Thor
- Cybertron::CLI
- Includes:
- Thor::Actions, Thor::RakeCompat
- Defined in:
- lib/cybertron/cli.rb
Overview
CLI class
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.source_root ⇒ Object
25 26 27 |
# File 'lib/cybertron/cli.rb', line 25 def self.source_root File.('../templates', __dir__) end |
Instance Method Details
#new(name) ⇒ Object
30 31 32 33 34 35 36 37 38 39 40 41 |
# 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 ⇒ Object
21 22 23 |
# File 'lib/cybertron/cli.rb', line 21 def spec Rake::Task['spec'].invoke end |