Sha256: 05b896677cf708b4f4e45273507290e0a4433094a3771352e9cd8ca8812fe135
Contents?: true
Size: 1.04 KB
Versions: 9
Compression:
Stored size: 1.04 KB
Contents
# encoding: utf-8 module Adhearsion module Generators class AppGenerator < Generator BASEDIRS = %w( config script spec ) EMPTYDIRS = %w( app/call_controllers lib spec/support spec/call_controllers ) class_option :empty, type: :boolean 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 end end end
Version data entries
9 entries across 9 versions & 1 rubygems