card 1.16.11 → 1.16.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/card/cache.rb +18 -18
- data/mod/01_core/set/all/subcards.rb +1 -1
- data/mod/01_core/set/all/trash.rb +1 -4
- data/mod/05_standard/set/type/signup.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: 8d1990615b92a108f5e31de742a36bd9e24775c3
|
4
|
+
data.tar.gz: 630821350bd6c6cf9292bca1ad6e8dc0ed0f0891
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 90603078c14e9931ae8ac6822da2afccd0a70bb6bd6578128beb0ee9ea55eddb45f31c1d766cd18cafe560c29f4793c1bd2d23b53f37255fa4fd7a204ad08485
|
7
|
+
data.tar.gz: 37c9f45c93cfa6f134085f599dd949cc3be996a19f4857b93e9146ea459961ae3098f7570c0c957aadc5f4c787933aea1d97e0d7b82f2eb09a8bd8d14e63f1f3
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.16.
|
1
|
+
1.16.12
|
data/lib/card/cache.rb
CHANGED
@@ -54,13 +54,11 @@ class Card
|
|
54
54
|
end
|
55
55
|
|
56
56
|
def generate_cache_id
|
57
|
-
((Time.now.to_f * 100).to_i).to_s +
|
58
|
-
('a'..'z').to_a[rand(26)] +
|
59
|
-
('a'..'z').to_a[rand(26)]
|
57
|
+
((Time.now.to_f * 100).to_i).to_s + ('a'..'z').to_a[rand(26)] + ('a'..'z').to_a[rand(26)]
|
60
58
|
end
|
61
59
|
|
62
60
|
def reset_global
|
63
|
-
cache_by_class.each do |
|
61
|
+
cache_by_class.each do |klass, cache|
|
64
62
|
cache.reset hard=true
|
65
63
|
end
|
66
64
|
Card::Codename.reset_cache
|
@@ -69,11 +67,9 @@ class Card
|
|
69
67
|
|
70
68
|
def reset_local
|
71
69
|
cache_by_class.each do |cc, cache|
|
72
|
-
if Card::Cache
|
70
|
+
if Card::Cache===cache
|
73
71
|
cache.reset_local
|
74
|
-
else
|
75
|
-
warn "reset class #{cc}, #{cache.class} #{caller[0..8] * "\n"} ???"
|
76
|
-
end
|
72
|
+
else warn "reset class #{cc}, #{cache.class} #{caller[0..8]*"\n"} ???" end
|
77
73
|
end
|
78
74
|
end
|
79
75
|
|
@@ -95,16 +91,20 @@ class Card
|
|
95
91
|
private
|
96
92
|
|
97
93
|
def prepopulate
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
94
|
+
if @@prepopulating
|
95
|
+
@@rule_cache ||= Card.rule_cache
|
96
|
+
@@read_rule_cache ||= Card.read_rule_cache
|
97
|
+
@@user_ids_cache ||= Card.user_ids_cache
|
98
|
+
@@rule_keys_cache ||= Card.rule_keys_cache
|
99
|
+
Card.cache.write_local 'RULES', @@rule_cache
|
100
|
+
Card.cache.write_local 'READRULES', @@read_rule_cache
|
101
|
+
Card.cache.write_local 'USER_IDS', @@user_ids_cache
|
102
|
+
Card.cache.write_local 'RULE_KEYS', @@rule_keys_cache
|
103
|
+
end
|
107
104
|
end
|
105
|
+
|
106
|
+
|
107
|
+
|
108
108
|
end
|
109
109
|
|
110
110
|
attr_reader :prefix, :store, :klass
|
@@ -179,7 +179,7 @@ class Card
|
|
179
179
|
|
180
180
|
def delete key
|
181
181
|
@store.delete(@prefix + key) if @store
|
182
|
-
|
182
|
+
@local.delete key
|
183
183
|
end
|
184
184
|
|
185
185
|
def delete_local key
|
@@ -28,10 +28,7 @@ event :validate_delete, before: :approve, on: :delete do
|
|
28
28
|
errors.add :delete, "#{name} is is a system card. (#{codename})"
|
29
29
|
end
|
30
30
|
|
31
|
-
undeletable_all_rules_tags =
|
32
|
-
%w{ default style layout create read update delete }
|
33
|
-
# FIXME: HACK! should be configured in the rule
|
34
|
-
|
31
|
+
undeletable_all_rules_tags = %w{ default style layout create read update delete }
|
35
32
|
if junction? && (l = left) && l.codename == 'all' &&
|
36
33
|
undeletable_all_rules_tags.member?(right.codename)
|
37
34
|
errors.add :delete, "#{name} is an indestructible rule"
|
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.16.
|
4
|
+
version: 1.16.12
|
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: 2015-11-
|
14
|
+
date: 2015-11-11 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: smartname
|