Class: Generators::InstanceGenerator
- Inherits:
-
Rails::Generators::AppBase
- Object
- Rails::Generators::AppBase
- Generators::InstanceGenerator
- Defined in:
- lib/generators/instance_generator.rb
Instance Method Summary collapse
Instance Method Details
#copy_files ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/generators/instance_generator.rb', line 12 def copy_files path = source_paths[0] path_length = path.length + 1 Dir.glob(path + "/**/*", File::FNM_DOTMATCH).each do |file| next if File.directory?(file) path = file[path_length..-1] template path, "#{app_path}/#{path}" end File.chmod 0755, "#{app_path}/bin/rails" File.chmod 0755, "#{app_path}/bin/setup" empty_directory_with_keep_file "#{app_path}/tmp/pids" end |
#name ⇒ Object
27 28 29 |
# File 'lib/generators/instance_generator.rb', line 27 def name File.basename(app_path) end |