validate-website 0.5.2 → 0.5.3

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/README.rdoc CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  == INSTALLATION
4
4
 
5
+ === Debian
6
+
7
+ aptitude install rubygems ruby1.8-dev libxslt-dev libxml2-dev
8
+
9
+ === RubyGems
10
+
5
11
  gem install validate-website
6
12
 
7
13
  == SYNOPSIS
@@ -33,6 +39,8 @@ found urls.
33
39
  Log not found url (Default: false)
34
40
  -v, --verbose
35
41
  Show detail of validator errors (Default: false).
42
+ -q, --quiet
43
+ Only report errors (Default: false).
36
44
  -d, --debug
37
45
  Show anemone log (Default: false)
38
46
  -h, --help
data/Rakefile CHANGED
@@ -7,7 +7,7 @@ require "rspec/core/rake_task" # RSpec 2.0
7
7
  # Globals
8
8
 
9
9
  PKG_NAME = 'validate-website'
10
- PKG_VERSION = '0.5.2'
10
+ PKG_VERSION = '0.5.3'
11
11
 
12
12
  PKG_FILES = ['README.rdoc', 'Rakefile', 'LICENSE']
13
13
  Find.find('bin/', 'lib/', 'man/', 'spec/') do |f|
@@ -23,18 +23,8 @@ end
23
23
  task :default => [:clean, :repackage]
24
24
 
25
25
  Rake::RDocTask.new do |rd|
26
- f = []
27
- require 'find'
28
- Find.find('lib/') do |file|
29
- # Skip hidden files (.svn/ directories and Vim swapfiles)
30
- if file.split(/\//).last =~ /^\./
31
- Find.prune
32
- else
33
- f << file if not FileTest.directory?(file)
34
- end
35
- end
36
- rd.rdoc_files.include(f)
37
- rd.options << '--all'
26
+ rd.main = "README.rdoc"
27
+ rd.rdoc_files.include("README.rdoc", "lib/**/*.rb")
38
28
  end
39
29
 
40
30
  Rake::PackageTask.new(PKG_NAME, PKG_VERSION) do |p|
data/bin/validate-website CHANGED
@@ -23,6 +23,7 @@ validate_website.crawl options[:site],
23
23
  :cookies => options[:cookies],
24
24
  :accept_cookies => options[:accept_cookies],
25
25
  :verbose => options[:debug],
26
- :error_verbose => options[:verbose]
26
+ :validate_verbose => options[:verbose],
27
+ :quiet => options[:quiet]
27
28
 
28
29
  exit(validate_website.exit_status)
@@ -34,6 +34,7 @@ class ValidateWebsite
34
34
  :accept_cookies => true,
35
35
  :verbose => false,
36
36
  :debug => false,
37
+ :quiet => false,
37
38
  }
38
39
  parse(args)
39
40
 
@@ -83,6 +84,10 @@ class ValidateWebsite
83
84
  "Show validator errors (Default: #{@options[:verbose]})") { |v|
84
85
  @options[:verbose] = v
85
86
  }
