rails_web_cache 0.7.0 → 0.7.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +79 -77
- data/README.md +6 -5
- data/app/assets/javascripts/rails_web_cache/keys.js +4 -4
- data/app/controllers/rails_web_cache/keys_controller.rb +5 -4
- data/app/views/layouts/rails_web_cache/application.html.erb +1 -0
- data/app/views/rails_web_cache/keys/index.html.erb +1 -1
- data/lib/rails_web_cache/version.rb +1 -1
- data/rails_web_cache.gemspec +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7aa648c380564d57979bcd8f1402f5996a70f7e02b7bd6cfa6c51c36b701ef39
|
4
|
+
data.tar.gz: f66919529cff0ea0020f8ea04be1ced53c58ccdd37d3d3c3ff06cd25f77dbf6e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ed28790d524869a0ebbd4eb89eafda8bab6d2335f49c6fa19280aa51cdd577c88e36cb31b7b2f6041c0f5ade5b9b3307cce8df1df8693cfcbea0b70a40fd7e8e
|
7
|
+
data.tar.gz: b62de6b5e241aefa21abe289c8800c01689d975acf139164b2534ea8ce83e6deda51a3ef7451da4cabb1f0bd48e098c188a98d1afcff69fd524c7048ef78513e
|
data/Gemfile.lock
CHANGED
@@ -1,146 +1,146 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
rails_web_cache (0.6
|
4
|
+
rails_web_cache (0.7.6)
|
5
5
|
rails (>= 5.2, < 7.0)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
|
-
actioncable (6.0.
|
11
|
-
actionpack (= 6.0.
|
10
|
+
actioncable (6.0.3.1)
|
11
|
+
actionpack (= 6.0.3.1)
|
12
12
|
nio4r (~> 2.0)
|
13
13
|
websocket-driver (>= 0.6.1)
|
14
|
-
actionmailbox (6.0.
|
15
|
-
actionpack (= 6.0.
|
16
|
-
activejob (= 6.0.
|
17
|
-
activerecord (= 6.0.
|
18
|
-
activestorage (= 6.0.
|
19
|
-
activesupport (= 6.0.
|
14
|
+
actionmailbox (6.0.3.1)
|
15
|
+
actionpack (= 6.0.3.1)
|
16
|
+
activejob (= 6.0.3.1)
|
17
|
+
activerecord (= 6.0.3.1)
|
18
|
+
activestorage (= 6.0.3.1)
|
19
|
+
activesupport (= 6.0.3.1)
|
20
20
|
mail (>= 2.7.1)
|
21
|
-
actionmailer (6.0.
|
22
|
-
actionpack (= 6.0.
|
23
|
-
actionview (= 6.0.
|
24
|
-
activejob (= 6.0.
|
21
|
+
actionmailer (6.0.3.1)
|
22
|
+
actionpack (= 6.0.3.1)
|
23
|
+
actionview (= 6.0.3.1)
|
24
|
+
activejob (= 6.0.3.1)
|
25
25
|
mail (~> 2.5, >= 2.5.4)
|
26
26
|
rails-dom-testing (~> 2.0)
|
27
|
-
actionpack (6.0.
|
28
|
-
actionview (= 6.0.
|
29
|
-
activesupport (= 6.0.
|
27
|
+
actionpack (6.0.3.1)
|
28
|
+
actionview (= 6.0.3.1)
|
29
|
+
activesupport (= 6.0.3.1)
|
30
30
|
rack (~> 2.0, >= 2.0.8)
|
31
31
|
rack-test (>= 0.6.3)
|
32
32
|
rails-dom-testing (~> 2.0)
|
33
33
|
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
34
|
-
actiontext (6.0.
|
35
|
-
actionpack (= 6.0.
|
36
|
-
activerecord (= 6.0.
|
37
|
-
activestorage (= 6.0.
|
38
|
-
activesupport (= 6.0.
|
34
|
+
actiontext (6.0.3.1)
|
35
|
+
actionpack (= 6.0.3.1)
|
36
|
+
activerecord (= 6.0.3.1)
|
37
|
+
activestorage (= 6.0.3.1)
|
38
|
+
activesupport (= 6.0.3.1)
|
39
39
|
nokogiri (>= 1.8.5)
|
40
|
-
actionview (6.0.
|
41
|
-
activesupport (= 6.0.
|
40
|
+
actionview (6.0.3.1)
|
41
|
+
activesupport (= 6.0.3.1)
|
42
42
|
builder (~> 3.1)
|
43
43
|
erubi (~> 1.4)
|
44
44
|
rails-dom-testing (~> 2.0)
|
45
45
|
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
46
|
-
activejob (6.0.
|
47
|
-
activesupport (= 6.0.
|
46
|
+
activejob (6.0.3.1)
|
47
|
+
activesupport (= 6.0.3.1)
|
48
48
|
globalid (>= 0.3.6)
|
49
|
-
activemodel (6.0.
|
50
|
-
activesupport (= 6.0.
|
51
|
-
activerecord (6.0.
|
52
|
-
activemodel (= 6.0.
|
53
|
-
activesupport (= 6.0.
|
54
|
-
activestorage (6.0.
|
55
|
-
actionpack (= 6.0.
|
56
|
-
activejob (= 6.0.
|
57
|
-
activerecord (= 6.0.
|
49
|
+
activemodel (6.0.3.1)
|
50
|
+
activesupport (= 6.0.3.1)
|
51
|
+
activerecord (6.0.3.1)
|
52
|
+
activemodel (= 6.0.3.1)
|
53
|
+
activesupport (= 6.0.3.1)
|
54
|
+
activestorage (6.0.3.1)
|
55
|
+
actionpack (= 6.0.3.1)
|
56
|
+
activejob (= 6.0.3.1)
|
57
|
+
activerecord (= 6.0.3.1)
|
58
58
|
marcel (~> 0.3.1)
|
59
|
-
activesupport (6.0.
|
59
|
+
activesupport (6.0.3.1)
|
60
60
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
61
61
|
i18n (>= 0.7, < 2)
|
62
62
|
minitest (~> 5.1)
|
63
63
|
tzinfo (~> 1.1)
|
64
|
-
zeitwerk (~> 2.2)
|
64
|
+
zeitwerk (~> 2.2, >= 2.2.2)
|
65
65
|
builder (3.2.4)
|
66
|
-
concurrent-ruby (1.1.
|
66
|
+
concurrent-ruby (1.1.6)
|
67
67
|
coveralls (0.8.23)
|
68
68
|
json (>= 1.8, < 3)
|
69
69
|
simplecov (~> 0.16.1)
|
70
70
|
term-ansicolor (~> 1.3)
|
71
71
|
thor (>= 0.19.4, < 2.0)
|
72
72
|
tins (~> 1.6)
|
73
|
-
crass (1.0.
|
73
|
+
crass (1.0.6)
|
74
74
|
diff-lcs (1.3)
|
75
75
|
docile (1.3.2)
|
76
76
|
erubi (1.9.0)
|
77
77
|
globalid (0.4.2)
|
78
78
|
activesupport (>= 4.2.0)
|
79
|
-
i18n (1.
|
79
|
+
i18n (1.8.2)
|
80
80
|
concurrent-ruby (~> 1.0)
|
81
81
|
json (2.3.0)
|
82
|
-
loofah (2.
|
82
|
+
loofah (2.5.0)
|
83
83
|
crass (~> 1.0.2)
|
84
84
|
nokogiri (>= 1.5.9)
|
85
85
|
mail (2.7.1)
|
86
86
|
mini_mime (>= 0.1.1)
|
87
87
|
marcel (0.3.3)
|
88
88
|
mimemagic (~> 0.3.2)
|
89
|
-
method_source (0.
|
90
|
-
mimemagic (0.3.
|
89
|
+
method_source (1.0.0)
|
90
|
+
mimemagic (0.3.5)
|
91
91
|
mini_mime (1.0.2)
|
92
92
|
mini_portile2 (2.4.0)
|
93
|
-
minitest (5.
|
93
|
+
minitest (5.14.1)
|
94
94
|
nio4r (2.5.2)
|
95
|
-
nokogiri (1.10.
|
95
|
+
nokogiri (1.10.9)
|
96
96
|
mini_portile2 (~> 2.4.0)
|
97
|
-
rack (2.
|
97
|
+
rack (2.2.2)
|
98
98
|
rack-test (1.1.0)
|
99
99
|
rack (>= 1.0, < 3)
|
100
|
-
rails (6.0.
|
101
|
-
actioncable (= 6.0.
|
102
|
-
actionmailbox (= 6.0.
|
103
|
-
actionmailer (= 6.0.
|
104
|
-
actionpack (= 6.0.
|
105
|
-
actiontext (= 6.0.
|
106
|
-
actionview (= 6.0.
|
107
|
-
activejob (= 6.0.
|
108
|
-
activemodel (= 6.0.
|
109
|
-
activerecord (= 6.0.
|
110
|
-
activestorage (= 6.0.
|
111
|
-
activesupport (= 6.0.
|
100
|
+
rails (6.0.3.1)
|
101
|
+
actioncable (= 6.0.3.1)
|
102
|
+
actionmailbox (= 6.0.3.1)
|
103
|
+
actionmailer (= 6.0.3.1)
|
104
|
+
actionpack (= 6.0.3.1)
|
105
|
+
actiontext (= 6.0.3.1)
|
106
|
+
actionview (= 6.0.3.1)
|
107
|
+
activejob (= 6.0.3.1)
|
108
|
+
activemodel (= 6.0.3.1)
|
109
|
+
activerecord (= 6.0.3.1)
|
110
|
+
activestorage (= 6.0.3.1)
|
111
|
+
activesupport (= 6.0.3.1)
|
112
112
|
bundler (>= 1.3.0)
|
113
|
-
railties (= 6.0.
|
113
|
+
railties (= 6.0.3.1)
|
114
114
|
sprockets-rails (>= 2.0.0)
|
115
115
|
rails-dom-testing (2.0.3)
|
116
116
|
activesupport (>= 4.2.0)
|
117
117
|
nokogiri (>= 1.6)
|
118
118
|
rails-html-sanitizer (1.3.0)
|
119
119
|
loofah (~> 2.3)
|
120
|
-
railties (6.0.
|
121
|
-
actionpack (= 6.0.
|
122
|
-
activesupport (= 6.0.
|
120
|
+
railties (6.0.3.1)
|
121
|
+
actionpack (= 6.0.3.1)
|
122
|
+
activesupport (= 6.0.3.1)
|
123
123
|
method_source
|
124
124
|
rake (>= 0.8.7)
|
125
125
|
thor (>= 0.20.3, < 2.0)
|
126
126
|
rake (13.0.1)
|
127
|
-
rspec-core (3.9.
|
128
|
-
rspec-support (~> 3.9.
|
129
|
-
rspec-expectations (3.9.
|
127
|
+
rspec-core (3.9.2)
|
128
|
+
rspec-support (~> 3.9.3)
|
129
|
+
rspec-expectations (3.9.2)
|
130
130
|
diff-lcs (>= 1.2.0, < 2.0)
|
131
131
|
rspec-support (~> 3.9.0)
|
132
|
-
rspec-mocks (3.9.
|
132
|
+
rspec-mocks (3.9.1)
|
133
133
|
diff-lcs (>= 1.2.0, < 2.0)
|
134
134
|
rspec-support (~> 3.9.0)
|
135
|
-
rspec-rails (4.0.
|
135
|
+
rspec-rails (4.0.1)
|
136
136
|
actionpack (>= 4.2)
|
137
137
|
activesupport (>= 4.2)
|
138
138
|
railties (>= 4.2)
|
139
|
-
rspec-core (~> 3.
|
140
|
-
rspec-expectations (~> 3.
|
141
|
-
rspec-mocks (~> 3.
|
142
|
-
rspec-support (~> 3.
|
143
|
-
rspec-support (3.9.
|
139
|
+
rspec-core (~> 3.9)
|
140
|
+
rspec-expectations (~> 3.9)
|
141
|
+
rspec-mocks (~> 3.9)
|
142
|
+
rspec-support (~> 3.9)
|
143
|
+
rspec-support (3.9.3)
|
144
144
|
simplecov (0.16.1)
|
145
145
|
docile (~> 1.1)
|
146
146
|
json (>= 1.8, < 3)
|
@@ -153,17 +153,19 @@ GEM
|
|
153
153
|
actionpack (>= 4.0)
|
154
154
|
activesupport (>= 4.0)
|
155
155
|
sprockets (>= 3.0.0)
|
156
|
+
sync (0.5.0)
|
156
157
|
term-ansicolor (1.7.1)
|
157
158
|
tins (~> 1.0)
|
158
159
|
thor (1.0.1)
|
159
160
|
thread_safe (0.3.6)
|
160
|
-
tins (1.
|
161
|
-
|
161
|
+
tins (1.25.0)
|
162
|
+
sync
|
163
|
+
tzinfo (1.2.7)
|
162
164
|
thread_safe (~> 0.1)
|
163
|
-
websocket-driver (0.7.
|
165
|
+
websocket-driver (0.7.2)
|
164
166
|
websocket-extensions (>= 0.1.0)
|
165
167
|
websocket-extensions (0.1.4)
|
166
|
-
zeitwerk (2.
|
168
|
+
zeitwerk (2.3.0)
|
167
169
|
|
168
170
|
PLATFORMS
|
169
171
|
ruby
|
@@ -171,8 +173,8 @@ PLATFORMS
|
|
171
173
|
DEPENDENCIES
|
172
174
|
coveralls (~> 0.8)
|
173
175
|
rails_web_cache!
|
174
|
-
rspec-rails (
|
176
|
+
rspec-rails (~> 4.0.0)
|
175
177
|
simplecov (~> 0.16)
|
176
178
|
|
177
179
|
BUNDLED WITH
|
178
|
-
2.
|
180
|
+
2.1.4
|
data/README.md
CHANGED
@@ -7,7 +7,11 @@
|
|
7
7
|
![Gem](https://img.shields.io/gem/dt/rails_web_cache)
|
8
8
|
[![Coverage Status](https://coveralls.io/repos/github/BorisBresciani/rails_web_cache/badge.svg?branch=master)](https://coveralls.io/github/BorisBresciani/rails_web_cache?branch=master)
|
9
9
|
|
10
|
-
|
10
|
+
RailsWebCache is a simple Ruby/Rails library for manage Rails cache by Web UI (Redis, Memory, etc...)
|
11
|
+
|
12
|
+
## Extra
|
13
|
+
|
14
|
+
https://github.com/OpenGems/redis_web_manager
|
11
15
|
|
12
16
|
## Installation
|
13
17
|
|
@@ -34,6 +38,7 @@ Add this line to the file `config/routes.rb`
|
|
34
38
|
|
35
39
|
Enjoy ! Go to `/rails_web_cache`
|
36
40
|
|
41
|
+
|
37
42
|
## Contributing
|
38
43
|
|
39
44
|
Bug reports and pull requests are welcome on GitHub at https://github.com/BorisBresciani/rails_web_cache. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
@@ -41,7 +46,3 @@ Bug reports and pull requests are welcome on GitHub at https://github.com/BorisB
|
|
41
46
|
## License
|
42
47
|
|
43
48
|
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
44
|
-
|
45
|
-
## Code of Conduct
|
46
|
-
|
47
|
-
Everyone interacting in the RailsParseHead project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/BorisBresciani/rails_web_cache/blob/master/CODE_OF_CONDUCT.md).
|
@@ -2,9 +2,9 @@ $(document).ready(function() {
|
|
2
2
|
$('#select-all-keys').on('click', function() {
|
3
3
|
var checked = $(this).is(':checked');
|
4
4
|
if (checked) {
|
5
|
-
$('#delete-all-keys').removeClass('disabled');
|
5
|
+
$('#delete-all-keys').removeClass('disabled').prop('disabled', false);
|
6
6
|
} else {
|
7
|
-
$('#delete-all-keys').addClass('disabled');
|
7
|
+
$('#delete-all-keys').addClass('disabled').prop('disabled', true);
|
8
8
|
}
|
9
9
|
$("input[name='keys[]']").each(function() {
|
10
10
|
$(this).prop('checked', checked);
|
@@ -14,9 +14,9 @@ $(document).ready(function() {
|
|
14
14
|
var checked = $("input:checked[name='keys[]']");
|
15
15
|
var size = checked.length;
|
16
16
|
if (size > 0) {
|
17
|
-
$('#delete-all-keys').removeClass('disabled');
|
17
|
+
$('#delete-all-keys').removeClass('disabled').prop('disabled', false);
|
18
18
|
} else {
|
19
|
-
$('#delete-all-keys').addClass('disabled');
|
19
|
+
$('#delete-all-keys').addClass('disabled').prop('disabled', true);
|
20
20
|
}
|
21
21
|
});
|
22
22
|
});
|
@@ -11,7 +11,8 @@ module RailsWebCache
|
|
11
11
|
def index
|
12
12
|
@keys = keys
|
13
13
|
@pages = (@keys.size / @per_page.to_f).ceil
|
14
|
-
@keys =
|
14
|
+
@keys = @keys[@offset, @per_page] || []
|
15
|
+
@keys = @keys.map.with_index do |key, idx|
|
15
16
|
format_key(key, idx)
|
16
17
|
end
|
17
18
|
end
|
@@ -32,9 +33,9 @@ module RailsWebCache
|
|
32
33
|
|
33
34
|
# DELETE /keys/all/:keys
|
34
35
|
def destroy_all
|
35
|
-
keys = params[:keys].presence
|
36
|
-
redirect_to root_path if keys.nil?
|
37
|
-
|
36
|
+
keys = params[:keys].presence || []
|
37
|
+
redirect_to root_path if keys.nil? || keys.empty?
|
38
|
+
keys.each do |key|
|
38
39
|
cache.delete(key)
|
39
40
|
end
|
40
41
|
redirect_to root_path
|
@@ -58,7 +58,7 @@
|
|
58
58
|
</tbody>
|
59
59
|
</table>
|
60
60
|
</div>
|
61
|
-
<%= submit_tag 'Delete selected keys', class: 'btn btn-danger w-100 mb-4 disabled', id: 'delete-all-keys' %>
|
61
|
+
<%= submit_tag 'Delete selected keys', class: 'btn btn-danger w-100 mb-4 disabled', id: 'delete-all-keys', disabled: true %>
|
62
62
|
<% end %>
|
63
63
|
</div>
|
64
64
|
<div class="col-12">
|
data/rails_web_cache.gemspec
CHANGED
@@ -32,7 +32,7 @@ Gem::Specification.new do |spec|
|
|
32
32
|
spec.test_files = Dir['spec/**/*']
|
33
33
|
|
34
34
|
spec.add_development_dependency 'coveralls', '~> 0.8'
|
35
|
-
spec.add_development_dependency 'rspec-rails', '
|
35
|
+
spec.add_development_dependency 'rspec-rails', '~> 4.0.0'
|
36
36
|
spec.add_development_dependency 'simplecov', '~> 0.16'
|
37
37
|
|
38
38
|
spec.add_dependency 'rails', '>= 5.2', '< 7.0'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_web_cache
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Boris BRESCIANI
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-05-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: coveralls
|
@@ -28,16 +28,16 @@ dependencies:
|
|
28
28
|
name: rspec-rails
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 4.0.0
|
33
|
+
version: 4.0.0
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 4.0.0
|
40
|
+
version: 4.0.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: simplecov
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -187,7 +187,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
187
187
|
- !ruby/object:Gem::Version
|
188
188
|
version: '0'
|
189
189
|
requirements: []
|
190
|
-
rubygems_version: 3.
|
190
|
+
rubygems_version: 3.1.2
|
191
191
|
signing_key:
|
192
192
|
specification_version: 4
|
193
193
|
summary: Manage rails cache by Web UI
|