File: index.erb

package info (click to toggle)
ruby-rack-cache 1.17.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 648 kB
  • sloc: ruby: 3,581; makefile: 4
file content (44 lines) | stat: -rw-r--r-- 941 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<html>
  <head>
    <title>Sample Rack::Cache Sinatra app</title>
    <style type="text/css" media="screen">
      body {
        font-family: Georgia;
        font-size: 24px;
        text-align: center;
      }

      #headers {
        font-size: 16px;
      }

      input {
        font-size: 24px;
        cursor: pointer;
      }
    </style>
  </head>
  <body>
    <h1>Last updated at: <%= $updated_at.strftime('%l:%m:%S%P') %></h1>

    <p>
      <form action="/" method="post">
        <input type="hidden" name="_method" value="PUT">
        <input type="submit" value="Expire the cache.">
      </form>
    </p>

    <div id="headers">
      <h3>Headers:</h3>

      <% response.headers.each do |key, value| %>
        <p><%= key %>: <%= value %></p>
      <% end %>

      <h3>Params:</h3>
      <% params.each do |key, value| %>
        <p><%= key %>: <%= value || '(blank)' %></p>
      <% end %>
    </div>
  </body>
</html>