11source 'https://rubygems.org'
22
3+ # monkey patching to support dual booting
4+ module Bundler ::SharedHelpers
5+ def default_lockfile = ( path )
6+ @default_lockfile = path
7+ end
8+ def default_lockfile
9+ @default_lockfile ||= Pathname . new ( "#{ default_gemfile } .lock" )
10+ end
11+ end
12+
13+ def rails4?
14+ !!ENV [ "RAILS4" ]
15+ end
16+
17+ if rails4?
18+ Bundler ::SharedHelpers . default_lockfile = Pathname . new ( "#{ Bundler ::SharedHelpers . default_gemfile } _rails4.lock" )
19+
20+ # Bundler::Dsl.evaluate already called with an incorrect lockfile ... fix it
21+ class Bundler ::Dsl
22+ # A bit messy, this can be called multiple times by bundler, avoid blowing the stack
23+ unless self . method_defined? :to_definition_unpatched
24+ alias_method :to_definition_unpatched , :to_definition
25+ puts "Booting in Rails 4 mode"
26+ end
27+ def to_definition ( bad_lockfile , unlock )
28+ to_definition_unpatched ( Bundler ::SharedHelpers . default_lockfile , unlock )
29+ end
30+ end
31+ end
32+
33+ if rails4?
34+ gem 'rails' , '4.0.0'
35+ gem 'redis-rails' , :git => 'git://github.com/SamSaffron/redis-store.git'
36+ gem 'rails-observers'
37+ gem 'protected_attributes'
38+ gem 'actionpack-action_caching'
39+ else
40+ # we had pain with the 3.2.13 upgrade so monkey patch the security fix
41+ # next time around we hope to upgrade
42+ gem 'rails' , '3.2.12'
43+ gem 'strong_parameters' # remove when we upgrade to Rails 4
44+ # we are using a custom sprockets repo to work around: https://github.com/rails/rails/issues/8099#issuecomment-16137638
45+ # REVIEW EVERY RELEASE
46+ gem 'sprockets' , git : 'https://github.com/SamSaffron/sprockets.git' , branch : 'rails-compat'
47+ gem 'redis-rails'
48+ end
49+
50+ gem 'redis'
51+ gem 'hiredis'
52+ gem 'em-redis'
53+
354gem 'active_model_serializers' , git : 'https://github.com/rails-api/active_model_serializers.git'
455
556# we had issues with latest, stick to the rev till we figure this out
@@ -20,13 +71,11 @@ gem 'activerecord-postgres-hstore'
2071gem 'active_attr' # until we get ActiveModel::Model with Rails 4
2172gem 'airbrake' , '3.1.2' , require : false # errbit is broken with 3.1.3 for now
2273gem 'clockwork' , require : false
23- gem 'em-redis'
2474gem 'eventmachine'
2575gem 'fast_xs'
2676gem 'fast_xor' , git : 'https://github.com/CodeMonkeySteve/fast_xor.git'
2777gem 'fastimage'
2878gem 'fog' , require : false
29- gem 'hiredis'
3079
3180gem 'email_reply_parser' , git : 'https://github.com/lawrencepit/email_reply_parser.git'
3281
@@ -49,12 +98,9 @@ gem 'omniauth-browserid', git: 'https://github.com/callahad/omniauth-browserid.g
4998gem 'omniauth-cas'
5099gem 'oj'
51100gem 'pg'
52- # we had pain with the 3.2.13 upgrade so monkey patch the security fix
53- # next time around we hope to upgrade
54- gem 'rails' , '3.2.12'
55101gem 'rake'
56- gem 'redis'
57- gem 'redis-rails'
102+
103+
58104gem 'rest-client'
59105gem 'rinku'
60106gem 'sanitize'
@@ -64,7 +110,6 @@ gem 'sidekiq'
64110gem 'sidekiq-failures'
65111gem 'sinatra' , require : nil
66112gem 'slim' # required for sidekiq-web
67- gem 'strong_parameters' # remove when we upgrade to Rails 4
68113gem 'therubyracer' , require : 'v8'
69114gem 'thin' , require : false
70115gem 'diffy' , require : false
@@ -123,9 +168,6 @@ group :development do
123168 gem 'annotate' , :git => 'https://github.com/SamSaffron/annotate_models.git'
124169end
125170
126- # we are using a custom sprockets repo to work around: https://github.com/rails/rails/issues/8099#issuecomment-16137638
127- # REVIEW EVERY RELEASE
128- gem 'sprockets' , git : 'https://github.com/SamSaffron/sprockets.git' , branch : 'rails-compat'
129171
130172
131173# this is an optional gem, it provides a high performance replacement
0 commit comments