Skip to content

Instantly share code, notes, and snippets.

@cblunt
Last active September 30, 2015 19:48
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cblunt/1853175 to your computer and use it in GitHub Desktop.
Save cblunt/1853175 to your computer and use it in GitHub Desktop.
# DEPRECATED: use https://gist.github.com/cblunt/1042832
# rails new my-app -m [raw url to this file]
gem 'json'
# Slim template
gem 'slim-rails'
gem 'simple_form'
# Easy dynamic nested forms using jQuery, works with SimpleForm / Formtastic
gem 'cocoon'
# Pagination
gem 'kaminari'
# Bcrypt ruby needed for ActiveRecord::secure_password
gem 'bcrypt-ruby', '~> 3.0.0'
# For APIs / rendering JSON views
# Deprecated: Rails now defaults to Jbuilder
# gem 'rabl'
# gem 'oj'
# For hooking deploys into Codebase API
# gem 'codebase4'
gem_group :development do
# Use Letter Opener to open rendered mailers in your browser
gem 'letter_opener'
# Disable log messages for asset pipeline (clean up logs)
gem 'disable_assets_logger'
# Enable BetterErrors debug screen (and inspection)
gem 'better_errors', '~> 0.9.0'
gem 'binding_of_caller', '~> 0.7.2'
end
gem_group :development, :test do
gem 'awesome_print'
# Deployment
gem 'capistrano', require: false
gem 'capistrano-maintenance', require: false
gem 'capistrano-rbenv', require: false
# gem "rspec-rails", "~> 2.14.0"
# gem 'pry-rails'
# gem 'spring', '~> 1.0.0'
# gem 'spring-commands-rspec'
# gem 'guard-bundler'
# gem 'guard-rspec'
# gem 'guard-livereload'
# gem 'terminal-notifier-guard'
# gem 'fabrication'
gem 'faker'
# gem 'shoulda-matchers'
# gem 'rspec-rails', '~> 2.13.2'
# Alternative documentation
# gem 'yard'
# gem 'mocha'
# gem 'steak' # includes rspec and capybara
# gem 'simplecov', : require => false # Ruby 1.9
# gem 'rmre', '~> 0.0.5', require: false # Gem for generating models from legacy database schema
end
gem_group :production do
# For monitoring the app on NewRelic
gem 'newrelic_rpm'
# To notify developer of exceptions, use:
# gem 'exception_notification'
#
# Or use Airbrake on Codebase for notifications
gem 'airbrake'
end
# Custom Gems
# gem 'plymsoftware_core', git: 'git://github.com/plymouthsoftware/core.git'
# Other useful gems
# gem 'friendly_id', '~> 5.0.0'
# gem 'rack-ssl', require: 'rack/ssl'
# gem 'whenever', require: false
# Normalize ActiveRecord attributes
gem 'attribute_normalizer'
# Generate search engine sitemaps
# gem 'sitemap_generator'
# File uploads / Cloud Storage
gem 'carrierwave'
gem 'fog', '~> 1.0'
gem 'mini_magick'
# Payments, e.g. PayPal
# gem 'activemerchant'
#################################
initializer 'carrierwave.rb', <<-CODE
CarrierWave.configure do |config|
# Configuration for Rackspace Cloud Files
config.fog_credentials = {
provider: 'Rackspace',
rackspace_username: ENV['CLOUDFILES_USERNAME'],
rackspace_api_key: ENV['CLOUDFILES_API_KEY'],
rackspace_auth_url: Fog::Rackspace::UK_AUTH_ENDPOINT,
rackspace_region: :lon,
rackspace_servicenet: Rails.env.production? # (Rails.env.production? || Rails.env == "staging")
}
# For testing, upload files to local `tmp` folder.
if Rails.env.test? || Rails.env.cucumber?
config.storage = :file
config.enable_processing = false
config.root = "\#{Rails.root}/tmp"
else
config.storage = :fog
end
config.cache_dir = "\#{Rails.root}/tmp/uploads" # To let CarrierWave work on heroku
config.fog_directory = ENV['CLOUDFILES_PUBLIC_CONTAINER']
config.asset_host = ENV['CLOUDFILES_PUBLIC_CDN_HOST']
end
CODE
#######################################
application <<-CODE
config.action_mailer.smtp_settings = {
address: 'smtp.sendgrid.net',
port: 587,
domain: ENV['SENDGRID_DOMAIN'],
authentication: :plain,
user_name: ENV['SENDGRID_USERNAME'],
password: ENV['SENDGRID_PASSWORD'],
enable_starttls_auto: true
}
config.action_mailer.default_url_options = { host: ENV['SENDGRID_DOMAIN'] }
config.action_mailer.delivery_method = :smtp
# Configure exception notification
#config.middleware.use ExceptionNotifier,
# email_prefix: '[Exceptions] [Application Name] ',
# exception_recipients: %w{you@example.com}
# sender_address: 'exceptions@example.com',
CODE
##########################################
initializer 'airbrake.rb', <<-CODE
if Rails.env.production?
Airbrake.configure do |config|
config.host = 'exceptions.codebasehq.com'
config.api_key = 'api_key'
end
end
CODE
environment 'BetterErrors::Middleware.allow_ip! "127.0.0.1" # Change to your private virtual box IP address to allow BetterErrors',
env: :development
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment