link-checker 0.5.2 → 0.6.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/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.2
1
+ 0.6.0
@@ -6,6 +6,7 @@ require 'trollop'
6
6
  options = Trollop::options do
7
7
  opt :no_warnings, "Don't warn about redirects to valid links"
8
8
  opt :warnings_are_errors, "Treat any warning as an error and produce an error return code"
9
+ opt :max_threads, "The maximum number of threads to start.", :default => 100
9
10
  end
10
11
 
11
12
  exit LinkChecker.new(:options => options, :target => ARGV[0]).check_uris
@@ -9,9 +9,16 @@ require 'anemone'
9
9
  class LinkChecker
10
10
 
11
11
  def initialize(params)
12
- @options = params[:options] || {}
12
+ @options = params[:options] || { }
13
13
  @target = params[:target] || './'
14
+
15
+ @html_files = []
16
+ @links = []
17
+ @errors = []
18
+ @warnings = []
14
19
  @return_code = 0
20
+
21
+ @options[:max_threads] ||= 100 # Only happens in testing.
15
22
  end
16
23
 
17
24
  def html_file_paths
@@ -43,7 +50,7 @@ class LinkChecker
43
50
  when Net::HTTPRedirection then
44
51
  return self.check_uri(URI(response['location']), true)
45
52
  else
46
- return Error.new(:uri_string => uri.to_s, :response => response)
53
+ return Error.new(:uri_string => uri.to_s, :error => response)
47
54
  end
48
55
  end
49
56
  end
@@ -59,6 +66,21 @@ class LinkChecker
59
66
  rescue => error
60
67
  puts "Error: #{error.to_s}".red
61
68
  end
69
+
70
+ # Report the final results.
71
+ unless @html_files.empty?
72
+ file_pluralized = (@html_files.size.eql? 1) ? 'file' : 'files'
73
+ link_pluralized = (@links.size.eql? 1) ? 'link' : 'links'
74
+ if @errors.empty?
75
+ puts ("Checked #{@links.size} #{link_pluralized} in #{@html_files.size} " +
76
+ "HTML #{file_pluralized} and found no errors.").green
77
+ else
78
+ error_pluralized = (@errors.size.eql? 1) ? 'error' : 'errors'
79
+ puts ("Checked #{@links.size} #{link_pluralized} in #{@html_files.size} " +
80
+ "HTML #{file_pluralized} and found #{@errors.size} #{error_pluralized}.").red
81
+ end
82
+ end
83
+
62
84
  @return_code
63
85
  end
64
86
 
@@ -69,6 +91,7 @@ class LinkChecker
69
91
  anemone.on_every_page do |crawled_page|
70
92
  raise StandardError.new(crawled_page.error) if crawled_page.error
71
93
  threads << start_link_check_thread(crawled_page.body, crawled_page.url.to_s)
94
+ @html_files << crawled_page
72
95
  end
73
96
  end
74
97
  threads.each{|thread| thread.join }
@@ -77,23 +100,33 @@ class LinkChecker
77
100
  def check_uris_in_files
78
101
  threads = []
79
102
  html_file_paths.each do |file|
103
+ wait_to_spawn_thread
80
104
  threads << start_link_check_thread(open(file), file)
105
+ @html_files << file
81
106
  end
82
107
  threads.each{|thread| thread.join }
83
108
  end
84
109
 
85
110
  def start_link_check_thread(source, source_name)
86
111
  Thread.new do
87
- results = self.class.external_link_uri_strings(source).map do |uri_string|
88
- begin
89
- uri = URI(uri_string)
90
- response = self.class.check_uri(uri)
91
- response.uri_string = uri_string
92
- response
93
- rescue => error
94
- Error.new(:error => error.to_s, :uri_string => uri_string)
112
+ threads = []
113
+ results = []
114
+ self.class.external_link_uri_strings(source).each do |uri_string|
115
+ Thread.exclusive { @links << source }
116
+ wait_to_spawn_thread
117
+ threads << Thread.new do
118
+ begin
119
+ uri = URI(uri_string)
120
+ response = self.class.check_uri(uri)
121
+ response.uri_string = uri_string
122
+ Thread.exclusive { results << response }
123
+ rescue => error
124
+ Thread.exclusive { results <<
125
+ Error.new(:error => error.to_s, :uri_string => uri_string) }
126
+ end
95
127
  end
96
128
  end
129
+ threads.each {|thread| thread.join }
97
130
  report_results(source_name, results)
98
131
  end
99
132
  end
@@ -108,6 +141,11 @@ class LinkChecker
108
141
  warnings = []
109
142
  end
110
143
  Thread.exclusive do
144
+ # Store the results in the LinkChecker instance.
145
+ # This must be thread-exclusive to avoid a race condition.
146
+ @errors = @errors.concat(errors)
147
+ @warnings = @warnings.concat(warnings)
148
+
111
149
  if errors.empty?
112
150
  message = "Checked: #{file}"
113
151
  if warnings.empty? || @options[:no_warnings]
@@ -164,4 +202,15 @@ class LinkChecker
164
202
  end
165
203
  end
166
204
 
205
+ private
206
+
207
+ def wait_to_spawn_thread
208
+ # Never spawn more than the specified maximum number of threads.
209
+ until Thread.list.select {|thread| thread.status == "run"}.count <
210
+ (1 + @options[:max_threads]) do
211
+ # Wait 5 milliseconds before trying again.
212
+ sleep 0.005
213
+ end
214
+ end
215
+
167
216
  end
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "link-checker"
8
- s.version = "0.5.2"
8
+ s.version = "0.6.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Ryan Alyn Porter"]
12
- s.date = "2012-10-07"
12
+ s.date = "2012-10-08"
13
13
  s.description = "Check the links in a web site before deploying, using Nokogiri."
14
14
  s.executables = ["check-links"]
15
15
  s.extra_rdoc_files = [
@@ -221,7 +221,8 @@ Gem::Specification.new do |s|
221
221
  "spec/test-site/public/assets/jwplayer/glow/sharing/shareScreen.png",
222
222
  "spec/test-site/public/assets/jwplayer/player.swf",
223
223
  "spec/test-site/public/atom.xml",
224
- "spec/test-site/public/blog/2012/10/02/a-list-of-links/index.html",
224
+ "spec/test-site/public/blog/2012/10/07/a-bad-link/index.html",
225
+ "spec/test-site/public/blog/2012/10/07/some-good-links/index.html",
225
226
  "spec/test-site/public/blog/archives/index.html",
226
227
  "spec/test-site/public/favicon.png",
227
228
  "spec/test-site/public/images/bird_32_gray.png",
@@ -304,7 +305,8 @@ Gem::Specification.new do |s|
304
305
  "spec/test-site/source/_layouts/default.html",
305
306
  "spec/test-site/source/_layouts/page.html",
306
307
  "spec/test-site/source/_layouts/post.html",
307
- "spec/test-site/source/_posts/2012-10-02-a-list-of-links.markdown",
308
+ "spec/test-site/source/_posts/2012-10-07-a-bad-link.markdown",
309
+ "spec/test-site/source/_posts/2012-10-07-some-good-links.markdown",
308
310
  "spec/test-site/source/assets/jwplayer/glow/controlbar/background.png",
309
311
  "spec/test-site/source/assets/jwplayer/glow/controlbar/blankButton.png",
310
312
  "spec/test-site/source/assets/jwplayer/glow/controlbar/divider.png",
@@ -11,18 +11,18 @@ describe LinkChecker do
11
11
 
12
12
  it "finds all of the HTML files in the target path." do
13
13
  files = LinkChecker.new(:target => @site_path).html_file_paths
14
- files.size.should == 3
14
+ files.size.should == 4
15
15
  end
16
16
 
17
17
  it "finds all of the external links in an HTML file." do
18
18
  links = LinkChecker.external_link_uri_strings(
19
- open('spec/test-site/public/blog/2012/10/02/a-list-of-links/index.html'))
19
+ open('spec/test-site/public/blog/2012/10/07/some-good-links/index.html'))
20
20
  links.size.should == 4
21
21
  end
22
22
 
23
23
  it "finds all of the external links in a string." do
24
24
  links = LinkChecker.external_link_uri_strings(
25
- open('spec/test-site/public/blog/2012/10/02/a-list-of-links/index.html').read)
25
+ open('spec/test-site/public/blog/2012/10/07/some-good-links/index.html').read)
26
26
  links.size.should == 4
27
27
  end
28
28
 
@@ -74,29 +74,36 @@ describe LinkChecker do
74
74
 
75
75
  before(:each) do
76
76
  LinkChecker.any_instance.stub(:html_file_paths) {
77
- ['spec/test-site/public/blog/2012/10/02/a-list-of-links/index.html'] }
77
+ ['spec/test-site/public/blog/2012/10/07/some-good-links/index.html'] }
78
78
  LinkChecker.stub(:external_link_uri_strings).and_return(
79
- ['http://something.com', 'http://something-else.com'])
79
+ (1..20).map{|i| "http://something-#{i}.com" } )
80
80
  end
81
81
 
82
82
  it "prints green when the links are good." do
83
83
  LinkChecker.stub(:check_uri) do
