link-checker 0.6.0 → 0.7.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -4,11 +4,13 @@ This Ruby gem enables you to easily check the links in your web site. It will s
4
4
 
5
5
  It will print the file path in green if all of the external links check out, and red if there are any problems. If there are any problems then it will list each problem URL. It will display yellow warnings for URLs that redirect to other URLs that are good, or red errors if the redirect does not lead to a good URL.
6
6
 
7
+ For more detailed information, please see the article [Introducing the link-checker Ruby gem](http://www.ryanalynporter.com/2012/10/06/introducing-the-link-checker-ruby-gem/) on [ryanalynporter.com](http://www.ryanalynporter.com).
8
+
7
9
  ## Features
8
10
 
9
11
  * Scans files for links, or
10
12
  * Crawls web pages for links
11
- * Multi-threaded (fast)
13
+ * Multi-threaded (fast) with a --max-threads parameter
12
14
  * Warnings for links that redirect to valid links
13
15
  * red/green/yellow colored output
14
16
  * 100% test coverage
@@ -38,6 +40,30 @@ To crawl a live web site:
38
40
 
39
41
  check-links 'http://your-site.com'
40
42
 
43
+ ## Return value
44
+
45
+ The ```check-links``` command will return a successful return value if there are no problems, or it will return an not-successful return code if it finds errors. So you can use the return code to make decisions on the command line. For example:
46
+
47
+ check-links 'public' && echo 'SUCCESS'
48
+
49
+ ## Parameters
50
+
51
+ If you don't want to see yellow warnings for URLs that redirect to valid URLs, then pass the ```--no-warnings``` parameter:
52
+
53
+ check-links 'public' --no-warnings
54
+
55
+ If you want those redirects to be considered errors, even if they redirect to good URLs, then pass the ```--warnings-are-errors``` parameter:
56
+
57
+ check-links 'public' --warnings-are-errors
58
+
59
+ The link checker will spawn a new thread for each HTML file, and a new thread for each link within each HTML file. That will get out of hand very quickly if you have a large site, so there is a maximum number of threads. When the maximum number is reached, it will block and wait for an existing thread to complete before spawning a new one. The default maximum threads setting is 100, but you can control that number with the ```--max-threads``` parameter:
60
+
61
+ check-links 'public' --max-threads 500
62
+
63
+ ...or:
64
+
65
+ check-links 'public' --max-threads 1
66
+
41
67
  ## Testing
42
68
 
43
69
  The ```link-checker``` gem uses [RSpec](http://rspec.info) for testing and has 100% test coverage, verified using [simplecov](https://github.com/colszowka/simplecov).
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.6.0
1
+ 0.7.1
@@ -8,6 +8,12 @@ require 'anemone'
8
8
 
9
9
  class LinkChecker
10
10
 
11
+ # Create a new instance of LinkChecker
12
+ #
13
+ # @param params [Hash] A hash containing the :target value, which can represent either
14
+ # a file path or a URL. And an optional :options value, which contains a hash with a
15
+ # list of possible optional paramters. This can include :no_warnings, :warnings_are_errors,
16
+ # or :max_threads
11
17
  def initialize(params)
12
18
  @options = params[:options] || { }
13
19
  @target = params[:target] || './'
@@ -18,22 +24,32 @@ class LinkChecker
18
24
  @warnings = []
19
25
  @return_code = 0
20
26
 
21
- @options[:max_threads] ||= 100 # Only happens in testing.
27
+ @options[:max_threads] ||= 100
22
28
  end
23
29
 
30
+ # Find a list of HTML files in the @target path, which was set in the {#initialize} method.
24
31
  def html_file_paths
25
32
  Find.find(@target).map {|path|
26
33
  FileTest.file?(path) && (path =~ /\.html?$/) ? path : nil
27
- }.reject{|path| path.nil?}
34
+ }.reject{|path| path.nil? }
28
35
  end
29
36
 
37
+ # Find a list of all external links in the specified target, represented as URI strings.
38
+ #
39
+ # @param source [String] Either a file path or a URL.
40
+ # @return [Array] A list of URI strings.
30
41
  def self.external_link_uri_strings(source)
31
42
  Nokogiri::HTML(source).css('a').select {|link|
32
43
  !link.attribute('href').nil? &&
33
44
  link.attribute('href').value =~ /^https?\:\/\//
34
- }.map{|link| link.attributes['href'].value}
45
+ }.map{|link| link.attributes['href'].value }
35
46
  end
