class Georgia::Heroku::Generators::InstallGenerator
Public Instance Methods
bonsai_config()
click to toggle source
# File lib/generators/georgia/heroku/install/install_generator.rb, line 58 def bonsai_config gem 'tire' copy_file "config/initializers/bonsai.rb" end
bundle()
click to toggle source
# File lib/generators/georgia/heroku/install/install_generator.rb, line 90 def bundle run "bundle install" end
cache_config()
click to toggle source
# File lib/generators/georgia/heroku/install/install_generator.rb, line 27 def cache_config gem 'dalli' gem 'kgio' gem 'rack-cache' gem 'memcachier' inject_into_file 'config/environments/production.rb', after: "Application.configure do" do <<-'RUBY' # Set static assets cache header. rack-cache will cache those. config.static_cache_control = "public, max-age=31536000" config.cache_store = :dalli_store client = Dalli::Client.new(ENV["MEMCACHIER_SERVERS"], :value_max_bytes => 10485760, :expires_in => 86400) # Configure rack-cache for using memcachier config.action_dispatch.rack_cache = { :metastore => client, :entitystore => client } RUBY end end
cloudinary_config()
click to toggle source
# File lib/generators/georgia/heroku/install/install_generator.rb, line 80 def cloudinary_config gem 'cloudinary' end
deploy_config()
click to toggle source
# File lib/generators/georgia/heroku/install/install_generator.rb, line 84 def deploy_config gem_group :assets do gem 'turbo-sprockets-rails3' end end
heroku_environment_config()
click to toggle source
# File lib/generators/georgia/heroku/install/install_generator.rb, line 16 def heroku_environment_config gsub_file 'config/environments/production.rb', "config.serve_static_assets = false" do <<-'RUBY' # config.serve_static_assets = false # Enable Rails's static asset server for Heroku config.serve_static_assets = true RUBY end application "config.assets.initialize_on_precompile = false" if Rails::VERSION::MAJOR == 3 and Rails::VERSION::MINOR >= 1 end
heroku_gems()
click to toggle source
# File lib/generators/georgia/heroku/install/install_generator.rb, line 9 def heroku_gems gem_group :production do gem 'heroku-deflater' gem 'rails_12factor' end end
sendgrid_config()
click to toggle source
# File lib/generators/georgia/heroku/install/install_generator.rb, line 63 def sendgrid_config inject_into_file 'config/environments/production.rb', after: "Application.configure do" do <<-'RUBY' # Send emails via sendgrid config.action_mailer.smtp_settings = { :address => 'smtp.sendgrid.net', :port => '587', :authentication => :plain, :user_name => ENV['SENDGRID_USERNAME'], :password => ENV['SENDGRID_PASSWORD'], :domain => 'heroku.com', :enable_starttls_auto => true } RUBY end end
show_readme()
click to toggle source
# File lib/generators/georgia/heroku/install/install_generator.rb, line 94 def show_readme readme "README" end
unicorn()
click to toggle source
# File lib/generators/georgia/heroku/install/install_generator.rb, line 52 def unicorn gem 'unicorn', group: :production copy_file "config/unicorn.rb" copy_file "Procfile" end