operations_middleware 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.1
1
+ 0.3.2
@@ -128,46 +128,58 @@ class OperationsMiddleware
128
128
  end
129
129
 
130
130
  def version_template
131
+ # </body>
132
+ # </html>
131
133
  <<-HTML
132
- <div class='container' style=' width: 1000px;'>
133
- <div class='spacer'></div>
134
- <div id='version'>
135
- <div class='label'>#{app_name} Version</div>
136
- <div class='value'>#{version_link}</div>
137
- </div>
138
- <div class='spacer'></div>
139
- <div id='date'>
140
- <div class='label'>Date Deployed:</div>
141
- <div class='value'>#{deploy_date}</div>
142
- </div>
143
- <div class='spacer'></div>
144
- <div id='commit'>
145
- <div class='label'>Last Commit:</div>
146
- <div class='value'>#{last_commit_link}</div>
147
- </div>
148
- <div class='spacer'></div>
149
- <div id='host'>
150
- <div class='label'>Host:</div>
151
- <div class='value'>#{hostname}</div>
152
- </div>
153
- <div class='spacer'></div>
154
- <div id='headers'>
155
- <div class='label'>Headers:</div>
156
- <div class='value'>#{headers}</div>
157
- </div>
158
- <div class='spacer'></div>
159
- <div id='environment'>
160
- <div class='label'>Environment:</div>
161
- <div class='value'>#{environment}</div>
162
- </div>
163
- </div>
164
- <style>
165
- .container {font-size: 20px;}
166
- .label {float: left; width: 400px;}
167
- .spacer {clear: both; padding: 10px;}
168
- .value {float: left; width: 500px; text-align: right;}
169
- .clear {clear: both;}
170
- </style>
134
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
135
+ <html>
136
+ <head>
137
+ <title>
138
+ #{app_name}
139
+ </title>
140
+ </head>
141
+ <body>
142
+ <div class='container' style=' width: 1000px;'>
143
+ <div class='spacer'></div>
144
+ <div id='version'>
145
+ <div class='label'>#{app_name} Version</div>
146
+ <div class='value'>#{version_link}</div>
147
+ </div>
148
+ <div class='spacer'></div>
149
+ <div id='date'>
150
+ <div class='label'>Date Deployed:</div>
151
+ <div class='value'>#{deploy_date}</div>
152
+ </div>
153
+ <div class='spacer'></div>
154
+ <div id='commit'>
155
+ <div class='label'>Last Commit:</div>
156
+ <div class='value'>#{last_commit_link}</div>
157
+ </div>
158
+ <div class='spacer'></div>
159
+ <div id='host'>
160
+ <div class='label'>Host:</div>
161
+ <div class='value'>#{hostname}</div>
162
+ </div>
163
+ <div class='spacer'></div>
164
+ <div id='headers'>
165
+ <div class='label'>Headers:</div>
166
+ <div class='value'>#{headers}</div>
167
+ </div>
168
+ <div class='spacer'></div>
169
+ <div id='environment'>
170
+ <div class='label'>Environment:</div>
171
+ <div class='value'>#{environment}</div>
172
+ </div>
173
+ </div>
174
+ <style>
175
+ .container {font-size: 20px;}
176
+ .label {float: left; width: 400px;}
177
+ .spacer {clear: both; padding: 10px;}
178
+ .value {float: left; width: 500px; text-align: right;}
179
+ .clear {clear: both;}
180
+ </style>
181
+ </body>
182
+ </html>
171
183
  HTML
172
184
  end
173
185
  end
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{operations_middleware}
8
- s.version = "0.3.1"
8
+ s.version = "0.3.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Primedia Team"]
12
- s.date = %q{2010-07-06}
12
+ s.date = %q{2010-07-19}
13
13
  s.description = %q{Rack middleware to provide route for heartbeat and version pages. Includes links to github repo. }
14
14
  s.email = %q{}
15
15
  s.extra_rdoc_files = [
@@ -77,6 +77,13 @@ describe "OperationsMiddleware" do
77
77
  last_response.body.should have_tag('#environment .label', 'Environment:')
78
78
  last_response.body.should have_tag('#environment .value', 'env')
79
79
  end
80
+
81
+ it "should render a valid html page" do
82
+ get '/ops/version'
83
+ last_response.body.should have_tag('html')
84
+ last_response.body.should have_tag('head')
85
+ last_response.body.should have_tag('body')
86
+ end
80
87
 
81
88
  end
82
89
 
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 3
8
- - 1
9
- version: 0.3.1
8
+ - 2
9
+ version: 0.3.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - Primedia Team
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-07-06 00:00:00 -04:00
17
+ date: 2010-07-19 00:00:00 -04:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency