Skip to content

Commit

Permalink
[add] 'public_html/index.rhtml'
Browse files Browse the repository at this point in the history
  • Loading branch information
kwatch committed Mar 20, 2011
1 parent 0a7b4be commit 1ec049a
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions public_html/index.rhtml
Original file line number Diff line number Diff line change
@@ -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>

0 comments on commit 1ec049a

Please sign in to comment.