36
47
 
48
+ # Check one URL.
49
+ #
50
+ # @param uri [URI] A URI object for the target URL.
51
+ # @return [LinkChecker::Result] One of the following objects: {LinkChecker::Good},
52
+ # {LinkChecker::Redirect}, or {LinkChecker::Error}.
37
53
  def self.check_uri(uri, redirected=false)
38
54
  http = Net::HTTP.new(uri.host, uri.port)
39
55
  http.use_ssl = true if uri.scheme == "https"
@@ -56,6 +72,9 @@ class LinkChecker
56
72
  end
57
73
  end
58
74
 
75
+ # Check the URLs in the @target, either using {#check_uris_by_crawling} or
76
+ # {#check_uris_in_files}, depending on whether the @target looks like an http:// URL or
77
+ # a file path.
59
78
  def check_uris
60
79
  begin
61
80
  if @target =~ /^https?\:\/\//
@@ -84,35 +103,45 @@ class LinkChecker
84
103
  @return_code
85
104
  end
86
105
 
106
+ # Use {http://anemone.rubyforge.org Anemone} to crawl the pages at the @target URL,
107
+ # and then check all of the external URLs in those pages.
87
108
  def check_uris_by_crawling
88
109
  threads = []
89
110
  Anemone.crawl(@target) do |anemone|
90
111
  anemone.storage = Anemone::Storage.PStore('link-checker-crawled-pages.pstore')
91
112
  anemone.on_every_page do |crawled_page|
92
113
  raise StandardError.new(crawled_page.error) if crawled_page.error
93
- threads << start_link_check_thread(crawled_page.body, crawled_page.url.to_s)
114
+ threads << check_page(crawled_page.body, crawled_page.url.to_s)
94
115
  @html_files << crawled_page
95
116
  end
96
117
  end
97
118
  threads.each{|thread| thread.join }
98
119
  end
99
120
 
121
+ # Treat the @target as a file path and find all HTML files under that path, and then
122
+ # scan all of the external URLs in those files.
100
123
  def check_uris_in_files
101
124
  threads = []
102
125
  html_file_paths.each do |file|
103
126
  wait_to_spawn_thread
104
- threads << start_link_check_thread(open(file), file)
127
+ threads << check_page(open(file), file)
105
128
  @html_files << file
106
129
  end
107
130
  threads.each{|thread| thread.join }
108
131
  end
109
132
 
110
- def start_link_check_thread(source, source_name)
133
+ # Spawn a thread to check an HTML page, and then spawn a thread for checking each
134
+ # link within that page.
135
+ #
136
+ # @param source [String] The contents of the HTML page, as a string.
137
+ # @param source_name [String] The name of the source, which will be reported if
138
+ # there is an error or a warning.
139
+ def check_page(page, page_name)
111
140
  Thread.new do
112
141
  threads = []
113
142
  results = []
114
- self.class.external_link_uri_strings(source).each do |uri_string|
115
- Thread.exclusive { @links << source }
143
+ self.class.external_link_uri_strings(page).each do |uri_string|
144
+ Thread.exclusive { @links << page }
116
145
  wait_to_spawn_thread
117
146
  threads << Thread.new do
118
147
  begin
@@ -122,16 +151,20 @@ class LinkChecker
122
151
  Thread.exclusive { results << response }
123
152
  rescue => error
124
153
  Thread.exclusive { results <<
125
- Error.new(:error => error.to_s, :uri_string => uri_string) }
154
+ Error.new( :error => error.to_s, :uri_string => uri_string) }
126
155
  end
127
156
  end
128
157
  end
129
158
  threads.each {|thread| thread.join }
130
- report_results(source_name, results)
159
+ report_results(page_name, results)
131
160
  end
132
161
  end
133
-
134
- def report_results(file, results)
162
+
163
+ # Report the results of scanning one HTML page.
164
+ #
165
+ # @param page_name [String] The name of the page.
166
+ # @param results [Array] An array of {LinkChecker::Result} objects.
167
+ def report_results(page_name, results)
135
168
  errors = results.select{|result| result.class.eql? Error}
136
169
  warnings = results.select{|result| result.class.eql? Redirect}
137
170
  @return_code = 1 unless errors.empty?
@@ -147,7 +180,7 @@ class LinkChecker
147
180
  @warnings = @warnings.concat(warnings)
148
181
 
