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
59 60 61 62 63 64 65 66 |
# File 'lib/linner/command.rb', line 59 def build Linner.compile = true Linner.strict = true if [:strict] clean env.merge_with_environment([:environment]) Bundler.new(env).perform perform end |
#check ⇒ Object
24 25 26 27 28 |
# File 'lib/linner/command.rb', line 24 def check env.merge_with_environment([:environment]) = Linner::Bundler.new(env).check puts (.first ? "🍵 :" : "👻 :") + .last end |
#clean ⇒ Object
86 87 88 |
# File 'lib/linner/command.rb', line 86 def clean FileUtils.rm_rf Dir.glob("#{env.public_folder}/*") end |
#install ⇒ Object
36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/linner/command.rb', line 36 def install begin env.merge_with_environment([:environment]) Linner::Bundler.new(env).perform rescue puts "👻 : Install failed!" puts $! return end puts "🍵 : Perfect installed all bundles!" end |
#new(name) ⇒ Object
91 92 93 94 |
# File 'lib/linner/command.rb', line 91 def new(name) directory('templates', name) chmod("#{name}/bin/server", 0755) end |