Sha256: 41d9ca3f66cb1d2e0a103dbd5cf10d60b4d86fe47d81a4ddf69568010d2215d0
Contents?: true
Size: 836 Bytes
Versions: 2
Compression:
Stored size: 836 Bytes
Contents
require "rails" require "rails/generators" require "rails/generators/app_base" require "houston/version" module Generators class InstanceGenerator < Rails::Generators::AppBase source_root File.expand_path("../../templates/new-instance", File.dirname(__FILE__)) argument :app_path, type: :string def copy_files copy_file ".gitignore", "#{app_path}/.gitignore" path = source_paths[0] path_length = path.length + 1 Dir.glob(path + "/**/*").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 def name app_path end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
houston-core-0.8.0 | lib/generators/instance_generator.rb |
houston-core-0.8.0.pre2 | lib/generators/instance_generator.rb |