broken_link_finder 0.12.2 → 0.12.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2279e54526bbf0b0a68072c060e480bc5efe3e8cd9deefd028789716c736cf77
4
- data.tar.gz: 667e1e86207dd74d594e5e57411076cc21713f15f549adb5a0c904ed5633902a
3
+ metadata.gz: 4e60e87e2f9f1ae05d4ebe58066169e389994fba88ea3393a9dc5c3d04df20b6
4
+ data.tar.gz: 8019a1671fb811d6bf67feefb044f77be18dc04b0904b1b4e43cb258ee0d5fa3
5
5
  SHA512:
6
- metadata.gz: 3dcc51f65cfb9b869f77f5becb0861b617b2b5424ad0890ff238f18be1f8cc5d70173dc9dd3a98d18754986dc8a2c578e66c7db533fbddcf8673a1ca8c1c90dd
7
- data.tar.gz: 7a4f7ee5cd856a2713bfa89f250aaf5bf0458818604cdc89ecd683af23337b2bb7b695b51b3f7ce134f3d696e9e447b2c1eaff97ca41b6f683dc85e9ee0dfb83
6
+ metadata.gz: 6b16be9cbbd35ea468ff879a833b8a20cc6557b6bf1f2c0c79ae7243fc8a75d0f1b2d19ff9030dc112816871b232f85cbe49e344ee0ada405062b731961912a8
7
+ data.tar.gz: cf4f43c4d5369f218e1700b941fd5a4b3681aaafc8131e1394b734b72d343b6ee743690f15c115f711ccf5e133fe91777224fd943b04ae89e46e3ca06f09e424
data/CHANGELOG.md CHANGED
@@ -9,9 +9,19 @@
9
9
  - ...
10
10
  ---
11
11
 
12
+ ## v0.12.3
13
+ ### Added
14
+ - Added `BrokenLinkFinder::Finder#manager` getter method.
15
+ ### Changed/Removed
16
+ - Updated production dependencies including `wgit` (to `v0.12.0`).
17
+ - Updated `Wgit::Url`s to look like Strings when inspected.
18
+ ### Fixed
19
+ - ...
20
+ ---
21
+
12
22
  ## v0.12.2
13
23
  ### Added
14
- - Updated to Ruby 3.3 and updated production dependencies including Wgit (v0.11)
24
+ - Updated to Ruby 3.3 and updated production dependencies including Wgit (v0.11.0)
15
25
  - Added `--js` and `--js-delay` flag options to the executable. This allows JS parsing to update a page's DOM before it get crawled.
16
26
  ### Changed/Removed
17
27
  - ...
data/Gemfile.lock CHANGED
@@ -1,62 +1,66 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- broken_link_finder (0.12.2)
4
+ broken_link_finder (0.12.3)
5
5
  thor (~> 1.3)
6
6
  thread (~> 0.2)
7
- wgit (~> 0.11)
7
+ wgit (~> 0.12)
8
8
 
9
9
  GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
- addressable (2.8.6)
13
- public_suffix (>= 2.0.2, < 6.0)
14
- bson (4.15.0)
12
+ addressable (2.8.7)
13
+ public_suffix (>= 2.0.2, < 7.0)
14
+ base64 (0.2.0)
15
+ bigdecimal (3.1.8)
16
+ bson (5.0.1)
15
17
  byebug (11.1.3)
16
18
  coderay (1.1.3)
17
- concurrent-ruby (1.2.2)
18
- crack (0.4.5)
19
+ concurrent-ruby (1.3.4)
20
+ crack (1.0.0)
21
+ bigdecimal
19
22
  rexml
20
23
  ethon (0.16.0)
21
24
  ffi (>= 1.15.0)
22
- ferrum (0.14)
25
+ ferrum (0.15)
23
26
  addressable (~> 2.5)
24
27
  concurrent-ruby (~> 1.1)
25
28
  webrick (~> 1.7)
26
- websocket-driver (>= 0.6, < 0.8)
27
- ffi (1.16.3)
28
- hashdiff (1.1.0)
29
+ websocket-driver (~> 0.7)
30
+ ffi (1.17.0)
31
+ hashdiff (1.1.1)
29
32
  maxitest (3.7.0)
30
33
  minitest (>= 5.0.0, < 5.15.0)
31
- method_source (1.0.0)
32
- mini_portile2 (2.8.5)
34
+ method_source (1.1.0)
35
+ mini_portile2 (2.8.7)
33
36
  minitest (5.14.4)
34
- mongo (2.19.3)
35
- bson (>= 4.14.1, < 5.0.0)
36
- nokogiri (1.16.0)
37
+ mongo (2.21.0)
38
+ bson (>= 4.14.1, < 6.0.0)
39
+ nokogiri (1.16.7)
37
40
  mini_portile2 (~> 2.8.2)
38
41
  racc (~> 1.4)
39
42
  pry (0.14.2)
40
43
  coderay (~> 1.1)
41
44
  method_source (~> 1.0)
42
- public_suffix (5.0.4)
43
- racc (1.7.3)
44
- rake (13.1.0)
45
- rexml (3.2.6)
46
- thor (1.3.0)
45
+ public_suffix (6.0.1)
46
+ racc (1.8.1)
47
+ rake (13.2.1)
48
+ rexml (3.3.9)
49
+ thor (1.3.2)
47
50
  thread (0.2.2)
48
51
  typhoeus (1.4.1)
49
52
  ethon (>= 0.9.0)
50
- webmock (3.19.1)
53
+ webmock (3.24.0)
51
54
  addressable (>= 2.8.0)
52
55
  crack (>= 0.3.2)
53
56
  hashdiff (>= 0.4.0, < 2.0.0)
54
- webrick (1.8.1)
57
+ webrick (1.8.2)
55
58
  websocket-driver (0.7.6)
56
59
  websocket-extensions (>= 0.1.0)
57
60
  websocket-extensions (0.1.5)
58
- wgit (0.11.0)
61
+ wgit (0.12.0)
59
62
  addressable (~> 2.8)
63
+ base64 (~> 0.2)
60
64
  ferrum (~> 0.14)
61
65
  mongo (~> 2.19)
62
66
  nokogiri (~> 1.15)
@@ -49,5 +49,5 @@ Gem::Specification.new do |spec|
49
49
 
50
50
  spec.add_runtime_dependency 'thor', '~> 1.3'
51
51
  spec.add_runtime_dependency 'thread', '~> 0.2'
52
- spec.add_runtime_dependency 'wgit', '~> 0.11'
52
+ spec.add_runtime_dependency 'wgit', '~> 0.12'
53
53
  end
@@ -20,6 +20,9 @@ module BrokenLinkFinder
20
20
  # The underlying Wgit::Crawler used by this instance of Finder.
21
21
  attr_reader :crawler
22
22
 
23
+ # The underlying link manager used by this instance of Finder.
24
+ attr_reader :manager
25
+
23
26
  # Returns a new Finder instance.
24
27
  def initialize(sort: :page, max_threads: DEFAULT_MAX_THREADS, &block)
25
28
  raise "Sort by either :page or :link, not #{sort}" \
@@ -61,7 +64,7 @@ module BrokenLinkFinder
61
64
  doc = @crawler.crawl(url.dup)
62
65
 
63
66
  # Ensure the given page url is valid.
64
- raise "Invalid or broken URL: #{url}" unless doc
67
+ raise "Invalid or broken URL: #{url}" if doc.empty?
65
68
 
66
69
  # Get all page links and determine which are broken.
67
70
  find_broken_links(doc)
@@ -212,7 +215,7 @@ module BrokenLinkFinder
212
215
 
213
216
  # Return if the crawled link is broken or not.
214
217
  def link_broken?(doc)
215
- doc.nil? || @crawler.last_response.not_found? || has_broken_anchor(doc)
218
+ doc.empty? || @crawler.last_response.not_found? || has_broken_anchor(doc)
216
219
  end
217
220
 
218
221
  # Returns true if the link is/contains a broken anchor/fragment.
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module BrokenLinkFinder
4
- VERSION = '0.12.2'
4
+ VERSION = '0.12.3'
5
5
  end
@@ -1,5 +1,12 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ # Make Wgit::Urls look like Strings when inspected.
4
+ class Wgit::Url
5
+ def inspect
6
+ to_s.inspect
7
+ end
8
+ end
9
+
3
10
  # Define a method on each doc for recording unparsable links.
4
11
  # Unparsable links are recorded as broken links by Finder.
5
12
  class Wgit::Document
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.12.2
4
+ version: 0.12.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: 2024-01-19 00:00:00.000000000 Z
11
+ date: 2024-10-30 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.11'
131
+ version: '0.12'
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.11'
138
+ version: '0.12'
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
@@ -194,7 +194,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
194
194
  - !ruby/object:Gem::Version
195
195
  version: '0'
196
196
  requirements: []
197
- rubygems_version: 3.5.3
197
+ rubygems_version: 3.5.22
198
198
  signing_key:
199
199
  specification_version: 4
200
200
  summary: Finds a website's broken links and reports back to you with a summary.