Adding Rails 4 compatibility

The ConnectionSpecification class is no longer part of
ActiveRecord::Base and is now in the ActiveRecord::ConectionAdapters
module. This adds a conditional so that the it will work with both Rails
3 and Rails 4.