-
Notifications
You must be signed in to change notification settings - Fork 62
/
index.rhtml
54 lines (51 loc) · 1.33 KB
/
index.rhtml
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
45
46
47
48
49
50
51
52
53
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>