Class: Teaspoon::Generators::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Teaspoon::Generators::InstallGenerator
- Defined in:
- lib/generators/teaspoon/install/install_generator.rb
Instance Method Summary collapse
- #copy_environment ⇒ Object
- #copy_partials ⇒ Object
- #create_structure ⇒ Object
- #display_post_install ⇒ Object
- #install_framework_files ⇒ Object
- #verify_framework_and_version ⇒ Object
Instance Method Details
#copy_environment ⇒ Object
48 49 50 51 |
# File 'lib/generators/teaspoon/install/install_generator.rb', line 48 def copy_environment source = [:documentation] ? "env_comments.rb.tt" : "env.rb.tt" template source, "#{framework.install_path}/teaspoon_env.rb" end |
#copy_partials ⇒ Object
62 63 64 65 66 |
# File 'lib/generators/teaspoon/install/install_generator.rb', line 62 def copy_partials return unless [:partials] copy_file "_boot.html.erb", "#{framework.install_path}/javascripts/fixtures/_boot.html.erb" copy_file "_body.html.erb", "#{framework.install_path}/javascripts/fixtures/_body.html.erb" end |
#create_structure ⇒ Object
53 54 55 56 |
# File 'lib/generators/teaspoon/install/install_generator.rb', line 53 def create_structure empty_directory "#{framework.install_path}/javascripts/support" empty_directory "#{framework.install_path}/javascripts/fixtures" end |
#display_post_install ⇒ Object
68 69 70 |
# File 'lib/generators/teaspoon/install/install_generator.rb', line 68 def display_post_install readme "POST_INSTALL" if behavior == :invoke end |
#install_framework_files ⇒ Object
58 59 60 |
# File 'lib/generators/teaspoon/install/install_generator.rb', line 58 def install_framework_files instance_eval(&framework.install_callback) end |
#verify_framework_and_version ⇒ Object
41 42 43 44 45 46 |
# File 'lib/generators/teaspoon/install/install_generator.rb', line 41 def verify_framework_and_version version.present? framework rescue if behavior == :invoke end |