fastentry 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/fastentry/cache_controller.rb +4 -2
- data/app/controllers/fastentry/stats_controller.rb +7 -0
- data/app/views/fastentry/cache/show.html.erb +14 -1
- data/app/views/fastentry/stats/index.html.erb +12 -0
- data/app/views/layouts/fastentry/application.html.erb +3 -0
- data/config/routes.rb +2 -0
- data/lib/fastentry/engine.rb +1 -1
- data/lib/fastentry/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ecbd37d8850658d30c3a6a90636cd2e7cbbacbc6c5fbecd61775bbf956d8fe28
|
4
|
+
data.tar.gz: 553ec75607dc303af1019ae94f3f93558687bb1bac1ff702ec86fa646bf1433c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0dd3d9145f2693b3cff2669dcc1c022ef777174887606dc3879a27bdbbc4aeb2f500e447042ec6565b57e495b2b8c61065a82394ee2585de2760911b92d52b32
|
7
|
+
data.tar.gz: 73b390298321c738cc0844c10d267047343cbc223a20e49f671e7e18c850992d016957b0da63e2682a8358ab1ea5970733683307a482fd3ef2ec164f076b7724
|
@@ -1,8 +1,10 @@
|
|
1
1
|
module Fastentry
|
2
2
|
class CacheController < ApplicationController
|
3
3
|
def show
|
4
|
-
key = params[:key]
|
5
|
-
|
4
|
+
@key = params[:key]
|
5
|
+
expiration_date = Rails.cache.send(:read_entry, @key, {}).expires_at
|
6
|
+
@expiration = (Time.at(expiration_date).strftime("%a, %e %b %Y %H:%M:%S %z") if expiration_date.present?)
|
7
|
+
@cache_item = Rails.cache.read(@key)
|
6
8
|
end
|
7
9
|
|
8
10
|
def invalidate
|
@@ -1,5 +1,18 @@
|
|
1
1
|
<section class="section">
|
2
2
|
<div class="container">
|
3
|
-
<%=
|
3
|
+
<%= link_to "< Back", root_url, class: "button is-small", style: "margin-bottom: 30px;" %>
|
4
|
+
|
5
|
+
<div>
|
6
|
+
<p class="heading">Key</p>
|
7
|
+
<p class="subtitle"><%= @key %></p>
|
8
|
+
|
9
|
+
<% if @expiration %>
|
10
|
+
<p class="heading">Expiration</p>
|
11
|
+
<p class="subtitle"><%= @expiration %></p>
|
12
|
+
<% end %>
|
13
|
+
|
14
|
+
<p class="heading">Content</p>
|
15
|
+
<%= ap(@cache_item).html_safe %>
|
16
|
+
</div>
|
4
17
|
</div>
|
5
18
|
</section>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<section class="section">
|
2
|
+
<div class="container">
|
3
|
+
<nav class="level">
|
4
|
+
<div class="level-item has-text-centered">
|
5
|
+
<div>
|
6
|
+
<p class="heading">Number of keys</p>
|
7
|
+
<p class="title"><%= @number_of_keys %></p>
|
8
|
+
</div>
|
9
|
+
</div>
|
10
|
+
</nav>
|
11
|
+
</div>
|
12
|
+
</section>
|
data/config/routes.rb
CHANGED
data/lib/fastentry/engine.rb
CHANGED
@@ -3,7 +3,7 @@ module Fastentry
|
|
3
3
|
isolate_namespace Fastentry
|
4
4
|
|
5
5
|
initializer "engine_name.assets.precompile" do |app|
|
6
|
-
app.config.assets.precompile += %w( fastentry/logo.png )
|
6
|
+
app.config.assets.precompile += %w( fastentry/logo.png fastentry/applications.css application.js )
|
7
7
|
end
|
8
8
|
end
|
9
9
|
end
|
data/lib/fastentry/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastentry
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tiago Alves
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-02-
|
11
|
+
date: 2019-02-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -56,12 +56,14 @@ files:
|
|
56
56
|
- app/controllers/fastentry/application_controller.rb
|
57
57
|
- app/controllers/fastentry/cache_controller.rb
|
58
58
|
- app/controllers/fastentry/dashboard_controller.rb
|
59
|
+
- app/controllers/fastentry/stats_controller.rb
|
59
60
|
- app/helpers/fastentry/application_helper.rb
|
60
61
|
- app/jobs/fastentry/application_job.rb
|
61
62
|
- app/mailers/fastentry/application_mailer.rb
|
62
63
|
- app/models/fastentry/application_record.rb
|
63
64
|
- app/views/fastentry/cache/show.html.erb
|
64
65
|
- app/views/fastentry/dashboard/index.html.erb
|
66
|
+
- app/views/fastentry/stats/index.html.erb
|
65
67
|
- app/views/layouts/fastentry/application.html.erb
|
66
68
|
- config/routes.rb
|
67
69
|
- lib/fastentry.rb
|