Class: Retter::Generator::Base
- Inherits:
-
Thor::Group
- Object
- Thor::Group
- Retter::Generator::Base
- Includes:
- Thor::Actions
- Defined in:
- lib/retter/generator/base.rb
Constant Summary collapse
- TEMPLATES =
%w( Retterfile Gemfile config.ru index.html layouts/entries.html.haml layouts/entry.html.haml layouts/article.html.haml layouts/profile.html.haml layouts/index.html.haml layouts/retter.html.haml )- FILES =
%w( .gitignore retters/.gitkeep images/.gitkeep entries/.gitkeep tmp/cache/.gitkeep javascripts/.gitkeep stylesheets/base.css stylesheets/retter.css stylesheets/pygments.css stylesheets/orange.css images/orange/bg_body.jpg images/orange/bg_entry.jpg images/orange/bg_header.png )
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.source_root ⇒ Object
44 45 46 |
# File 'lib/retter/generator/base.rb', line 44 def self.source_root File.dirname(__FILE__) end |
Instance Method Details
#bundle_install ⇒ Object
58 59 60 61 62 63 64 65 |
# File 'lib/retter/generator/base.rb', line 58 def bundle_install pwd = Dir.pwd FileUtils.cd name Bundler::CLI.new.install FileUtils.cd pwd end |
#create_files ⇒ Object
48 49 50 51 52 53 54 55 56 |
# File 'lib/retter/generator/base.rb', line 48 def create_files FILES.each do |file| copy_file("skel/#{file}", "#{name}/#{file}") end TEMPLATES.each do |file| template("skel/#{file}", "#{name}/#{file}") end end |