spec/dummy/config/boot.rb in doorkeeper-2.0.0.alpha1 vs spec/dummy/config/boot.rb in doorkeeper-2.0.0.rc2
- old
+ new
@@ -1,6 +1,9 @@
require 'rubygems'
require 'bundler/setup'
-DOORKEEPER_ORM = (ENV['orm'] || :active_record).to_sym unless defined?(DOORKEEPER_ORM)
+orm = ENV['BUNDLE_GEMFILE'].match(/Gemfile\.(.+)\.rb/)
+unless defined?(DOORKEEPER_ORM)
+ DOORKEEPER_ORM = (orm && orm[1]) || :active_record
+end
$LOAD_PATH.unshift File.expand_path('../../../../lib', __FILE__)