switchman 1.2.11 → 1.2.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 24a9d501ff39800e2fbc3c7bcdd58b1ed78a59fc
4
- data.tar.gz: bd0d9bb1b19dc0ea14b5f79f44a16925283e761a
3
+ metadata.gz: c2e8747b77d09d38c1f00f984c7e85d6560515b3
4
+ data.tar.gz: d9bfe61f3a1a7a0a22a1cb5cbffa33ef751b3b7e
5
5
  SHA512:
6
- metadata.gz: bd6f9f98050e479013de4f449d9c1f77fe2a851c3bcec9b40701d52c6b2457e4bc3a36df12a97c1e7f9fd2f5597df11ef360233cf7403fe1aa3e6a70b7c77477
7
- data.tar.gz: e4df60dc747f88ea8908395d01685d4a9b7a43417e4d8c915d2ae38f94b5a88a465d4ab741d242c67f0fd33778aec11cf8d698eab6dfd2c67513e95d5296f9b0
6
+ metadata.gz: 05bf84c6e45ed9530202a4f5ce6ba058326cbd7fae15c8ab3d8c4c5d50328d93df41e9027e61b4591856d2452537f82b96de589460a8ac4e43d8916a0cb9d2fc
7
+ data.tar.gz: 6bcab454b76a9c373708222463414959c4a14c08946d94c1aa7c1d4a9d8e72f5027ae1fdc7ea86fad20b15f3bdf0f35e7cf5266023d97c82516ec03600b6c381
@@ -24,9 +24,6 @@ module Switchman
24
24
  def checkout_new_connection_with_sharding
25
25
  # TODO: this might be a threading issue
26
26
  spec.config[:shard_name] = self.shard.name
27
- if self.shard.database_server.id == ::Rails.env
28
- ::ActiveRecord::Base.configurations[::Rails.env] = spec.config.stringify_keys
29
- end
30
27
 
31
28
  conn = checkout_new_connection_without_sharding
32
29
  conn.shard = self.shard
@@ -1,3 +1,3 @@
1
1
  module Switchman
2
- VERSION = "1.2.11"
2
+ VERSION = "1.2.12"
3
3
  end
@@ -64,6 +64,8 @@ module Switchman
64
64
  Shard.with_each_shard(shards, Shard.categories, :parallel => ENV['PARALLEL'].to_i) do
65
65
  shard = Shard.current
66
66
  puts "#{shard.id}: #{shard.description}"
67
+ ::ActiveRecord::Base.connection_pool.spec.config[:shard_name] = Shard.current.name
68
+ ::ActiveRecord::Base.configurations[::Rails.env] = ::ActiveRecord::Base.connection_pool.spec.config.stringify_keys
67
69
  shard.database_server.unshackle do
68
70
  old_actions.each(&:call)
69
71
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: switchman
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.11
4
+ version: 1.2.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cody Cutrer
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2014-07-23 00:00:00.000000000 Z
13
+ date: 2014-07-28 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: railties