149
182
  if errors.empty?
150
- message = "Checked: #{file}"
183
+ message = "Checked: #{page_name}"
151
184
  if warnings.empty? || @options[:no_warnings]
152
185
  puts message.green
153
186
  else
@@ -160,7 +193,7 @@ class LinkChecker
160
193
  end
161
194
  end
162
195
  else
163
- puts "Problem: #{file}".red
196
+ puts "Problem: #{page_name}".red
164
197
  errors.each do |error|
165
198
  puts " Link: #{error.uri_string}".red
166
199
  case error
@@ -174,19 +207,31 @@ class LinkChecker
174
207
  end
175
208
  end
176
209
 
210
+ # Abstract base class for representing the results of checking one URI.
177
211
  class Result
178
212
  attr_accessor :uri_string
213
+
214
+ # A new LinkChecker::Result object instance.
215
+ #
216
+ # @param params [Hash] A hash of parameters. Expects :uri_string.
179
217
  def initialize(params)
180
218
  @uri_string = params[:uri_string]
181
219
  end
182
220
  end
183
221
 
222
+ # A good result. The URL is valid.
184
223
  class Good < Result
185
224
  end
186
225
 
226
+ # A redirection to another URL.
187
227
  class Redirect < Result
188
228
  attr_reader :good
189
229
  attr_reader :final_destination_uri_string
230
+
231
+ # A new LinkChecker::Redirect object.
232
+ #
233
+ # @param params [Hash] A hash of parameters. Expects :final_destination_uri_string,
234
+ # which is the URL that the original :uri_string redirected to.
190
235
  def initialize(params)
191
236
  @final_destination_uri_string = params[:final_destination_uri_string]
192
237
  @good = params[:good]
@@ -194,6 +239,11 @@ class LinkChecker
194
239
  end
195
240
  end
196
241
 
242
+ # A bad result. The URL is not valid for some reason. Any reason, other than a 200
243
+ # HTTP response.
244
+ #
245
+ # @param params [Hash] A hash of parameters. Expects :error, which is a string
246
+ # representing the error.
197
247
  class Error < Result
198
248
  attr_reader :error
199
249
  def initialize(params)
@@ -204,6 +254,8 @@ class LinkChecker
204
254
 
205
255
  private
206
256
 
257
+ # Checks the current :max_threads setting and blocks until the number of threads is
258
+ # below that number.
207
259
  def wait_to_spawn_thread
208
260
  # Never spawn more than the specified maximum number of threads.
209
261
  until Thread.list.select {|thread| thread.status == "run"}.count <
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "link-checker"
8
- s.version = "0.6.0"
8
+ s.version = "0.7.1"
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-08"
12
+ s.date = "2012-10-09"
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,7 @@ 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/07/a-bad-link/index.html",
224
+ "spec/test-site/public/blog/2012/10/07/all-good-links/index.html",
225
225
  "spec/test-site/public/blog/2012/10/07/some-good-links/index.html",
226
226
  "spec/test-site/public/blog/archives/index.html",
227
227
  "spec/test-site/public/favicon.png",
@@ -305,7 +305,7 @@ Gem::Specification.new do |s|
305
305
  "spec/test-site/source/_layouts/default.html",
306
306
  "spec/test-site/source/_layouts/page.html",
307
307
  "spec/test-site/source/_layouts/post.html",
308
- "spec/test-site/source/_posts/2012-10-07-a-bad-link.markdown",
308
+ "spec/test-site/source/_posts/2012-10-07-all-good-links.markdown",
309
309
  "spec/test-site/source/_posts/2012-10-07-some-good-links.markdown",
310
310
  "spec/test-site/source/assets/jwplayer/glow/controlbar/background.png",
311
311
  "spec/test-site/source/assets/jwplayer/glow/controlbar/blankButton.png",
@@ -162,7 +162,7 @@ describe LinkChecker do
162
162
  $stdout.should_receive(:puts).with(/Problem\: .*\.html/).once
163
163
  $stdout.should_receive(:puts).with(/Link/).twice
164
164
  $stdout.should_receive(:puts).with(/Response/).twice
165
- thread = LinkChecker.new(:target => @site_path).start_link_check_thread('<html></html>', 'source.html')
165
+ thread = LinkChecker.new(:target => @site_path).check_page('<html></html>', 'source.html')
166
166
  thread.join
167
167
  end
168
168
 
