rails_web_cache 0.2.0 → 0.3.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bd8588662b14afb76436c1e2d4a7769ffd6af51c219ff274571c5bb1a1962937
4
- data.tar.gz: a7da04856fe6931608f0ded7c5288f8df34b8b7988babe7ec4f90de71969d782
3
+ metadata.gz: 87bc03470d52715dc730783e79a5432ddb6cac5df6f1220fc9f486acccb31f72
4
+ data.tar.gz: fbab8317fb3400c3e6a6d3dfc8970cb7d12eed0c11ef7e7f7d035ee9af33d020
5
5
  SHA512:
6
- metadata.gz: c47087462763c6446152646f32ac94d85e774b4d84b836d79945ad8f3024b748e88e4ba7d8b0fff0f4879c86de4bb15924798544520e28e1f7aade9a263eefbf
7
- data.tar.gz: a7b98fbdfb59edcdc4d99fe6e31c4b9f6fdf5086b03a31b3b41fd26fefa6809c0c74ee9b8a8b736f89fcb8759e47e5231b88d08c00907eb593a4a18f9a3ff336
6
+ metadata.gz: 7f47292cd7d0b547a52b07fcada844a5aa600ff08f2b8a324201683d0dedb60e6be8d7de2bc26e75c91dea20e7c27d5b464b4c9a7e74d4e907875aca34183005
7
+ data.tar.gz: 3e4a9754f67bdea75156897168a7458cc6d3203375b23cfdef7f0b44b429bcf15713bb85d35d44d7be01ae1c8f76abae0b4c7387a9a426cbb3b4a7042899b06a
@@ -14,10 +14,22 @@ module RailsWebCache
14
14
  redis.scan_each(match: "*#{query.downcase}*").to_a if query
15
15
  end
16
16
 
17
+ def entry(key, options = {})
18
+ return nil unless key
19
+ return nil if type(key) == 'zset'
20
+ entry = read_entry(key, options)
21
+ return nil unless entry
22
+ RailsWebCache::Entry.new(entry)
23
+ end
24
+
17
25
  private
18
26
 
19
27
  def redis
20
28
  @redis ||= cache.redis
21
29
  end
30
+
31
+ def type(key)
32
+ redis.type(key)
33
+ end
22
34
  end
23
35
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RailsWebCache
4
- VERSION = '0.2.0'
4
+ VERSION = '0.3.0'
5
5
  end
@@ -1817,3 +1817,87 @@ Processing by RailsWebCache::KeysController#destroy_all as HTML
1817
1817
  Parameters: {"keys"=>["RailsWebCache"]}
1818
1818
  Redirected to http://test.host/rails_web_cache/
1819
1819
  Completed 302 Found in 0ms (Allocations: 165)
