site_validator 1.0.4 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/site_validator/sitemap.rb +2 -1
- data/lib/site_validator/version.rb +1 -1
- data/site_validator.gemspec +2 -1
- data/spec/samples/http_github.response +15 -0
- data/spec/samples/https_github.response +634 -0
- data/spec/sitemap_spec.rb +9 -0
- data/spec/spec_helper.rb +2 -0
- metadata +36 -18
@@ -1,6 +1,7 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
2
|
|
3
3
|
require 'open-uri'
|
4
|
+
require 'open_uri_redirections'
|
4
5
|
require 'nokogiri'
|
5
6
|
require 'metainspector'
|
6
7
|
require 'timeout'
|
@@ -86,7 +87,7 @@ module SiteValidator
|
|
86
87
|
end
|
87
88
|
|
88
89
|
def doc
|
89
|
-
@doc ||= open(url)
|
90
|
+
@doc ||= open(url, :allow_safe_redirections => true)
|
90
91
|
end
|
91
92
|
end
|
92
93
|
end
|
data/site_validator.gemspec
CHANGED
@@ -17,7 +17,8 @@ Gem::Specification.new do |gem|
|
|
17
17
|
|
18
18
|
gem.add_dependency 'w3c_validators', '~> 1.2'
|
19
19
|
gem.add_dependency 'nokogiri', '~> 1.5.3'
|
20
|
-
gem.add_dependency '
|
20
|
+
gem.add_dependency 'open_uri_redirections', '0.0.1'
|
21
|
+
gem.add_dependency 'metainspector', '~> 1.13.0'
|
21
22
|
|
22
23
|
gem.add_development_dependency 'rspec', '~> 2.5.0'
|
23
24
|
gem.add_development_dependency 'mocha', '~> 0.11.4'
|
@@ -0,0 +1,15 @@
|
|
1
|
+
HTTP/1.1 301 Moved Permanently
|
2
|
+
Server: nginx
|
3
|
+
Date: Mon, 03 Dec 2012 11:36:17 GMT
|
4
|
+
Content-Type: text/html
|
5
|
+
Content-Length: 178
|
6
|
+
Connection: close
|
7
|
+
Location: https://github.com/
|
8
|
+
|
9
|
+
<html>
|
10
|
+
<head><title>301 Moved Permanently</title></head>
|
11
|
+
<body bgcolor="white">
|
12
|
+
<center><h1>301 Moved Permanently</h1></center>
|
13
|
+
<hr><center>nginx</center>
|
14
|
+
</body>
|
15
|
+
</html>
|
@@ -0,0 +1,634 @@
|
|
1
|
+
HTTP/1.1 200 OK
|
2
|
+
Server: nginx
|
3
|
+
Date: Mon, 03 Dec 2012 11:37:51 GMT
|
4
|
+
Content-Type: text/html; charset=utf-8
|
5
|
+
Connection: keep-alive
|
6
|
+
Status: 200 OK
|
7
|
+
X-Runtime: 10
|
8
|
+
ETag: "a9e1dd587bb233eb670ec06f7d553dbc"
|
9
|
+
X-Frame-Options: deny
|
10
|
+
Set-Cookie: _gh_sess=BAh7BzoPc2Vzc2lvbl9pZCIlZTc4ZDNlOGEwM2NlZDQ3Y2VhMDdlMTQyOTA4NWVmYzA6EF9jc3JmX3Rva2VuIjE0U2xsYUoybFFNSWxhWEtudHNvalJCVjZtVnJZcFVlRVk4WlpMbEZKWktRPQ%3D%3D--8ea4a235fd3c5e727d462e24b992fabd8f50050d; path=/; expires=Sat, 01-Jan-2022 00:00:00 GMT; secure; HttpOnly
|
11
|
+
Content-Length: 21814
|
12
|
+
Cache-Control: private, max-age=0, must-revalidate
|
13
|
+
Strict-Transport-Security: max-age=2592000
|
14
|
+
|
15
|
+
<!DOCTYPE html>
|
16
|
+
<html>
|
17
|
+
<head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# githubog: http://ogp.me/ns/fb/githubog#">
|
18
|
+
<meta charset='utf-8'>
|
19
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
20
|
+
<title>GitHub · Social Coding</title>
|
21
|
+
<link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="GitHub" />
|
22
|
+
<link rel="fluid-icon" href="https://github.com/fluidicon.png" title="GitHub" />
|
23
|
+
<link rel="apple-touch-icon-precomposed" sizes="57x57" href="apple-touch-icon-114.png" />
|
24
|
+
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="apple-touch-icon-114.png" />
|
25
|
+
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="apple-touch-icon-144.png" />
|
26
|
+
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="apple-touch-icon-144.png" />
|
27
|
+
<meta name="msapplication-TileImage" content="/windows-tile.png">
|
28
|
+
<meta name="msapplication-TileColor" content="#ffffff">
|
29
|
+
|
30
|
+
|
31
|
+
|
32
|
+
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
|
33
|
+
|
34
|
+
<meta content="authenticity_token" name="csrf-param" />
|
35
|
+
<meta content="4SllaJ2lQMIlaXKntsojRBV6mVrYpUeEY8ZZLlFJZKQ=" name="csrf-token" />
|
36
|
+
|
37
|
+
<link href="https://a248.e.akamai.net/assets.github.com/assets/github-bd7a9aac1964f57509ff6d9dbddc6e086343bca4.css" media="screen" rel="stylesheet" type="text/css" />
|
38
|
+
<link href="https://a248.e.akamai.net/assets.github.com/assets/github2-8fa43eb7ec103bd3bf79be09cf64db52d75c244f.css" media="screen" rel="stylesheet" type="text/css" />
|
39
|
+
|
40
|
+
|
41
|
+
|
42
|
+
<script src="https://a248.e.akamai.net/assets.github.com/assets/frameworks-57542e0cba19d068168099f287c117efa142863c.js" type="text/javascript"></script>
|
43
|
+
<script src="https://a248.e.akamai.net/assets.github.com/assets/github-650ee832daf5d46d78829c3f98d1e97bab858056.js" type="text/javascript"></script>
|
44
|
+
|
45
|
+
|
46
|
+
|
47
|
+
</head>
|
48
|
+
|
49
|
+
|
50
|
+
<body class="logged_out wider env-production ">
|
51
|
+
<div id="wrapper">
|
52
|
+
|
53
|
+
|
54
|
+
|
55
|
+
|
56
|
+
|
57
|
+
|
58
|
+
|
59
|
+
|
60
|
+
<div class="header header-logged-out">
|
61
|
+
<div class="container clearfix">
|
62
|
+
|
63
|
+
<a class="header-logo-wordmark" href="https://github.com/">
|
64
|
+
<img alt="GitHub" class="github-logo-4x" height="30" src="https://a248.e.akamai.net/assets.github.com/images/modules/header/logov7@4x.png?1338945075" />
|
65
|
+
<img alt="GitHub" class="github-logo-4x-hover" height="30" src="https://a248.e.akamai.net/assets.github.com/images/modules/header/logov7@4x-hover.png?1338945075" />
|
66
|
+
</a>
|
67
|
+
|
68
|
+
|
69
|
+
<ul class="top-nav">
|
70
|
+
<li class="explore"><a href="https://github.com/explore">Explore GitHub</a></li>
|
71
|
+
<li class="search"><a href="https://github.com/search">Search</a></li>
|
72
|
+
<li class="features"><a href="https://github.com/features">Features</a></li>
|
73
|
+
<li class="blog"><a href="https://github.com/blog">Blog</a></li>
|
74
|
+
</ul>
|
75
|
+
|
76
|
+
|
77
|
+
<div class="header-actions">
|
78
|
+
<a class="button primary classy" href="https://github.com/signup">Sign up for free</a>
|
79
|
+
<a class="button classy" href="https://github.com/login">Sign in</a>
|
80
|
+
</div>
|
81
|
+
|
82
|
+
</div>
|
83
|
+
</div>
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
<div class="site home">
|
92
|
+
<div class="pagehead homehead">
|
93
|
+
<div class="container">
|
94
|
+
<div class="hero">
|
95
|
+
<h1>
|
96
|
+
<strong>2,689,314</strong>
|
97
|
+
people hosting over
|
98
|
+
<strong>4,511,128</strong>
|
99
|
+
repositories
|
100
|
+
</h1>
|
101
|
+
<div class="textographic">
|
102
|
+
<form accept-charset="UTF-8" action="/search" id="top_search_form" method="get">
|
103
|
+
<p>
|
104
|
+
<a class="repo" href="/jquery/jquery">jQuery</a>,
|
105
|
+
<a class="repo" href="/reddit/reddit">reddit</a>,
|
106
|
+
<a class="repo" href="/andymatuschak/Sparkle">Sparkle</a>,
|
107
|
+
<a class="repo" href="/bagder/curl">curl</a>,
|
108
|
+
<a class="repo" href="/rails/rails">Ruby on Rails</a>,
|
109
|
+
<a class="repo" href="/ry/node">node.js</a>,
|
110
|
+
<a class="repo" href="/rentzsch/clicktoflash">ClickToFlash</a>,
|
111
|
+
<a class="repo" href="/erlang/otp">Erlang/OTP</a>,
|
112
|
+
<a class="repo" href="/cakephp/cakephp">CakePHP</a>,
|
113
|
+
<a class="repo" href="/antirez/redis">Redis</a>,
|
114
|
+
and <strong><a href="/repositories">many more</a></strong>
|
115
|
+
|
116
|
+
<input type="text" class="search" name="q" placeholder="Find any repository" autocapitalize="off" />
|
117
|
+
<input type="hidden" name="type" value="Everything" />
|
118
|
+
<input type="hidden" name="repo" value="" />
|
119
|
+
<input type="hidden" name="l" value="" />
|
120
|
+
<input type="hidden" name="p" value="1" />
|
121
|
+
</p>
|
122
|
+
</form> </div>
|
123
|
+
</div>
|
124
|
+
</div>
|
125
|
+
</div>
|
126
|
+
|
127
|
+
<div class="container">
|
128
|
+
<div class="logos">
|
129
|
+
|
130
|
+
<a href="/facebook"><img alt="facebook" height="35" src="https://a248.e.akamai.net/assets.github.com/images/modules/home/logos/facebook.png?1349517651" width="95" /></a>
|
131
|
+
<a href="/twitter"><img alt="Twitter" height="50" src="https://a248.e.akamai.net/assets.github.com/images/modules/home/logos/twitter.png?1340303965" /></a>
|
132
|
+
<a href="/WindowsAzure"><img alt="Microsoft" height="35" src="https://a248.e.akamai.net/assets.github.com/images/modules/home/logos/microsoft.png?1349517651" width="156" /></a>
|
133
|
+
<a href="/vmware"><img alt="VMWare" height="26" src="https://a248.e.akamai.net/assets.github.com/images/modules/home/logos/vmware.png?1349517651" width="118" /></a>
|
134
|
+
<a href="/jbossas"><img alt="Redhat" height="35" src="https://a248.e.akamai.net/assets.github.com/images/modules/home/logos/redhat.png?1349517651" width="114" /></a>
|
135
|
+
<a href="/linkedin"><img alt="LinkedIN" height="30" src="https://a248.e.akamai.net/assets.github.com/images/modules/home/logos/linkedin.png?1349517651" width="112" /></a>
|
136
|
+
<a href="/mozilla"><img alt="Mozilla" height="26" src="https://a248.e.akamai.net/assets.github.com/images/modules/home/logos/mozilla.png?1349517651" width="96" /></a>
|
137
|
+
</div>
|
138
|
+
|
139
|
+
<div class="definitions">
|
140
|
+
<div class="inner columns equacols">
|
141
|
+
<div class="column main">
|
142
|
+
<h2>git <em>/'ɡɪt/</em></h2>
|
143
|
+
<p>Git is an extremely fast, efficient, distributed version control system ideal for the collaborative development of software.</p>
|
144
|
+
</div><!-- /.column.left -->
|
145
|
+
|
146
|
+
<div class="column secondary">
|
147
|
+
<h2>git·hub <em>/'ɡɪtˌhʌb/</em></h2>
|
148
|
+
<p>GitHub is the best way to collaborate with others. Fork, send pull requests and manage all your <strong>public</strong> and <strong>private</strong> git repositories.</p>
|
149
|
+
</div><!-- /.column.right -->
|
150
|
+
</div><!-- /.columns.inner -->
|
151
|
+
</div><!-- /.definitions -->
|
152
|
+
|
153
|
+
<div class="signup-entice">
|
154
|
+
<a href="/plans" class="signup-button"><strong>Plans, Pricing and Signup</strong> Unlimited public repositories are <em>free!</em></a>
|
155
|
+
<p>Free public repositories, collaborator management, issue tracking, wikis, downloads, code review, graphs and much more…</p>
|
156
|
+
</div>
|
157
|
+
|
158
|
+
<div class="rule"></div>
|
159
|
+
|
160
|
+
<div class="columns fourcols feature-overview">
|
161
|
+
<div class="column leftmost">
|
162
|
+
<h3>Team management</h3>
|
163
|
+
<p><strong>30 seconds</strong> to give people access to code. No SSH key required. Activity feeds keep you updated on progress.</p>
|
164
|
+
<p><strong><a href="/features/projects/collaboration">More about collaboration</a></strong></p>
|
165
|
+
</div><!-- /.leftmost -->
|
166
|
+
<div class="column leftmid">
|
167
|
+
<h3>Code review</h3>
|
168
|
+
<p>Comment on changes, track issues, compare branches, send pull requests and merge forks.</p>
|
169
|
+
<p><strong><a href="/features/projects/codereview">More about code review</a></strong></p>
|
170
|
+
</div><!-- /.leftmid -->
|
171
|
+
<div class="column rightmid">
|
172
|
+
<h3>Reliable code hosting</h3>
|
173
|
+
<p>We spend all day and night making sure your repositories are <strong>secure</strong>, <strong>backed up</strong> and <strong>always available</strong>.</p>
|
174
|
+
<p><strong><a href="/features/hosting">More about code hosting</a></strong></p>
|
175
|
+
</div><!-- /.rightmid -->
|
176
|
+
<div class="column rightmost">
|
177
|
+
<h3>Open source collaboration</h3>
|
178
|
+
<p>Participate in the most important open source community in the world today—online or at one of our meetups.</p>
|
179
|
+
<p><strong><a href="/features/community">More about our community</a></strong></p>
|
180
|
+
</div><!-- /.rightmost -->
|
181
|
+
</div>
|
182
|
+
</div>
|
183
|
+
</div>
|
184
|
+
|
185
|
+
<div id="footer-push"></div><!-- hack for sticky footer -->
|
186
|
+
</div><!-- end of wrapper - hack for sticky footer -->
|
187
|
+
|
188
|
+
<!-- footer -->
|
189
|
+
<div id="footer">
|
190
|
+
<div class="container clearfix">
|
191
|
+
|
192
|
+
<dl class="footer_nav">
|
193
|
+
<dt>GitHub</dt>
|
194
|
+
<dd><a href="https://github.com/about">About us</a></dd>
|
195
|
+
<dd><a href="https://github.com/blog">Blog</a></dd>
|
196
|
+
<dd><a href="https://github.com/contact">Contact & support</a></dd>
|
197
|
+
<dd><a href="http://enterprise.github.com/">GitHub Enterprise</a></dd>
|
198
|
+
<dd><a href="http://status.github.com/">Site status</a></dd>
|
199
|
+
</dl>
|
200
|
+
|
201
|
+
<dl class="footer_nav">
|
202
|
+
<dt>Applications</dt>
|
203
|
+
<dd><a href="http://mac.github.com/">GitHub for Mac</a></dd>
|
204
|
+
<dd><a href="http://windows.github.com/">GitHub for Windows</a></dd>
|
205
|
+
<dd><a href="http://eclipse.github.com/">GitHub for Eclipse</a></dd>
|
206
|
+
<dd><a href="http://mobile.github.com/">GitHub mobile apps</a></dd>
|
207
|
+
</dl>
|
208
|
+
|
209
|
+
<dl class="footer_nav">
|
210
|
+
<dt>Services</dt>
|
211
|
+
<dd><a href="http://get.gaug.es/">Gauges: Web analytics</a></dd>
|
212
|
+
<dd><a href="http://speakerdeck.com">Speaker Deck: Presentations</a></dd>
|
213
|
+
<dd><a href="https://gist.github.com">Gist: Code snippets</a></dd>
|
214
|
+
<dd><a href="http://jobs.github.com/">Job board</a></dd>
|
215
|
+
</dl>
|
216
|
+
|
217
|
+
<dl class="footer_nav">
|
218
|
+
<dt>Documentation</dt>
|
219
|
+
<dd><a href="http://help.github.com/">GitHub Help</a></dd>
|
220
|
+
<dd><a href="http://developer.github.com/">Developer API</a></dd>
|
221
|
+
<dd><a href="http://github.github.com/github-flavored-markdown/">GitHub Flavored Markdown</a></dd>
|
222
|
+
<dd><a href="http://pages.github.com/">GitHub Pages</a></dd>
|
223
|
+
</dl>
|
224
|
+
|
225
|
+
<dl class="footer_nav">
|
226
|
+
<dt>More</dt>
|
227
|
+
<dd><a href="http://training.github.com/">Training</a></dd>
|
228
|
+
<dd><a href="https://github.com/edu">Students & teachers</a></dd>
|
229
|
+
<dd><a href="http://shop.github.com">The Shop</a></dd>
|
230
|
+
<dd><a href="http://octodex.github.com/">The Octodex</a></dd>
|
231
|
+
</dl>
|
232
|
+
|
233
|
+
<hr class="footer-divider">
|
234
|
+
|
235
|
+
|
236
|
+
<p class="right">© 2012 <span title="0.01397s from fe2.rs.github.com">GitHub</span> Inc. All rights reserved.</p>
|
237
|
+
<a class="left" href="https://github.com/">
|
238
|
+
<span class="mega-icon mega-icon-invertocat"></span>
|
239
|
+
</a>
|
240
|
+
<ul id="legal">
|
241
|
+
<li><a href="https://github.com/site/terms">Terms of Service</a></li>
|
242
|
+
<li><a href="https://github.com/site/privacy">Privacy</a></li>
|
243
|
+
<li><a href="https://github.com/security">Security</a></li>
|
244
|
+
</ul>
|
245
|
+
|
246
|
+
</div><!-- /.container -->
|
247
|
+
|
248
|
+
</div><!-- /.#footer -->
|
249
|
+
|
250
|
+
|
251
|
+
|
252
|
+
|
253
|
+
<div id="keyboard_shortcuts_pane" class="instapaper_ignore readability-extra" style="display:none">
|
254
|
+
<h2>Keyboard Shortcuts <small><a href="#" class="js-see-all-keyboard-shortcuts">(see all)</a></small></h2>
|
255
|
+
|
256
|
+
<div class="columns threecols">
|
257
|
+
<div class="column first">
|
258
|
+
<h3>Site wide shortcuts</h3>
|
259
|
+
<dl class="keyboard-mappings">
|
260
|
+
<dt>s</dt>
|
261
|
+
<dd>Focus command bar</dd>
|
262
|
+
</dl>
|
263
|
+
<dl class="keyboard-mappings">
|
264
|
+
<dt>?</dt>
|
265
|
+
<dd>Bring up this help dialog</dd>
|
266
|
+
</dl>
|
267
|
+
</div><!-- /.column.first -->
|
268
|
+
|
269
|
+
<div class="column middle" style='display:none'>
|
270
|
+
<h3>Commit list</h3>
|
271
|
+
<dl class="keyboard-mappings">
|
272
|
+
<dt>j</dt>
|
273
|
+
<dd>Move selection down</dd>
|
274
|
+
</dl>
|
275
|
+
<dl class="keyboard-mappings">
|
276
|
+
<dt>k</dt>
|
277
|
+
<dd>Move selection up</dd>
|
278
|
+
</dl>
|
279
|
+
<dl class="keyboard-mappings">
|
280
|
+
<dt>c <em>or</em> o <em>or</em> enter</dt>
|
281
|
+
<dd>Open commit</dd>
|
282
|
+
</dl>
|
283
|
+
<dl class="keyboard-mappings">
|
284
|
+
<dt>y</dt>
|
285
|
+
<dd>Expand URL to its canonical form</dd>
|
286
|
+
</dl>
|
287
|
+
</div><!-- /.column.first -->
|
288
|
+
|
289
|
+
<div class="column last js-hidden-pane" style='display:none'>
|
290
|
+
<h3>Pull request list</h3>
|
291
|
+
<dl class="keyboard-mappings">
|
292
|
+
<dt>j</dt>
|
293
|
+
<dd>Move selection down</dd>
|
294
|
+
</dl>
|
295
|
+
<dl class="keyboard-mappings">
|
296
|
+
<dt>k</dt>
|
297
|
+
<dd>Move selection up</dd>
|
298
|
+
</dl>
|
299
|
+
<dl class="keyboard-mappings">
|
300
|
+
<dt>o <em>or</em> enter</dt>
|
301
|
+
<dd>Open issue</dd>
|
302
|
+
</dl>
|
303
|
+
<dl class="keyboard-mappings">
|
304
|
+
<dt><span class="platform-mac">⌘</span><span class="platform-other">ctrl</span> <em>+</em> enter</dt>
|
305
|
+
<dd>Submit comment</dd>
|
306
|
+
</dl>
|
307
|
+
<dl class="keyboard-mappings">
|
308
|
+
<dt><span class="platform-mac">⌘</span><span class="platform-other">ctrl</span> <em>+</em> shift p</dt>
|
309
|
+
<dd>Preview comment</dd>
|
310
|
+
</dl>
|
311
|
+
</div><!-- /.columns.last -->
|
312
|
+
|
313
|
+
</div><!-- /.columns.equacols -->
|
314
|
+
|
315
|
+
<div class="js-hidden-pane" style='display:none'>
|
316
|
+
<div class="rule"></div>
|
317
|
+
|
318
|
+
<h3>Issues</h3>
|
319
|
+
|
320
|
+
<div class="columns threecols">
|
321
|
+
<div class="column first">
|
322
|
+
<dl class="keyboard-mappings">
|
323
|
+
<dt>j</dt>
|
324
|
+
<dd>Move selection down</dd>
|
325
|
+
</dl>
|
326
|
+
<dl class="keyboard-mappings">
|
327
|
+
<dt>k</dt>
|
328
|
+
<dd>Move selection up</dd>
|
329
|
+
</dl>
|
330
|
+
<dl class="keyboard-mappings">
|
331
|
+
<dt>x</dt>
|
332
|
+
<dd>Toggle selection</dd>
|
333
|
+
</dl>
|
334
|
+
<dl class="keyboard-mappings">
|
335
|
+
<dt>o <em>or</em> enter</dt>
|
336
|
+
<dd>Open issue</dd>
|
337
|
+
</dl>
|
338
|
+
<dl class="keyboard-mappings">
|
339
|
+
<dt><span class="platform-mac">⌘</span><span class="platform-other">ctrl</span> <em>+</em> enter</dt>
|
340
|
+
<dd>Submit comment</dd>
|
341
|
+
</dl>
|
342
|
+
<dl class="keyboard-mappings">
|
343
|
+
<dt><span class="platform-mac">⌘</span><span class="platform-other">ctrl</span> <em>+</em> shift p</dt>
|
344
|
+
<dd>Preview comment</dd>
|
345
|
+
</dl>
|
346
|
+
</div><!-- /.column.first -->
|
347
|
+
<div class="column last">
|
348
|
+
<dl class="keyboard-mappings">
|
349
|
+
<dt>c</dt>
|
350
|
+
<dd>Create issue</dd>
|
351
|
+
</dl>
|
352
|
+
<dl class="keyboard-mappings">
|
353
|
+
<dt>l</dt>
|
354
|
+
<dd>Create label</dd>
|
355
|
+
</dl>
|
356
|
+
<dl class="keyboard-mappings">
|
357
|
+
<dt>i</dt>
|
358
|
+
<dd>Back to inbox</dd>
|
359
|
+
</dl>
|
360
|
+
<dl class="keyboard-mappings">
|
361
|
+
<dt>u</dt>
|
362
|
+
<dd>Back to issues</dd>
|
363
|
+
</dl>
|
364
|
+
<dl class="keyboard-mappings">
|
365
|
+
<dt>/</dt>
|
366
|
+
<dd>Focus issues search</dd>
|
367
|
+
</dl>
|
368
|
+
</div>
|
369
|
+
</div>
|
370
|
+
</div>
|
371
|
+
|
372
|
+
<div class="js-hidden-pane" style='display:none'>
|
373
|
+
<div class="rule"></div>
|
374
|
+
|
375
|
+
<h3>Issues Dashboard</h3>
|
376
|
+
|
377
|
+
<div class="columns threecols">
|
378
|
+
<div class="column first">
|
379
|
+
<dl class="keyboard-mappings">
|
380
|
+
<dt>j</dt>
|
381
|
+
<dd>Move selection down</dd>
|
382
|
+
</dl>
|
383
|
+
<dl class="keyboard-mappings">
|
384
|
+
<dt>k</dt>
|
385
|
+
<dd>Move selection up</dd>
|
386
|
+
</dl>
|
387
|
+
<dl class="keyboard-mappings">
|
388
|
+
<dt>o <em>or</em> enter</dt>
|
389
|
+
<dd>Open issue</dd>
|
390
|
+
</dl>
|
391
|
+
</div><!-- /.column.first -->
|
392
|
+
</div>
|
393
|
+
</div>
|
394
|
+
|
395
|
+
<div class="js-hidden-pane" style='display:none'>
|
396
|
+
<div class="rule"></div>
|
397
|
+
|
398
|
+
<h3>Network Graph</h3>
|
399
|
+
<div class="columns equacols">
|
400
|
+
<div class="column first">
|
401
|
+
<dl class="keyboard-mappings">
|
402
|
+
<dt><span class="badmono">←</span> <em>or</em> h</dt>
|
403
|
+
<dd>Scroll left</dd>
|
404
|
+
</dl>
|
405
|
+
<dl class="keyboard-mappings">
|
406
|
+
<dt><span class="badmono">→</span> <em>or</em> l</dt>
|
407
|
+
<dd>Scroll right</dd>
|
408
|
+
</dl>
|
409
|
+
<dl class="keyboard-mappings">
|
410
|
+
<dt><span class="badmono">↑</span> <em>or</em> k</dt>
|
411
|
+
<dd>Scroll up</dd>
|
412
|
+
</dl>
|
413
|
+
<dl class="keyboard-mappings">
|
414
|
+
<dt><span class="badmono">↓</span> <em>or</em> j</dt>
|
415
|
+
<dd>Scroll down</dd>
|
416
|
+
</dl>
|
417
|
+
<dl class="keyboard-mappings">
|
418
|
+
<dt>t</dt>
|
419
|
+
<dd>Toggle visibility of head labels</dd>
|
420
|
+
</dl>
|
421
|
+
</div><!-- /.column.first -->
|
422
|
+
<div class="column last">
|
423
|
+
<dl class="keyboard-mappings">
|
424
|
+
<dt>shift <span class="badmono">←</span> <em>or</em> shift h</dt>
|
425
|
+
<dd>Scroll all the way left</dd>
|
426
|
+
</dl>
|
427
|
+
<dl class="keyboard-mappings">
|
428
|
+
<dt>shift <span class="badmono">→</span> <em>or</em> shift l</dt>
|
429
|
+
<dd>Scroll all the way right</dd>
|
430
|
+
</dl>
|
431
|
+
<dl class="keyboard-mappings">
|
432
|
+
<dt>shift <span class="badmono">↑</span> <em>or</em> shift k</dt>
|
433
|
+
<dd>Scroll all the way up</dd>
|
434
|
+
</dl>
|
435
|
+
<dl class="keyboard-mappings">
|
436
|
+
<dt>shift <span class="badmono">↓</span> <em>or</em> shift j</dt>
|
437
|
+
<dd>Scroll all the way down</dd>
|
438
|
+
</dl>
|
439
|
+
</div><!-- /.column.last -->
|
440
|
+
</div>
|
441
|
+
</div>
|
442
|
+
|
443
|
+
<div class="js-hidden-pane" style='display:none'>
|
444
|
+
<div class="rule"></div>
|
445
|
+
<div class="columns threecols">
|
446
|
+
<div class="column first js-hidden-pane" style='display:none'>
|
447
|
+
<h3>Source Code Browsing</h3>
|
448
|
+
<dl class="keyboard-mappings">
|
449
|
+
<dt>t</dt>
|
450
|
+
<dd>Activates the file finder</dd>
|
451
|
+
</dl>
|
452
|
+
<dl class="keyboard-mappings">
|
453
|
+
<dt>l</dt>
|
454
|
+
<dd>Jump to line</dd>
|
455
|
+
</dl>
|
456
|
+
<dl class="keyboard-mappings">
|
457
|
+
<dt>w</dt>
|
458
|
+
<dd>Switch branch/tag</dd>
|
459
|
+
</dl>
|
460
|
+
<dl class="keyboard-mappings">
|
461
|
+
<dt>y</dt>
|
462
|
+
<dd>Expand URL to its canonical form</dd>
|
463
|
+
</dl>
|
464
|
+
</div>
|
465
|
+
</div>
|
466
|
+
</div>
|
467
|
+
|
468
|
+
<div class="js-hidden-pane" style='display:none'>
|
469
|
+
<div class="rule"></div>
|
470
|
+
<div class="columns threecols">
|
471
|
+
<div class="column first">
|
472
|
+
<h3>Browsing Commits</h3>
|
473
|
+
<dl class="keyboard-mappings">
|
474
|
+
<dt><span class="platform-mac">⌘</span><span class="platform-other">ctrl</span> <em>+</em> enter</dt>
|
475
|
+
<dd>Submit comment</dd>
|
476
|
+
</dl>
|
477
|
+
<dl class="keyboard-mappings">
|
478
|
+
<dt>escape</dt>
|
479
|
+
<dd>Close form</dd>
|
480
|
+
</dl>
|
481
|
+
<dl class="keyboard-mappings">
|
482
|
+
<dt>p</dt>
|
483
|
+
<dd>Parent commit</dd>
|
484
|
+
</dl>
|
485
|
+
<dl class="keyboard-mappings">
|
486
|
+
<dt>o</dt>
|
487
|
+
<dd>Other parent commit</dd>
|
488
|
+
</dl>
|
489
|
+
</div>
|
490
|
+
</div>
|
491
|
+
</div>
|
492
|
+
|
493
|
+
<div class="js-hidden-pane" style='display:none'>
|
494
|
+
<div class="rule"></div>
|
495
|
+
<h3>Notifications</h3>
|
496
|
+
|
497
|
+
<div class="columns threecols">
|
498
|
+
<div class="column first">
|
499
|
+
<dl class="keyboard-mappings">
|
500
|
+
<dt>j</dt>
|
501
|
+
<dd>Move selection down</dd>
|
502
|
+
</dl>
|
503
|
+
<dl class="keyboard-mappings">
|
504
|
+
<dt>k</dt>
|
505
|
+
<dd>Move selection up</dd>
|
506
|
+
</dl>
|
507
|
+
<dl class="keyboard-mappings">
|
508
|
+
<dt>o <em>or</em> enter</dt>
|
509
|
+
<dd>Open notification</dd>
|
510
|
+
</dl>
|
511
|
+
</div><!-- /.column.first -->
|
512
|
+
|
513
|
+
<div class="column second">
|
514
|
+
<dl class="keyboard-mappings">
|
515
|
+
<dt>e <em>or</em> shift i <em>or</em> y</dt>
|
516
|
+
<dd>Mark as read</dd>
|
517
|
+
</dl>
|
518
|
+
<dl class="keyboard-mappings">
|
519
|
+
<dt>shift m</dt>
|
520
|
+
<dd>Mute thread</dd>
|
521
|
+
</dl>
|
522
|
+
</div><!-- /.column.first -->
|
523
|
+
</div>
|
524
|
+
</div>
|
525
|
+
|
526
|
+
</div>
|
527
|
+
|
528
|
+
<div id="markdown-help" class="instapaper_ignore readability-extra">
|
529
|
+
<h2>Markdown Cheat Sheet</h2>
|
530
|
+
|
531
|
+
<div class="cheatsheet-content">
|
532
|
+
|
533
|
+
<div class="mod">
|
534
|
+
<div class="col">
|
535
|
+
<h3>Format Text</h3>
|
536
|
+
<p>Headers</p>
|
537
|
+
<pre>
|
538
|
+
# This is an <h1> tag
|
539
|
+
## This is an <h2> tag
|
540
|
+
###### This is an <h6> tag</pre>
|
541
|
+
<p>Text styles</p>
|
542
|
+
<pre>
|
543
|
+
*This text will be italic*
|
544
|
+
_This will also be italic_
|
545
|
+
**This text will be bold**
|
546
|
+
__This will also be bold__
|
547
|
+
|
548
|
+
*You **can** combine them*
|
549
|
+
</pre>
|
550
|
+
</div>
|
551
|
+
<div class="col">
|
552
|
+
<h3>Lists</h3>
|
553
|
+
<p>Unordered</p>
|
554
|
+
<pre>
|
555
|
+
* Item 1
|
556
|
+
* Item 2
|
557
|
+
* Item 2a
|
558
|
+
* Item 2b</pre>
|
559
|
+
<p>Ordered</p>
|
560
|
+
<pre>
|
561
|
+
1. Item 1
|
562
|
+
2. Item 2
|
563
|
+
3. Item 3
|
564
|
+
* Item 3a
|
565
|
+
* Item 3b</pre>
|
566
|
+
</div>
|
567
|
+
<div class="col">
|
568
|
+
<h3>Miscellaneous</h3>
|
569
|
+
<p>Images</p>
|
570
|
+
<pre>
|
571
|
+

|
572
|
+
Format: 
|
573
|
+
</pre>
|
574
|
+
<p>Links</p>
|
575
|
+
<pre>
|
576
|
+
http://github.com - automatic!
|
577
|
+
[GitHub](http://github.com)</pre>
|
578
|
+
<p>Blockquotes</p>
|
579
|
+
<pre>
|
580
|
+
As Kanye West said:
|
581
|
+
|
582
|
+
> We're living the future so
|
583
|
+
> the present is our past.
|
584
|
+
</pre>
|
585
|
+
</div>
|
586
|
+
</div>
|
587
|
+
<div class="rule"></div>
|
588
|
+
|
589
|
+
<h3>Code Examples in Markdown</h3>
|
590
|
+
<div class="col">
|
591
|
+
<p>Syntax highlighting with <a href="http://github.github.com/github-flavored-markdown/" title="GitHub Flavored Markdown" target="_blank">GFM</a></p>
|
592
|
+
<pre>
|
593
|
+
```javascript
|
594
|
+
function fancyAlert(arg) {
|
595
|
+
if(arg) {
|
596
|
+
$.facebox({div:'#foo'})
|
597
|
+
}
|
598
|
+
}
|
599
|
+
```</pre>
|
600
|
+
</div>
|
601
|
+
<div class="col">
|
602
|
+
<p>Or, indent your code 4 spaces</p>
|
603
|
+
<pre>
|
604
|
+
Here is a Python code example
|
605
|
+
without syntax highlighting:
|
606
|
+
|
607
|
+
def foo:
|
608
|
+
if not bar:
|
609
|
+
return true</pre>
|
610
|
+
</div>
|
611
|
+
<div class="col">
|
612
|
+
<p>Inline code for comments</p>
|
613
|
+
<pre>
|
614
|
+
I think you should use an
|
615
|
+
`<addr>` element here instead.</pre>
|
616
|
+
</div>
|
617
|
+
</div>
|
618
|
+
|
619
|
+
</div>
|
620
|
+
</div>
|
621
|
+
|
622
|
+
|
623
|
+
<div id="ajax-error-message" class="flash flash-error">
|
624
|
+
<span class="mini-icon mini-icon-exclamation"></span>
|
625
|
+
Something went wrong with that request. Please try again.
|
626
|
+
<a href="#" class="mini-icon mini-icon-remove-close ajax-error-dismiss"></a>
|
627
|
+
</div>
|
628
|
+
|
629
|
+
|
630
|
+
|
631
|
+
<span id='server_response_time' data-time='0.01494' data-host='fe2'></span>
|
632
|
+
|
633
|
+
</body>
|
634
|
+
</html>
|
data/spec/sitemap_spec.rb
CHANGED
@@ -14,6 +14,7 @@ describe SiteValidator::Sitemap do
|
|
14
14
|
@sitemap_for_exclusions_xml = SiteValidator::Sitemap.new('http://example.com/exclusions.xml')
|
15
15
|
@sitemap_for_absolute_urls = SiteValidator::Sitemap.new('http://markupvalidator.com/faqs')
|
16
16
|
@sitemap_international = SiteValidator::Sitemap.new('http://example.com/international')
|
17
|
+
@sitemap_with_safe_redirect = SiteValidator::Sitemap.new('http://github.com')
|
17
18
|
|
18
19
|
MarkupValidator.any_instance.stubs(:validate_uri).returns(stubbed_validator_results)
|
19
20
|
end
|
@@ -68,6 +69,14 @@ describe SiteValidator::Sitemap do
|
|
68
69
|
"http://guides.rubyonrails.org/v2.3.8/"]
|
69
70
|
end
|
70
71
|
|
72
|
+
it "should follow safe (http => https) redirects" do
|
73
|
+
expect {
|
74
|
+
@sitemap_with_safe_redirect.pages
|
75
|
+
}.to_not raise_error
|
76
|
+
|
77
|
+
@sitemap_with_safe_redirect.pages.length.should == 37
|
78
|
+
end
|
79
|
+
|
71
80
|
it "should get correct absolute links for internal pages" do
|
72
81
|
@sitemap_for_absolute_urls.pages.length.should == 9
|
73
82
|
@sitemap_for_absolute_urls.pages.map {|p| p.url}
|
data/spec/spec_helper.rb
CHANGED
@@ -17,6 +17,8 @@ FakeWeb.register_uri(:get, "http://example.com/exclusions", :response => open("#
|
|
17
17
|
FakeWeb.register_uri(:get, "http://example.com/exclusions.xml", :response => open("#{$samples_dir}/exclusions.xml").read)
|
18
18
|
FakeWeb.register_uri(:get, "http://markupvalidator.com/faqs", :response => open("#{$samples_dir}/markup_validator_faqs.response").read)
|
19
19
|
FakeWeb.register_uri(:get, "http://example.com/international", :response => open("#{$samples_dir}/international.response").read)
|
20
|
+
FakeWeb.register_uri(:get, "http://github.com", :response => open("#{$samples_dir}/http_github.response").read)
|
21
|
+
FakeWeb.register_uri(:get, "https://github.com", :response => open("#{$samples_dir}/https_github.response").read)
|
20
22
|
|
21
23
|
def message_text(message_id)
|
22
24
|
message_texts = {
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: site_validator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 19
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
|
+
- 1
|
8
9
|
- 0
|
9
|
-
|
10
|
-
version: 1.0.4
|
10
|
+
version: 1.1.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Jaime Iniesta
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2012-
|
18
|
+
date: 2012-12-03 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: w3c_validators
|
@@ -49,25 +49,41 @@ dependencies:
|
|
49
49
|
type: :runtime
|
50
50
|
version_requirements: *id002
|
51
51
|
- !ruby/object:Gem::Dependency
|
52
|
-
name:
|
52
|
+
name: open_uri_redirections
|
53
53
|
prerelease: false
|
54
54
|
requirement: &id003 !ruby/object:Gem::Requirement
|
55
55
|
none: false
|
56
56
|
requirements:
|
57
|
-
- -
|
57
|
+
- - "="
|
58
58
|
- !ruby/object:Gem::Version
|
59
|
-
hash:
|
59
|
+
hash: 29
|
60
60
|
segments:
|
61
|
+
- 0
|
62
|
+
- 0
|
61
63
|
- 1
|
62
|
-
|
63
|
-
- 2
|
64
|
-
version: 1.10.2
|
64
|
+
version: 0.0.1
|
65
65
|
type: :runtime
|
66
66
|
version_requirements: *id003
|
67
67
|
- !ruby/object:Gem::Dependency
|
68
|
-
name:
|
68
|
+
name: metainspector
|
69
69
|
prerelease: false
|
70
70
|
requirement: &id004 !ruby/object:Gem::Requirement
|
71
|
+
none: false
|
72
|
+
requirements:
|
73
|
+
- - ~>
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
hash: 35
|
76
|
+
segments:
|
77
|
+
- 1
|
78
|
+
- 13
|
79
|
+
- 0
|
80
|
+
version: 1.13.0
|
81
|
+
type: :runtime
|
82
|
+
version_requirements: *id004
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rspec
|
85
|
+
prerelease: false
|
86
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
71
87
|
none: false
|
72
88
|
requirements:
|
73
89
|
- - ~>
|
@@ -79,11 +95,11 @@ dependencies:
|
|
79
95
|
- 0
|
80
96
|
version: 2.5.0
|
81
97
|
type: :development
|
82
|
-
version_requirements: *
|
98
|
+
version_requirements: *id005
|
83
99
|
- !ruby/object:Gem::Dependency
|
84
100
|
name: mocha
|
85
101
|
prerelease: false
|
86
|
-
requirement: &
|
102
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
87
103
|
none: false
|
88
104
|
requirements:
|
89
105
|
- - ~>
|
@@ -95,11 +111,11 @@ dependencies:
|
|
95
111
|
- 4
|
96
112
|
version: 0.11.4
|
97
113
|
type: :development
|
98
|
-
version_requirements: *
|
114
|
+
version_requirements: *id006
|
99
115
|
- !ruby/object:Gem::Dependency
|
100
116
|
name: rake
|
101
117
|
prerelease: false
|
102
|
-
requirement: &
|
118
|
+
requirement: &id007 !ruby/object:Gem::Requirement
|
103
119
|
none: false
|
104
120
|
requirements:
|
105
121
|
- - ~>
|
@@ -111,11 +127,11 @@ dependencies:
|
|
111
127
|
- 2
|
112
128
|
version: 0.9.2
|
113
129
|
type: :development
|
114
|
-
version_requirements: *
|
130
|
+
version_requirements: *id007
|
115
131
|
- !ruby/object:Gem::Dependency
|
116
132
|
name: fakeweb
|
117
133
|
prerelease: false
|
118
|
-
requirement: &
|
134
|
+
requirement: &id008 !ruby/object:Gem::Requirement
|
119
135
|
none: false
|
120
136
|
requirements:
|
121
137
|
- - ~>
|
@@ -127,7 +143,7 @@ dependencies:
|
|
127
143
|
- 0
|
128
144
|
version: 1.3.0
|
129
145
|
type: :development
|
130
|
-
version_requirements: *
|
146
|
+
version_requirements: *id008
|
131
147
|
description: command-line tool to validate the markup of a whole site against the W3C validator
|
132
148
|
email:
|
133
149
|
- jaimeiniesta@gmail.com
|
@@ -163,6 +179,8 @@ files:
|
|
163
179
|
- spec/samples/exclusions.html
|
164
180
|
- spec/samples/exclusions.xml
|
165
181
|
- spec/samples/guides.rubyonrails.org.html
|
182
|
+
- spec/samples/http_github.response
|
183
|
+
- spec/samples/https_github.response
|
166
184
|
- spec/samples/international.response
|
167
185
|
- spec/samples/markup_validator_faqs.response
|
168
186
|
- spec/samples/protocol_relative.html
|