The intent of this patch is to allow the Gemfile.lock to be
checked in without impacting installed versions for those running
from RPM. This is done via an env variable to toggle bundler usage.
If this works well, next step is to do the same thing for test deps,
and eventually have some kind of wrapper (perhaps just parse a yml file)
to generate either the requires or the Gemfile.
---
conf/aeolus-conductor | 1 +
src/config/application.rb | 27 ++++++++++++++++++++++++++-
2 files changed, 27 insertions(+), 1 deletions(-)
diff --git a/conf/aeolus-conductor b/conf/aeolus-conductor
index 677355c..a3e2ac9 100755
--- a/conf/aeolus-conductor
+++ b/conf/aeolus-conductor
@@ -23,6 +23,7 @@ PREFIX="${PREFIX:-/conductor}"
ADDR="${ADDR:-127.0.0.1}"
export RAILS_RELATIVE_URL_ROOT=$PREFIX
+export USE_BUNDLER=false
RETVAL=0
STARTTIMEOUT=20
diff --git a/src/config/application.rb b/src/config/application.rb
index 1dedc23..c41d4aa 100644
--- a/src/config/application.rb
+++ b/src/config/application.rb
@@ -4,7 +4,32 @@ require 'rails/all'
# If you have a Gemfile, require the gems listed there, including any gems
# you've limited to :test, :development, or :production.
-Bundler.require(:default, Rails.env) if defined?(Bundler)
+ENV['USE_BUNDLER'] = true unless ENV['USE_BUNDLER']
+
+if ENV['USE_BUNDLER'] == true
+ puts 'attempting to use bundler'
+ Bundler.require(:default, Rails.env) if defined?(Bundler)
+else
+ puts 'Using gem require instead of bundler'
+ require 'rails'
+ require 'authlogic'
+ require 'deltacloud'
+ require 'sass'
+ require 'haml'
+ require 'will_paginate'
+ require 'nokogiri'
+ require 'compass'
+ require 'ninesixty'
+ require 'simple-navigation'
+ require 'typhoeus'
+ require 'rest-client'
+ require 'rack-restful_submit'
+ require 'uuidtools'
+ require 'pg'
+ require 'thin'
+ require 'json'
+# require 'railties'
+end
$: << File.join(File.dirname(__FILE__), "../app")
--
1.7.6