switchman 1.3.4 → 1.3.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7b5dd01c0a1dadf00fbd80ba4b18eedae1940c2f
4
- data.tar.gz: 1262ed4a2bd2227494d7e2b7345b2e32f6af1bce
3
+ metadata.gz: 09493336157f61ccb43f4e24f11209a77fda8c97
4
+ data.tar.gz: b44f57c7ef7a1021e0ef00e4ed994f3e2c39e910
5
5
  SHA512:
6
- metadata.gz: b23be0363dd7cfbd78b24ef398c4bce8562174e60b1bed6e499f88a6431fc41f70529a2e6fb2cc58facc68e54db522bdce6052a1bdcd8d63eeab091d2ffab29d
7
- data.tar.gz: 4cf00abaca093b54e9737e2aba626640cf9a55b4b7f8aec5d1bb823893ce81406079ccd9ba7a0d6f4e7b768b267c57d2a7b4f3d311aa3bcfe10efc16f230545b
6
+ metadata.gz: 12532700fa9acf85c4e64ff0e5312a7927672bfa659e84d7d96ca1ebbff391d9117fc94fca5584dc7e5988cd11a9863227670edc1ac990dab709b015c4526981
7
+ data.tar.gz: 29e030c2de52373968eaed76061c7b9ebee85d8972f6ca827a427acb8d0988bab8f5526f77427c57406897568bc5dbcd868bc0a2af011919f650c4ea5f3046da
@@ -94,14 +94,14 @@ module Switchman
94
94
  where = inddef.scan(/WHERE (.+)$/).flatten[0]
95
95
  using = inddef.scan(/USING (.+?) /).flatten[0].to_sym
96
96
 
97
- IndexDefinition.new(table_name, index_name, unique, column_names, [], orders, where, nil, using)
97
+ ::ActiveRecord::ConnectionAdapters::IndexDefinition.new(table_name, index_name, unique, column_names, [], orders, where, nil, using)
98
98
  end
99
99
  else
100
100
  # add info on sort order for columns (only desc order is explicitly specified, asc is the default)
101
101
  desc_order_columns = inddef.scan(/(\w+) DESC/).flatten
102
102
  orders = desc_order_columns.any? ? Hash[desc_order_columns.map {|order_column| [order_column, :desc]}] : {}
103
103
 
104
- column_names.empty? ? nil : IndexDefinition.new(table_name, index_name, unique, column_names, [], orders)
104
+ column_names.empty? ? nil : ::ActiveRecord::ConnectionAdapters::IndexDefinition.new(table_name, index_name, unique, column_names, [], orders)
105
105
  end
106
106
  end.compact
107
107
  end
@@ -41,6 +41,10 @@ module Switchman
41
41
  pool
42
42
  end
43
43
 
44
+ def connections
45
+ @connection_pools.values.map(&:connections).inject([], &:+)
46
+ end
47
+
44
48
  def connection
45
49
  pool = current_pool
46
50
  begin
@@ -1,3 +1,3 @@
1
1
  module Switchman
2
- VERSION = "1.3.4"
2
+ VERSION = "1.3.5"
3
3
  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.3.4
4
+ version: 1.3.5
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: 2015-10-19 00:00:00.000000000 Z
13
+ date: 2015-10-20 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: railties
@@ -548,7 +548,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
548
548
  version: '0'
549
549
  requirements: []
550
550
  rubyforge_project:
551
- rubygems_version: 2.4.7
551
+ rubygems_version: 2.4.5.1
552
552
  signing_key:
553
553
  specification_version: 4
554
554
  summary: Rails 3 sharding magic