84
+ sleep 0.5 # Make LinkChecker#wait_to_spawn_thread wait a little.
84
85
  LinkChecker::Good.new(:uri_string => 'http://something.com')
85
86
  end
86
- $stdout.should_receive(:puts).with(/Checked/i).once
87
- LinkChecker.new(:target => @site_path).check_uris.should == 0 # Return value: good
87
+ $stdout.should_receive(:puts).with(/Checked\: .*\.html/).once
88
+ $stdout.should_receive(:puts).with(/Checked 20 links in 1 HTML file and found no errors/)
89
+ LinkChecker.new(
90
+ :target => @site_path,
91
+ # This is to make sure that the entire LinkChecker#wait_to_spawn_thread gets hit during testing.
92
+ :options => { :max_threads => 1 }
93
+ ).check_uris.should == 0 # Return value: good
88
94
  end
89
95
 
90
96
  it "prints red when the links are bad." do
91
97
  LinkChecker.stub(:check_uri) do
92
98
  LinkChecker::Error.new(
93
99
  :uri_string => 'http://something.com',
94
- :response => 'No.'
100
+ :error => 'No.'
95
101
  )
96
102
  end
97
- $stdout.should_receive(:puts).with(/Problem/i).once
98
- $stdout.should_receive(:puts).with(/Link/i).twice
99
- $stdout.should_receive(:puts).with(/Response/i).twice
103
+ $stdout.should_receive(:puts).with(/Problem\: .*\.html/).once
104
+ $stdout.should_receive(:puts).with(/Link\: http/).exactly(20).times
105
+ $stdout.should_receive(:puts).with(/Response/).exactly(20).times
106
+ $stdout.should_receive(:puts).with(/Checked 20 links in 1 HTML file and found 20 errors/)
100
107
  LinkChecker.new(:target => @site_path).check_uris.should == 1 # Return value: error
101
108
  end
102
109
 
@@ -107,9 +114,10 @@ describe LinkChecker do
107
114
  :final_desination => 'http://something-else.com'
108
115
  )
109
116
  end
110
- $stdout.should_receive(:puts).with(/Checked/i).once
111
- $stdout.should_receive(:puts).with(/Warning/i).twice
112
- $stdout.should_receive(:puts).with(/Redirected/i).twice
117
+ $stdout.should_receive(:puts).with(/Checked\: .*\.html/).once
118
+ $stdout.should_receive(:puts).with(/Warning/).exactly(20).times
119
+ $stdout.should_receive(:puts).with(/Redirected/).exactly(20).times
120
+ $stdout.should_receive(:puts).with(/Checked 20 links in 1 HTML file and found no errors/)
113
121
  LinkChecker.new(:target => @site_path).check_uris.should == 0 # Return value: good
114
122
  end
115
123
 
@@ -120,9 +128,10 @@ describe LinkChecker do
120
128
  :final_destination_uri_string => 'http://something-else.com'
121
129
  )
122
130
  end
123
- $stdout.should_receive(:puts).with(/Problem/i).once
124
- $stdout.should_receive(:puts).with(/Link/i).twice
125
- $stdout.should_receive(:puts).with(/Redirected/i).twice
131
+ $stdout.should_receive(:puts).with(/Problem\: .*\.html/).once
132
+ $stdout.should_receive(:puts).with(/Link/).exactly(20).times
133
+ $stdout.should_receive(:puts).with(/Redirected/).exactly(20).times
134
+ $stdout.should_receive(:puts).with(/Checked 20 links in 1 HTML file and found 20 errors/)
126
135
  LinkChecker.new(
127
136
  :target => @site_path,
128
137
  :options => { :warnings_are_errors => true }
@@ -136,9 +145,10 @@ describe LinkChecker do
136
145
  :final_destination_uri_string => 'http://something-else.com'
137
146
  )
138
147
  end
139
- $stdout.should_receive(:puts).with(/Checked/i).once
140
- $stdout.should_receive(:puts).with(/Warning/i).twice
141
- $stdout.should_receive(:puts).with(/Redirected/i).twice
148
+ $stdout.should_receive(:puts).with(/Checked\: .*\.html/).once
149
+ $stdout.should_receive(:puts).with(/Warning/).exactly(20).times
150
+ $stdout.should_receive(:puts).with(/Redirected/).exactly(20).times
151
+ $stdout.should_receive(:puts).with(/Checked 20 links in 1 HTML file and found no errors/)
142
152
  LinkChecker.new(:target => @site_path).check_uris.should == 0 # Return value: good
143
153
  end
144
154
 
@@ -149,9 +159,9 @@ describe LinkChecker do
149
159
  it "declares them to be bad." do
150
160
  LinkChecker.stub(:external_link_uri_strings).and_return(
151
161
  ['hQQp://!!!.com', 'hOOp://???.com'])
