Sha256: a40a95fd19bcb40393ca19a7c75944bb9765de5489688b1ddcd71134cc7ef75a

Contents?: true

Size: 794 Bytes

Versions: 8

Compression:

Stored size: 794 Bytes

Contents

require "rails/generators"
require File.expand_path("../generator_helper", __FILE__)
include GeneratorHelper

module ReactOnRails
  module Generators
    class HerokuDeploymentGenerator < Rails::Generators::Base
      hide!
      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

8 entries across 8 versions & 1 rubygems

Version Path
react_on_rails-2.0.0.rc.1 lib/generators/react_on_rails/heroku_deployment_generator.rb
react_on_rails-2.0.0.beta.3 lib/generators/react_on_rails/heroku_deployment_generator.rb
react_on_rails-2.0.0.beta.2 lib/generators/react_on_rails/heroku_deployment_generator.rb
react_on_rails-1.2.0 lib/generators/react_on_rails/heroku_deployment_generator.rb
react_on_rails-1.2.0.rc1 lib/generators/react_on_rails/heroku_deployment_generator.rb
react_on_rails-1.1.1 lib/generators/react_on_rails/heroku_deployment_generator.rb
react_on_rails-1.1.0 lib/generators/react_on_rails/heroku_deployment_generator.rb
react_on_rails-1.0.3 lib/generators/react_on_rails/heroku_deployment_generator.rb