rails_web_cache 0.7.0 → 0.7.2
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5ab5c869fe41b64b81a738d378565d5e4493ffa7b4dc916a8be5a0e3c62efaf1
|
4
|
+
data.tar.gz: 644e2b8747d9eb71a450a743ca2a7da128c34c52b2fc427daeeb683c3ef5ae24
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6aacb702ee50d33f384f6800f31c6f509de85bb4ff7f12ebaef2c9e81589cf930e7690e5c8d25f38ff32b45b58943bc2bac86f2dcc08055163c450189d673bfa
|
7
|
+
data.tar.gz: db163c2259ecb587eae0694d14e45e162f3b9d4099704c176265efa1c3a66b9cd3aabf59c09ac07c94919cf4d2793075c45c05f8dfead726ba68d364be22f2bc
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -7,7 +7,7 @@
|
|
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
11
|
|
12
12
|
## Installation
|
13
13
|
|
@@ -44,4 +44,4 @@ The gem is available as open source under the terms of the [MIT License](https:/
|
|
44
44
|
|
45
45
|
## Code of Conduct
|
46
46
|
|
47
|
-
Everyone interacting in the
|
47
|
+
Everyone interacting in the RailsWebCache 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">
|
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.2
|
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-01-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: coveralls
|