@@ -13,6 +13,7 @@ group :development do
13
13
  gem 'rb-fsevent', '~> 0.9'
14
14
  gem 'stringex', '~> 1.4.0'
15
15
  gem 'liquid', '~> 2.3.0'
16
+ gem 'link-checker'
16
17
  end
17
18
 
18
19
  gem 'sinatra', '~> 1.3.2'
@@ -4,10 +4,14 @@ GEM
4
4
  RedCloth (4.2.9)
5
5
  albino (1.3.3)
6
6
  posix-spawn (>= 0.3.6)
7
- blankslate (2.1.2.4)
8
- chunky_png (1.2.5)
7
+ anemone (0.7.2)
8
+ nokogiri (>= 1.3.0)
9
+ robotex (>= 1.0.0)
10
+ blankslate (3.1.2)
11
+ chunky_png (1.2.6)
9
12
  classifier (1.3.3)
10
13
  fast-stemmer (>= 1.0.0)
14
+ colorize (0.5.8)
11
15
  compass (0.12.2)
12
16
  chunky_png (~> 1.2)
13
17
  fssm (>= 0.2.7)
@@ -16,7 +20,7 @@ GEM
16
20
  fast-stemmer (1.0.1)
17
21
  ffi (1.0.11)
18
22
  fssm (0.2.9)
19
- haml (3.1.6)
23
+ haml (3.1.7)
20
24
  jekyll (0.11.2)
21
25
  albino (~> 1.3)
22
26
  classifier (~> 1.3)
@@ -24,10 +28,16 @@ GEM
24
28
  kramdown (~> 0.13)
25
29
  liquid (~> 2.3)
26
30
  maruku (~> 0.5)
27
- kramdown (0.13.7)
31
+ kramdown (0.14.0)
32
+ link-checker (0.6.0)
33
+ anemone (~> 0.7.2)
34
+ colorize (~> 0.5.8)
35
+ nokogiri (~> 1.5.5)
36
+ trollop (~> 2.0)
28
37
  liquid (2.3.0)
29
- maruku (0.6.0)
38
+ maruku (0.6.1)
30
39
  syntax (>= 1.0.0)
40
+ nokogiri (1.5.5)
31
41
  posix-spawn (0.3.6)
32
42
  pygments.rb (0.2.13)
33
43
  rubypython (~> 0.5.3)
@@ -35,20 +45,22 @@ GEM
35
45
  rack-protection (1.2.0)
36
46
  rack
37
47
  rake (0.9.2.2)
38
- rb-fsevent (0.9.1)
48
+ rb-fsevent (0.9.2)
39
49
  rdiscount (1.6.8)
50
+ robotex (1.0.0)
40
51
  rubypants (0.2.0)
41
52
  rubypython (0.5.3)
42
53
  blankslate (>= 2.1.2.3)
43
54
  ffi (~> 1.0.7)
44
- sass (3.1.20)
45
- sinatra (1.3.2)
55
+ sass (3.2.1)
56
+ sinatra (1.3.3)
46
57
  rack (~> 1.3, >= 1.3.6)
47
58
  rack-protection (~> 1.2)
48
59
  tilt (~> 1.3, >= 1.3.3)
49
60
  stringex (1.4.0)
50
61
  syntax (1.0.0)
51
62
  tilt (1.3.3)
63
+ trollop (2.0)
52
64
 
53
65
  PLATFORMS
54
66
  ruby
@@ -58,6 +70,7 @@ DEPENDENCIES
58
70
  compass (~> 0.12.1)
59
71
  haml (~> 3.1.6)
60
72
  jekyll (~> 0.11.2)
73
+ link-checker
61
74
  liquid (~> 2.3.0)
62
75
  pygments.rb (~> 0.2.12)
63
76
  rack (~> 1.4.1)
@@ -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-07T13:09:13-04:00</updated>
7
+ <updated>2012-10-07T21:01:28-04:00</updated>
8
8
  <id>http://yoursite.com/</id>
9
9
  <author>
10
10
  <name><![CDATA[Your Name]]></name>
@@ -18,18 +18,18 @@
18
18
  <link href="http://yoursite.com/blog/2012/10/07/some-good-links/"/>
19
19
  <updated>2012-10-07T00:00:00-04:00</updated>
20
20
  <id>http://yoursite.com/blog/2012/10/07/some-good-links</id>
