broken_link_finder 0.9.2 → 0.9.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 110068a5db9454d69709454f50ade3f667c0e63dad6d101c23bf991a04f770eb
4
- data.tar.gz: 0fd46fed486bf382935d68020fcae9391c288b5d5742ce19ba61d2896e2eebe7
3
+ metadata.gz: 0e03d27fce04a04ff97aa40ea895b01272926915367712a865787cda0efc3a0a
4
+ data.tar.gz: 487abab06c5664fb4024e58c7e1ba43209d076100d5d7da275db2f534aee4c4b
5
5
  SHA512:
6
- metadata.gz: c9c744045ee462b8981ab418a5c3acdb9162c36e14c8603391c1f79e9247872de877a83ce2a7dd5f8779d8774a044562054445410666a5af518d11f5fded3f22
7
- data.tar.gz: e4e0e2b2d19596493564a361fef0a98afdddcefb395309dba139df6bd508a12385ca16e47004bd503c585954454d9608449995b4ed6009926e0b856d11962181
6
+ metadata.gz: 2b90b76061107fcde9b79e6b737710ee067be255182bdd7726ba2343aa64f0357b9901217f78cd0e3928244610cb9ad37007db8d316bbbef2a50355213d5764b
7
+ data.tar.gz: 5d727113d883f94e263933c726ea0eb0a41da343844c044d8220e042b877ac84b5c806e2f2d5570dd0dd9eb09a56f4603676b9194bc62201a01cb9fba7b14e23
@@ -9,6 +9,15 @@
9
9
  - ...
10
10
  ---
11
11
 
12
+ ## v0.9.3
13
+ ### Added
14
+ - ...
15
+ ### Changed/Removed
16
+ - ...
17
+ ### Fixed
18
+ - A bug resulting in some servers dropping crawl requests from broken_link_finder.
19
+ ---
20
+
12
21
  ## v0.9.2
13
22
  ### Added
14
23
  - ...
@@ -1,10 +1,10 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- broken_link_finder (0.9.2)
4
+ broken_link_finder (0.9.3)
5
5
  thor (~> 0.20.3)
6
6
  thread (~> 0.2.0)
7
- wgit (~> 0.4.0)
7
+ wgit (~> 0.4.1)
8
8
 
9
9
  GEM
10
10
  remote: https://rubygems.org/
@@ -43,7 +43,7 @@ GEM
43
43
  addressable (>= 2.3.6)
44
44
  crack (>= 0.3.2)
45
45
  hashdiff (>= 0.4.0, < 2.0.0)
46
- wgit (0.4.0)
46
+ wgit (0.4.1)
47
47
  addressable (~> 2.6.0)
48
48
  mongo (~> 2.9.0)
49
49
  nokogiri (~> 1.10.3)
data/README.md CHANGED
@@ -8,8 +8,8 @@ Simply point it at a website and it will crawl all of its webpages searching for
8
8
 
9
9
  Any HTML page element with a `href` or `src` attribute is considered a link. For each link on a given page, any of the following conditions constitutes that the link is broken:
10
10
 
11
- - A response status code of `404 Not Found` is returned.
12
11
  - An empty HTML response body is returned.
12
+ - A response status code of `404 Not Found` is returned.
13
13
  - The HTML response body doesn't contain an element ID matching that of the link's anchor e.g. `http://server.com#about` must contain an element with `id="about"` or the link is considered broken.
14
14
  - The link redirects more than 5 times consecutively.
15
15
 
@@ -123,9 +123,12 @@ The gem is available as open source under the terms of the [MIT License](http://
123
123
 
124
124
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `bundle exec rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
125
125
 
126
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new gem version:
126
+ To install this gem onto your local machine, run `bundle exec rake install`.
127
+
128
+ To release a new gem version:
127
129
  - Update the version number in `version.rb` and add the new version to the `CHANGELOG`
128
130
  - Run `bundle install`
129
131
  - Run `bundle exec rake test` ensuring all tests pass
130
132
  - Run `bundle exec rake compile` ensuring no warnings
133
+ - Run `bundle exec rake install && rbenv rehash` and manually test the executable
131
134
  - Run `bundle exec rake release[origin]`
@@ -46,5 +46,5 @@ Gem::Specification.new do |spec|
46
46
 
47
47
  spec.add_runtime_dependency 'thor', '~> 0.20.3'
48
48
  spec.add_runtime_dependency 'thread', '~> 0.2.0'
49
- spec.add_runtime_dependency 'wgit', '~> 0.4.0'
49
+ spec.add_runtime_dependency 'wgit', '~> 0.4.1'
50
50
  end
@@ -44,7 +44,7 @@ module BrokenLinkFinder
44
44
  clear_links
45
45
 
46
46
  url = url.to_url
47
- doc = @crawler.crawl_url(url)
47
+ doc = @crawler.crawl(url)
48
48
 
49
49
  # Ensure the given page url is valid.
50
50
  raise "Invalid or broken URL: #{url}" unless doc
@@ -129,8 +129,8 @@ module BrokenLinkFinder
129
129
  link_doc = crawl_link(doc, link)
130
130
 
131
131
  # Determine if the crawled link is broken or not.
132
- if @crawler.last_response.code == 404 ||
133
- link_doc.nil? ||
132
+ if link_doc.nil? ||
133
+ @crawler.last_response.code == 404 ||
134
134
  has_broken_anchor(link_doc)
135
135
  append_broken_link(doc.url, link)
136
136
  else
@@ -156,7 +156,7 @@ module BrokenLinkFinder
156
156
  # Makes the link absolute and crawls it, returning its Wgit::Document.
157
157
  def crawl_link(doc, link)
158
158
  link = get_absolute_link(doc, link)
159
- @crawler.crawl_url(link)
159
+ @crawler.crawl(link)
160
160
  end
161
161
 
162
162
  # Returns the link in absolute form so it can be crawled.
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module BrokenLinkFinder
4
- VERSION = '0.9.2'
4
+ VERSION = '0.9.3'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: broken_link_finder
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.2
4
+ version: 0.9.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Telford
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-10-18 00:00:00.000000000 Z
11
+ date: 2019-10-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -128,14 +128,14 @@ dependencies:
128
128
  requirements:
129
129
  - - "~>"
130
130
  - !ruby/object:Gem::Version
131
- version: 0.4.0
131
+ version: 0.4.1
132
132
  type: :runtime
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
136
  - - "~>"
137
137
  - !ruby/object:Gem::Version
138
- version: 0.4.0
138
+ version: 0.4.1
139
139
  description: Finds a website's broken links using the 'wgit' gem and reports back
140
140
  to you with a summary.
141
141
  email: michael.telford@live.com