Skip to content

Commit

Permalink
Remove unneeded configuration.orm_name
Browse files Browse the repository at this point in the history
  • Loading branch information
jasl authored and tute committed Dec 16, 2014
1 parent 5641f3d commit e0ecef7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 0 additions & 4 deletions lib/doorkeeper/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -208,10 +208,6 @@ def scopes
@scopes ||= default_scopes + optional_scopes
end

def orm_name
[:mongoid2, :mongoid3, :mongoid4].include?(orm.to_sym) ? :mongoid : orm
end

def client_credentials_methods
@client_credentials ||= [:from_basic, :from_params]
end
Expand Down
8 changes: 6 additions & 2 deletions spec/spec_helper_integration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
TABLE_NAME_SUFFIX = ENV['table_name_suffix'] || nil

orm = ENV['BUNDLE_GEMFILE'].match(/Gemfile\.(.+)\.rb/)
DOORKEEPER_ORM = (orm && orm[1]) || :active_record
DOORKEEPER_ORM = (orm && orm[1] || :active_record).to_sym

$LOAD_PATH.unshift File.dirname(__FILE__)

Expand All @@ -24,7 +24,11 @@
Rails.logger.info "====> Rails version: #{Rails.version}"
Rails.logger.info "====> Ruby version: #{RUBY_VERSION}"

require "support/orm/#{Doorkeeper.configuration.orm_name}"
if [:mongoid2, :mongoid3, :mongoid4].include?(DOORKEEPER_ORM)
require "support/orm/mongoid"
else
require "support/orm/#{DOORKEEPER_ORM}"
end

ENGINE_RAILS_ROOT = File.join(File.dirname(__FILE__), '../')

Expand Down

0 comments on commit e0ecef7

Please sign in to comment.