21
- <content type="html"><![CDATA[<p><a href="http://goodlink.com">A good link</a></p>
21
+ <content type="html"><![CDATA[<p><a href="http://cnn.com">A good link</a></p>
22
22
 
23
- <p><a href="http://anothergoodlink.com">Another good link</a></p>
23
+ <p><a href="http://google.com">Another good link</a></p>
24
24
  ]]></content>
25
25
  </entry>
26
26
 
27
27
  <entry>
28
28
  <title type="html"><![CDATA[Some good links]]></title>
29
- <link href="http://yoursite.com/blog/2012/10/07/a-bad-link/"/>
29
+ <link href="http://yoursite.com/blog/2012/10/07/all-good-links/"/>
30
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>
31
+ <id>http://yoursite.com/blog/2012/10/07/all-good-links</id>
32
+ <content type="html"><![CDATA[<p><a href="http://cnn.com">A bad link</a></p>
33
33
  ]]></content>
34
34
  </entry>
35
35
 
@@ -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/07/a-bad-link/">
22
+ <link rel="canonical" href="http://yoursite.com/blog/2012/10/07/all-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>
@@ -91,7 +91,7 @@
91
91
  </header>
92
92
 
93
93
 
94
- <div class="entry-content"><p><a href="http://badlink.com">A bad link</a></p>
94
+ <div class="entry-content"><p><a href="http://cnn.com">A bad link</a></p>
95
95
  </div>
96
96
 
97
97
 
@@ -122,7 +122,7 @@
122
122
 
123
123
  <div class="sharing">
124
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>
125
+ <a href="http://twitter.com/share" class="twitter-share-button" data-url="http://yoursite.com/blog/2012/10/07/all-good-links/" data-via="" data-counturl="http://yoursite.com/blog/2012/10/07/all-good-links/" >Tweet</a>
126
126
 
127
127
 
128
128
 
@@ -151,7 +151,7 @@
151
151
  </li>
152
152
 
153
153
  <li class="post">
154
- <a href="/blog/2012/10/07/a-bad-link/">Some good links</a>
154
+ <a href="/blog/2012/10/07/all-good-links/">Some good links</a>
155
155
  </li>
156
156
 
157
157
  </ul>
@@ -91,9 +91,9 @@
91
91
  </header>
92
92
 
93
93
 
94
- <div class="entry-content"><p><a href="http://goodlink.com">A good link</a></p>
94
+ <div class="entry-content"><p><a href="http://cnn.com">A good link</a></p>
95
95
 
96
- <p><a href="http://anothergoodlink.com">Another good link</a></p>
96
+ <p><a href="http://google.com">Another good link</a></p>
97
97
  </div>
98
98
 
99
99
 
@@ -133,7 +133,7 @@
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>
136
+ <a class="basic-alignment left" href="/blog/2012/10/07/all-good-links/" title="Previous Post: Some good links">&laquo; Some good links</a>
137
137
 
138
138
 
139
139
  </p>
@@ -153,7 +153,7 @@
153
153
  </li>
154
154
 
155
155
  <li class="post">
156
- <a href="/blog/2012/10/07/a-bad-link/">Some good links</a>
156
+ <a href="/blog/2012/10/07/all-good-links/">Some good links</a>
157
157
  </li>
158
158
 
159
159
  </ul>
@@ -91,7 +91,7 @@ Oct 07 2012 Recent Posts Some good links Some good links ">
91
91
 
92
92
  <article>
93
93
 
94
- <h1><a href="/blog/2012/10/07/a-bad-link/">Some good links</a></h1>
94
+ <h1><a href="/blog/2012/10/07/all-good-links/">Some good links</a></h1>
95
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>
96
96
 
97
97
 
@@ -115,7 +115,7 @@ Oct 07 2012 Recent Posts Some good links Some good links ">
115
115
  </li>
116
116
 
117
117
  <li class="post">
118
- <a href="/blog/2012/10/07/a-bad-link/">Some good links</a>
118
+ <a href="/blog/2012/10/07/all-good-links/">Some good links</a>
119
119
  </li>
120
120
 
121
121
  </ul>
@@ -94,9 +94,9 @@
94
94
  </header>
95
95
 
96
96
 
97
- <div class="entry-content"><p><a href="http://goodlink.com">A good link</a></p>
97
+ <div class="entry-content"><p><a href="http://cnn.com">A good link</a></p>
98
98
 
99
- <p><a href="http://anothergoodlink.com">Another good link</a></p>
99
+ <p><a href="http://google.com">Another good link</a></p>
100
100
  </div>
101
101
 
102
102
 
@@ -109,7 +109,7 @@
109
109
 
110
110
  <header>
111
111
 
112
- <h1 class="entry-title"><a href="/blog/2012/10/07/a-bad-link/">Some Good Links</a></h1>
112
+ <h1 class="entry-title"><a href="/blog/2012/10/07/all-good-links/">Some Good Links</a></h1>
113
113
 
114
114
 
115
115
  <p class="meta">
@@ -132,7 +132,7 @@
132
132
  </header>
133
133
 
134
134
 
135
- <div class="entry-content"><p><a href="http://badlink.com">A bad link</a></p>
135
+ <div class="entry-content"><p><a href="http://cnn.com">A bad link</a></p>
136
136
  </div>
137
137
 
138
138
 
@@ -157,7 +157,7 @@
157
157
  </li>
158
158
 
159
159
  <li class="post">
160
- <a href="/blog/2012/10/07/a-bad-link/">Some good links</a>
160
+ <a href="/blog/2012/10/07/all-good-links/">Some good links</a>
161
161
  </li>
162
162
 
163
163
  </ul>
@@ -1,19 +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/07/a-bad-link/</loc>
5
- <lastmod>2012-10-07T11:47:25-04:00</lastmod>
4
+ <loc>http://yoursite.com/blog/2012/10/07/all-good-links/</loc>
5
+ <lastmod>2012-10-07T20:59:00-04:00</lastmod>
6
6
  </url>
7
7
  <url>
8
8
  <loc>http://yoursite.com/blog/2012/10/07/some-good-links/</loc>
9
- <lastmod>2012-10-07T11:47:18-04:00</lastmod>
9
+ <lastmod>2012-10-07T20:50:36-04:00</lastmod>
10
10
  </url>
11
11
  <url>
12
12
  <loc>http://yoursite.com/blog/archives/</loc>
13
- <lastmod>2012-10-07T11:47:25-04:00</lastmod>
13
+ <lastmod>2012-10-07T20:59:00-04:00</lastmod>
14
14
  </url>
15
15
  <url>
16
16
  <loc>http://yoursite.com/</loc>
17
- <lastmod>2012-10-07T11:47:25-04:00</lastmod>
17
+ <lastmod>2012-10-07T20:59:00-04:00</lastmod>
18
18
  </url>
19
19
  </urlset>
@@ -6,4 +6,4 @@ comments: true
6
6
  categories:
7
7
  ---
8
8
 
9
- [A bad link](http://badlink.com)
9
+ [A bad link](http://cnn.com)
@@ -6,6 +6,6 @@ comments: true
6
6
  categories:
7
7
  ---
8
8
 
9
- [A good link](http://goodlink.com)
9
+ [A good link](http://cnn.com)
10
10
 
11
- [Another good link](http://anothergoodlink.com)
11
+ [Another good link](http://google.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.6.0
4
+ version: 0.7.1
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-08 00:00:00.000000000 Z
12
+ date: 2012-10-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: nokogiri
@@ -400,7 +400,7 @@ 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/07/a-bad-link/index.html
403
+ - spec/test-site/public/blog/2012/10/07/all-good-links/index.html
404
404
  - spec/test-site/public/blog/2012/10/07/some-good-links/index.html
405
405
  - spec/test-site/public/blog/archives/index.html
406
406
  - spec/test-site/public/favicon.png
@@ -484,7 +484,7 @@ files:
484
484
  - spec/test-site/source/_layouts/default.html
485
485
  - spec/test-site/source/_layouts/page.html
486
486
  - spec/test-site/source/_layouts/post.html
487
- - spec/test-site/source/_posts/2012-10-07-a-bad-link.markdown
487
+ - spec/test-site/source/_posts/2012-10-07-all-good-links.markdown
488
488
  - spec/test-site/source/_posts/2012-10-07-some-good-links.markdown
489
489
  - spec/test-site/source/assets/jwplayer/glow/controlbar/background.png
490
490
  - spec/test-site/source/assets/jwplayer/glow/controlbar/blankButton.png
@@ -560,7 +560,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
560
560
  version: '0'
561
561
  segments:
562
562
  - 0
563
- hash: 1307597629832746042
563
+ hash: -106573811042248566
564
564
  required_rubygems_version: !ruby/object:Gem::Requirement
565
565
  none: false
566
566
  requirements: