class Adhearsion::Generators::AppGenerator

Constants

BASEDIRS
EMPTYDIRS

Public Instance Methods

setup_project() click to toggle source
# File lib/adhearsion/generators/app/app_generator.rb, line 12
def setup_project
  self.destination_root = @generator_name
  BASEDIRS.each { |dir| directory dir }
  EMPTYDIRS.each { |dir| empty_directory dir }

  template "Gemfile.erb", "Gemfile"
  template "adhearsion.erb", "config/adhearsion.rb"
  template "events.erb", "config/events.rb"
  template "routes.erb", "config/routes.rb"
  copy_file "gitignore", ".gitignore"
  copy_file "rspec", ".rspec"
  copy_file "Procfile"
  copy_file "Rakefile"
  copy_file "README.md"
  unless options[:empty]
    copy_file "simon_game.rb", "app/call_controllers/simon_game.rb"
    copy_file "simon_game_spec.rb", "spec/call_controllers/simon_game_spec.rb"
  end
  chmod "script/ahn", 0755
end