filecluster 0.4.14 → 0.4.15

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/fc/db.rb +5 -1
  3. data/lib/fc/version.rb +1 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 682a63b1d5a1315b249718bc596d4297ceecd7aa
4
- data.tar.gz: f212b750a964e94e454f2a2163359334ec1cc898
3
+ metadata.gz: b860fb1f75b6844222f4335a3e7f3088518fa4d2
4
+ data.tar.gz: feefd623d4cf79f93672c5fbde5208704466767a
5
5
  SHA512:
6
- metadata.gz: 228b7124186c2bac6921b6a4e286c9e87f36d0352dfc842e2c1c4090978cca84a1f9a5b6cd9aff2706dcf9f793f8fb98f03ea68856c7fc73e986d5a72756b78f
7
- data.tar.gz: 9d95e2fe21d4dd036451019d28783102f2098462afd8e34f8dd29a23d4de235043c413cea82dabda56c510ea882641d85eb21750f138e6219ce45f61c03dbcf0
6
+ metadata.gz: 321930084012bda837973fc91a217e37648e0d97a909627a03288933f0c81ffde1349959e9ce3ecebee9df9542596e5ad13bbc625037012288bb5b92124ae39b
7
+ data.tar.gz: 4a1e444e9e8de32df3355c135378659ebfed7c4fd2365790032866b6c723b932bb4c3e4e289c53f746d42faa081a27db83ade49ad7f7f38f1d7cf74de003e89e
@@ -15,7 +15,11 @@ module FC
15
15
  def self.connect(options = {})
16
16
  if !@options
17
17
  if defined?(ActiveRecord::Base) && ActiveRecord::Base.connection
18
- connection = ActiveRecord::Base.connection.instance_variable_get(:@connection)
18
+ if defined?(Octopus::Proxy) && ActiveRecord::Base.connection.is_a?(Octopus::Proxy)
19
+ connection = ActiveRecord::Base.connection.select_connection.instance_variable_get(:@connection)
20
+ else
21
+ connection = ActiveRecord::Base.connection.instance_variable_get(:@connection)
22
+ end
19
23
  @options = connection.query_options.clone
20
24
  @options.merge!(options)
21
25
  @prefix = @options[:prefix].to_s if @options[:prefix]
@@ -1,3 +1,3 @@
1
1
  module FC
2
- VERSION = "0.4.14"
2
+ VERSION = "0.4.15"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: filecluster
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.14
4
+ version: 0.4.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - sh
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-29 00:00:00.000000000 Z
11
+ date: 2015-08-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mysql2