Sha256: 918b3b7bde1e3690a467d42cc9497f89e4e3046843718774d02611228fbbf688
Contents?: true
Size: 815 Bytes
Versions: 8
Compression:
Stored size: 815 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 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 def name File.basename(app_path) end end end
Version data entries
8 entries across 8 versions & 1 rubygems