Skip to content

Instantly share code, notes, and snippets.

@cblunt
Last active September 30, 2015 19:48

Revisions

  1. cblunt revised this gist Mar 6, 2015. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions template.rb
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,5 @@
    # DEPRECATED: use https://gist.github.com/cblunt/1042832

    # rails new my-app -m [raw url to this file]

    gem 'json'
  2. cblunt revised this gist Jun 17, 2014. 1 changed file with 3 additions and 2 deletions.
    5 changes: 3 additions & 2 deletions template.rb
    Original file line number Diff line number Diff line change
    @@ -16,8 +16,9 @@
    gem 'bcrypt-ruby', '~> 3.0.0'

    # For APIs / rendering JSON views
    gem 'rabl'
    gem 'oj'
    # Deprecated: Rails now defaults to Jbuilder
    # gem 'rabl'
    # gem 'oj'

    # For hooking deploys into Codebase API
    # gem 'codebase4'
  3. cblunt revised this gist Jun 14, 2014. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions template.rb
    Original file line number Diff line number Diff line change
    @@ -58,8 +58,8 @@
    # gem 'shoulda-matchers'
    # gem 'rspec-rails', '~> 2.13.2'

    # Documentation
    gem 'yard'
    # Alternative documentation
    # gem 'yard'

    # gem 'mocha'
    # gem 'steak' # includes rspec and capybara
  4. cblunt revised this gist Jun 14, 2014. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion template.rb
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    # rails new my-app -m https://gist.githubusercontent.com/cblunt/1853175/raw/4b03f811634b78caa48a11685d4db52bf358c2ee/template.rb
    # rails new my-app -m [raw url to this file]

    gem 'json'

  5. cblunt revised this gist Jun 14, 2014. 6 changed files with 171 additions and 183 deletions.
    123 changes: 0 additions & 123 deletions Gemfile
    Original file line number Diff line number Diff line change
    @@ -1,123 +0,0 @@
    source 'https://rubygems.org'

    gem 'rails', '4.0.3'

    # Gems for Rails 4 upgrade compatibility
    # gem 'protected_attributes'
    # gem 'rails-observers'
    # gem 'actionpack-action_caching'
    # gem 'activeresource', require: 'active_resource'

    #gem 'pg'
    gem 'mysql2'
    gem 'jquery-rails'
    gem 'json'

    gem 'slim-rails'

    # Form rendering helpers
    gem 'simple_form'

    # Easy dynamic nested forms using jQuery, works with SimpleForm / Formtastic
    gem 'cocoon'

    # Pagination
    gem 'kaminari'

    # For monitoring the app on NewRelic
    gem 'newrelic_rpm', :group => :production

    # To notify developer of exceptions, use:
    # gem 'exception_notification'
    #
    # Or use Airbrake on Codebase for notifications
    gem 'airbrake'

    # Use Letter Opener to open rendered mailers in your browser
    gem 'letter_opener', :group => :development

    # Bcrypt ruby needed for ActiveRecord::secure_password
    gem 'bcrypt-ruby', '~> 3.0.0'

    # For APIs / rendering JSON views
    # gem 'rabl'
    # gem 'oj'

    # For hooking deploys into Codebase API
    gem 'codebase4'

    # Custom Gems
    # gem 'plymsoftware_core', :git => 'git://github.com/plymouthsoftware/core.git'

    # Other useful gems
    # gem 'friendly_id', '~> 4.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'

    # Use spork for quick spec runs
    # gem 'spork-rails', :github => 'sporkrb/spork-rails', require: false, group: :development

    # Disable log messages for asset pipeline (clean up logs)
    gem 'disable_assets_logger', group: :development

    # Enable BetterErrors debug screen (and inspection)
    gem 'better_errors', '~> 0.9.0', group: :development
    gem 'binding_of_caller', '~> 0.7.2', group: :development

    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'

    gem 'yard', :require => false

    # 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

    # Asset gems
    gem 'sass-rails', '~> 4.0.0'
    gem 'coffee-rails', '~> 4.0.0'


    # See https://github.com/sstephenson/execjs#readme for more supported runtimes
    # gem 'therubyracer'

    gem 'uglifier', '>= 1.3.0'
    5 changes: 0 additions & 5 deletions airbrake.rb
    Original file line number Diff line number Diff line change
    @@ -1,5 +0,0 @@
    # config/initializers/airbrake.rb
    Airbrake.configure do |config|
    config.host = 'exceptions.codebasehq.com'
    config.api_key = 'api_key'
    end
    22 changes: 0 additions & 22 deletions application.rb
    Original file line number Diff line number Diff line change
    @@ -1,22 +0,0 @@
    # config/application.rb

    # Configure ActionMailer to send via SendGrid
    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{[email protected]}
    # :sender_address => '[email protected]',
    25 changes: 0 additions & 25 deletions carrierwave.rb
    Original file line number Diff line number Diff line change
    @@ -1,25 +0,0 @@
    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
    8 changes: 0 additions & 8 deletions development.rb
    Original file line number Diff line number Diff line change
    @@ -1,8 +0,0 @@
    # config/environments/development.rb

    RailsApp::Application.configure do
    #...

    # Allow Better Errors through Vagrant box
    BetterErrors::Middleware.allow_ip! "127.0.0.1"# Change to your private virtual box IP address to allow BetterErrors
    end
    171 changes: 171 additions & 0 deletions template.rb
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,171 @@
    # rails new my-app -m https://gist.githubusercontent.com/cblunt/1853175/raw/4b03f811634b78caa48a11685d4db52bf358c2ee/template.rb

    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
    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'

    # 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{[email protected]}
    # sender_address: '[email protected]',
    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
  6. cblunt revised this gist Mar 29, 2014. 1 changed file with 2 additions and 5 deletions.
    7 changes: 2 additions & 5 deletions Gemfile
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    source 'https://rubygems.org'

    gem 'rails', '~> 4.0.1'
    gem 'rails', '4.0.3'

    # Gems for Rails 4 upgrade compatibility
    # gem 'protected_attributes'
    @@ -69,11 +69,8 @@ gem 'attribute_normalizer'
    # Payments, e.g. PayPal
    # gem 'activemerchant'

    # Use passenger standalone as a server?
    # gem 'passenger', :require => false

    # Use spork for quick spec runs
    gem 'spork-rails', :github => 'sporkrb/spork-rails', require: false, group: :development
    # gem 'spork-rails', :github => 'sporkrb/spork-rails', require: false, group: :development

    # Disable log messages for asset pipeline (clean up logs)
    gem 'disable_assets_logger', group: :development
  7. cblunt revised this gist Jan 21, 2014. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion carrierwave.rb
    Original file line number Diff line number Diff line change
    @@ -5,7 +5,7 @@
    rackspace_username: ENV['CLOUDFILES_USERNAME'],
    rackspace_api_key: ENV['CLOUDFILES_API_KEY'],
    rackspace_auth_url: Fog::Rackspace::UK_AUTH_ENDPOINT,
    rackspace_region: :lon
    rackspace_region: :lon,
    rackspace_servicenet: Rails.env.production? # (Rails.env.production? || Rails.env == "staging")
    }

  8. cblunt revised this gist Jan 21, 2014. 2 changed files with 7 additions and 6 deletions.
    2 changes: 1 addition & 1 deletion application.rb
    Original file line number Diff line number Diff line change
    @@ -11,7 +11,7 @@
    :enable_starttls_auto => true
    }

    config.action_mailer.default_url_options = { :host => ENV['SENDGRID_DOMAIN'] }
    config.action_mailer.default_url_options = { host: ENV['SENDGRID_DOMAIN'] }

    config.action_mailer.delivery_method = :smtp

    11 changes: 6 additions & 5 deletions carrierwave.rb
    Original file line number Diff line number Diff line change
    @@ -1,11 +1,12 @@
    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 => "lon.auth.api.rackspacecloud.com",
    :rackspace_servicenet => Rails.env.production?
    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.
  9. cblunt revised this gist Dec 8, 2013. 1 changed file with 12 additions and 2 deletions.
    14 changes: 12 additions & 2 deletions Gemfile
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    source 'https://rubygems.org'

    gem 'rails', '~> 4.0.0'
    gem 'rails', '~> 4.0.1'

    # Gems for Rails 4 upgrade compatibility
    # gem 'protected_attributes'
    @@ -90,7 +90,17 @@ group :development, :test do
    gem 'capistrano-maintenance', require: false
    gem 'capistrano-rbenv', require: false

    gem 'guard-rspec', :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'
  10. cblunt revised this gist Aug 5, 2013. 2 changed files with 15 additions and 0 deletions.
    7 changes: 7 additions & 0 deletions Gemfile
    Original file line number Diff line number Diff line change
    @@ -75,6 +75,13 @@ gem 'attribute_normalizer'
    # Use spork for quick spec runs
    gem 'spork-rails', :github => 'sporkrb/spork-rails', require: false, group: :development

    # Disable log messages for asset pipeline (clean up logs)
    gem 'disable_assets_logger', group: :development

    # Enable BetterErrors debug screen (and inspection)
    gem 'better_errors', '~> 0.9.0', group: :development
    gem 'binding_of_caller', '~> 0.7.2', group: :development

    group :development, :test do
    gem 'awesome_print'

    8 changes: 8 additions & 0 deletions development.rb
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,8 @@
    # config/environments/development.rb

    RailsApp::Application.configure do
    #...

    # Allow Better Errors through Vagrant box
    BetterErrors::Middleware.allow_ip! "127.0.0.1"# Change to your private virtual box IP address to allow BetterErrors
    end
  11. cblunt revised this gist Jul 12, 2013. 1 changed file with 26 additions and 19 deletions.
    45 changes: 26 additions & 19 deletions Gemfile
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,12 @@
    source 'https://rubygems.org'

    gem 'rails', '~> 3.2' # 3.2.x ensures security updates.
    gem 'rails', '~> 4.0.0'

    # Gems for Rails 4 upgrade compatibility
    # gem 'protected_attributes'
    # gem 'rails-observers'
    # gem 'actionpack-action_caching'
    # gem 'activeresource', require: 'active_resource'

    #gem 'pg'
    gem 'mysql2'
    @@ -49,15 +55,12 @@ gem 'codebase4'
    # gem 'rack-ssl', :require => 'rack/ssl'
    # gem 'whenever', :require => false

    # gem 'uuid', '~> 2.3' # Ruby 1.8

    # Normalize ActiveRecord attributes
    gem 'attribute_normalizer'

    # Generate search engine sitemaps
    # gem 'sitemap_generator'


    # File uploads / Cloud Storage
    # gem 'carrierwave'
    # gem 'fog', '~> 1.0'
    @@ -69,34 +72,38 @@ gem 'attribute_normalizer'
    # Use passenger standalone as a server?
    # gem 'passenger', :require => false

    # Use spork for quick spec runs
    gem 'spork-rails', :github => 'sporkrb/spork-rails', require: false, group: :development

    group :development, :test do
    gem 'awesome_print'
    gem 'capistrano', :require => false

    # Deployment
    gem 'capistrano', require: false
    gem 'capistrano-maintenance', require: false
    gem 'capistrano-rbenv', require: false

    gem 'guard-rspec', :require => false
    gem 'yard', :require => false
    gem 'fabrication'
    gem 'faker'
    gem 'shoulda-matchers'
    gem 'rspec-rails', '~> 2.13.2'


    gem 'yard', :require => false

    # 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

    # Gems used only for assets and not required
    # in production environments by default.
    group :assets do
    gem 'sass-rails', '~> 3.2.3'
    gem 'coffee-rails', '~> 3.2.1'
    # Asset gems
    gem 'sass-rails', '~> 4.0.0'
    gem 'coffee-rails', '~> 4.0.0'

    # Twitter Bootstrap CSS
    # gem 'twitter-bootstrap-rails'
    # gem 'twitter-bootstrap-rails', :git => "git://github.com/seyhunak/twitter-bootstrap-rails.git", :branch => "static"

    # See https://github.com/sstephenson/execjs#readme for more supported runtimes
    # gem 'therubyracer'
    # See https://github.com/sstephenson/execjs#readme for more supported runtimes
    # gem 'therubyracer'

    gem 'uglifier', '>= 1.0.3'
    end
    gem 'uglifier', '>= 1.3.0'
  12. cblunt revised this gist Jun 26, 2013. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions Gemfile
    Original file line number Diff line number Diff line change
    @@ -12,6 +12,9 @@ gem 'slim-rails'
    # Form rendering helpers
    gem 'simple_form'

    # Easy dynamic nested forms using jQuery, works with SimpleForm / Formtastic
    gem 'cocoon'

    # Pagination
    gem 'kaminari'

  13. cblunt revised this gist Jun 26, 2013. 1 changed file with 4 additions and 2 deletions.
    6 changes: 4 additions & 2 deletions Gemfile
    Original file line number Diff line number Diff line change
    @@ -74,9 +74,11 @@ group :development, :test do
    gem 'yard', :require => false
    gem 'fabrication'
    gem 'faker'
    gem 'mocha'
    gem 'shoulda-matchers'
    gem 'steak' # includes rspec and capybara
    gem 'rspec-rails', '~> 2.13.2'

    # gem 'mocha'
    # gem 'steak' # includes rspec and capybara
    # gem 'simplecov', : require => false # Ruby 1.9
    end

  14. cblunt revised this gist Mar 19, 2013. 1 changed file with 4 additions and 0 deletions.
    4 changes: 4 additions & 0 deletions Gemfile
    Original file line number Diff line number Diff line change
    @@ -51,6 +51,10 @@ gem 'codebase4'
    # Normalize ActiveRecord attributes
    gem 'attribute_normalizer'

    # Generate search engine sitemaps
    # gem 'sitemap_generator'


    # File uploads / Cloud Storage
    # gem 'carrierwave'
    # gem 'fog', '~> 1.0'
  15. cblunt revised this gist Mar 13, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Gemfile
    Original file line number Diff line number Diff line change
    @@ -68,7 +68,7 @@ group :development, :test do
    gem 'capistrano', :require => false
    gem 'guard-rspec', :require => false
    gem 'yard', :require => false
    gem 'factory_girl_rails', '~> 1.2' # Ruby 1.9 only.
    gem 'fabrication'
    gem 'faker'
    gem 'mocha'
    gem 'shoulda-matchers'
  16. cblunt renamed this gist Feb 26, 2013. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion production.rb → application.rb
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    # config/environments/production.rb
    # config/application.rb

    # Configure ActionMailer to send via SendGrid
    config.action_mailer.smtp_settings = {
    @@ -11,6 +11,8 @@
    :enable_starttls_auto => true
    }

    config.action_mailer.default_url_options = { :host => ENV['SENDGRID_DOMAIN'] }

    config.action_mailer.delivery_method = :smtp

    # Configure exception notification
  17. cblunt revised this gist Feb 8, 2013. 1 changed file with 24 additions and 0 deletions.
    24 changes: 24 additions & 0 deletions carrierwave.rb
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,24 @@
    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 => "lon.auth.api.rackspacecloud.com",
    :rackspace_servicenet => Rails.env.production?
    }

    # 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
  18. cblunt revised this gist Jan 22, 2013. 3 changed files with 50 additions and 16 deletions.
    53 changes: 41 additions & 12 deletions Gemfile
    Original file line number Diff line number Diff line change
    @@ -1,18 +1,38 @@
    source 'https://rubygems.org'

    gem 'rails', '3.2.8'
    gem 'rails', '~> 3.2' # 3.2.x ensures security updates.

    gem 'pg'
    # gem 'mysql2'
    #gem 'pg'
    gem 'mysql2'
    gem 'jquery-rails'
    gem 'json'

    gem 'slim-rails'

    # Form rendering helpers
    gem 'simple_form'

    # Pagination
    gem 'kaminari'

    # To notify developer of exceptions
    gem 'exception_notification'
    # For monitoring the app on NewRelic
    gem 'newrelic_rpm', :group => :production

    # To notify developer of exceptions, use:
    # gem 'exception_notification'
    #
    # Or use Airbrake on Codebase for notifications
    gem 'airbrake'

    # Use Letter Opener to open rendered mailers in your browser
    gem 'letter_opener', :group => :development

    # Bcrypt ruby needed for ActiveRecord::secure_password
    gem 'bcrypt-ruby', '~> 3.0.0'

    # For APIs / rendering JSON views
    # gem 'rabl'
    # gem 'oj'

    # For hooking deploys into Codebase API
    gem 'codebase4'
    @@ -22,29 +42,38 @@ gem 'codebase4'

    # Other useful gems
    # gem 'friendly_id', '~> 4.0.0'

    # gem 'rack-ssl', :require => 'rack/ssl'
    # gem 'whenever', :require => false
    # gem 'uuid', '~> 2.3.5' # Ruby 1.8

    # gem 'uuid', '~> 2.3' # Ruby 1.8

    # Normalize ActiveRecord attributes
    gem 'attribute_normalizer'

    # File uploads / Cloud Storage
    # gem 'carrierwave'
    # gem 'fog', '~> 1.0.0'
    # gem 'fog', '~> 1.0'
    # gem 'mini_magick'

    # Payments, e.g. PayPal
    # gem 'activemerchant'

    # Use passenger standalone as a server?
    # gem 'passenger', :require => false


    group :development, :test do
    gem 'awesome_print'
    gem 'capistrano'
    gem 'guard-rspec'
    gem 'yard'
    gem 'factory_girl_rails', '~> 1.2'
    gem 'capistrano', :require => false
    gem 'guard-rspec', :require => false
    gem 'yard', :require => false
    gem 'factory_girl_rails', '~> 1.2' # Ruby 1.9 only.
    gem 'faker'
    gem 'mocha'
    gem 'shoulda-matchers'
    gem 'steak' # includes rspec and capybara
    # gem 'simplecov' # Ruby 1.9
    # gem 'simplecov', : require => false # Ruby 1.9
    end

    # Gems used only for assets and not required
    5 changes: 5 additions & 0 deletions airbrake.rb
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    # config/initializers/airbrake.rb
    Airbrake.configure do |config|
    config.host = 'exceptions.codebasehq.com'
    config.api_key = 'api_key'
    end
    8 changes: 4 additions & 4 deletions production.rb
    Original file line number Diff line number Diff line change
    @@ -14,7 +14,7 @@
    config.action_mailer.delivery_method = :smtp

    # Configure exception notification
    config.middleware.use ExceptionNotifier,
    :email_prefix => '[Exceptions] [Application Name] ',
    :sender_address => 'exceptions@example.com',
    :exception_recipients => %w{you@example.com}
    #config.middleware.use ExceptionNotifier,
    # :email_prefix => '[Exceptions] [Application Name] ',
    # :exception_recipients => %w{you@example.com}
    # :sender_address => 'exceptions@example.com',
  19. cblunt revised this gist Oct 25, 2012. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion Gemfile
    Original file line number Diff line number Diff line change
    @@ -1,9 +1,11 @@
    source 'https://rubygems.org'

    gem 'rails', '3.2.3'
    gem 'rails', '3.2.8'

    gem 'pg'
    # gem 'mysql2'
    gem 'jquery-rails'
    gem 'json'

    gem 'slim-rails'
    gem 'simple_form'
  20. cblunt revised this gist Apr 25, 2012. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions Gemfile
    Original file line number Diff line number Diff line change
    @@ -22,6 +22,7 @@ gem 'codebase4'
    # gem 'friendly_id', '~> 4.0.0'
    # gem 'rack-ssl', :require => 'rack/ssl'
    # gem 'whenever', :require => false
    # gem 'uuid', '~> 2.3.5' # Ruby 1.8

    # File uploads / Cloud Storage
    # gem 'carrierwave'
  21. cblunt revised this gist Apr 25, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Gemfile
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    source 'https://rubygems.org'

    gem 'rails', '3.2.1'
    gem 'rails', '3.2.3'

    gem 'pg'
    gem 'jquery-rails'
  22. cblunt revised this gist Apr 25, 2012. 1 changed file with 13 additions and 0 deletions.
    13 changes: 13 additions & 0 deletions production.rb
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,18 @@
    # config/environments/production.rb

    # Configure ActionMailer to send via SendGrid
    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.delivery_method = :smtp

    # Configure exception notification
    config.middleware.use ExceptionNotifier,
    :email_prefix => '[Exceptions] [Application Name] ',
  23. cblunt revised this gist Apr 24, 2012. 2 changed files with 10 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions Gemfile
    Original file line number Diff line number Diff line change
    @@ -9,6 +9,9 @@ gem 'slim-rails'
    gem 'simple_form'
    gem 'kaminari'

    # To notify developer of exceptions
    gem 'exception_notification'

    # For hooking deploys into Codebase API
    gem 'codebase4'

    7 changes: 7 additions & 0 deletions production.rb
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    # config/environments/production.rb

    # Configure exception notification
    config.middleware.use ExceptionNotifier,
    :email_prefix => '[Exceptions] [Application Name] ',
    :sender_address => '[email protected]',
    :exception_recipients => %w{[email protected]}
  24. cblunt revised this gist Feb 27, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Gemfile
    Original file line number Diff line number Diff line change
    @@ -31,7 +31,7 @@ gem 'codebase4'
    group :development, :test do
    gem 'awesome_print'
    gem 'capistrano'
    gem 'guard'
    gem 'guard-rspec'
    gem 'yard'
    gem 'factory_girl_rails', '~> 1.2'
    gem 'faker'
  25. cblunt revised this gist Feb 17, 2012. 1 changed file with 11 additions and 8 deletions.
    19 changes: 11 additions & 8 deletions Gemfile
    Original file line number Diff line number Diff line change
    @@ -13,20 +13,20 @@ gem 'kaminari'
    gem 'codebase4'

    # Custom Gems
    gem 'plymsoftware_core', :git => 'git://github.com/plymouthsoftware/core.git'
    # gem 'plymsoftware_core', :git => 'git://github.com/plymouthsoftware/core.git'

    # Other useful gems
    gem 'friendly_id', '~> 4.0.0'
    # gem 'friendly_id', '~> 4.0.0'
    # gem 'rack-ssl', :require => 'rack/ssl'
    # gem 'whenever', :require => false

    # File uploads / Cloud Storage
    gem 'carrierwave'
    gem 'fog', '~> 1.0.0'
    gem 'mini_magick'
    # gem 'carrierwave'
    # gem 'fog', '~> 1.0.0'
    # gem 'mini_magick'

    # Payments, e.g. PayPal
    gem 'activemerchant'
    # gem 'activemerchant'

    group :development, :test do
    gem 'awesome_print'
    @@ -38,15 +38,18 @@ group :development, :test do
    gem 'mocha'
    gem 'shoulda-matchers'
    gem 'steak' # includes rspec and capybara
    # gem 'simplecov'
    # gem 'simplecov' # Ruby 1.9
    end

    # Gems used only for assets and not required
    # in production environments by default.
    group :assets do
    gem 'sass-rails', '~> 3.2.3'
    gem 'coffee-rails', '~> 3.2.1'
    gem 'twitter-bootstrap-rails', :git => "git://github.com/seyhunak/twitter-bootstrap-rails.git", :branch => "static"

    # Twitter Bootstrap CSS
    # gem 'twitter-bootstrap-rails'
    # gem 'twitter-bootstrap-rails', :git => "git://github.com/seyhunak/twitter-bootstrap-rails.git", :branch => "static"

    # See https://github.com/sstephenson/execjs#readme for more supported runtimes
    # gem 'therubyracer'
  26. cblunt revised this gist Feb 17, 2012. 1 changed file with 6 additions and 18 deletions.
    24 changes: 6 additions & 18 deletions Gemfile
    Original file line number Diff line number Diff line change
    @@ -16,7 +16,7 @@ gem 'codebase4'
    gem 'plymsoftware_core', :git => 'git://github.com/plymouthsoftware/core.git'

    # Other useful gems
    # gem 'friendly_id', '~> 4.0.0'
    gem 'friendly_id', '~> 4.0.0'
    # gem 'rack-ssl', :require => 'rack/ssl'
    # gem 'whenever', :require => false

    @@ -26,42 +26,30 @@ gem 'fog', '~> 1.0.0'
    gem 'mini_magick'

    # Payments, e.g. PayPal
    # gem 'activemerchant'
    gem 'activemerchant'

    group :development, :test do
    gem 'awesome_print'
    gem 'capistrano'
    gem 'guard'
    gem 'yard'
    gem 'fabrication'
    gem 'factory_girl_rails', '~> 1.2'
    gem 'faker'
    gem 'mocha'
    gem 'shoulda-matchers'
    gem 'steak' # includes rspec and capybara
    # gem 'simplecov' # Ruby 1.9
    # gem 'simplecov'
    end

    # Gems used only for assets and not required
    # in production environments by default.
    group :assets do
    gem 'sass-rails', '~> 3.2.3'
    gem 'coffee-rails', '~> 3.2.1'
    gem 'twitter-bootstrap-rails', :git => "git://github.com/seyhunak/twitter-bootstrap-rails.git", :branch => "static"

    # See https://github.com/sstephenson/execjs#readme for more supported runtimes
    # gem 'therubyracer'

    gem 'uglifier', '>= 1.0.3'
    end


    # To use ActiveModel has_secure_password
    # gem 'bcrypt-ruby', '~> 3.0.0'

    # To use Jbuilder templates for JSON
    # gem 'jbuilder'

    # Use unicorn as the web server
    # gem 'unicorn'

    # To use debugger
    # gem 'ruby-debug'
    end
  27. cblunt revised this gist Feb 17, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Gemfile
    Original file line number Diff line number Diff line change
    @@ -5,7 +5,7 @@ gem 'rails', '3.2.1'
    gem 'pg'
    gem 'jquery-rails'

    gem 'slim'
    gem 'slim-rails'
    gem 'simple_form'
    gem 'kaminari'

  28. cblunt revised this gist Feb 17, 2012. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions Gemfile
    Original file line number Diff line number Diff line change
    @@ -36,9 +36,9 @@ group :development, :test do
    gem 'fabrication'
    gem 'faker'
    gem 'mocha'
    gem 'shoulda'
    gem 'shoulda-matchers'
    gem 'steak' # includes rspec and capybara
    gem 'simplecov'
    # gem 'simplecov' # Ruby 1.9
    end

    # Gems used only for assets and not required
  29. cblunt revised this gist Feb 17, 2012. 1 changed file with 1 addition and 4 deletions.
    5 changes: 1 addition & 4 deletions Gemfile
    Original file line number Diff line number Diff line change
    @@ -28,14 +28,11 @@ gem 'mini_magick'
    # Payments, e.g. PayPal
    # gem 'activemerchant'

    group :development do
    group :development, :test do
    gem 'awesome_print'
    gem 'capistrano'
    gem 'guard'
    gem 'yard'
    end

    group :test do
    gem 'fabrication'
    gem 'faker'
    gem 'mocha'
  30. cblunt revised this gist Feb 17, 2012. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions Gemfile
    Original file line number Diff line number Diff line change
    @@ -12,6 +12,9 @@ gem 'kaminari'
    # For hooking deploys into Codebase API
    gem 'codebase4'

    # Custom Gems
    gem 'plymsoftware_core', :git => 'git://github.com/plymouthsoftware/core.git'

    # Other useful gems
    # gem 'friendly_id', '~> 4.0.0'
    # gem 'rack-ssl', :require => 'rack/ssl'