87
+ o.on("-q", "--quiet",
88
+ "Only report errors (Default: #{@options[:quiet]})") { |v|
89
+ @options[:quiet] = v
90
+ }
86
91
  o.on("-d", "--debug",
87
92
  "Show anemone log (Default: #{@options[:debug]})") { |v|
88
93
  @options[:debug] = v
@@ -95,6 +100,8 @@ class ValidateWebsite
95
100
  end
96
101
 
97
102
  def crawl(site, opts={})
103
+ puts note("Validating #{site}") if opts[:validate_verbose]
104
+
98
105
  @anemone = Anemone.crawl(site, opts) do |anemone|
99
106
  anemone.skip_links_like Regexp.new(opts[:exclude]) if opts[:exclude]
100
107
 
@@ -127,15 +134,18 @@ class ValidateWebsite
127
134
  if opts[:markup_validation]
128
135
  # validate html/html+xml
129
136
  if page.html? && page.fetched?
130
- print info(url)
131
137
  validator = Validator.new(page)
132
138
  msg = " well formed? %s" % validator.valid?
133
139
  if validator.valid?
134
- puts success(msg)
140
+ unless opts[:quiet]
141
+ print info(url)
142
+ puts success(msg)
143
+ end
135
144
  else
136
145
  @markup_error = true
146
+ print info(url)
137
147
  puts error(msg)
138
- puts error(validator.errors.join(", ")) if opts[:error_verbose]
148
+ puts error(validator.errors.join(", ")) if opts[:validate_verbose]
139
149
  to_file(url)
140
150
  end
141
151
  end
@@ -2,12 +2,12 @@
2
2
  .\" Title: validate-website
3
3
  .\" Author: [see the "AUTHOR" section]
4
4
  .\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
5
- .\" Date: 10/31/2010
5
+ .\" Date: 12/05/2010
6
6
  .\" Manual: \ \&
7
7
  .\" Source: \ \&
8
8
  .\" Language: English
9
9
  .\"
10
- .TH "VALIDATE\-WEBSITE" "1" "10/31/2010" "\ \&" "\ \&"
10
+ .TH "VALIDATE\-WEBSITE" "1" "12/05/2010" "\ \&" "\ \&"
11
11
  .\" -----------------------------------------------------------------
12
12
  .\" * Define some portability stuff
13
13
  .\" -----------------------------------------------------------------
@@ -84,6 +84,11 @@ Log not found url (Default: false)
84
84
  Show detail of validator errors (Default: false)\&.
85
85
  .RE
86
86
  .PP
87
+ \fB\-q\fR, \fB\-\-quiet\fR
88
+ .RS 4
89
+ Only report errors (Default: false)\&.
90
+ .RE
91
+ .PP
87
92
  \fB\-d\fR, \fB\-\-debug\fR
88
93
  .RS 4
89
94
  Show anemone log (Default: false)
@@ -0,0 +1,528 @@
1
+ <!DOCTYPE html>
2
+ <html lang="fr">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <title>Accueil - LinuxFr.org</title>
6
+ <link href="/stylesheets/application.css?1291158931" media="screen, projection" rel="stylesheet" type="text/css" />
7
+ <link href="/stylesheets/print.css?1291158931" media="print" rel="stylesheet" type="text/css" />
8
+ <meta content="L'actualité de Linux et du Logiciel Libre" name="description">
9
+ <meta content="Linux, Logiciel, Libre, GNU, Free, Software, Actualité, Forum, Communauté" name="keywords">
10
+ <link href="/news.atom" rel="alternate" title="S'abonner au flux Atom des dépêches" type="application/atom+xml" />
11
+ </head>
12
+
13
+ <body class="js-off alpha" id="home-index">
14
+ <div id="top">
15
+ </div>
16
+ <nav id="site">
17
+ <div class="go_to_content">
18
+ <a href="#contents">Aller au contenu</a>
19
+ <a href="#sidebar">Aller au menu</a>
20
+ </div>
21
+ <ul>
22
+ <li><a href="/">Accueil</a></li>
23
+ <li><a href="/news">Dépêches</a></li>
24
+ <li><a href="/journaux">Journaux</a></li>
25
+ <li><a href="/forums">Forums</a></li>
26
+ <li><a href="/sondages">Sondages</a></li>
27
+ <li><a href="/wiki">Wiki</a></li>
28
+ <li><a href="/suivi">Suivi</a></li>
29
+ <li><a href="/plan">Plan</a></li>
30
+ </ul>
31
+ <form accept-charset="UTF-8" action="/recherche" method="get" target="_blank"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="&#x2713;" /></div>
32
+ <label for="query" id="label_query">Recherche :</label>
33
+ <input id="query" name="q" type="search" placeholder="Entrer un mot-clé" />
34
+ <input id="search_submit" type="submit" value="Rechercher" />
35
+ </form>
36
+
37
+ </nav>
38
+
39
+ <aside id="sidebar">
40
+ <header id="branding">
41
+ <h1 style="background-image: url('/images/logos/linuxfr2_classic.png');" title="Le logo de LinuxFr.org"><a href="/">LinuxFr.org</a></h1>
42
+ </header>
43
+ <div class="login box">
44
+ <script type="text/javascript">
45
+ //<![CDATA[
46
+ if (location.protocol == 'http:') {
47
+ document.write('<a href="https://' + location.hostname + location.pathname + '"><img alt="Accès en clair (http)" class="access" src="/images/icones/lock-insecure.png" /></a>');
48
+ } else {
49
+ document.write('<img alt="Accès sécurisé (https)" class="access" src="/images/icones/lock-secure.png" />');
50
+ }
51
+ //]]>
52
+ </script>
53
+ <h1>Se connecter</h1>
54
+ <form accept-charset="UTF-8" action="/compte/connexion" class="new_account" id="new_account_sidebar" method="post"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="&#x2713;" /><input name="authenticity_token" type="hidden" value="KL/EfI8nXmRk2lk+8VpUaMfowwD6ruRdcnwoarGEX2g=" /></div>
55
+ <p>
56
+ <label for="account_login_sidebar">Identifiant</label>
57
+ <input id="account_login_sidebar" name="account[login]" required="required" size="30" type="text" />
58
+ </p>
59
+ <p>
60
+ <label for="account_password_sidebar">Mot de passe</label>
61
+ <input id="account_password_sidebar" name="account[password]" required="required" size="30" type="password" />
62
+ </p>
63
+ <p>
64
+ <input name="account[remember_me]" type="hidden" value="0" /><input id="account_remember_me_sidebar" name="account[remember_me]" type="checkbox" value="1" />
65
+ <label for="account_remember_me_sidebar">Connexion automatique</label>
66
+ </p>
67
+ <p>
68
+ <input id="account_submit_sidebar" name="commit" type="submit" value="Se connecter" />
69
+ </p>
70
+ </form>
71
+
72
+ <ul>
73
+ <li><a href="/compte/inscription">Pas de compte ? S'inscrire !</a></li>
74
+ <li><a href="/proposer-un-contenu">Proposer un contenu</a></li>
75
+ </ul>
76
+ </div>
77
+
78
+ </aside>
79
+
80
+ <section id="container">
81
+ <h1>Accueil</h1>
82
+ <section id="phare">
83
+ <article class="node score10 news">
84
+ <header>
85
+ <h1>
86
+ <a href="/sections/kernel">Kernel</a> <a href="/news/le-noyau-linux-2636-est-disponible">Le noyau Linux 2.6.36 est disponible</a>
87
+ </h1>
88
+ <div class="meta">
89
+ Posté par <a href="/users/patrickg" rel="author">patrick_g</a> le <time datetime="2010-10-21T11:37:04+02:00" pubdate="pubdate">21/10/2010 à 11:37</time>. Modéré par <a href="/users/patrickg">patrick_g</a>.
90
+ <div class="tags">
91
+ Tags :
92
+ <ul class="tag_cloud">
93
+ <li><a href="/tags/kernel/public" rel="tag">kernel</a></li>
94
+ <li><a href="/tags/plop/public" rel="tag">plop</a></li>
95
+ <li><a href="/tags/noyau/public" rel="tag">noyau</a></li>
96
+ <li><a href="/tags/torvalds/public" rel="tag">torvalds</a></li>
97
+ <li><a href="/tags/apparmor/public" rel="tag">apparmor</a></li>
98
+ <li><a href="/tags/linux/public" rel="tag">linux</a></li>
99
+ <li><a href="/tags/moulefr/public" rel="tag">moulefr</a></li></ul>
100
+ </div>
101
+ </div>
102
+ </header>
103
+ <figure class="score">
104
+ 111
105
+ </figure>
106
+ <figure class="image">
107
+ <a href="/sections/kernel"><img alt="Kernel" src="/images/sections/26.png?1289179073" /></a>
108
+ </figure>
109
+ <div class="content">
110
+ La sortie de la version stable 2.6.36 du noyau Linux <a href="http://lkml.org/lkml/2010/10/20/409">vient d'être annoncée</a> par Linus Torvalds. Le nouveau noyau est, comme d'habitude, téléchargeable sur les serveurs du site <a href="http://kernel.org/">kernel.org</a>.
111
+
112
+ Le détail des évolutions, nouveautés et prévisions est dans la seconde partie de la dépêche (qui est sous licence <a href="http://creativecommons.org/licenses/by-sa/3.0/deed.fr">CC BY-SA</a>).
113
+ <ul>
114
+ <li class="link" id="link_69374">
115
+ <img alt="[en]" src="/images/langs/en.png?1291158915" />
116
+ <a href="http://kernelnewbies.org/Linux_2_6_36" class="hit_counter" data-hit="69374" hreflang="en" title="http://kernelnewbies.org/Linux_2_6_36">Les nouveautés du noyau 2.6.36</a>
117
+ (80 clics)
118
+ </li>
119
+ <li class="link" id="link_69375">
120
+ <img alt="[en]" src="/images/langs/en.png?1291158915" />
121
+ <a href="http://lwn.net/Articles/398684/" class="hit_counter" data-hit="69375" hreflang="en" title="http://lwn.net/Articles/398684/">Le bilan des ajouts partie 1</a>
122
+ (29 clics)
123
+ </li>
124
+ <li class="link" id="link_69376">
125
+ <img alt="[en]" src="/images/langs/en.png?1291158915" />
126
+ <a href="http://lwn.net/Articles/399052/" class="hit_counter" data-hit="69376" hreflang="en" title="http://lwn.net/Articles/399052/">Le bilan des ajouts partie 2</a>
127
+ (15 clics)
128
+ </li>
129
+ <li class="link" id="link_69377">
130
+ <img alt="[en]" src="/images/langs/en.png?1291158915" />
131
+ <a href="http://lwn.net/Articles/400074/" class="hit_counter" data-hit="69377" hreflang="en" title="http://lwn.net/Articles/400074/">Le bilan des ajouts partie 3</a>
132
+ (12 clics)
133
+ </li>
134
+ <li class="link" id="link_69378">
135
+ <img alt="[en]" src="/images/langs/en.png?1291158915" />
136
+ <a href="http://linuxfoundation.org/collaborate/lwf" class="hit_counter" data-hit="69378" hreflang="en" title="http://linuxfoundation.org/collaborate/lwf">Les prévisions pour l'avenir de Linux</a>
137
+ (28 clics)
138
+ </li>
139
+
140
+ </ul>
141
+
142
+ </div>
143
+ <footer class="actions">
144
+ <a href="http://alpha.linuxfr.org/news/le-noyau-linux-2636-est-disponible">Lire la suite</a> (99 commentaires).
145
+
146
+
147
+ </footer>
148
+ </article>
149
+
150
+ </section>
151
+ <aside class="banner">
152
+ Ce site est encore en <a href="http://linuxfr.org/2010/11/09/27559.html">beta</a>. Nous vous encourageons à remonter les bugs sur le <a href="https://github.com/nono/linuxfr.org">tracker github</a>.
153
+ </aside>
154
+ <nav class="toolbox"><div class="new_content"><a href="/news/nouveau">Proposer une dépêche</a></div><div class="order_navbar">
155
+ Trier par :
156
+ <ul>
157
+ <li><a href="/?order=created_at">date</a></li>
158
+ <li><a href="/?order=score">note</a></li>
159
+ <li>intérêt</li>
160
+ <li><a href="/?order=last_commented_at">dernier commentaire</a></li>
161
+ </ul>
162
+ </div>
163
+ <div class="pagination"><span class="previous_page disabled">&laquo; Précedent</span> <em>1</em> <a rel="next" href="/?page=2">2</a> <a href="/?page=3">3</a> <a href="/?page=4">4</a> <a href="/?page=5">5</a> <a href="/?page=6">6</a> <a href="/?page=7">7</a> <a href="/?page=8">8</a> <a href="/?page=9">9</a> <a href="/?page=10">10</a> <a href="/?page=11">11</a> <a href="/?page=12">12</a> <a href="/?page=13">13</a> <a href="/?page=14">14</a> <a href="/?page=15">15</a> <a href="/?page=16">16</a> <a href="/?page=17">17</a> <a href="/?page=18">18</a> <a href="/?page=19">19</a> <a href="/?page=20">20</a> <a href="/?page=21">21</a> <span class="gap">&hellip;</span> <a href="/?page=7246">7246</a> <a href="/?page=7247">7247</a> <a class="next_page" rel="next" href="/?page=2">Suivant &raquo;</a></div></nav><div id="contents">
164
+ <article class="node score0 post">
165
+ <header>
166
+ <h1>
167
+ <a href="/forums/templeetgeneral">Templeet.general</a> <a href="/forums/templeetgeneral/posts/test-forum">test forum</a>
168
+ </h1>
169
+ <div class="meta">
170
+ Posté par <a href="/users/montaigne" rel="author">Ontologia</a> le <time datetime="2010-12-01T12:04:53+01:00" pubdate="pubdate">01/12/2010 à 12:04</time>.
171
+ </div>
172
+ </header>
173
+ <figure class="score">
174
+ 1
175
+ </figure>
176
+ <div class="content">
177
+ <p>Je crain que cette section ne serve plus &#xE0; grand chose sur le nouveau site.</p>
178
+
179
+ <p>Test forum</p>
180
+ </div>
181
+ <footer class="actions">
182
+ <a href="http://alpha.linuxfr.org/forums/templeetgeneral/posts/test-forum">Lire la suite</a> (0 commentaire).
183
+
184
+
185
+ </footer>
186
+ </article>
187
+ <article class="node score0 diary">
188
+ <header>
189
+ <h1>
190
+ <a href="/users/moqui/journaux/the-lisp-revenge">Journal : The Lisp Revenge?</a>
191
+ </h1>
192
+ <div class="meta">
193
+ Posté par <a href="/users/moqui" rel="author">Miguel Moquillon</a> le <time datetime="2010-12-01T08:43:28+01:00" pubdate="pubdate">01/12/2010 à 08:43</time>.
194
+ <a href="http://creativecommons.org/licenses/by-sa/3.0/deed.fr" rel="license">Licence CC by-sa</a>
195
+ </div>
196
+ </header>
197
+ <figure class="score">
198
+ 2
199
+ </figure>
200
+ <figure class="image">
201
+ <img alt="Avatar de Miguel Moquillon" class="avatar" src="http://www.gravatar.com/avatar/171e0f8453ed2150b0ec145ad8cc82ff.jpg?size=100&amp;d=http%3A%2F%2Falpha.linuxfr.org%2Fimages%2Fdefault-avatar.png" />
202
+ </figure>
203
+ <div class="content">
204
+ <p>Pourquoi ce titre en anglais ? Parce que ce journal a trait &#xE0; l'article am&#xE9;ricain "Revenge of the Nerds" qui a &#xE9;t&#xE9; &#xE9;crit en 2002 par Paul Graham.</p>
205
+
206
+ <p>Pour ceux qui ne savent pas, Paul Graham est un hacker Lisp qui a r&#xE9;alis&#xE9;, en 1995, avec un autre hacker, la premi&#xE8;re application Web et ceci tout en Lisp ! (Attention, j'ai bien &#xE9;cris application et non site web.) Son application, ViaWeb, a &#xE9;t&#xE9; rachet&#xE9;e par Yahoo en 2002 et depuis<a href="http://alpha.linuxfr.org/users/moqui/journaux/the-lisp-revenge"> (...)</a></p>
207
+ </div>
208
+ <footer class="actions">
209
+ <a href="http://alpha.linuxfr.org/users/moqui/journaux/the-lisp-revenge">Lire la suite</a> (1 commentaire).
210
+
211
+
212
+ </footer>
213
+ </article>
214
+ <article class="node score0 diary">
215
+ <header>
216
+ <h1>
217
+ <a href="/users/tontonth/journaux/myspace">Journal : MySpace</a>
218
+ </h1>
219
+ <div class="meta">
220
+ Posté par <a href="/users/tontonth" rel="author">Thierry</a> le <time datetime="2010-12-01T04:52:54+01:00" pubdate="pubdate">01/12/2010 à 04:52</time>.
221
+ <a href="http://creativecommons.org/licenses/by-sa/3.0/deed.fr" rel="license">Licence CC by-sa</a>
222
+ </div>
223
+ </header>
224
+ <figure class="score">
225
+ 0
226
+ </figure>
227
+ <figure class="image">
228
+ <img alt="Avatar de Thierry" class="avatar" src="http://www.gravatar.com/avatar/50735c1e3716f342c0127e9e0516c9b2.jpg?size=100&amp;d=http%3A%2F%2Falpha.linuxfr.org%2Fimages%2Fdefault-avatar.png" />
229
+ </figure>
230
+ <div class="content">
231
+ <p>Vu qu'en ce moment, c'est la mode des "alternatives libres" aux kikoololeries du web 2.0, et qu'une <em>breaking news</em> vient de m'apprendre que myspace serait &#xE0; vendre, pour un prix quasiment d&#xE9;risoire (par rapport au prix des fesses de bouc), je vous propose d'&#xE9;couter &#xC7;A :</p>
232
+
233
+ <p> <a href="http://mutah.smeuh.org/sound/chroniques/20101109-chronique_de_mutah.mp3">http://mutah.smeuh.org/sound/chroniques/20101109-chronique_de_mutah.mp3</a></p>
234
+
235
+ <p>et ensuite de songer &#xE0; un rachat communautaire, dans le genre du rachat de Blender.</p>
236
+ </div>
237
+ <footer class="actions">
238
+ <a href="http://alpha.linuxfr.org/users/tontonth/journaux/myspace">Lire la suite</a> (0 commentaire).
239
+
240
+
241
+ </footer>
242
+ </article>
243
+ <article class="node score0 diary">
244
+ <header>
245
+ <h1>
246
+ <a href="/users/liberf0rce/journaux/le-pr%C3%A9c%C3%A9dent-journal">Journal : Le précédent journal...</a>
247
+ </h1>
248
+ <div class="meta">
249
+ Posté par <a href="/users/liberf0rce" rel="author">liberforce</a> le <time datetime="2010-12-01T01:52:03+01:00" pubdate="pubdate">01/12/2010 à 01:52</time>.
250
+ <a href="http://creativecommons.org/licenses/by-sa/3.0/deed.fr" rel="license">Licence CC by-sa</a>
251
+ </div>
252
+ </header>
253
+ <figure class="score">
254
+ 0
255
+ </figure>
256
+ <figure class="image">
257
+ <img alt="Avatar de liberforce" class="avatar" src="http://www.gravatar.com/avatar/acb432f238aca00de3374f66234aab88.jpg?size=100&amp;d=http%3A%2F%2Falpha.linuxfr.org%2Fimages%2Fdefault-avatar.png" />
258
+ </figure>
259
+ <div class="content">
260
+ <p>&#xC9;tait ma foi fort int&#xE9;ressant. Il manquait peut &#xEA;tre juste un wikilien vers <a href="http://fr.wikipedia.org/wiki/PierreTramo" title="Définition Wikipédia">PierreTramo</a> ou un peu de code C:</p>
261
+
262
+ <pre>
263
+ <code>void main (int argc, char **argv)
264
+ {
265
+ printf ("pouet !");
266
+ }
267
+ </code>
268
+ </pre>
269
+ </div>
270
+ <footer class="actions">
271
+ <a href="http://alpha.linuxfr.org/users/liberf0rce/journaux/le-pr%C3%A9c%C3%A9dent-journal">Lire la suite</a> (0 commentaire).
272
+
273
+
274
+ </footer>
275
+ </article>
276
+ <article class="node score0 diary">
277
+ <header>
278
+ <h1>
279
+ <a href="/users/liberf0rce/journaux/o-coin">Journal : \_o&lt; ~~~ COIN !</a>
280
+ </h1>
281
+ <div class="meta">
282
+ Posté par <a href="/users/liberf0rce" rel="author">liberforce</a> le <time datetime="2010-12-01T01:43:19+01:00" pubdate="pubdate">01/12/2010 à 01:43</time>.
283
+ <a href="http://creativecommons.org/licenses/by-sa/3.0/deed.fr" rel="license">Licence CC by-sa</a>
284
+ <div class="tags">
285
+ Tags :
286
+ <ul class="tag_cloud">
287
+ <li><a href="/tags/inutile/public" rel="tag">inutile</a></li></ul>
288
+ </div>
289
+ </div>
290
+ </header>
291
+ <figure class="score">
292
+ 0
293
+ </figure>
294
+ <figure class="image">
295
+ <img alt="Avatar de liberforce" class="avatar" src="http://www.gravatar.com/avatar/acb432f238aca00de3374f66234aab88.jpg?size=100&amp;d=http%3A%2F%2Falpha.linuxfr.org%2Fimages%2Fdefault-avatar.png" />
296
+ </figure>
297
+ <div class="content">
298
+ <p>Pan ! Pan !</p>
299
+ </div>
300
+ <footer class="actions">
301
+ <a href="http://alpha.linuxfr.org/users/liberf0rce/journaux/o-coin">Lire la suite</a> (0 commentaire).
302
+
303
+
304
+ </footer>
305
+ </article>
306
+ <article class="node score0 diary">
307
+ <header>
308
+ <h1>
309
+ <a href="/users/totolol/journaux/win-the-yes-needs-the-no-to-win-against-the-no">Journal : Win the yes needs the no to win against the no</a>
310
+ </h1>
311
+ <div class="meta">
312
+ Posté par <a href="/users/totolol" rel="author">totolol</a> le <time datetime="2010-12-01T00:28:45+01:00" pubdate="pubdate">01/12/2010 à 00:28</time>.
313
+ <a href="http://creativecommons.org/licenses/by-sa/3.0/deed.fr" rel="license">Licence CC by-sa</a>
314
+ </div>
315
+ </header>
316
+ <figure class="score">
317
+ 0
318
+ </figure>
319
+ <figure class="image">
320
+ <img alt="Avatar de totolol" class="avatar" src="http://www.gravatar.com/avatar/bd130f74755480fcae08be010d85a335.jpg?size=100&amp;d=http%3A%2F%2Falpha.linuxfr.org%2Fimages%2Fdefault-avatar.png" />
321
+ </figure>
322
+ <div class="content">
323
+ <p>Totolol is under attack !</p>
324
+ </div>
325
+ <footer class="actions">
326
+ <a href="http://alpha.linuxfr.org/users/totolol/journaux/win-the-yes-needs-the-no-to-win-against-the-no">Lire la suite</a> (0 commentaire).
327
+
328
+
329
+ </footer>
330
+ </article>
331
+ <article class="node score0 diary">
332
+ <header>
333
+ <h1>
334
+ <a href="/users/cram51/journaux/test-de-journal">Journal : test de journal</a>
335
+ </h1>
336
+ <div class="meta">
337
+ Posté par <a href="/users/cram51" rel="author">cram51</a> le <time datetime="2010-11-30T22:56:21+01:00" pubdate="pubdate">30/11/2010 à 22:56</time>.
338
+ <a href="http://creativecommons.org/licenses/by-sa/3.0/deed.fr" rel="license">Licence CC by-sa</a>
339
+ </div>
340
+ </header>
341
+ <figure class="score">
342
+ 1
343
+ </figure>
344
+ <figure class="image">
345
+ <img alt="Avatar de cram51" class="avatar" src="http://www.gravatar.com/avatar/597daf7e835406e9587e562a2d24574e.jpg?size=100&amp;d=http%3A%2F%2Falpha.linuxfr.org%2Fimages%2Fdefault-avatar.png" />
346
+ </figure>
347
+ <div class="content">
348
+ <p>journal sur les criquets z&#xE8;bres bleu sauvages de Papouasie/Nouvelle guin&#xE9;e.</p>
349
+
350
+ <p>Bein il sont <strong>sauvage</strong>, z&#xE9;br&#xE9;, bleu et habite en Papouasie/Nouvelle guin&#xE9;e.</p>
351
+ </div>
352
+ <footer class="actions">
353
+ <a href="http://alpha.linuxfr.org/users/cram51/journaux/test-de-journal">Lire la suite</a> (3 commentaires).
354
+
355
+
356
+ </footer>
357
+ </article>
358
+ <article class="node score0 diary">
359
+ <header>
360
+ <h1>
361
+ <a href="/users/nic0p/journaux/linvasion-des-re">Journal : L'invasion des Re:</a>
362
+ </h1>
363
+ <div class="meta">
364
+ Posté par <a href="/users/nic0p" rel="author">Nic0</a> le <time datetime="2010-11-30T18:31:47+01:00" pubdate="pubdate">30/11/2010 à 18:31</time>.
365
+ <a href="http://creativecommons.org/licenses/by-sa/3.0/deed.fr" rel="license">Licence CC by-sa</a>
366
+ <div class="tags">
367
+ Tags :
368
+ <ul class="tag_cloud">
369
+ <li><a href="/tags/alpha/public" rel="tag">alpha</a></li></ul>
370
+ </div>
371
+ </div>
372
+ </header>
373
+ <figure class="score">
374
+ 4
375
+ </figure>
376
+ <figure class="image">
377
+ <img alt="Avatar de Nic0" class="avatar" src="http://www.gravatar.com/avatar/182124548c34dccc9ca7f9e2325e60b8.jpg?size=100&amp;d=http%3A%2F%2Falpha.linuxfr.org%2Fimages%2Fdefault-avatar.png" />
378
+ </figure>
379
+ <div class="content">
380
+ <p>Une petite r&#xE9;flexion comme &#xE7;a, j'ai cru voir que les &#xAB; Re: &#xBB; s'accumule lors des r&#xE9;ponses aux commentaires, &#xE7;a ne risque pas de faire beaucoup lors de long threads ?</p>
381
+
382
+ <p>Autre petite truc, il n'y aura plus l'affichage de la page perso &#xE0; c&#xF4;t&#xE9; du nom de l'utilisateur ? dommage c'&#xE9;tait pratique pour acc&#xE9;der rapidement &#xE0; certain site des utilisateurs.</p>
383
+
384
+ <p>Bon courage et merci pour cette nouvelle version.</p>
385
+
386
+ <p>Sinon, c'&#xE9;tait surtout un petit journal jetable histoire de dire &#xAB;<a href="http://alpha.linuxfr.org/users/nic0p/journaux/linvasion-des-re"> (...)</a></p>
387
+ </div>
388
+ <footer class="actions">
389
+ <a href="http://alpha.linuxfr.org/users/nic0p/journaux/linvasion-des-re">Lire la suite</a> (1 commentaire).
390
+
391
+
392
+ </footer>
393
+ </article>
394
+ <article class="node score0 wikipage">
395
+ <header>
396
+ <h1>
397
+ <a href="/wiki">Wiki</a> <a href="/wiki/pierre-tramo--4">Pierre Tramo</a>
398
+ </h1>
399
+ <div class="meta">
400
+ Posté par <a href="/users/crottindecheval" rel="author">crottin_de_cheval</a> le <time datetime="2010-11-30T20:24:16+01:00" pubdate="pubdate">30/11/2010 à 20:24</time>.
401
+ <a href="http://creativecommons.org/licenses/by-sa/3.0/deed.fr" rel="license">Licence CC by-sa</a>
402
+ </div>
403
+ </header>
404
+ <figure class="score">
405
+ 1
406
+ </figure>
407
+ <div class="content">
408
+ <p>Développeur J2EE.</p>
409
+
410
+ </div>
411
+ <footer class="actions">
412
+ <a href="http://alpha.linuxfr.org/wiki/pierre-tramo--4">Lire la suite</a> (2 commentaires).
413
+
414
+
415
+ </footer>
416
+ </article>
417
+ <article class="node score0 wikipage">
418
+ <header>
419
+ <h1>
420
+ <a href="/wiki">Wiki</a> <a href="/wiki/coin">Coin</a>
421
+ </h1>
422
+ <div class="meta">
423
+ Posté par <a href="/users/nicolaso" rel="author">nicolas_o</a> le <time datetime="2010-11-30T18:21:21+01:00" pubdate="pubdate">30/11/2010 à 18:21</time>.
424
+ <a href="http://creativecommons.org/licenses/by-sa/3.0/deed.fr" rel="license">Licence CC by-sa</a>
425
+ </div>
426
+ </header>
427
+ <figure class="score">
428
+ 1
429
+ </figure>
430
+ <div class="content">
431
+ <p>pan!</p>
432
+
433
+ </div>
434
+ <footer class="actions">
435
+ <a href="http://alpha.linuxfr.org/wiki/coin">Lire la suite</a> (0 commentaire).
436
+
437
+
438
+ </footer>
439
+ </article>
440
+
441
+ </div>
442
+ <nav class="toolbox"><div class="pagination"><span class="previous_page disabled">&laquo; Précedent</span> <em>1</em> <a rel="next" href="/?page=2">2</a> <a href="/?page=3">3</a> <a href="/?page=4">4</a> <a href="/?page=5">5</a> <a href="/?page=6">6</a> <a href="/?page=7">7</a> <a href="/?page=8">8</a> <a href="/?page=9">9</a> <a href="/?page=10">10</a> <a href="/?page=11">11</a> <a href="/?page=12">12</a> <a href="/?page=13">13</a> <a href="/?page=14">14</a> <a href="/?page=15">15</a> <a href="/?page=16">16</a> <a href="/?page=17">17</a> <a href="/?page=18">18</a> <a href="/?page=19">19</a> <a href="/?page=20">20</a> <a href="/?page=21">21</a> <span class="gap">&hellip;</span> <a href="/?page=7246">7246</a> <a href="/?page=7247">7247</a> <a class="next_page" rel="next" href="/?page=2">Suivant &raquo;</a></div></nav>
443
+ <footer>
444
+ <p><a href="#top" class="scroll">Revenir en haut de page</a></p>
445
+ </footer>
446
+ </section>
447
+ <footer id="bigfooter">
448
+ <nav id="last_comments">
449
+ <h1>Derniers commentaires</h1>
450
+ <ul>
451
+ <li><a href="/nodes/83404/comments/1179653">Re: Par chez moi</a></li>
452
+ <li><a href="/nodes/83444/comments/1179652">Re: Re: Re: Un autre problème</a></li>
453
+ <li><a href="/nodes/83444/comments/1179651">Re: Re: Un autre problème</a></li>
454
+ <li><a href="/nodes/83457/comments/1179650">Garde cet article</a></li>
455
+ <li><a href="/nodes/83425/comments/1179649">La nouvelle version est moche</a></li>
456
+ <li><a href="/nodes/83452/comments/1179648">Re: Re: test de commentaires </a></li>
457
+ <li><a href="/nodes/83444/comments/1179647">Re: Re: Un autre problème</a></li>
458
+ <li><a href="/nodes/83444/comments/1179646">Re: Un autre problème</a></li>
459
+ <li><a href="/nodes/26374/comments/1179645">Re: Re: petite boulette</a></li>
460
+ <li><a href="/nodes/83452/comments/1179644">Re: test de commentaires </a></li>
461
+ <li><a href="/nodes/83452/comments/1179643">test de commentaires </a></li>
462
+ <li><a href="/nodes/83444/comments/1179642">Re: Un autre problème</a></li>
463
+ </ul>
464
+ </nav>
465
+ <nav id="popular_tags">
466
+ <h1>Tags populaires</h1>
467
+ <ul class="tag_cloud">
468
+ <li><a href="/tags/articles/public">articles</a></li>
469
+ <li><a href="/tags/logiciel/public">logiciel</a></li>
470
+ <li><a href="/tags/infos_locales/public">infos_locales</a></li>
471
+ <li><a href="/tags/internet/public">internet</a></li>
472
+ <li><a href="/tags/presse/public">presse</a></li>
473
+ <li><a href="/tags/développeur/public">développeur</a></li>
474
+ <li><a href="/tags/distribution/public">distribution</a></li>
475
+ <li><a href="/tags/sécurité/public">sécurité</a></li>
476
+ <li><a href="/tags/humeur/public">humeur</a></li>
477
+ <li><a href="/tags/interview/public">interview</a></li>
478
+ <li><a href="/tags/livre/public">livre</a></li>
479
+ <li><a href="/tags/cinéma/public">cinéma</a></li>
480
+ </ul>
481
+ </nav>
482
+ <section id="friends">
483
+ <h1>Sites amis</h1>
484
+ <ul>
485
+ <li><a href="http://www.april.org/">April</a></li>
486
+ <li><a href="http://www.agendadulibre.org/">Agenda du libre</a></li>
487
+ <li><a href="http://www.framasoft.net/">Framasoft</a></li>
488
+ <li><a href="http://lea-linux.org/">Léa-Linux</a></li>
489
+ <li><a href="http://fr.lolix.org/">Lolix</a></li>
490
+ <li><a href="http://www.jesuislibre.org/">JeSuisLibre</a></li>
491
+ <li><a href="http://www.editions-eyrolles.com/Recherche/?q=linux">Eyrolles</a></li>
492
+ <li><a href="http://www.gnulinuxmag.com/">LinuxMag</a></li>
493
+ <li><a href="http://www.venividilibri.org/">Veni, Vedi, Libri</a></li>
494
+ <li><a href="http://www.inlibroveritas.net/linuxfr.html">InLibroVeritas</a></li>
495
+ <li><a href="http://www.linuxgraphic.org/">LinuxGraphic</a></li>
496
+ <li><a href="http://www.editions-eni.fr/Livres/Systeme/.2_3a6222cf-b921-41f5-886c-c989f77ba994_a8799413-9165-4927-bb7e-36491cc3dcf2_1_0_0_0_d9bd8b5e-f324-473f-b1fc-b41b421c950f.html">Éditions ENI</a></li>
497
+ </ul>
498
+ </section>
499
+ <nav id="about_us">
500
+ <h1>À propos de LinuxFr.org</h1>
501
+ <ul>
502
+ <li><a href="/contact">Nous contacter</a></li>
503
+ <li><a href="/faire_un_don">Faire un don</a></li>
504
+ <li><a href="/team">Team LinuxFr.org</a></li>
505
+ <li><a href="/informations">Informations sur le site</a></li>
506
+ <li><a href="/aide">Foire aux questions</a></li>
507
+ <li><a href="/regles_de_moderation">Règles de modération</a></li>
508
+ <li><a href="/statistiques">Statistiques</a></li>
509
+ <li><a href="/code_source_du_site">Code source du site</a></li>
510
+ <li><a href="/plan">Plan du site</a></li>
511
+ </ul>
512
+ </nav>
513
+ </footer>
514
+
515
+ <script src="/javascripts/jquery-1.4.4.min.js?1291158915" type="text/javascript"></script>
516
+ <script src="/javascripts/jquery.nano.js?1291158915" type="text/javascript"></script>
517
+ <script src="/javascripts/jquery.autocomplete.js?1291158915" type="text/javascript"></script>
518
+ <script src="/javascripts/jquery.markitup.js?1291158915" type="text/javascript"></script>
519
+ <script src="/javascripts/jquery.hotkeys.js?1291158915" type="text/javascript"></script>
520
+ <script src="/javascripts/jquery.notice.js?1291158915" type="text/javascript"></script>
521
+ <script src="/javascripts/dlfp.chat.js?1291158915" type="text/javascript"></script>
522
+ <script src="/javascripts/dlfp.nested_fields.js?1291158915" type="text/javascript"></script>
523
+ <script src="/javascripts/dlfp.toolbar.js?1291158915" type="text/javascript"></script>
524
+ <script src="/javascripts/markitup-markdown.js?1291158915" type="text/javascript"></script>
525
+ <script src="/javascripts/rails.js?1291158915" type="text/javascript"></script>
526
+ <script src="/javascripts/application.js?1291158915" type="text/javascript"></script>
527
+ </body>
528
+ </html>
@@ -6,39 +6,60 @@ describe Validator do
6
6
  @http = Anemone::HTTP.new
7
7
  end
8
8
 
9
- it "xhtml1-strict should be valid" do
10
- name = 'xhtml1-strict'
11
- dtd_uri = 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'
12
- file = File.join('spec', 'data', "#{name}.html")
13
- page = FakePage.new(name,
14
- :body => open(file).read,
15
- :content_type => 'text/html')
16
- @xhtml1_page = @http.fetch_page(page.url)
17
- validator = Validator.new(@xhtml1_page)
18
- validator.dtd.system_id.should == dtd_uri
19
- validator.namespace.should == name
20
- validator.should be_valid
9
+ describe("xhtml1") do
10
+ it "xhtml1-strict should be valid" do
11
+ name = 'xhtml1-strict'
12
+ dtd_uri = 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'
13
+ file = File.join('spec', 'data', "#{name}.html")
14
+ page = FakePage.new(name,
15
+ :body => open(file).read,
16
+ :content_type => 'text/html')
17
+ @xhtml1_page = @http.fetch_page(page.url)
18
+ validator = Validator.new(@xhtml1_page)
19
+ validator.dtd.system_id.should == dtd_uri
20
+ validator.namespace.should == name
21
+ validator.should be_valid
22
+ end
21
23
  end
22
24
 
23
- it "html5 should be valid" do
24
- name = 'html5'
25
- file = File.join('spec', 'data', "#{name}.html")
26
- page = FakePage.new(name,
27
- :body => open(file).read,
28
- :content_type => 'text/html')
29
- @html5_page = @http.fetch_page(page.url)
30
- validator = Validator.new(@html5_page)
31
- validator.should be_valid
25
+ describe('html5') do
26
+ context('when valid') do
27
+ it "html5 should be valid" do
28
+ name = 'html5'
29
+ file = File.join('spec', 'data', "#{name}.html")
30
+ page = FakePage.new(name,
31
+ :body => open(file).read,
32
+ :content_type => 'text/html')
33
+ @html5_page = @http.fetch_page(page.url)
34
+ validator = Validator.new(@html5_page)
35
+ validator.should be_valid
36
+ end
37
+ end
38
+ context('should be valid') do
39
+ it "with DLFP" do
40
+ pending("update html5lib ruby ?")
41
+ name = 'html5'
42
+ file = File.join('spec', 'data', "#{name}-linuxfr.html")
43
+ page = FakePage.new(name,
44
+ :body => open(file).read,
45
+ :content_type => 'text/html')
46
+ @html5_page = @http.fetch_page(page.url)
47
+ validator = Validator.new(@html5_page)
48
+ validator.should be_valid
49
+ end
50
+ end
32
51
  end
33
52
 
34
- it 'should validate html4' do
35
- name = 'html4-strict'
36
- file = File.join('spec', 'data', "#{name}.html")
37
- page = FakePage.new(name,
38
- :body => open(file).read,
39
- :content_type => 'text/html')
40
- @html4_strict_page = @http.fetch_page(page.url)
41
- validator = Validator.new(@html4_strict_page)
42
- validator.should be_valid
53
+ describe('html4') do
54
+ it 'should validate html4' do
55
+ name = 'html4-strict'
56
+ file = File.join('spec', 'data', "#{name}.html")
57
+ page = FakePage.new(name,
58
+ :body => open(file).read,
59
+ :content_type => 'text/html')
60
+ @html4_strict_page = @http.fetch_page(page.url)
61
+ validator = Validator.new(@html4_strict_page)
62
+ validator.should be_valid
63
+ end
43
64
  end
44
65
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: validate-website
3
3
  version: !ruby/object:Gem::Version
4
- hash: 15
4
+ hash: 13
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 5
9
- - 2
10
- version: 0.5.2
9
+ - 3
10
+ version: 0.5.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Laurent Arnoud
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-11-05 00:00:00 +01:00
18
+ date: 2010-12-05 00:00:00 +01:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -206,6 +206,7 @@ files:
206
206
  - man/man1/validate-website.1
207
207
  - spec/validator_spec.rb
208
208
  - spec/spec_helper.rb
209
+ - spec/data/html5-linuxfr.html
209
210
  - spec/data/html4-strict.html
210
211
  - spec/data/html5.html
211
212
  - spec/data/xhtml1-strict.html