1820
+ Processing by RailsWebCache::KeysController#index as HTML
1821
+ Rendering /Users/boris/Gems/rails_web_cache/app/views/rails_web_cache/keys/index.html.erb within layouts/rails_web_cache/application
1822
+ Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
1823
+ Rendered /Users/boris/Gems/rails_web_cache/app/views/rails_web_cache/keys/index.html.erb within layouts/rails_web_cache/application (Duration: 1.0ms | Allocations: 267)
1824
+ Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
1825
+ Completed 200 OK in 9ms (Views: 6.2ms | Allocations: 2751)
1826
+ Processing by RailsWebCache::KeysController#index as HTML
1827
+ Parameters: {"query"=>"Search"}
1828
+ Rendering /Users/boris/Gems/rails_web_cache/app/views/rails_web_cache/keys/index.html.erb within layouts/rails_web_cache/application
1829
+ Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
1830
+ Rendered /Users/boris/Gems/rails_web_cache/app/views/rails_web_cache/keys/index.html.erb within layouts/rails_web_cache/application (Duration: 0.1ms | Allocations: 55)
1831
+ Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
1832
+ Completed 200 OK in 1ms (Views: 0.5ms | Allocations: 450)
1833
+ Processing by RailsWebCache::KeysController#show as HTML
1834
+ Parameters: {"key"=>"RailsWebCache"}
1835
+ Rendering /Users/boris/Gems/rails_web_cache/app/views/rails_web_cache/keys/show.html.erb within layouts/rails_web_cache/application
1836
+ Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
1837
+ Rendered /Users/boris/Gems/rails_web_cache/app/views/rails_web_cache/keys/show.html.erb within layouts/rails_web_cache/application (Duration: 0.1ms | Allocations: 57)
1838
+ Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
1839
+ Completed 200 OK in 2ms (Views: 1.0ms | Allocations: 675)
1840
+ Processing by RailsWebCache::KeysController#destroy as HTML
1841
+ Parameters: {"key"=>"RailsWebCache"}
1842
+ Redirected to http://test.host/rails_web_cache/
1843
+ Completed 302 Found in 0ms (Allocations: 200)
1844
+ Processing by RailsWebCache::KeysController#destroy_all as HTML
1845
+ Parameters: {"keys"=>["RailsWebCache"]}
1846
+ Redirected to http://test.host/rails_web_cache/
1847
+ Completed 302 Found in 0ms (Allocations: 165)
1848
+ Processing by RailsWebCache::KeysController#index as HTML
1849
+ Rendering /Users/boris/Gems/rails_web_cache/app/views/rails_web_cache/keys/index.html.erb within layouts/rails_web_cache/application
1850
+ Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
1851
+ Rendered /Users/boris/Gems/rails_web_cache/app/views/rails_web_cache/keys/index.html.erb within layouts/rails_web_cache/application (Duration: 0.6ms | Allocations: 267)
1852
+ Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
1853
+ Completed 200 OK in 5ms (Views: 3.1ms | Allocations: 2747)
1854
+ Processing by RailsWebCache::KeysController#index as HTML
1855
+ Parameters: {"query"=>"Search"}
1856
+ Rendering /Users/boris/Gems/rails_web_cache/app/views/rails_web_cache/keys/index.html.erb within layouts/rails_web_cache/application
1857
+ Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
1858
+ Rendered /Users/boris/Gems/rails_web_cache/app/views/rails_web_cache/keys/index.html.erb within layouts/rails_web_cache/application (Duration: 0.1ms | Allocations: 55)
1859
+ Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
1860
+ Completed 200 OK in 1ms (Views: 0.4ms | Allocations: 450)
1861
+ Processing by RailsWebCache::KeysController#show as HTML
1862
+ Parameters: {"key"=>"RailsWebCache"}
1863
+ Rendering /Users/boris/Gems/rails_web_cache/app/views/rails_web_cache/keys/show.html.erb within layouts/rails_web_cache/application
1864
+ Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
1865
+ Rendered /Users/boris/Gems/rails_web_cache/app/views/rails_web_cache/keys/show.html.erb within layouts/rails_web_cache/application (Duration: 0.1ms | Allocations: 57)
1866
+ Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
1867
+ Completed 200 OK in 1ms (Views: 0.5ms | Allocations: 671)
1868
+ Processing by RailsWebCache::KeysController#destroy as HTML
1869
+ Parameters: {"key"=>"RailsWebCache"}
1870
+ Redirected to http://test.host/rails_web_cache/
1871
+ Completed 302 Found in 0ms (Allocations: 200)
1872
+ Processing by RailsWebCache::KeysController#destroy_all as HTML
1873
+ Parameters: {"keys"=>["RailsWebCache"]}
1874
+ Redirected to http://test.host/rails_web_cache/
1875
+ Completed 302 Found in 0ms (Allocations: 165)
1876
+ Processing by RailsWebCache::KeysController#index as HTML
1877
+ Rendering /Users/boris/Gems/rails_web_cache/app/views/rails_web_cache/keys/index.html.erb within layouts/rails_web_cache/application
1878
+ Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
1879
+ Rendered /Users/boris/Gems/rails_web_cache/app/views/rails_web_cache/keys/index.html.erb within layouts/rails_web_cache/application (Duration: 0.4ms | Allocations: 267)
1880
+ Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
1881
+ Completed 200 OK in 4ms (Views: 3.0ms | Allocations: 2747)
1882
+ Processing by RailsWebCache::KeysController#index as HTML
1883
+ Parameters: {"query"=>"Search"}
1884
+ Rendering /Users/boris/Gems/rails_web_cache/app/views/rails_web_cache/keys/index.html.erb within layouts/rails_web_cache/application
1885
+ Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
1886
+ Rendered /Users/boris/Gems/rails_web_cache/app/views/rails_web_cache/keys/index.html.erb within layouts/rails_web_cache/application (Duration: 0.1ms | Allocations: 55)
1887
+ Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
1888
+ Completed 200 OK in 1ms (Views: 0.4ms | Allocations: 450)
1889
+ Processing by RailsWebCache::KeysController#show as HTML
1890
+ Parameters: {"key"=>"RailsWebCache"}
1891
+ Rendering /Users/boris/Gems/rails_web_cache/app/views/rails_web_cache/keys/show.html.erb within layouts/rails_web_cache/application
1892
+ Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
1893
+ Rendered /Users/boris/Gems/rails_web_cache/app/views/rails_web_cache/keys/show.html.erb within layouts/rails_web_cache/application (Duration: 0.1ms | Allocations: 57)
1894
+ Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
1895
+ Completed 200 OK in 1ms (Views: 0.5ms | Allocations: 671)
1896
+ Processing by RailsWebCache::KeysController#destroy as HTML
1897
+ Parameters: {"key"=>"RailsWebCache"}
1898
+ Redirected to http://test.host/rails_web_cache/
1899
+ Completed 302 Found in 0ms (Allocations: 200)
1900
+ Processing by RailsWebCache::KeysController#destroy_all as HTML
1901
+ Parameters: {"keys"=>["RailsWebCache"]}
1902
+ Redirected to http://test.host/rails_web_cache/
1903
+ Completed 302 Found in 0ms (Allocations: 165)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_web_cache
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Boris BRESCIANI
@@ -85,7 +85,6 @@ files:
85
85
  - ".rubocop.yml"