152
- $stdout.should_receive(:puts).with(/Problem/i).once
153
- $stdout.should_receive(:puts).with(/Link/i).twice
154
- $stdout.should_receive(:puts).with(/Response/i).twice
162
+ $stdout.should_receive(:puts).with(/Problem\: .*\.html/).once
163
+ $stdout.should_receive(:puts).with(/Link/).twice
164
+ $stdout.should_receive(:puts).with(/Response/).twice
155
165
  thread = LinkChecker.new(:target => @site_path).start_link_check_thread('<html></html>', 'source.html')
156
166
  thread.join
157
167
  end
@@ -164,7 +174,8 @@ describe LinkChecker do
164
174
  LinkChecker.stub(:check_uri) do
165
175
  LinkChecker::Good.new(:uri_string => 'http://something.com')
166
176
  end
167
- $stdout.should_receive(:puts).with(/Checked/i).once
177
+ $stdout.should_receive(:puts).with(/Checked\: http/).once
178
+ $stdout.should_receive(:puts).with(/Checked 1 link in 1 HTML file and found no errors/)
168
179
  LinkChecker.new(:target => 'http://some-target.com').check_uris
169
180
  end
170
181
 
@@ -4,7 +4,7 @@
4
4
  <title><![CDATA[My Octopress Blog]]></title>
5
5
  <link href="http://yoursite.com/atom.xml" rel="self"/>
6
6
  <link href="http://yoursite.com/"/>
7
- <updated>2012-10-02T22:10:18-04:00</updated>
7
+ <updated>2012-10-07T13:09:13-04:00</updated>
8
8
  <id>http://yoursite.com/</id>
9
9
  <author>
10
10
  <name><![CDATA[Your Name]]></name>
@@ -14,13 +14,22 @@
14
14
 
15
15
 
16
16
  <entry>
17
- <title type="html"><![CDATA[A list of links]]></title>
18
- <link href="http://yoursite.com/blog/2012/10/02/a-list-of-links/"/>
19
- <updated>2012-10-02T14:44:00-04:00</updated>
20
- <id>http://yoursite.com/blog/2012/10/02/a-list-of-links</id>
17
+ <title type="html"><![CDATA[Some good links]]></title>
18
+ <link href="http://yoursite.com/blog/2012/10/07/some-good-links/"/>
19
+ <updated>2012-10-07T00:00:00-04:00</updated>
20
+ <id>http://yoursite.com/blog/2012/10/07/some-good-links</id>
21
21
  <content type="html"><![CDATA[<p><a href="http://goodlink.com">A good link</a></p>
22
22
 
23
- <p><a href="http://brokenlink.com">A broken link</a></p>
23
+ <p><a href="http://anothergoodlink.com">Another good link</a></p>
24
+ ]]></content>
25
+ </entry>
26
+
27
+ <entry>
28
+ <title type="html"><![CDATA[Some good links]]></title>
29
+ <link href="http://yoursite.com/blog/2012/10/07/a-bad-link/"/>
30
+ <updated>2012-10-07T00:00:00-04:00</updated>
31
+ <id>http://yoursite.com/blog/2012/10/07/a-bad-link</id>
32
+ <content type="html"><![CDATA[<p><a href="http://badlink.com">A bad link</a></p>
24
33
  ]]></content>
25
34
  </entry>
26
35
 
