Last active
March 1, 2022 10:18
-
-
Save pboling/4564780 to your computer and use it in GitHub Desktop.
My latest project's Gemfile, implements bundle group pattern
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load this file by replacing the if defined?(Bundler) block in config/application.rb with: | |
# require File.expand_path('../application.bundler', __FILE__) | |
if defined?(Bundler) | |
Class.new Rails::Railtie do | |
console do |app| | |
Bundler.require(:console) | |
require 'irbtools/configure' | |
Irbtools.add_package :more # adds this extension package | |
# here you can edit which libraries get loaded. See the irbtools README for details. | |
Irbtools.start | |
end | |
end | |
groups = { | |
# If you precompile assets before deploying to production, use this line | |
assets: %w(development test), | |
monitoring: %w(staging production), | |
security_analysis: %w(development test), | |
} | |
# List the groups that are always loaded, followed by the ones that are selectively loaded based on environment | |
Bundler.require(:rails3, :web_server, :data_store, :async_jobs, :templates, :javascript, :users, :metrics, :messaging, :email, :enhancers, :mobile, *Rails.groups(groups)) | |
#Bundler.require(*Rails.groups(:assets => %w(development test))) | |
# If you want your assets lazily compiled in production, use this line | |
# Bundler.require(:default, :assets, Rails.env) | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##### See Gemfile.md for detailed notes on specific gems ##### | |
source 'https://rubygems.org' | |
# Follows the bundler group pattern described here: | |
# http://iain.nl/getting-the-most-out-of-bundler-groups | |
# Gemfile.mine in root dir allows locally custom gems. | |
# NOTE: Doing this will change the Gemfile.lock - commit with care. | |
eval File.read(File.join(File.dirname(__FILE__), 'Gemfile.mine')) if File.exists? File.join(File.dirname(__FILE__), 'Gemfile.mine') | |
ruby '1.9.3' | |
#################### Rails 3.2 #################### | |
# NOTE on branching: We are using the rails 4 track gems as much as possible, | |
# because in most cases they retain support for Rails 3, | |
# and there will fewer issues with upgrading to Rails 4 when the time comes. | |
# Where we need actual different gems (e.g. rails proper) we have a rails4 group (see EOF) | |
group :rails3 do | |
gem 'rails', '~> 3.2.11' | |
# Not compatible with Rails4, see :rails4 group for alternative | |
gem 'simple_form', '~> 2.0.4' | |
# Backports default Rails4 functionality to Rails3 | |
gem 'dismissible_helpers', '~> 0.1.5' | |
end | |
group :assets do | |
gem 'sprockets-rails', '~> 0.0.1' | |
gem 'sass-rails', '~> 3.2.5' | |
gem 'coffee-rails', '~> 3.2.2' | |
gem 'turbo-sprockets-rails3', '~> 0.3.6' | |
end | |
#################### /Rails 3.2 #################### | |
group :web_server do | |
# The Webserver | |
gem 'puma', '~> 2.0.0.b4' # 1.6.3 has issues with NewRelic | |
# Allows rack to rewrite requests, no need for Apache mod_rewrite | |
gem 'rack-rewrite', '~> 1.3.3' | |
end | |
group :data_store do | |
# The Database | |
gem 'pg', '~> 0.14.1' | |
# More power to the Database | |
gem 'pg_power', '~> 1.3.0' #, github: 'acquaintable/pg_power', branch: 'rails4' | |
# Allows PostgreSQLto use the new HSTORE from Rails 4 | |
gem 'activerecord-postgres-hstore', '0.5.2' | |
# Bit fields for Active Record - Follows conventions of standard boolean columns. | |
gem 'flag_shih_tzu', '~> 0.3.2' | |
# Neo4j REST API | |
gem 'neography', '~> 1.0.5' | |
# Replicates wholly, or partially, ActiveRecord (PG) models into Neo4j for faster querying | |
# Manages synchronization of updates to records across both data stores | |
gem 'neoid', '~> 0.1.2' | |
# Versioning Things and Soft-Deletes | |
gem 'vestal_versions', github: 'justintanner/vestal_versions' | |
# Voting On Things | |
gem 'thumbs_up', '~> 0.6.2' | |
# Map any methods on any Ruby objects to a CSV export, and vice verse. | |
gem 'csv_pirate', '~> 5.0.7' | |
end | |
group :async_jobs do | |
# The Cache - Redis can back Object Caches, I18n, Session, HTTP Cache | |
gem 'redis', '~> 3.0.2' | |
gem 'redis-namespace', '~> 1.2.1' | |
gem 'redis-rails', '~> 3.2.3' | |
gem 'redis-store', '~> 1.1.3' | |
# Our Queue | |
gem 'sidekiq', '~> 2.7.0' | |
# Add failure tracking and failure tab to sidekiq UI | |
gem 'sidekiq-failures', '~> 0.1.0' | |
# Queue Manager (Hires and Fires workers) | |
gem 'autoscaler', '~> 0.2.0' | |
end | |
group :templates do | |
# View Template Language | |
gem 'slim', '~> 1.3.5' | |
gem 'slim-rails', '~> 1.1.0' | |
# Views can be and should be 100% DRY | |
gem 'dry_views', '~> 0.0.2' | |
# Markdown Parser (for copy) | |
gem 'redcarpet', '~> 2.2.2' | |
# To avoid indecent exposure of instance variables in the view | |
gem 'decent_exposure', '~> 2.0.1' | |
gem 'cells', '~> 3.8.6'#, :path => '/Users/pboling/Documents/src/other/cells' #:git => 'git://github.com/acquaintable/cells.git' | |
end | |
# TODO: Determine which of these can be moved into :assets group | |
group :javascript do | |
# Base for JSON | |
gem 'json', '~> 1.7.6' | |
# Fast JSON Object parsing and marshalling | |
gem 'oj', '~> 2.0.3' | |
# Implant jQuery directly into the Asset Pipeline ========> | |
gem 'jquery-rails', '~> 2.1.4' # '~> 2.2.0' updates to jQuery 1.9, which is not yet compatible with foundation, see: | |
# https://github.com/zurb/foundation/pull/1432 | |
# Enable the AMD design pattern for Javascript modules and integrate into the Asset Pipeline ========> | |
gem 'requirejs-rails', github: 'jwhitley/requirejs-rails' | |
end | |
group :users do | |
# Registration, Authentication, Invitation, Confirmation | |
gem 'devise', github: 'idl3/devise', branch: 'rails4' | |
gem 'devise_invitable', github: 'sunny36/devise_invitable', :ref => '5af50a925e0a41cc648b124ffe7de0f8f081481e' | |
gem 'devise-async', '~> 0.5.1' | |
# Facebook Oauth | |
gem 'koala', '~> 1.6.0' | |
gem 'omniauth', '~> 1.1.1' | |
gem 'omniauth-facebook', '~> 1.4.1' | |
# Authorization | |
gem 'cancan', '>= 1.6.8' | |
gem 'rolify', '>= 3.2.0' | |
# Stateful Behavior | |
gem 'state_machine', '~> 1.1.2' | |
end | |
group :metrics do | |
# User Metrics | |
gem 'km', '~> 1.1.3' | |
# Send errors to airbrake.io | |
gem 'airbrake', '~> 3.1.7' | |
# Report missing i18n translations | |
gem 'i18n-airbrake', github: 'acquaintable/i18n-airbrake', branch: 'configuration_options' | |
# Code Metrics | |
gem 'newrelic_rpm', '~> 3.5.5.540.dev' | |
# The rails app administration tool | |
gem 'rails_admin', '~> 0.4.3' | |
# Debugging toolbar, heir of rack-bug | |
#gem 'rack-insight' | |
end | |
group :messaging do | |
# Add messages to your flash messaging stack whenever you need to, array-style | |
gem 'stackable_flash' | |
# Use the cookie for transporting the flash messages and javascript to render them into the view | |
gem 'cacheable_flash' | |
end | |
group :email do | |
# Third Party Email Service | |
gem 'sendgrid', '>= 1.0.1' | |
# Redirect all email in non-Production environments to alternate, safe, addresses | |
gem 'sanitize_email', '~> 1.0.5' | |
end | |
group :enhancers do | |
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks | |
gem 'turbolinks', '~> 0.6.1' | |
# Mini Controllers & tiny mounted Rack apps inside Rails for widgety things | |
# XML Parsing | |
gem 'nokogiri', '~> 1.5.6' | |
# Yet another framework | |
# TODO: Document why this is here. What relies on this? | |
gem 'sinatra', :require => nil | |
# HTML5 Boilerplate | |
gem 'html5-rails' | |
# Possessive form of a string | |
gem 'possessive' | |
# Convert numbers to words 1 => 'one' | |
gem 'numbers_and_words' | |
end | |
group :mobile do | |
# Mobile Push | |
gem 'urbanairship', '~> 2.2.0' | |
end | |
group :security_analysis do | |
# Check for Security Holes | |
gem 'brakeman' | |
end | |
# Gems used only for assets and not required | |
# in production environments by default. | |
group :assets do | |
# AWS RUBY APIs | |
# NOTE: This gem is almost threadsafe | |
# See: https://github.com/mperham/sidekiq/wiki/Problems-and-Troubleshooting | |
gem 'aws-sdk', '~> 1.8.0' | |
# Assets stored on AWS S3 | |
# Goal is to send compiled assets to AWS when FOGGY is not set, and when it is set to 'true' | |
gem 'asset_sync', '~> 0.5.4', {}.merge(!ENV['FOGGY'].nil? && ENV['FOGGY'] != 'true' ? {require: false} : {}) | |
gem 'uglifier', '>= 1.3.0' | |
gem 'handlebars_assets', '~> 0.8.1' | |
gem 'compass-rails', github: 'ai/compass-rails', branch: 'rails4' #'>= 1.0.3' | |
gem 'compass-h5bp' | |
gem 'zurb-foundation', '>= 3.2.3' | |
gem 'foundation-icons-sass-rails', '~> 2.0.0' | |
end | |
group :development do | |
# Find bad queries, TODO: evaluate: uniform_notifier for use with bullet | |
gem 'bullet', '~> 4.3.0' | |
gem 'quiet_assets', github: 'evrone/quiet_assets' | |
# Improve the development error experience | |
gem 'better_errors', '>= 0.3.2' | |
gem 'binding_of_caller' | |
# Annotate models, fixtures, and model specs | |
gem 'annotate', '>=2.5.0' | |
# Allows us to magically convert directories of haml templates to slim templates | |
gem 'haml2slim', '>= 0.4.6' | |
gem 'haml', '>= 3.1.7' | |
gem 'haml-rails', '>= 0.3.5' | |
end | |
group :development, :test do | |
gem 'powder', '~> 0.1.8' | |
gem 'rails_best_practices', '~> 1.13.2' | |
#gem 'ruby-prof', '~> 0.11.3', require: false | |
gem 'rspec-rails', '>= 2.12' | |
gem 'fabrication', '>= 2.5.2' | |
gem 'parallel_tests', '~> 0.9.2' | |
gem 'teabag', github: 'acquaintable/teabag' | |
gem 'pry', '~> 0.9.10' | |
gem 'pry-rails' | |
gem 'pry-doc' | |
gem 'pry-remote' | |
# Guard | |
gem 'guard' | |
gem 'guard-spork' | |
gem 'guard-rspec', '~> 2.3.3' | |
gem 'rb-inotify', :require => false | |
gem 'rb-fsevent', :require => false | |
gem 'wdm', :platforms => [:mswin, :mingw], :require => false | |
# Mac OS X Notification center | |
gem 'terminal-notifier-guard' | |
# Spork | |
gem 'spork-rails' | |
end | |
group :test do | |
gem 'remarkable_activerecord', '>=4.0.0.alpha2' | |
gem 'cane', '~> 2.5.0' | |
gem 'test-unit', '~> 2.5.3' | |
gem 'mocha', '0.13.1', require: false | |
#gem 'rspec-apotomo', :git => 'git://github.com/kristianmandrup/rspec-apotomo.git', :ref => '03a2ac2f526fa668ee3a4bdb09cbc41693931ca3' | |
gem 'rspec-cells', github: 'acquaintable/rspec-cells' | |
gem 'shoulda-matchers', github: 'acquaintable/shoulda-matchers' | |
gem 'bourne', github: 'thoughtbot/bourne' | |
gem 'capybara', '>= 2.0.2' | |
gem 'capybara-email' | |
gem 'poltergeist', github: 'brutuscat/poltergeist' | |
gem 'vcr', '~> 2.3.0' | |
gem 'fakeweb', '~> 1.3.0' | |
#gem 'autotest', '4.4.6' | |
#gem 'autotest-rails', '4.1.2' | |
gem 'simplecov', '~> 0.7.1', require: false | |
gem 'database_cleaner', '>= 0.9.1' | |
gem 'email_spec', '>= 1.4.0' | |
end | |
# These gems are only loaded when rails is loaded in console mode, see condition near top of config/application.rb | |
group :console do | |
gem 'irbtools', :require => false, github: 'acquaintable/irbtools' | |
gem 'irbtools-more', :require => false | |
gem 'terminal-notifier' | |
end | |
#################### Gems Under Evaluation #################### | |
# This group is never loaded by default in any environment | |
# We are in process of evaluating them, and this ensures they are bundle-able, | |
# for at least a nominal level of integration awareness | |
group :evaluation do | |
# Abstraction Layer over the WebSocket protocol | |
gem 'websocket', '~> 1.0.6' | |
# Geolocations | |
gem 'geokit', '~> 1.6.5' | |
gem 'geokit-rails3', github: 'acquaintable/geokit-rails3' | |
#gem 'airbrake-statsd', '~> 0.2.1' | |
# App, Service & Environment Config | |
gem 'figaro', github: 'acquaintable/figaro', branch: 'rails4' | |
# User Metrics | |
gem 'analytical', '~> 3.0.12' | |
# But User Metrics from the client-side! | |
gem 'event_tracker', github: 'acquaintable/event_tracker' | |
# AJAX file upload | |
gem 'remotipart' | |
# Automated Sitemap and SEO | |
gem 'sitemap_generator' | |
# A/B Testing | |
gem 'split', '~> 0.4.6' | |
# Mobile Response | |
gem 'mobylette', '~> 3.3.2' | |
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder | |
gem 'jbuilder', '~> 0.9.1' | |
# To use dummy images built on-demand for rapid prototyping | |
# Depends on an install of imagemagick and the rmagick gem | |
# TODO:Verify Setup instructions for ImageMagick before uncommenting rmagick | |
#gem 'rmagick' | |
#gem 'dummy_image', :git => 'git://github.com/davelyon/dummy_image.git' | |
end | |
####################/ Gems Under Evaluation #################### | |
#################### Rails 4.0 #################### | |
#group :rails4 do | |
# gem 'rails', github: 'rails/rails' | |
# gem 'journey', github: 'rails/journey' | |
# gem 'arel', github: 'rails/arel' | |
# gem 'simple_form', github: 'plataformatec/simple_form', branch: 'rails_4' | |
# gem 'activerecord-session_store', github: 'rails/activerecord-session_store' | |
# TODO: These are deprecated functionality of Rails 3 removed from Rails4 | |
# We will use this to transition, but ultimately change our code to not rely on it | |
# gem 'activerecord-deprecated_finders', github: 'rails/activerecord-deprecated_finders' | |
# gem 'protected_attributes', github: 'rails/protected_attributes' | |
#end | |
#group :assets do | |
# gem 'sprockets-rails', github: 'rails/sprockets-rails' | |
# gem 'sass-rails', github: 'rails/sass-rails' | |
# gem 'coffee-rails', github: 'rails/coffee-rails' | |
#end | |
#################### /Rails 4.0 #################### |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment