Class: Ahn::Generators::AppGenerator
- Defined in:
- lib/generators/ahn/app/app_generator.rb
Instance Method Summary collapse
- #generate_ahn_app ⇒ Object
- #place_custom_files ⇒ Object
- #place_files_for_rails ⇒ Object
- #remove_ahn_tmp ⇒ Object
Methods inherited from Base
Instance Method Details
#generate_ahn_app ⇒ Object
6 7 8 |
# File 'lib/generators/ahn/app/app_generator.rb', line 6 def generate_ahn_app run "ahn create #{ahn_tmp_dir}" end |
#place_custom_files ⇒ Object
20 21 22 23 24 25 26 |
# File 'lib/generators/ahn/app/app_generator.rb', line 20 def place_custom_files gem "adhearsion", ">= 1.0.1" copy_file "adhearsion.rake", "lib/tasks/adhearsion.rake" copy_file "adhearsion.rb", "config/adhearsion.rb" copy_file "adhearsion.yml", "config/adhearsion.example.yml" copy_file "ahnrc", ".ahnrc" end |
#place_files_for_rails ⇒ Object
10 11 12 13 14 |
# File 'lib/generators/ahn/app/app_generator.rb', line 10 def place_files_for_rails run "mv #{ahn_tmp_dir}/components components" run "mv #{ahn_tmp_dir}/dialplan.rb app/dialplan.rb" run "mv #{ahn_tmp_dir}/events.rb app/events.rb" end |
#remove_ahn_tmp ⇒ Object
16 17 18 |
# File 'lib/generators/ahn/app/app_generator.rb', line 16 def remove_ahn_tmp remove_dir ahn_tmp_dir end |