copy shard configuration back to ActiveRecord::Base.configurations

fixes CNVS-14348

So that something that looks up connection info via that method
(like rake db:structure:dump) works correctly

Change-Id: I11b40a8f38af9672f84d3e196a31a5eb6a0341ff
Reviewed-on: https://gerrit.instructure.com/37933
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: James Williams  <jamesw@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
fix deprecation warning in Rails 4+ due to change in result class

Change-Id: I554e6061a5fe44c866bb997881a3e30c37e53315
Reviewed-on: https://gerrit.instructure.com/38009
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
recreate persistent test shards for sharded rake tasks

so that you don't have to wipe your db ever time a new migration
is created

Change-Id: Ia6758c8b307af1b043860cd8615350a93d11c8ae
Reviewed-on: https://gerrit.instructure.com/38006
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
upgrade to rspec 3

Change-Id: I10fe0d0bd4685a8de93fddbc1141c15c4dd06e2b
Reviewed-on: https://gerrit.instructure.com/37874
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
fix automagic connection sharing for secondary dbs

test plan:
 * have a second database in database.yml, with only database and
   adapter specified
 * in console, find the db (DatabaseServer.find('xyz')), and create
   a new shard on it
 * switch to that shard, and create a new account
 * create another shard, switch to it, and create another account
 * activate both shards and ensure Account.pluck(:name) gives you
   back the data you expect

Change-Id: I620d5cfdc5b8b2ec8f6ef0e33868238992695b29
Reviewed-on: https://gerrit.instructure.com/37996
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: James Williams  <jamesw@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
fix some pool key inconsistencies

 * the active shard should use the default shard's pool even if it's not
   shareable
 * construct the default pool's pool_key correctly

Change-Id: I4f221a7177c0eca801e4b284e5f0fdc1705ec300
Reviewed-on: https://gerrit.instructure.com/37998
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: James Williams  <jamesw@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
bump version

Change-Id: I0b88fc3f728cc9e714d0f83d7ab4a3d4a6d4568c