@@ -0,0 +1,200 @@
1
+
2
+ <!DOCTYPE html>
3
+ <!--[if IEMobile 7 ]><html class="no-js iem7"><![endif]-->
4
+ <!--[if lt IE 9]><html class="no-js lte-ie8"><![endif]-->
5
+ <!--[if (gt IE 8)|(gt IEMobile 7)|!(IEMobile)|!(IE)]><!--><html class="no-js" lang="en"><!--<![endif]-->
6
+ <head>
7
+ <meta charset="utf-8">
8
+ <title>Some good links - My Octopress Blog</title>
9
+ <meta name="author" content="Your Name">
10
+
11
+
12
+ <meta name="description" content="A bad link
13
+ ">
14
+
15
+
16
+ <!-- http://t.co/dKP3o1e -->
17
+ <meta name="HandheldFriendly" content="True">
18
+ <meta name="MobileOptimized" content="320">
19
+ <meta name="viewport" content="width=device-width, initial-scale=1">
20
+
21
+
22
+ <link rel="canonical" href="http://yoursite.com/blog/2012/10/07/a-bad-link/">
23
+ <link href="/favicon.png" rel="icon">
24
+ <link href="/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css">
25
+ <script src="/javascripts/modernizr-2.0.js"></script>
26
+ <script src="/javascripts/ender.js"></script>
27
+ <script src="/javascripts/octopress.js" type="text/javascript"></script>
28
+ <link href="/atom.xml" rel="alternate" title="My Octopress Blog" type="application/atom+xml">
29
+ <!--Fonts from Google"s Web font directory at http://google.com/webfonts -->
30
+ <link href="http://fonts.googleapis.com/css?family=PT+Serif:regular,italic,bold,bolditalic" rel="stylesheet" type="text/css">
31
+ <link href="http://fonts.googleapis.com/css?family=PT+Sans:regular,italic,bold,bolditalic" rel="stylesheet" type="text/css">
32
+
33
+
34
+
35
+ </head>
36
+
37
+ <body >
38
+ <header role="banner"><hgroup>
39
+ <h1><a href="/">My Octopress Blog</a></h1>
40
+
41
+ <h2>A blogging framework for hackers.</h2>
42
+
43
+ </hgroup>
44
+
45
+ </header>
46
+ <nav role="navigation"><ul class="subscription" data-subscription="rss">
47
+ <li><a href="/atom.xml" rel="subscribe-rss" title="subscribe via RSS">RSS</a></li>
48
+
49
+ </ul>
50
+
51
+ <form action="http://google.com/search" method="get">
52
+ <fieldset role="search">
53
+ <input type="hidden" name="q" value="site:yoursite.com" />
54
+ <input class="search" type="text" name="q" results="0" placeholder="Search"/>
55
+ </fieldset>
56
+ </form>
57
+
58
+ <ul class="main-navigation">
59
+ <li><a href="/">Blog</a></li>
60
+ <li><a href="/blog/archives">Archives</a></li>
61
+ </ul>
62
+
63
+ </nav>
64
+ <div id="main">
65
+ <div id="content">
66
+ <div>
67
+ <article class="hentry" role="article">
68
+
69
+ <header>
70
+
71
+ <h1 class="entry-title">Some Good Links</h1>
72
+
73
+
74
+ <p class="meta">
75
+
76
+
77
+
78
+
79
+
80
+
81
+
82
+
83
+
84
+
85
+
86
+
87
+ <time datetime="2012-10-07T00:00:00-04:00" pubdate data-updated="true">Oct 7<span>th</span>, 2012</time>
88
+
89
+ </p>
90
+
91
+ </header>
92
+
93
+
94
+ <div class="entry-content"><p><a href="http://badlink.com">A bad link</a></p>
95
+ </div>
96
+
97
+
98
+ <footer>
99
+ <p class="meta">
100
+
101
+
102
+
103
+ <span class="byline author vcard">Posted by <span class="fn">Your Name</span></span>
104
+
105
+
106
+
107
+
108
+
109
+
110
+
111
+
112
+
113
+
114
+
115
+
116
+
117
+ <time datetime="2012-10-07T00:00:00-04:00" pubdate data-updated="true">Oct 7<span>th</span>, 2012</time>
118
+
119
+
120
+
121
+ </p>
122
+
123
+ <div class="sharing">
124
+
125
+ <a href="http://twitter.com/share" class="twitter-share-button" data-url="http://yoursite.com/blog/2012/10/07/a-bad-link/" data-via="" data-counturl="http://yoursite.com/blog/2012/10/07/a-bad-link/" >Tweet</a>
126
+
127
+
128
+
129
+ </div>
130
+
131
+
132
+ <p class="meta">
133
+
134
+
135
+ <a class="basic-alignment right" href="/blog/2012/10/07/some-good-links/" title="Next Post: Some good links">Some good links &raquo;</a>
136
+
137
+ </p>
138
+ </footer>
139
+ </article>
140
+
141
+ </div>
142
+
143
+ <aside class="sidebar">
144
+
145
+ <section>
146
+ <h1>Recent Posts</h1>
147
+ <ul id="recent_posts">
148
+
149
+ <li class="post">
150
+ <a href="/blog/2012/10/07/some-good-links/">Some good links</a>
151
+ </li>
152
+
153
+ <li class="post">
154
+ <a href="/blog/2012/10/07/a-bad-link/">Some good links</a>
155
+ </li>
156
+
157
+ </ul>
158
+ </section>
159
+
160
+
161
+
162
+
163
+
164
+
165
+
166
+ </aside>
167
+
168
+
169
+ </div>
170
+ </div>
171
+ <footer role="contentinfo"><p>
172
+ Copyright &copy; 2012 - Your Name -
173
+ <span class="credit">Powered by <a href="http://octopress.org">Octopress</a></span>
174
+ </p>
175
+
176
+ </footer>
177
+
178
+
179
+
180
+
181
+
182
+
183
+
184
+
185
+ <script type="text/javascript">
186
+ (function(){
187
+ var twitterWidgets = document.createElement('script');
188
+ twitterWidgets.type = 'text/javascript';
189
+ twitterWidgets.async = true;
190
+ twitterWidgets.src = 'http://platform.twitter.com/widgets.js';
191
+ document.getElementsByTagName('head')[0].appendChild(twitterWidgets);
192
+ })();
193
+ </script>
194
+
195
+
196
+
197
+
198
+
199
+ </body>
200
+ </html>
@@ -5,11 +5,11 @@
5
5
  <!--[if (gt IE 8)|(gt IEMobile 7)|!(IEMobile)|!(IE)]><!--><html class="no-js" lang="en"><!--<![endif]-->
