class Jinda_lte::InstallGenerator

Public Class Methods

source_root() click to toggle source
# File lib/generators/jinda_lte/install_generator.rb, line 5
def self.source_root
  File.dirname(__FILE__) + "/templates"
end

Public Instance Methods

copy_theme() click to toggle source
# File lib/generators/jinda_lte/install_generator.rb, line 22
def copy_theme
  copy_file "application.js","app/assets/javascripts/application.js"
  copy_file "jindalte.js","app/assets/javascripts/jindalte.js"
  copy_file "application.scss","app/assets/stylesheets/application.scss"
  copy_file "jindalte.css","app/assets/stylesheets/jindalte.css"
  copy_file "application.haml","app/views/layouts/application.haml"
  copy_file "adminltes_controller.rb","app/controllers/adminltes_controller.rb"
  copy_file "index.mm","app/jinda/index.mm"
end
finish() click to toggle source
# File lib/generators/jinda_lte/install_generator.rb, line 32
def finish        
  puts "------------------------------------------------\n"
  puts "                                                \n"
  puts "  Jinda Theme installation finished             \n"
  puts "  Note: last jinda_assets was move to tmp/cache \n"
  puts "  To delte run the following command            \n"
  puts "                                                \n"
  puts "rake tmp:cache:clear                            \n"
  puts "------------------------------------------------\n"
end
setup_app() click to toggle source
# File lib/generators/jinda_lte/install_generator.rb, line 9
def setup_app
  inside("app/views/layouts") { run "mv application.haml application.haml.bak" }
  inside("app/views/layouts") { run "mv lte lte.bak" }
  inside("app/assets") { run "mv jinda_assets ../../tmp/cache" }
  inside("app/assets") { run "mv javascripts ../../tmp/cache" }
  inside("app/assets") { run "mv stylesheets ../../tmp/cache" }
  inside("app/jinda") { run "mv index.mm index.mm.bak"}
  directory "app/assets/jinda_assets"
  directory "app/views/adminltes"
  directory "app/views/layouts/lte"

end