ack_rails_admin_settings 1.2.0.2 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/Gemfile.lock +5 -5
- data/app/models/rails_admin_settings/setting.rb +0 -30
- data/lib/rails_admin_settings/mongoid.rb +10 -11
- data/lib/rails_admin_settings/namespaced.rb +2 -0
- data/lib/rails_admin_settings/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: 9f5ba1a5a4b2cf80275df63c8c0111baaacaa193
|
4
|
+
data.tar.gz: 1bc593c9340226c0cd0cad2a203ee4695194aa14
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f114e8e85f5d646c95b47d61ee555ba757755e278bdc5b688e167d816773cfa0fda19241605beace46d8cf9965237a106bca6754dd59ae83cc296db391ab1827
|
7
|
+
data.tar.gz: eae4a9899647f6d1313ba256813121402b021bb9ac06741cfa6234d2e83977970b9d6189f661e076846e6c60d34e563cba243766ff5ff2350f9ba467fd1c5247
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
## 1.2.1
|
2
|
+
|
3
|
+
- Remove HancockCMS support (moved into CMS and cache plugin for CMS).
|
4
|
+
- Cache is still here but only base methods.
|
5
|
+
- Options :cache_key and :cache_keys are working (not the same time but both).
|
6
|
+
|
1
7
|
## 1.2.0
|
2
8
|
|
3
9
|
- Default cache key is underscored namespace. Not work for default namespace without {cache: true}.
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
ack_rails_admin_settings (1.2.
|
4
|
+
ack_rails_admin_settings (1.2.1)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
@@ -52,9 +52,9 @@ GEM
|
|
52
52
|
diff-lcs (1.2.5)
|
53
53
|
docile (1.1.5)
|
54
54
|
erubis (2.7.0)
|
55
|
-
factory_girl (4.
|
55
|
+
factory_girl (4.8.0)
|
56
56
|
activesupport (>= 3.0.0)
|
57
|
-
geocoder (1.4.
|
57
|
+
geocoder (1.4.1)
|
58
58
|
glebtv-carrierwave-mongoid (0.8.0)
|
59
59
|
carrierwave (>= 0.8.0, < 0.11.0)
|
60
60
|
mongoid (>= 3.0, < 5.0)
|
@@ -122,7 +122,7 @@ GEM
|
|
122
122
|
rake (>= 0.8.7)
|
123
123
|
rdoc (~> 3.4)
|
124
124
|
thor (>= 0.14.6, < 2.0)
|
125
|
-
rake (
|
125
|
+
rake (12.0.0)
|
126
126
|
rdoc (3.12.2)
|
127
127
|
json (~> 1.4)
|
128
128
|
rspec (3.5.0)
|
@@ -155,7 +155,7 @@ GEM
|
|
155
155
|
multi_json (~> 1.0)
|
156
156
|
rack (~> 1.0)
|
157
157
|
tilt (~> 1.1, != 1.3.0)
|
158
|
-
thor (0.19.
|
158
|
+
thor (0.19.4)
|
159
159
|
tilt (1.4.1)
|
160
160
|
treetop (1.4.15)
|
161
161
|
polyglot
|
@@ -17,36 +17,6 @@ module RailsAdminSettings
|
|
17
17
|
end
|
18
18
|
end
|
19
19
|
|
20
|
-
if defined?(Hancock)
|
21
|
-
if defined?(Hancock::RailsAdminPatch)
|
22
|
-
include Hancock::RailsAdminPatch
|
23
|
-
|
24
|
-
def self.manager_can_default_actions
|
25
|
-
[:show, :read, :edit, :update]
|
26
|
-
end
|
27
|
-
def self.manager_can_add_actions
|
28
|
-
ret = []
|
29
|
-
ret << :model_accesses if defined?(RailsAdminUserAbilities)
|
30
|
-
ret += [:comments, :model_comments] if defined?(RailsAdminComments)
|
31
|
-
ret.freeze
|
32
|
-
end
|
33
|
-
def self.manager_cannot_actions
|
34
|
-
[:new, :create, :delete, :destroy]
|
35
|
-
end
|
36
|
-
|
37
|
-
def self.rails_admin_add_visible_actions
|
38
|
-
ret = []
|
39
|
-
ret << :model_accesses if defined?(RailsAdminUserAbilities)
|
40
|
-
ret += [:comments, :model_comments] if defined?(RailsAdminComments)
|
41
|
-
ret.freeze
|
42
|
-
end
|
43
|
-
end
|
44
|
-
|
45
|
-
if defined?(Hancock::Cacheable)
|
46
|
-
include Hancock::Cacheable
|
47
|
-
end
|
48
|
-
end
|
49
|
-
|
50
20
|
if RailsAdminSettings.active_record?
|
51
21
|
self.table_name = "rails_admin_settings".freeze
|
52
22
|
end
|
@@ -14,18 +14,17 @@ module RailsAdminSettings
|
|
14
14
|
field :label, type: String
|
15
15
|
index({ns: 1, key: 1}, {unique: true, sparse: true})
|
16
16
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
end
|
17
|
+
field :cache_keys_str, type: String, default: ""
|
18
|
+
def cache_keys
|
19
|
+
cache_keys_str.split(/\s+/).map { |k| k.strip }.reject { |k| k.blank? }
|
20
|
+
end
|
22
21
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
22
|
+
after_touch :clear_cache
|
23
|
+
after_save :clear_cache
|
24
|
+
after_destroy :clear_cache
|
25
|
+
def clear_cache
|
26
|
+
cache_keys.each do |k|
|
27
|
+
Rails.cache.delete(k)
|
29
28
|
end
|
30
29
|
end
|
31
30
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ack_rails_admin_settings
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexander Kiseliev
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-
|
12
|
+
date: 2016-12-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: mongoid
|