card 1.17.0 → 1.17.1
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.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/card/cache.rb +10 -7
- data/lib/card/reference.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: a4f48d47748a3722b990ce46cf124c029ab739c0
|
4
|
+
data.tar.gz: e75894912cdeedb1503358bcf5debe5c85bb3019
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d70cba85ffa764ea15973673238a89d8d19afcd50b2ec46d3eacf13e71ae617def616d83a044bf6150f1d636fd496c0061127cb708bbe87125957d676a12fcba
|
7
|
+
data.tar.gz: 5b0d8f08cc4dfee2cf0e28ad804e9f61b6c3365041421be40b582506300177a6abf29845b61f834a76345b7a7cc943abdb0b84f9b0d26f47f5150b3e1c95e77e
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.17.
|
1
|
+
1.17.1
|
data/lib/card/cache.rb
CHANGED
@@ -22,7 +22,7 @@ class Card
|
|
22
22
|
|
23
23
|
class << self
|
24
24
|
def [] klass
|
25
|
-
|
25
|
+
fail 'nil klass' if klass.nil?
|
26
26
|
cache_type = (@@no_rails_cache ? nil : Cardio.cache)
|
27
27
|
cache_by_class[klass] ||= new class: klass,
|
28
28
|
store: cache_type
|
@@ -30,17 +30,20 @@ class Card
|
|
30
30
|
|
31
31
|
def renew
|
32
32
|
cache_by_class.keys do |klass|
|
33
|
-
|
34
|
-
|
35
|
-
else
|
36
|
-
raise "renewing nil cache: #{klass}"
|
37
|
-
end
|
33
|
+
fail "renewing nil cache: #{klass}" unless klass.cache
|
34
|
+
cache_by_class[klass].system_prefix = system_prefix(klass)
|
38
35
|
end
|
39
36
|
reset_soft
|
40
37
|
end
|
41
38
|
|
39
|
+
def database_name
|
40
|
+
@database_name ||= (cfg = Cardio.config) &&
|
41
|
+
(dbcfg = cfg.database_configuration) &&
|
42
|
+
dbcfg[Rails.env]['database']
|
43
|
+
end
|
44
|
+
|
42
45
|
def system_prefix klass
|
43
|
-
"#{
|
46
|
+
"#{database_name}/#{klass}"
|
44
47
|
end
|
45
48
|
|
46
49
|
def restore
|
data/lib/card/reference.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: card
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.17.
|
4
|
+
version: 1.17.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ethan McCutchen
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2016-01-
|
14
|
+
date: 2016-01-28 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: smartname
|