Sha256: 376b4da9762fe97a875df094c660a40edb10efa2879b800e0f10e1fdd1fcedfe
Contents?: true
Size: 1 KB
Versions: 27
Compression:
Stored size: 1 KB
Contents
require 'rails/generators' module Enjoy class CapifyGenerator < Rails::Generators::Base argument :kind, type: :string argument :port, type: :string argument :domain, type: :string source_root File.expand_path('../templates', __FILE__) def app_name Rails.application.class.name.split("::")[0] end def deploy_to if kind == 'data' "/data/#{app_name.downcase}/app" else "/home/#{app_name.downcase}/www/#{app_name.downcase}" end end def tmp_path if kind == 'data' "/data/#{app_name.downcase}/tmp_dump" else "/home/#{app_name.downcase}/www/#{app_name.downcase}/tmp_dump" end end desc 'Enjoy capistrano setup generator' def install copy_file "Capfile", "Capfile" template "unicorn.erb", "config/unicorn/production.rb" template "deploy.erb", "config/deploy.rb" template "production.erb", "config/deploy/production.rb" template "dl.erb", "lib/tasks/dl.thor" end end end
Version data entries
27 entries across 27 versions & 1 rubygems