Sha256: b33943f0ed377485a12fb2be5fa438a878c2b8732649abf65fd70803f0fe79c2

Contents?: true

Size: 825 Bytes

Versions: 28

Compression:

Stored size: 825 Bytes

Contents

require 'rails/generators'

module RocketCms
  class CapifyGenerator < Rails::Generators::Base
    argument :domain, type: :string
    argument :port, type: :string, optional: true

    source_root File.expand_path('../templates', __FILE__)

    def app_name
      Rails.application.class.name.split("::")[0]
    end

    def deploy_to
      "/data/#{app_name.downcase}/app"
    end
    def tmp_path
      "/data/#{app_name.downcase}/tmp_dump"
    end

    desc 'RocketCMS capistrano setup generator'
    def install
      copy_file "Capfile", "Capfile"
      unless port.nil?
        template "unicorn.erb", "config/unicorn/production.rb"
      end
      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

28 entries across 28 versions & 1 rubygems

Version Path
rocket_cms-0.37.1 lib/generators/rocket_cms/capify_generator.rb
rocket_cms-0.37.0 lib/generators/rocket_cms/capify_generator.rb
rocket_cms-0.36.0 lib/generators/rocket_cms/capify_generator.rb
rocket_cms-0.35.0 lib/generators/rocket_cms/capify_generator.rb
rocket_cms-0.34.0 lib/generators/rocket_cms/capify_generator.rb
rocket_cms-0.33.1 lib/generators/rocket_cms/capify_generator.rb
rocket_cms-0.33.0 lib/generators/rocket_cms/capify_generator.rb
rocket_cms-0.32.0 lib/generators/rocket_cms/capify_generator.rb
rocket_cms-0.31.1 lib/generators/rocket_cms/capify_generator.rb
rocket_cms-0.31.0 lib/generators/rocket_cms/capify_generator.rb
rocket_cms-0.30.0 lib/generators/rocket_cms/capify_generator.rb
rocket_cms-0.29.0 lib/generators/rocket_cms/capify_generator.rb
rocket_cms-0.28.0 lib/generators/rocket_cms/capify_generator.rb
rocket_cms-0.27.8 lib/generators/rocket_cms/capify_generator.rb
rocket_cms-0.27.7 lib/generators/rocket_cms/capify_generator.rb
rocket_cms-0.27.6 lib/generators/rocket_cms/capify_generator.rb
rocket_cms-0.27.5 lib/generators/rocket_cms/capify_generator.rb
rocket_cms-0.27.4 lib/generators/rocket_cms/capify_generator.rb
rocket_cms-0.27.3 lib/generators/rocket_cms/capify_generator.rb
rocket_cms-0.27.2 lib/generators/rocket_cms/capify_generator.rb