86
86
  - ".travis.yml"
87
87
  - Gemfile
88
- - Gemfile.lock
89
88
  - LICENSE.txt
90
89
  - README.md
91
90
  - Rakefile
data/Gemfile.lock DELETED
@@ -1,178 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- rails_web_cache (0.1.0)
5
- rails (>= 5.2, < 7.0)
6
-
7
- GEM
8
- remote: https://rubygems.org/
9
- specs:
10
- actioncable (6.0.2.1)
11
- actionpack (= 6.0.2.1)
12
- nio4r (~> 2.0)
13
- websocket-driver (>= 0.6.1)
14
- actionmailbox (6.0.2.1)
15
- actionpack (= 6.0.2.1)
16
- activejob (= 6.0.2.1)
17
- activerecord (= 6.0.2.1)
18
- activestorage (= 6.0.2.1)
19
- activesupport (= 6.0.2.1)
20
- mail (>= 2.7.1)
21
- actionmailer (6.0.2.1)
22
- actionpack (= 6.0.2.1)
23
- actionview (= 6.0.2.1)
24
- activejob (= 6.0.2.1)
25
- mail (~> 2.5, >= 2.5.4)
26
- rails-dom-testing (~> 2.0)
27
- actionpack (6.0.2.1)
28
- actionview (= 6.0.2.1)
29
- activesupport (= 6.0.2.1)
30
- rack (~> 2.0, >= 2.0.8)
31
- rack-test (>= 0.6.3)
32
- rails-dom-testing (~> 2.0)
33
- rails-html-sanitizer (~> 1.0, >= 1.2.0)
34
- actiontext (6.0.2.1)
35
- actionpack (= 6.0.2.1)
36
- activerecord (= 6.0.2.1)
37
- activestorage (= 6.0.2.1)
38
- activesupport (= 6.0.2.1)
39
- nokogiri (>= 1.8.5)
40
- actionview (6.0.2.1)
41
- activesupport (= 6.0.2.1)
42
- builder (~> 3.1)
43
- erubi (~> 1.4)
44
- rails-dom-testing (~> 2.0)
45
- rails-html-sanitizer (~> 1.1, >= 1.2.0)
46
- activejob (6.0.2.1)
47
- activesupport (= 6.0.2.1)
48
- globalid (>= 0.3.6)
49
- activemodel (6.0.2.1)
50
- activesupport (= 6.0.2.1)
51
- activerecord (6.0.2.1)
52
- activemodel (= 6.0.2.1)
53
- activesupport (= 6.0.2.1)
54
- activestorage (6.0.2.1)
55
- actionpack (= 6.0.2.1)
56
- activejob (= 6.0.2.1)
57
- activerecord (= 6.0.2.1)
58
- marcel (~> 0.3.1)
59
- activesupport (6.0.2.1)
60
- concurrent-ruby (~> 1.0, >= 1.0.2)
61
- i18n (>= 0.7, < 2)
62
- minitest (~> 5.1)
63
- tzinfo (~> 1.1)
64
- zeitwerk (~> 2.2)
65
- builder (3.2.4)
66
- concurrent-ruby (1.1.5)
67
- coveralls (0.8.23)
68
- json (>= 1.8, < 3)
69
- simplecov (~> 0.16.1)
70
- term-ansicolor (~> 1.3)
71
- thor (>= 0.19.4, < 2.0)
72
- tins (~> 1.6)
73
- crass (1.0.5)
74
- diff-lcs (1.3)
75
- docile (1.3.2)
76
- erubi (1.9.0)
77
- globalid (0.4.2)
78
- activesupport (>= 4.2.0)
79
- i18n (1.7.0)
80
- concurrent-ruby (~> 1.0)
81
- json (2.3.0)
82
- loofah (2.4.0)
83
- crass (~> 1.0.2)
84
- nokogiri (>= 1.5.9)
85
- mail (2.7.1)
86
- mini_mime (>= 0.1.1)
87
- marcel (0.3.3)
88
- mimemagic (~> 0.3.2)
89
- method_source (0.9.2)
90
- mimemagic (0.3.3)
91
- mini_mime (1.0.2)
92
- mini_portile2 (2.4.0)
93
- minitest (5.13.0)
94
- nio4r (2.5.2)
95
- nokogiri (1.10.7)
96
- mini_portile2 (~> 2.4.0)
97
- rack (2.0.8)
98
- rack-test (1.1.0)
99
- rack (>= 1.0, < 3)
100
- rails (6.0.2.1)
101
- actioncable (= 6.0.2.1)
102
- actionmailbox (= 6.0.2.1)
103
- actionmailer (= 6.0.2.1)
104
- actionpack (= 6.0.2.1)
105
- actiontext (= 6.0.2.1)
106
- actionview (= 6.0.2.1)
107
- activejob (= 6.0.2.1)
108
- activemodel (= 6.0.2.1)
109
- activerecord (= 6.0.2.1)
110
- activestorage (= 6.0.2.1)
111
- activesupport (= 6.0.2.1)
112
- bundler (>= 1.3.0)
113
- railties (= 6.0.2.1)
114
- sprockets-rails (>= 2.0.0)
115
- rails-dom-testing (2.0.3)
116
- activesupport (>= 4.2.0)
117
- nokogiri (>= 1.6)
118
- rails-html-sanitizer (1.3.0)
119
- loofah (~> 2.3)
120
- railties (6.0.2.1)
121
- actionpack (= 6.0.2.1)
122
- activesupport (= 6.0.2.1)
123
- method_source
124
- rake (>= 0.8.7)
125
- thor (>= 0.20.3, < 2.0)
126
- rake (13.0.1)
127
- rspec-core (3.9.1)
128
- rspec-support (~> 3.9.1)
129
- rspec-expectations (3.9.0)
130
- diff-lcs (>= 1.2.0, < 2.0)
131
- rspec-support (~> 3.9.0)
132
- rspec-mocks (3.9.0)
133
- diff-lcs (>= 1.2.0, < 2.0)
134
- rspec-support (~> 3.9.0)
135
- rspec-rails (4.0.0.beta3)
136
- actionpack (>= 4.2)
137
- activesupport (>= 4.2)
138
- railties (>= 4.2)
139
- rspec-core (~> 3.8)
140
- rspec-expectations (~> 3.8)
141
- rspec-mocks (~> 3.8)
142
- rspec-support (~> 3.8)
143
- rspec-support (3.9.1)
144
- simplecov (0.16.1)
145
- docile (~> 1.1)
146
- json (>= 1.8, < 3)
147
- simplecov-html (~> 0.10.0)
148
- simplecov-html (0.10.2)
149
- sprockets (4.0.0)
150
- concurrent-ruby (~> 1.0)
151
- rack (> 1, < 3)
152
- sprockets-rails (3.2.1)
153
- actionpack (>= 4.0)
154
- activesupport (>= 4.0)
155
- sprockets (>= 3.0.0)
156
- term-ansicolor (1.7.1)
157
- tins (~> 1.0)
158
- thor (1.0.1)
159
- thread_safe (0.3.6)
160
- tins (1.22.2)
161
- tzinfo (1.2.6)
162
- thread_safe (~> 0.1)
163
- websocket-driver (0.7.1)
164
- websocket-extensions (>= 0.1.0)
165
- websocket-extensions (0.1.4)
166
- zeitwerk (2.2.2)
167
-
168
- PLATFORMS
169
- ruby
170
-
171
- DEPENDENCIES
172
- coveralls (~> 0.8)
173
- rails_web_cache!
174
- rspec-rails (= 4.0.0.beta3)
175
- simplecov (~> 0.16)
176
-
177
- BUNDLED WITH
178
- 2.0.2