6
6
  <head>
7
7
  <meta charset="utf-8">
8
- <title>A list of links - My Octopress Blog</title>
8
+ <title>Some good links - My Octopress Blog</title>
9
9
  <meta name="author" content="Your Name">
10
10
 
11
11
 
12
- <meta name="description" content="A good link A broken link
12
+ <meta name="description" content="A good link Another good link
13
13
  ">
14
14
 
15
15
 
@@ -19,7 +19,7 @@
19
19
  <meta name="viewport" content="width=device-width, initial-scale=1">
20
20
 
21
21
 
22
- <link rel="canonical" href="http://yoursite.com/blog/2012/10/02/a-list-of-links/">
22
+ <link rel="canonical" href="http://yoursite.com/blog/2012/10/07/some-good-links/">
23
23
  <link href="/favicon.png" rel="icon">
24
24
  <link href="/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css">
25
25
  <script src="/javascripts/modernizr-2.0.js"></script>
@@ -68,7 +68,7 @@
68
68
 
69
69
  <header>
70
70
 
71
- <h1 class="entry-title">A List of Links</h1>
71
+ <h1 class="entry-title">Some Good Links</h1>
72
72
 
73
73
 
74
74
  <p class="meta">
@@ -84,7 +84,7 @@
84
84
 
85
85
 
86
86
 
87
- <time datetime="2012-10-02T14:44:00-04:00" pubdate data-updated="true">Oct 2<span>nd</span>, 2012</time>
87
+ <time datetime="2012-10-07T00:00:00-04:00" pubdate data-updated="true">Oct 7<span>th</span>, 2012</time>
88
88
 
89
89
  </p>
90
90
 
@@ -93,7 +93,7 @@
93
93
 
94
94
  <div class="entry-content"><p><a href="http://goodlink.com">A good link</a></p>
95
95
 
96
- <p><a href="http://brokenlink.com">A broken link</a></p>
96
+ <p><a href="http://anothergoodlink.com">Another good link</a></p>
97
97
  </div>
98
98
 
99
99
 
@@ -116,7 +116,7 @@
116
116
 
117
117
 
118
118
 
119
- <time datetime="2012-10-02T14:44:00-04:00" pubdate data-updated="true">Oct 2<span>nd</span>, 2012</time>
119
+ <time datetime="2012-10-07T00:00:00-04:00" pubdate data-updated="true">Oct 7<span>th</span>, 2012</time>
120
120
 
121
121
 
122
122
 
@@ -124,7 +124,7 @@
124
124
 
125
125
  <div class="sharing">
126
126
 
127
- <a href="http://twitter.com/share" class="twitter-share-button" data-url="http://yoursite.com/blog/2012/10/02/a-list-of-links/" data-via="" data-counturl="http://yoursite.com/blog/2012/10/02/a-list-of-links/" >Tweet</a>
127
+ <a href="http://twitter.com/share" class="twitter-share-button" data-url="http://yoursite.com/blog/2012/10/07/some-good-links/" data-via="" data-counturl="http://yoursite.com/blog/2012/10/07/some-good-links/" >Tweet</a>
128
128
 
129
129
 
130
130
 
@@ -133,6 +133,8 @@
133
133
 
134
134
  <p class="meta">
135
135
 
136
+ <a class="basic-alignment left" href="/blog/2012/10/07/a-bad-link/" title="Previous Post: Some good links">&laquo; Some good links</a>
137
+
136
138
 
137
139
  </p>
138
140
  </footer>
@@ -147,7 +149,11 @@
147
149
  <ul id="recent_posts">
148
150
 
149
151
  <li class="post">
150
- <a href="/blog/2012/10/02/a-list-of-links/">A list of links</a>
152
+ <a href="/blog/2012/10/07/some-good-links/">Some good links</a>
153
+ </li>
154
+
155
+ <li class="post">
156
+ <a href="/blog/2012/10/07/a-bad-link/">Some good links</a>
151
157
  </li>
