Sha256: 53b522091824e0222e2e422a37d60d40cb248321914f9ef74f8fed25446d4eef

Contents?: true

Size: 816 Bytes

Versions: 23

Compression:

Stored size: 816 Bytes

Contents

require "rails/generators"
require_relative "generator_helper"

module ReactOnRails
  module Generators
    class HerokuDeploymentGenerator < Rails::Generators::Base
      include GeneratorHelper
      Rails::Generators.hide_namespace(namespace)
      source_root(File.expand_path("../templates", __FILE__))

      def copy_heroku_deployment_files
        base_path = "heroku_deployment"
        %w(.buildpacks
           Procfile
           config/puma.rb).each { |file| copy_file("#{base_path}/#{file}", file) }
      end

      def add_heroku_production_gems
        gem_text = <<-GEMS.strip_heredoc

          # For Heroku deployment
          gem 'rails_12factor', group: :production
          gem 'puma', group: :production

        GEMS
        append_to_file("Gemfile", gem_text)
      end
    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
react_on_rails-4.0.0 lib/generators/react_on_rails/heroku_deployment_generator.rb
react_on_rails-4.0.0.beta.3 lib/generators/react_on_rails/heroku_deployment_generator.rb
react_on_rails-4.0.0.beta.2 lib/generators/react_on_rails/heroku_deployment_generator.rb
react_on_rails-4.0.0.beta.1 lib/generators/react_on_rails/heroku_deployment_generator.rb
react_on_rails-3.0.6 lib/generators/react_on_rails/heroku_deployment_generator.rb
react_on_rails-3.0.5 lib/generators/react_on_rails/heroku_deployment_generator.rb
react_on_rails-3.0.4 lib/generators/react_on_rails/heroku_deployment_generator.rb
react_on_rails-3.0.3 lib/generators/react_on_rails/heroku_deployment_generator.rb
react_on_rails-3.0.2 lib/generators/react_on_rails/heroku_deployment_generator.rb
react_on_rails-3.0.1 lib/generators/react_on_rails/heroku_deployment_generator.rb
react_on_rails-3.0.0 lib/generators/react_on_rails/heroku_deployment_generator.rb
react_on_rails-3.0.0.rc.2 lib/generators/react_on_rails/heroku_deployment_generator.rb
react_on_rails-3.0.0.rc.1 lib/generators/react_on_rails/heroku_deployment_generator.rb
react_on_rails-3.0.0.beta.1 lib/generators/react_on_rails/heroku_deployment_generator.rb
react_on_rails-2.3.0 lib/generators/react_on_rails/heroku_deployment_generator.rb
react_on_rails-2.2.0 lib/generators/react_on_rails/heroku_deployment_generator.rb
react_on_rails-2.1.1 lib/generators/react_on_rails/heroku_deployment_generator.rb
react_on_rails-2.1.0 lib/generators/react_on_rails/heroku_deployment_generator.rb
react_on_rails-2.0.2 lib/generators/react_on_rails/heroku_deployment_generator.rb
react_on_rails-2.0.1 lib/generators/react_on_rails/heroku_deployment_generator.rb