Sha256: 2eed9d4516d0e0cc5a71568095256ebe2b5651dc7d69f36582dcb5136efc7a4d
Contents?: true
Size: 1.11 KB
Versions: 1
Compression:
Stored size: 1.11 KB
Contents
module Troy # The Troy::Generator class will create a new book structure. # # ebook = Troy::Generator.new # ebook.destination_root = "/some/path/book-name" # ebook.invoke_all # class Generator < Thor::Group include Thor::Actions desc "Generate a new site structure" def self.source_root File.expand_path("../../../templates", __FILE__) end def create_directories empty_directory "assets/javascripts" empty_directory "assets/stylesheets" empty_directory "assets/images" empty_directory "assets/media" empty_directory "source" empty_directory "config" empty_directory "layouts" end def copy_files copy_file "helpers.rb", "config/helpers.rb" copy_file "default.erb", "layouts/default.erb" copy_file "index.erb", "source/index.erb" copy_file "404.erb", "source/404.erb" copy_file "500.erb", "source/500.erb" copy_file "Gemfile", "Gemfile" copy_file "config.ru", "config.ru" copy_file "unicorn.rb", "config/unicorn.rb" end def bundle_install run "bundle install" end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
troy-0.0.8 | lib/troy/generator.rb |