cloudfront-link-checker 0.0.2 → 0.0.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: 56a365f7821a0c9b518a4468248892a5631f7fa2297896943f6484f85a24a9c7
4
- data.tar.gz: f92974ad15a2c72061a89aa512ccf2feee4fd44863bb2a7e6fcf2560a0e12667
3
+ metadata.gz: 3cec48e634c35827e0146c7e8931f9ec8a162f0e3b315ca22de1e33bd285a113
4
+ data.tar.gz: 47349529aff69d3719fa61ac50cbc943a972b3e8470dcb49c7a899b97dffff10
5
5
  SHA512:
6
- metadata.gz: 43c71c2483da1f81715fa8cb3651f8bd82a3c1ef359d5361e6bfb6541f178ce669b3381f789a7cb151d9238917b2a462b8a69e22f1e6c4de50443e3af300cdfd
7
- data.tar.gz: 33f5425b1baaf3ea4712936e8312fca895c3c7a668c887d8862f61c4558ec2c574afa64cce6d5b0a33c1a9afed84f6b558161fbdaa57ba09530f94b33460b366
6
+ metadata.gz: a6f8b361e9f960fa543ec59cb1bb5a30f99e76a69690e2017e5e46db630e70abb1e4262d4af685a5a0e3c56cbaaf007ac63c675f8d6e3fba1e2dfe3d44ecc180
7
+ data.tar.gz: 94cce0c83db4717e5c9e3589779ceb798993c32df0449ebeb91fe242d30890d12f6b15fce1d4a08424e1b0e0b34f388867a02ef16ff41879b393faa925b5ddfc
@@ -10,8 +10,8 @@ class CloudfrontLinkChecker
10
10
  results = File.readlines(file, :encoding => "UTF-8").grep /href="(.*)"/i
11
11
  results.each do |line|
12
12
  links = line.match(/href=(["'])(.*?)\1/i)[2]
13
- exclude_start_with_list = ["https:", "#", "mailto:", "tel:"]
14
- exclude_endings = [".ico", ".png", ".css", "/#contact-us", ".pdf"]
13
+ exclude_start_with_list = ["https:", "http:", "#", "mailto:", "tel:"]
14
+ exclude_endings = [".ico", ".png", ".css", "/#contact-us", ".pdf", ".html"]
15
15
  if !links.start_with?(*exclude_start_with_list) && !links.end_with?(*exclude_endings)
16
16
  if !links.start_with?("/") || !links.end_with?("/")
17
17
  bad_links.push(links)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cloudfront-link-checker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brandon Carlson