Class: Linner::Command
- Inherits:
-
Thor
- Object
- Thor
- Linner::Command
- Includes:
- Thor::Actions
- Defined in:
- lib/linner/command.rb
Class Method Summary collapse
Instance Method Summary collapse
- #build ⇒ Object
- #check ⇒ Object
- #clean ⇒ Object
- #install ⇒ Object
- #new(name) ⇒ Object
- #version ⇒ Object
- #watch ⇒ Object
Class Method Details
.source_root ⇒ Object
9 10 11 |
# File 'lib/linner/command.rb', line 9 def self.source_root File.dirname(__FILE__) end |
Instance Method Details
#build ⇒ Object
42 43 44 45 46 47 48 |
# File 'lib/linner/command.rb', line 42 def build Linner.compile = true Linner.strict = true if [:strict] clean Bundler.new(env.bundles).perform perform end |
#check ⇒ Object
19 20 21 22 |
# File 'lib/linner/command.rb', line 19 def check = Linner::Bundler.new(env.bundles).check puts (.first ? "🍵 :" : "👻 :") + .last end |
#clean ⇒ Object
62 63 64 |
# File 'lib/linner/command.rb', line 62 def clean FileUtils.rm_rf Dir.glob("#{env.public_folder}/*") end |
#install ⇒ Object
25 26 27 28 29 30 31 32 33 34 |
# File 'lib/linner/command.rb', line 25 def install begin Linner::Bundler.new(env.bundles).perform rescue puts "👻 : Install failed!" puts $! return end puts "🍵 : Perfect installed all bundles!" end |
#new(name) ⇒ Object
67 68 69 70 |
# File 'lib/linner/command.rb', line 67 def new(name) directory('templates', name) chmod("#{name}/bin/server", 0755) end |