filecluster 0.4.18 → 0.4.19
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/fc/db.rb +4 -3
- data/lib/fc/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aac24b717934dcbd725628834a6b0636b860c019
|
4
|
+
data.tar.gz: 790af9f42d49808420ffa79808ad116781b7c175
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 591aec59e41a052db68bc8750d4b30de34ad8b0fbd1e4c9fdf83fdbcd01453629c918af717bf8e5fc0cf6b560031f47a882d746e0221e050ab33c1ea9364fcee
|
7
|
+
data.tar.gz: 95c6e59b1fd6de27abcb500bfc9009160f983c26a2cfcaea9f727b74949a9f11e65766e41d6e21124e48a1272d838279c93ea2cc24367a41b8757040bc480541
|
data/lib/fc/db.rb
CHANGED
@@ -14,7 +14,10 @@ module FC
|
|
14
14
|
|
15
15
|
def self.connect(options = {})
|
16
16
|
if !@options
|
17
|
-
if
|
17
|
+
if options[:host] || options[:database] || options[:username] || options[:password] ||
|
18
|
+
!defined?(ActiveRecord::Base) && ActiveRecord::Base.connection
|
19
|
+
self.connect_by_config(options)
|
20
|
+
else
|
18
21
|
if defined?(Octopus::Proxy) && ActiveRecord::Base.connection.is_a?(Octopus::Proxy)
|
19
22
|
connection = ActiveRecord::Base.connection.select_connection.instance_variable_get(:@connection)
|
20
23
|
else
|
@@ -25,8 +28,6 @@ module FC
|
|
25
28
|
@prefix = @options[:prefix].to_s if @options[:prefix]
|
26
29
|
@connects = {} unless @connects
|
27
30
|
@connects[Thread.current.object_id] = connection
|
28
|
-
else
|
29
|
-
self.connect_by_config(options)
|
30
31
|
end
|
31
32
|
else
|
32
33
|
@options.merge!(options)
|
data/lib/fc/version.rb
CHANGED
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.
|
4
|
+
version: 0.4.19
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- sh
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-02-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mysql2
|