remove Shackles shims

refs CNVS-4713

Change-Id: I2edd8a8403da8c4a476c2e52b0767fccdd1e5e62
Reviewed-on: https://gerrit.instructure.com/19288
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
This commit is contained in:
Cody Cutrer 2013-04-02 13:05:48 -06:00
parent 80b27f5738
commit c3743577a8
1 changed files with 0 additions and 29 deletions

View File

@ -1,29 +0,0 @@
# compatibility shim for plugins that aren't converted to Shackles yet
ActiveRecord::Base::ConnectionSpecification.class_eval do
class << self
def environment
Shackles.environment
end
def explicit_user
Shackles.global_config[:username]
end
def with_environment(env)
Shackles.activate(env) { yield }
end
def connection_handlers
Shackles.connection_handlers
end
end
end
if ActiveRecord::Base::ConnectionSpecification.respond_to?(:ensure_handler)
Shackles.module_eval do
def self.ensure_handler
ActiveRecord::Base::ConnectionSpecification.instance_variable_set(:@connection_handlers, connection_handlers)
ActiveRecord::Base::ConnectionSpecification.ensure_handler
end
end
end