Class: Wck::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Wck::InstallGenerator
- Defined in:
- lib/generators/wck/install/install_generator.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.source_root ⇒ Object
7 8 9 |
# File 'lib/generators/wck/install/install_generator.rb', line 7 def self.source_root File. '../templates', __FILE__ end |
Instance Method Details
#copy_views ⇒ Object
11 12 13 14 15 |
# File 'lib/generators/wck/install/install_generator.rb', line 11 def copy_views %w[layouts/application shared/_header shared/_footer].each do |file| copy_file "#{file}.html.erb", "app/views/#{file}.html.erb" end end |
#create_asset_bolierplate ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/generators/wck/install/install_generator.rb', line 17 def create_asset_bolierplate %w[images/content images/interface javascripts/modules stylesheets/modules stylesheets/theme stylesheets/layouts].each do |dir| empty_directory "app/assets/#{dir}" run "touch app/assets/#{dir}/.keep" end copy_file 'sprite.psd', 'app/assets/images/interface/sprite.psd' remove_file 'app/assets/stylesheets/application.css' copy_file 'stylesheets/application.css.scss', 'app/assets/stylesheets/application.css.scss' %w[fonts theme].each do |file| copy_file "stylesheets/theme/_#{file}.scss", "app/assets/stylesheets/theme/_#{file}.scss" end end |
#the_humans_are_dead ⇒ Object
33 34 35 36 37 |
# File 'lib/generators/wck/install/install_generator.rb', line 33 def the_humans_are_dead %w[humans robots].each do |file| copy_file "public/#{file}.txt" end end |