lib/generators/faalis/install_generator.rb in faalis-0.14.3 vs lib/generators/faalis/install_generator.rb in faalis-0.14.4

- old
+ new

@@ -1,7 +1,7 @@ # ----------------------------------------------------------------------------- -# Red Base - Basic website skel engine +# Faalis - Basic website skel engine # Copyright (C) 2012-2013 Yellowen # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or @@ -20,11 +20,11 @@ module Faalis module Generators class InstallGenerator < Rails::Generators::Base source_root File.expand_path('../templates', __FILE__) - desc "Copy all the necessary files to use Red Base" + desc "Copy all the necessary files to use Faalis" class_option :orm def install_mailboxer invoke "mailboxer:install" end @@ -35,11 +35,22 @@ template "fast_gettext.rb", "config/initializers/fast_gettext.rb" template "formtastic.rb", "config/initializers/formstatic.rb" template "seeds.rb", "db/seeds.rb" end + def copy_js_manifest + template "application.js", "#{angularjs_app_path}application.js" + end + def show_readme readme "README" if behavior == :invoke + end + + private + + def angularjs_app_path + path = Faalis::Engine.dashboard_js_manifest.split("/")[0..-2].join("/") + "app/assets/javascripts/#{path}/" end end end end