validate-website 1.0.1 → 1.0.2

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
  SHA1:
3
- metadata.gz: 46efde8e3afaf965afb3a61893bbf6070bf3ee78
4
- data.tar.gz: ddcf5e37e699eb74ae6fc299bb7366323c34c2bf
3
+ metadata.gz: 4263f21d67ab70f12daa7658a7808e1829a9f9da
4
+ data.tar.gz: 88550249c2caca495b8478392c44d6df52d4d7a6
5
5
  SHA512:
6
- metadata.gz: 7e137db2244e39a6f9fd12d36b8ed5c477f59bd22a6edb8f010315fe27c8fe1d60fbdeeb590396b6a25e01993ce69579a8bc8006b06b2b5a4759e739679b3c22
7
- data.tar.gz: 75d4c6e34efa984b0bf0b998fc790f89422742ac40d7cf7b7c5a02e744abf66ac0a9eba0f08a99161e30aeaae07276c3f1ca62bb604ee31e6b18424851f0eda9
6
+ metadata.gz: e8e86f4d2afbed43f52fecb99f5a2e953f4d20440de2b000ab235d60c42318cf0e0b77c80e83fb4cea2d90aa53e9838c848ff1ba3179d5393badb6e300aad890
7
+ data.tar.gz: a1676d60f28951d851983661000362e337952dee65188c670fc55484156100ac2ed8ac9683329fc8afae9d55db9cab7811585db0fea6eb0bf0467f27222f066a
data/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License
2
2
 
3
- Copyright (c) 2009-2010 Laurent Arnoud <laurent@spkdev.net>
3
+ Copyright (c) 2009-2015 Laurent Arnoud <laurent@spkdev.net>
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining
6
6
  a copy of this software and associated documentation files (the
@@ -118,7 +118,7 @@ module ValidateWebsite
118
118
  # check files linked on static document
119
119
  # see lib/validate_website/runner.rb
120
120
  def check_static_not_found(links)
121
- links.each do |l|
121
+ links.each_with_object(Set[]) do |l, result|
122
122
  link = static_site_link(l)
123
123
  next unless in_static_domain?(@site, link)
124
124
  file_path = URI.parse(File.join(Dir.getwd, link.path || '/')).path
@@ -127,8 +127,7 @@ module ValidateWebsite
127
127
  if File.extname(file_path) == '.css'
128
128
  response = fake_httpresponse(open(file_path).read, ['text/css'])
129
129
  css_page = Spidr::Page.new(l, response)
130
- links.concat extract_urls_from_css(css_page)
131
- links.uniq!
130
+ result.merge extract_urls_from_css(css_page)
132
131
  end
133
132
  end
134
133
  end
data/spec/core_spec.rb CHANGED
@@ -111,7 +111,7 @@ describe ValidateWebsite::Core do
111
111
  site: 'https://linuxfr.org/',
112
112
  markup: false,
113
113
  not_found: true)
114
- @validate_website.not_founds_count.must_equal 464
114
+ @validate_website.not_founds_count.must_equal 463
115
115
  end
116
116
  end
117
117
  end
@@ -0,0 +1 @@
1
+ .t { background-image: url(/image/42.png) }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: validate-website
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Laurent Arnoud
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-15 00:00:00.000000000 Z
11
+ date: 2015-02-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: spidr
@@ -234,6 +234,7 @@ files:
234
234
  - man/man1/validate-website-static.1
235
235
  - man/man1/validate-website.1
236
236
  - spec/core_spec.rb
237
+ - spec/data/assets/application-92f19110a9d47a56d2ebe744e15af301.css
237
238
  - spec/data/html4-strict.html
238
239
  - spec/data/html5-linuxfr.html
239
240
  - spec/data/html5.html