w3clove 0.0.2 → 0.2.1

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.
@@ -12,7 +12,7 @@ module W3Clove
12
12
 
13
13
  ##
14
14
  # Parses a remote xml sitemap and checks markup validation for each url
15
- # Shows progress on dot-style (...F...FFE..). A dot is a page with no errors,
15
+ # Shows progress on dot-style (...F...FFE..). A dot is a valid page,
16
16
  # an F is a page with errors, and an E is an exception
17
17
  # After the checking is done, a detailed summary is shown
18
18
  def check(url)
@@ -33,7 +33,7 @@ module W3Clove
33
33
  def show_results(sitemap)
34
34
  show_sitemap_summary(sitemap)
35
35
  show_popular_errors(sitemap)
36
- show_popular_errors(sitemap)
36
+ show_popular_warnings(sitemap)
37
37
  say "\n\nDETAILS PER PAGE"
38
38
  sitemap.pages.select {|page| !page.errors.empty?}.each do |p|
39
39
  show_page_summary(p)
@@ -49,16 +49,20 @@ HEREDOC
49
49
 
50
50
  def show_popular_errors(sitemap)
51
51
  say "\n\nMOST POPULAR ERRORS\n"
52
- sitemap.errors.group_by {|e| e.message_id}.sort_by {|m,e| e.length}.reverse.each do |message_id, errors|
53
- say "error #{message_id} happens #{errors.length} times"
54
- end
52
+ sitemap.errors.group_by {|e| e.message_id}
53
+ .sort_by {|m,e| e.length}
54
+ .reverse.each do |message_id, errors|
55
+ say "error #{message_id} happens #{errors.length} times"
56
+ end
55
57
  end
56
58
 
57
59
  def show_popular_warnings(sitemap)
58
60
  say "\n\nMOST POPULAR WARNINGS\n"
59
- sitemap.warnings.group_by {|e| e.message_id}.sort_by {|m,e| e.length}.reverse.each do |message_id, warnings|
60
- say "warning #{message_id} happens #{warnings.length} times"
61
- end
61
+ sitemap.warnings.group_by {|e| e.message_id}
62
+ .sort_by {|m,e| e.length}
63
+ .reverse.each do |message_id, warnings|
64
+ say "warning #{message_id} happens #{warnings.length} times"
65
+ end
62
66
  end
63
67
 
64
68
  def show_page_summary(page)
@@ -1,5 +1,5 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
 
3
3
  module W3Clove
4
- VERSION = "0.0.2"
4
+ VERSION = "0.2.1"
5
5
  end
metadata CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 0
7
- - 0
8
7
  - 2
9
- version: 0.0.2
8
+ - 1
9
+ version: 0.2.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - Jaime Iniesta