wye 0.0.2 → 0.0.3

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.
@@ -15,13 +15,17 @@ module Wye
15
15
  @switch = Switch.new(::ActiveRecord::Base)
16
16
  end
17
17
 
18
+ def alternates
19
+ @class_to_alternate_pools.map { |(klass,atp)| atp.map(&:first) }.flatten.uniq
20
+ end
21
+
18
22
  def establish_connection(name, spec)
19
23
  super.tap do
20
24
  @class_to_alternate_pools[name] ||= {}
21
25
 
22
26
  alternate_specs(spec).each do |alternate,spec|
23
27
  @connection_pools[spec] ||= ::ActiveRecord::ConnectionAdapters::ConnectionPool.new(spec)
24
- @class_to_alternate_pools[name][alternate] = @connection_pools[spec]
28
+ @class_to_alternate_pools[name][alternate.to_sym] = @connection_pools[spec]
25
29
  end
26
30
  end
27
31
  end
data/lib/wye/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Wye
2
- VERSION = '0.0.2'
2
+ VERSION = '0.0.3'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wye
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: