Class: Ahn::Generators::AppGenerator

Inherits:
Base
  • Object
show all
Defined in:
lib/generators/ahn/app/app_generator.rb

Instance Method Summary collapse

Methods inherited from Base

banner, source_root

Instance Method Details

#generate_ahn_appObject



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_filesObject



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_railsObject



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_tmpObject



16
17
18
# File 'lib/generators/ahn/app/app_generator.rb', line 16

def remove_ahn_tmp
  remove_dir ahn_tmp_dir
end