shackles 1.3.0 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/shackles/helper_methods.rb +3 -1
- data/lib/shackles/version.rb +1 -1
- data/lib/shackles.rb +3 -1
- metadata +7 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4692b2c9a32072b9a591234bad820ad8845a13af
|
4
|
+
data.tar.gz: 34809b1f70d5741b40688bd59f2fe9c2d94fa88a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '09955aed6683cadf221f6cd3b461528b7250e84fa2754c06108d9c8bb31b550af95795c4f35e49ffaf7914aefc5b35d1e4784cfadf9112784cdb757ab5bfcf8a'
|
7
|
+
data.tar.gz: 89a7a2bf11d701f900c8f6020e25d4f3a10641f467625dadb7d0b22c706299f4e070f0a7519cfb9e724ea53901007bb845b6708390be08551d314caedda2ef2f
|
@@ -1,7 +1,9 @@
|
|
1
1
|
module Shackles
|
2
2
|
module HelperMethods
|
3
3
|
def self.included(base)
|
4
|
-
base.
|
4
|
+
base.singleton_class.include(ClassMethods)
|
5
|
+
# call shackle_class_method on the class itself, which then calls shackle_method on the singleton_class
|
6
|
+
base.singleton_class.singleton_class.include(ClassMethods)
|
5
7
|
end
|
6
8
|
|
7
9
|
# see readme for example usage
|
data/lib/shackles/version.rb
CHANGED
data/lib/shackles.rb
CHANGED
@@ -93,8 +93,10 @@ module Shackles
|
|
93
93
|
if Rails.version < '5'
|
94
94
|
model = model.constantize
|
95
95
|
new_handler.establish_connection(model, pool.spec)
|
96
|
-
|
96
|
+
elsif Rails.version < '5.1'
|
97
97
|
new_handler.establish_connection(pool.spec)
|
98
|
+
else
|
99
|
+
new_handler.establish_connection(pool.spec.config)
|
98
100
|
end
|
99
101
|
end
|
100
102
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shackles
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cody Cutrer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-06-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -19,7 +19,7 @@ dependencies:
|
|
19
19
|
version: '4.0'
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: '5.
|
22
|
+
version: '5.2'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -29,7 +29,7 @@ dependencies:
|
|
29
29
|
version: '4.0'
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: '5.
|
32
|
+
version: '5.2'
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: railties
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -39,7 +39,7 @@ dependencies:
|
|
39
39
|
version: '4.0'
|
40
40
|
- - "<"
|
41
41
|
- !ruby/object:Gem::Version
|
42
|
-
version: '5.
|
42
|
+
version: '5.2'
|
43
43
|
type: :runtime
|
44
44
|
prerelease: false
|
45
45
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -49,7 +49,7 @@ dependencies:
|
|
49
49
|
version: '4.0'
|
50
50
|
- - "<"
|
51
51
|
- !ruby/object:Gem::Version
|
52
|
-
version: '5.
|
52
|
+
version: '5.2'
|
53
53
|
- !ruby/object:Gem::Dependency
|
54
54
|
name: appraisal
|
55
55
|
requirement: !ruby/object:Gem::Requirement
|
@@ -156,10 +156,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
156
156
|
version: '0'
|
157
157
|
requirements: []
|
158
158
|
rubyforge_project:
|
159
|
-
rubygems_version: 2.6.
|
159
|
+
rubygems_version: 2.6.11
|
160
160
|
signing_key:
|
161
161
|
specification_version: 4
|
162
162
|
summary: ActiveRecord database environment switching for slaves and least-privilege
|
163
163
|
test_files:
|
164
164
|
- spec/shackles_spec.rb
|
165
|
-
has_rdoc:
|