summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormakoto kuwata <kwa@kuwata-lab.com>2011-03-20 16:25:30 +0900
committermakoto kuwata <kwa@kuwata-lab.com>2011-03-20 16:25:30 +0900
commit1ec049a561a2206646f95bbff66175884bbb02f5 (patch)
treed62b45fe072477ce339b503f426fb9ffd64ae5c4
parent0a7b4be8a40fbcb8d6ca5400b99efcf93e3f1267 (diff)
downloaderubis-1ec049a561a2206646f95bbff66175884bbb02f5.tar.gz
[add] 'public_html/index.rhtml'
-rw-r--r--public_html/index.rhtml54
1 files changed, 54 insertions, 0 deletions
diff --git a/public_html/index.rhtml b/public_html/index.rhtml
new file mode 100644
index 0000000..766c97f
--- /dev/null
+++ b/public_html/index.rhtml
@@ -0,0 +1,54 @@
+<%
+ page_title = 'Erubis Example Page'
+%>
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
+ <title><%== page_title %></title>
+ <style type="text/css">
+ table.list {
+ border-collapse: collapse;
+ }
+ table.list td, table.list th {
+ border: solid 1px #999;
+ padding: 2px 5px;
+ }
+ table.list th {
+ background: #CCF;
+ text-align: left;
+ vertical-align: top;
+ }
+ </style>
+ </head>
+ <body>
+ <h1><%== page_title %></h1>
+
+ <h2>Ruby Information</h2>
+ <table class="list">
+ <% cont_names = ['RUBY_VERSION', 'RUBY_PATCHLEVEL', 'RUBY_PLATFORM', 'RUBY_RELEASE_DATE', 'RUBY_ENGINE'] %>
+ <% cont_names.each do |name| %>
+ <% if Object.const_defined?(name) %>
+ <tr>
+ <th><%== name %></th><td><%== Object.const_get(name).inspect %></td>
+ </tr>
+ <% end %>
+ <% end %>
+ <tr>
+ <th>Erubis::VERSION</th><td><%== Erubis::VERSION.inspect %></td>
+ </tr>
+ </table>
+
+ <h2>Environment Variables</h2>
+ <table class="list">
+ <% odd = false %>
+ <% ENV.keys.sort.each do |k| %>
+ <% odd != odd %>
+ <tr class="<%== odd ? 'odd' : 'even' %>">
+ <th><%== k %></th><td><%== ENV[k].inspect %></td>
+ </tr>
+ <% end %>
+ </table>
+
+ </body>
+</html>