152
158
 
153
159
  </ul>
@@ -9,8 +9,9 @@
9
9
  <meta name="author" content="Your Name">
10
10
 
11
11
 
12
- <meta name="description" content=" Blog Archive 2012 A list of links
13
- Oct 02 2012 Recent Posts A list of links ">
12
+ <meta name="description" content=" Blog Archive 2012 Some good links
13
+ Oct 07 2012 Some good links
14
+ Oct 07 2012 Recent Posts Some good links Some good links ">
14
15
 
15
16
 
16
17
  <!-- http://t.co/dKP3o1e -->
@@ -80,8 +81,18 @@ Oct 02 2012 Recent Posts A list of links ">
80
81
 
81
82
  <article>
82
83
 
83
- <h1><a href="/blog/2012/10/02/a-list-of-links/">A list of links</a></h1>
84
- <time datetime="2012-10-02T14:44:00-04:00" pubdate><span class='month'>Oct</span> <span class='day'>02</span> <span class='year'>2012</span></time>
84
+ <h1><a href="/blog/2012/10/07/some-good-links/">Some good links</a></h1>
85
+ <time datetime="2012-10-07T00:00:00-04:00" pubdate><span class='month'>Oct</span> <span class='day'>07</span> <span class='year'>2012</span></time>
86
+
87
+
88
+ </article>
89
+
90
+
91
+
92
+ <article>
93
+
94
+ <h1><a href="/blog/2012/10/07/a-bad-link/">Some good links</a></h1>
95
+ <time datetime="2012-10-07T00:00:00-04:00" pubdate><span class='month'>Oct</span> <span class='day'>07</span> <span class='year'>2012</span></time>
85
96
 
86
97
 
87
98
  </article>
@@ -100,7 +111,11 @@ Oct 02 2012 Recent Posts A list of links ">
100
111
  <ul id="recent_posts">
101
112
 
102
113
  <li class="post">
103
- <a href="/blog/2012/10/02/a-list-of-links/">A list of links</a>
114
+ <a href="/blog/2012/10/07/some-good-links/">Some good links</a>
115
+ </li>
116
+
117
+ <li class="post">
118
+ <a href="/blog/2012/10/07/a-bad-link/">Some good links</a>
104
119
  </li>
105
120
 
106
121
  </ul>
@@ -9,7 +9,7 @@
9
9
  <meta name="author" content="Your Name">
10
10
 
11
11
 
12
- <meta name="description" content="A good link A broken link
12
+ <meta name="description" content="A good link Another good link
13
13
  ">
14
14
 
15
15
 
@@ -71,7 +71,7 @@
71
71
 
72
72
  <header>
73
73
 
74
- <h1 class="entry-title"><a href="/blog/2012/10/02/a-list-of-links/">A List of Links</a></h1>
74
+ <h1 class="entry-title"><a href="/blog/2012/10/07/some-good-links/">Some Good Links</a></h1>
75
75
 
76
76
 
77
77
  <p class="meta">
@@ -87,7 +87,7 @@
87
87
 
88
88
 
89
89
 
90
- <time datetime="2012-10-02T14:44:00-04:00" pubdate data-updated="true">Oct 2<span>nd</span>, 2012</time>
90
+ <time datetime="2012-10-07T00:00:00-04:00" pubdate data-updated="true">Oct 7<span>th</span>, 2012</time>
91
91
 
92
92
  </p>
93
93
 
@@ -96,7 +96,43 @@
96
96
 
97
97
  <div class="entry-content"><p><a href="http://goodlink.com">A good link</a></p>
98
98
 
99
- <p><a href="http://brokenlink.com">A broken link</a></p>
99
+ <p><a href="http://anothergoodlink.com">Another good link</a></p>
100
+ </div>
101
+
102
+
103
+
104
+
105
+ </article>
106
+
107
+
108
+ <article>
109
+
110
+ <header>
111
+
112
+ <h1 class="entry-title"><a href="/blog/2012/10/07/a-bad-link/">Some Good Links</a></h1>
113
+
114
+
115
+ <p class="meta">
116
+
117
+
118
+
119
+
120
+
121
+
122
+
123
+
124
+
125
+
126
+
127
+
128
+ <time datetime="2012-10-07T00:00:00-04:00" pubdate data-updated="true">Oct 7<span>th</span>, 2012</time>
129
+
130
+ </p>
131
+
132
+ </header>
133
+
134
+
135
+ <div class="entry-content"><p><a href="http://badlink.com">A bad link</a></p>
100
136
  </div>
101
137
 
102
138
 
@@ -117,7 +153,11 @@
117
153
  <ul id="recent_posts">
118
154
 
119
155
  <li class="post">
