Class: Adhearsion::Generators::AppGenerator
Constant Summary
- BASEDIRS =
%w( config lib script spec )
- EMPTYDIRS =
%w( spec/call_controllers spec/support )
Instance Method Summary (collapse)
Methods inherited from Generator
base_root, default_source_root, desc, namespace, short_desc, source_root
Instance Method Details
- (Object) setup_project
10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/adhearsion/generators/app/app_generator.rb', line 10 def setup_project self.destination_root = @generator_name BASEDIRS.each { |dir| directory dir } EMPTYDIRS.each { |dir| empty_directory dir } template "Gemfile.erb", "Gemfile" copy_file "gitignore", ".gitignore" copy_file "rspec", ".rspec" copy_file "Procfile" copy_file "Rakefile" copy_file "README.md" chmod "script/ahn", 0755 end |