120
- <a href="/blog/2012/10/02/a-list-of-links/">A list of links</a>
156
+ <a href="/blog/2012/10/07/some-good-links/">Some good links</a>
157
+ </li>
158
+
159
+ <li class="post">
160
+ <a href="/blog/2012/10/07/a-bad-link/">Some good links</a>
121
161
  </li>
122
162
 
123
163
  </ul>
@@ -1,15 +1,19 @@
1
1
  <?xml version='1.0' encoding='UTF-8'?>
2
2
  <urlset xmlns='http://www.sitemaps.org/schemas/sitemap/0.9'>
3
3
  <url>
4
- <loc>http://yoursite.com/blog/2012/10/02/a-list-of-links/</loc>
5
- <lastmod>2012-10-02T21:00:55-04:00</lastmod>
4
+ <loc>http://yoursite.com/blog/2012/10/07/a-bad-link/</loc>
5
+ <lastmod>2012-10-07T11:47:25-04:00</lastmod>
6
+ </url>
7
+ <url>
8
+ <loc>http://yoursite.com/blog/2012/10/07/some-good-links/</loc>
9
+ <lastmod>2012-10-07T11:47:18-04:00</lastmod>
6
10
  </url>
7
11
  <url>
8
12
  <loc>http://yoursite.com/blog/archives/</loc>
9
- <lastmod>2012-10-02T21:00:55-04:00</lastmod>
13
+ <lastmod>2012-10-07T11:47:25-04:00</lastmod>
10
14
  </url>
11
15
  <url>
12
16
  <loc>http://yoursite.com/</loc>
13
- <lastmod>2012-10-02T21:00:55-04:00</lastmod>
17
+ <lastmod>2012-10-07T11:47:25-04:00</lastmod>
14
18
  </url>
15
19
  </urlset>
@@ -0,0 +1,9 @@
1
+ ---
2
+ layout: post
3
+ title: "Some good links"
4
+ date: 2012-10-07
5
+ comments: true
6
+ categories:
7
+ ---
8
+
9
+ [A bad link](http://badlink.com)
@@ -0,0 +1,11 @@
1
+ ---
2
+ layout: post
3
+ title: "Some good links"
4
+ date: 2012-10-07
5
+ comments: true
6
+ categories:
7
+ ---
8
+
9
+ [A good link](http://goodlink.com)
10
+
11
+ [Another good link](http://anothergoodlink.com)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: link-checker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
4
+ version: 0.6.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-10-07 00:00:00.000000000 Z
12
+ date: 2012-10-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: nokogiri
@@ -400,7 +400,8 @@ files:
400
400
  - spec/test-site/public/assets/jwplayer/glow/sharing/shareScreen.png
401
401
  - spec/test-site/public/assets/jwplayer/player.swf
402
402
  - spec/test-site/public/atom.xml
403
- - spec/test-site/public/blog/2012/10/02/a-list-of-links/index.html
403
+ - spec/test-site/public/blog/2012/10/07/a-bad-link/index.html
404
+ - spec/test-site/public/blog/2012/10/07/some-good-links/index.html
404
405
  - spec/test-site/public/blog/archives/index.html
405
406
  - spec/test-site/public/favicon.png
406
407
  - spec/test-site/public/images/bird_32_gray.png
@@ -483,7 +484,8 @@ files:
483
484
  - spec/test-site/source/_layouts/default.html
484
485
  - spec/test-site/source/_layouts/page.html
485
486
  - spec/test-site/source/_layouts/post.html
486
- - spec/test-site/source/_posts/2012-10-02-a-list-of-links.markdown
487
+ - spec/test-site/source/_posts/2012-10-07-a-bad-link.markdown
488
+ - spec/test-site/source/_posts/2012-10-07-some-good-links.markdown
487
489
  - spec/test-site/source/assets/jwplayer/glow/controlbar/background.png
488
490
  - spec/test-site/source/assets/jwplayer/glow/controlbar/blankButton.png
489
491
  - spec/test-site/source/assets/jwplayer/glow/controlbar/divider.png
@@ -558,7 +560,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
558
560
  version: '0'
559
561
  segments:
560
562
  - 0
561
- hash: 3561793786704085147
563
+ hash: 1307597629832746042
562
564
  required_rubygems_version: !ruby/object:Gem::Requirement
563
565
  none: false
564
566
  requirements:
@@ -1,11 +0,0 @@
1
- ---
2
- layout: post
3
- title: "A list of links"
4
- date: 2012-10-02 14:44
5
- comments: true
6
- categories:
7
- ---
8
-
9
- [A good link](http://goodlink.com)
10
-
11
- [A broken link](http://brokenlink.com)