site_health 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. checksums.yaml +5 -5
  2. data/.gitignore +3 -0
  3. data/.rubocop.yml +7 -0
  4. data/.ruby-style-guide.yml +263 -0
  5. data/.travis.yml +3 -2
  6. data/CHANGELOG.md +10 -0
  7. data/Gemfile +4 -2
  8. data/LICENSE.txt +1 -1
  9. data/README.md +165 -21
  10. data/Rakefile +5 -3
  11. data/bin/console +4 -10
  12. data/bin/setup +0 -2
  13. data/exe/site_health +75 -0
  14. data/lib/site_health.rb +89 -113
  15. data/lib/site_health/check_data.rb +35 -0
  16. data/lib/site_health/checkers/checker.rb +152 -0
  17. data/lib/site_health/checkers/facebook_share_link.rb +125 -0
  18. data/lib/site_health/checkers/google_page_speed.rb +55 -0
  19. data/lib/site_health/checkers/html_proofer.rb +67 -0
  20. data/lib/site_health/checkers/json_syntax.rb +28 -0
  21. data/lib/site_health/checkers/missing_description.rb +50 -0
  22. data/lib/site_health/checkers/missing_title.rb +41 -0
  23. data/lib/site_health/checkers/page_not_found.rb +30 -0
  24. data/lib/site_health/checkers/redirect.rb +16 -0
  25. data/lib/site_health/checkers/w3c_css.rb +37 -0
  26. data/lib/site_health/checkers/w3c_html.rb +37 -0
  27. data/lib/site_health/checkers/xml.rb +27 -0
  28. data/lib/site_health/configuration/configuration.rb +84 -0
  29. data/lib/site_health/configuration/html_proofer_configuration.rb +88 -0
  30. data/lib/site_health/configuration/w3c_validators_configuration.rb +23 -0
  31. data/lib/site_health/event_emitter.rb +70 -0
  32. data/lib/site_health/issue.rb +125 -0
  33. data/lib/site_health/issues.rb +43 -0
  34. data/lib/site_health/issues_report.rb +52 -0
  35. data/lib/site_health/key_struct.rb +6 -3
  36. data/lib/site_health/link.rb +32 -0
  37. data/lib/site_health/null_logger.rb +14 -0
  38. data/lib/site_health/nurse.rb +167 -0
  39. data/lib/site_health/summarizers/page_size_summarizer.rb +77 -0
  40. data/lib/site_health/timer.rb +47 -0
  41. data/lib/site_health/url_map.rb +41 -0
  42. data/lib/site_health/version.rb +10 -1
  43. data/lib/site_health/{journals/w3c_journal.rb → w3c_journal_builder.rb} +5 -1
  44. data/site_health.gemspec +28 -17
  45. metadata +144 -21
  46. data/lib/site_health/checkers/css_page.rb +0 -36
  47. data/lib/site_health/checkers/html_page.rb +0 -41
  48. data/lib/site_health/checkers/xml_page.rb +0 -21
  49. data/lib/site_health/journals/css_journal.rb +0 -12
  50. data/lib/site_health/journals/html_journal.rb +0 -16
  51. data/lib/site_health/journals/xml_journal.rb +0 -8
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 251746b898058b968e3e9f5a50406a9e6d4ab4d3
4
- data.tar.gz: 6889e72c9f4d2b925381d9f41ef28a5acf0e84d6
2
+ SHA256:
3
+ metadata.gz: 58954b6231e7ac87ca9708ed7ab494fea6c40dc0e9be354c94c8d42abdafa48a
4
+ data.tar.gz: 32943cf9511a5bcfcfb9677c33a7f36da093121f654d5947fe380e7670976eb2
5
5
  SHA512:
6
- metadata.gz: c06a8679ef7fc7ebb6f9b926b8730119201ff4ad07439fae7b5e38fb15499ec51c11cca6664be80cb1d4dbde3a63d65c6d2861fcd0e567f9041908b39fa46b02
7
- data.tar.gz: af62e5459f0882e659da7a2e9e7b47b12aaf8d87d1835acf621dbdc3234999002f5e25ade7ed64da93ec9c95d2231aa0671adddb22ad7896447b2bc2a91be8c9
6
+ metadata.gz: 033e88ed85ee9582298722df6098575a1a3526788b1e174c78723175e63ba729e82102aef0771e680c1c5fbbbde2bc08bf33b8c35800949c358a92d0d2fc78f9
7
+ data.tar.gz: cba191702784f73c3fa78980204157ab62d53afc2a0351e9ab6b75e528599d907f78fa4b04f2944e9300722a9417acb19f1fc497adb9eb5eaabf756f0a9c3f49
data/.gitignore CHANGED
@@ -6,6 +6,7 @@
6
6
  /pkg/
7
7
  /spec/reports/
8
8
  /tmp/
9
+ /doc/
9
10
 
10
11
  Gemfile.lock
11
12
 
@@ -13,3 +14,5 @@ Gemfile.lock
13
14
  .rspec_status
14
15
 
15
16
  .byebug_history
17
+
18
+ NOTES.md
@@ -0,0 +1,7 @@
1
+ inherit_from: .ruby-style-guide.yml
2
+ AllCops:
3
+ UseCache: true
4
+ CacheRootDirectory: tmp
5
+ Exclude:
6
+ - 'tmp/*.rb'
7
+ - 'db/schema.rb'
@@ -0,0 +1,263 @@
1
+ Rails:
2
+ Enabled: false
3
+ AllCops:
4
+ TargetRubyVersion: 2.3
5
+ Exclude:
6
+ - "vendor/**/*"
7
+ UseCache: true
8
+ Style/CollectionMethods:
9
+ Description: Preferred collection methods.
10
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#map-find-select-reduce-size
11
+ Enabled: true
12
+ PreferredMethods:
13
+ collect: map
14
+ collect!: map!
15
+ find: detect
16
+ find_all: select
17
+ reduce: inject
18
+ Style/RedundantFreeze:
19
+ Description: "Checks usages of Object#freeze on immutable objects."
20
+ Enabled: false
21
+ Layout/DotPosition:
22
+ Description: Checks the position of the dot in multi-line method calls.
23
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-multi-line-chains
24
+ Enabled: true
25
+ EnforcedStyle: trailing
26
+ SupportedStyles:
27
+ - leading
28
+ - trailing
29
+ Naming/FileName:
30
+ Description: Use snake_case for source file names.
31
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-files
32
+ Enabled: false
33
+ Exclude: []
34
+ Naming/MemoizedInstanceVariableName:
35
+ Description: Memoized method name should match memo instance variable name.
36
+ Enabled: false
37
+ Naming/UncommunicativeMethodParamName:
38
+ Description: >-
39
+ Checks for method parameter names that contain capital letters,
40
+ end in numbers, or do not meet a minimal length.
41
+ Enabled: false
42
+ Style/GuardClause:
43
+ Description: Check for conditionals that can be replaced with guard clauses
44
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals
45
+ Enabled: true
46
+ MinBodyLength: 3
47
+ Style/IfUnlessModifier:
48
+ Description: Favor modifier if/unless usage when you have a single-line body.
49
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier
50
+ Enabled: false
51
+ Style/OptionHash:
52
+ Description: Don't use option hashes when you can use keyword arguments.
53
+ Enabled: false
54
+ Style/PercentLiteralDelimiters:
55
+ Description: Use `%`-literal delimiters consistently
56
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-literal-braces
57
+ Enabled: false
58
+ PreferredDelimiters:
59
+ "%": "()"
60
+ "%i": "()"
61
+ "%q": "()"
62
+ "%Q": "()"
63
+ "%r": "{}"
64
+ "%s": "()"
65
+ "%w": "()"
66
+ "%W": "()"
67
+ "%x": "()"
68
+ Naming/PredicateName:
69
+ Description: Check the names of predicate methods.
70
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#bool-methods-qmark
71
+ Enabled: true
72
+ NamePrefix:
73
+ - is_
74
+ - has_
75
+ - have_
76
+ NamePrefixBlacklist:
77
+ - is_
78
+ Exclude:
79
+ - spec/**/*
80
+ Style/RaiseArgs:
81
+ Description: Checks the arguments passed to raise/fail.
82
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#exception-class-messages
83
+ Enabled: false
84
+ EnforcedStyle: exploded
85
+ SupportedStyles:
86
+ - compact
87
+ - exploded
88
+ Style/SignalException:
89
+ Description: Checks for proper usage of fail and raise.
90
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#fail-method
91
+ Enabled: false
92
+ EnforcedStyle: semantic
93
+ SupportedStyles:
94
+ - only_raise
95
+ - only_fail
96
+ - semantic
97
+ Style/SingleLineBlockParams:
98
+ Description: Enforces the names of some block params.
99
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#reduce-blocks
100
+ Enabled: false
101
+ Methods:
102
+ - reduce:
103
+ - a
104
+ - e
105
+ - inject:
106
+ - a
107
+ - e
108
+ Style/TrivialAccessors:
109
+ Enabled: false
110
+ Style/SingleLineMethods:
111
+ Description: Avoid single-line methods.
112
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-single-line-methods
113
+ Enabled: false
114
+ AllowIfMethodIsEmpty: true
115
+ Style/StringLiterals:
116
+ Description: Checks if uses of quotes match the configured preference.
117
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-string-literals
118
+ Enabled: true
119
+ EnforcedStyle: single_quotes
120
+ SupportedStyles:
121
+ - single_quotes
122
+ - double_quotes
123
+ Style/MixinUsage:
124
+ Enabled: true
125
+ Exclude:
126
+ - exe/*
127
+ Style/StringLiteralsInInterpolation:
128
+ Description: Checks if uses of quotes inside expressions in interpolated strings
129
+ match the configured preference.
130
+ Enabled: true
131
+ EnforcedStyle: single_quotes
132
+ SupportedStyles:
133
+ - single_quotes
134
+ - double_quotes
135
+ Style/TrailingCommaInArrayLiteral:
136
+ Description: Checks for trailing comma in parameter lists and literals.
137
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas
138
+ Enabled: true
139
+ EnforcedStyleForMultiline: comma
140
+ Style/TrailingCommaInHashLiteral:
141
+ Description: Checks for trailing comma in parameter lists and literals.
142
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas
143
+ Enabled: true
144
+ EnforcedStyleForMultiline: comma
145
+ Metrics/AbcSize:
146
+ Description: A calculated magnitude based on number of assignments, branches, and
147
+ conditions.
148
+ Enabled: false
149
+ Max: 15
150
+ Metrics/ClassLength:
151
+ Description: Avoid classes longer than 100 lines of code.
152
+ Enabled: false
153
+ CountComments: false
154
+ Max: 100
155
+ Metrics/ModuleLength:
156
+ CountComments: false
157
+ Max: 100
158
+ Description: Avoid modules longer than 100 lines of code.
159
+ Enabled: false
160
+ Metrics/CyclomaticComplexity:
161
+ Description: A complexity metric that is strongly correlated to the number of test
162
+ cases needed to validate a method.
163
+ Enabled: false
164
+ Max: 6
165
+ Metrics/MethodLength:
166
+ Description: Avoid methods longer than 10 lines of code.
167
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#short-methods
168
+ Enabled: false
169
+ CountComments: false
170
+ Max: 10
171
+ Metrics/ParameterLists:
172
+ Description: Avoid parameter lists longer than three or four parameters.
173
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#too-many-params
174
+ Enabled: false
175
+ Max: 5
176
+ CountKeywordArgs: true
177
+ Metrics/PerceivedComplexity:
178
+ Description: A complexity metric geared towards measuring complexity for a human
179
+ reader.
180
+ Enabled: false
181
+ Max: 7
182
+ Metrics/LineLength:
183
+ Description: Maximum line length
184
+ Enabled: true
185
+ Max: 95
186
+ Exclude:
187
+ - Gemfile
188
+ - site_health.gemspec
189
+ - spec/**/*
190
+ Metrics/BlockLength:
191
+ Enabled: true
192
+ Exclude:
193
+ - site_health.gemspec
194
+ - spec/**/*
195
+ Lint/AssignmentInCondition:
196
+ Description: Don't use assignment in conditions.
197
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#safe-assignment-in-condition
198
+ Enabled: false
199
+ AllowSafeAssignment: true
200
+ Style/InlineComment:
201
+ Description: Avoid inline comments.
202
+ Enabled: false
203
+ Naming/AccessorMethodName:
204
+ Description: Check the naming of accessor methods for get_/set_.
205
+ Enabled: false
206
+ Style/Alias:
207
+ Description: Use alias_method instead of alias.
208
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#alias-method
209
+ Enabled: false
210
+ Style/Documentation:
211
+ Description: Document classes and non-namespace modules.
212
+ Enabled: false
213
+ Style/DoubleNegation:
214
+ Description: Checks for uses of double negation (!!).
215
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-bang-bang
216
+ Enabled: false
217
+ Style/EachWithObject:
218
+ Description: Prefer `each_with_object` over `inject` or `reduce`.
219
+ Enabled: false
220
+ Style/EmptyLiteral:
221
+ Description: Prefer literals to Array.new/Hash.new/String.new.
222
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#literal-array-hash
223
+ Enabled: false
224
+ Style/ModuleFunction:
225
+ Description: Checks for usage of `extend self` in modules.
226
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#module-function
227
+ Enabled: false
228
+ Style/OneLineConditional:
229
+ Description: Favor the ternary operator(?:) over if/then/else/end constructs.
230
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#ternary-operator
231
+ Enabled: false
232
+ Style/PerlBackrefs:
233
+ Description: Avoid Perl-style regex back references.
234
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-perl-regexp-last-matchers
235
+ Enabled: false
236
+ Style/Send:
237
+ Description: Prefer `Object#__send__` or `Object#public_send` to `send`, as `send`
238
+ may overlap with existing methods.
239
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#prefer-public-send
240
+ Enabled: false
241
+ Style/SpecialGlobalVars:
242
+ Description: Avoid Perl-style global variables.
243
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-cryptic-perlisms
244
+ Enabled: false
245
+ Style/VariableInterpolation:
246
+ Description: Don't interpolate global, instance and class variables directly in
247
+ strings.
248
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#curlies-interpolate
249
+ Enabled: false
250
+ Style/WhenThen:
251
+ Description: Use when x then ... for one-line cases.
252
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#one-line-cases
253
+ Enabled: false
254
+ Lint/EachWithObjectArgument:
255
+ Description: Check for immutable argument given to each_with_object.
256
+ Enabled: true
257
+ Lint/HandleExceptions:
258
+ Description: Don't suppress exception.
259
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#dont-hide-exceptions
260
+ Enabled: false
261
+ Lint/LiteralInInterpolation:
262
+ Description: Checks for literals used in interpolation.
263
+ Enabled: false
@@ -1,5 +1,6 @@
1
1
  sudo: false
2
2
  language: ruby
3
3
  rvm:
4
- - 2.4.1
5
- before_install: gem install bundler -v 1.16.0.pre.2
4
+ - 2.3.0
5
+ - 2.5.0
6
+ before_install: gem install bundler -v 1.16.1
@@ -0,0 +1,10 @@
1
+ # HEAD
2
+
3
+ ## v0.2.0
4
+
5
+ - Add post analysis steps for more issues - [#25](https://github.com/buren/site_health/pull/25)
6
+ - Add simple CLI – [#24](https://github.com/buren/site_health/pull/24)
7
+
8
+ ## v0.1.0
9
+
10
+ Is history..
data/Gemfile CHANGED
@@ -1,6 +1,8 @@
1
- source "https://rubygems.org"
1
+ # frozen_string_literal: true
2
2
 
3
- git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
3
+ source 'https://rubygems.org'
4
+
5
+ git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
4
6
 
5
7
  # Specify your gem's dependencies in site_health.gemspec
6
8
  gemspec
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2017 Jacob Burenstam
3
+ Copyright (c) 2018 Jacob Burenstam Linder
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -1,20 +1,22 @@
1
- # SiteHealth
1
+ # SiteHealth [![Build Status](https://travis-ci.org/buren/site_health.svg?branch=master)](https://travis-ci.org/buren/site_health)
2
2
 
3
3
  :warning: Project is still experimental, API will change (a lot) without notice.
4
4
 
5
5
  Crawl a site and check various health indicators, such as:
6
6
 
7
- - HTTP error status
8
- - Invalid HTML/CSS/XML
9
- - Missing HTML page title
10
- - Broken links
7
+ - Server errors
8
+ - HTTP errors
9
+ - Invalid HTML/XML/JSON
10
+ - Missing HTML title/description
11
+ - Missing image alt-attribute
12
+ - Google Pagespeed
11
13
 
12
14
  ## Installation
13
15
 
14
16
  Add this line to your application's Gemfile:
15
17
 
16
18
  ```ruby
17
- gem 'site_health'
19
+ gem "site_health"
18
20
  ```
19
21
 
20
22
  And then execute:
@@ -27,31 +29,162 @@ Or install it yourself as:
27
29
 
28
30
  ## Usage
29
31
 
32
+ [CLI usage](#cli).
33
+
34
+ Crawl and check site
35
+
36
+ ```ruby
37
+ nurse = SiteHealth.check("https://example.com")
38
+ ```
39
+
40
+ Check list of URLs
41
+ ```ruby
42
+ nurse = SiteHealth.check_urls(["https://example.com"])
43
+ ```
44
+
45
+ Write raw JSON result to file
46
+ ```ruby
47
+ nurse = SiteHealth.check("https://example.com")
48
+ json = JSON.pretty_generate(nurse.journal)
49
+
50
+ File.write("result.json", json)
51
+ ```
52
+
53
+ Each issue
54
+
55
+ ```ruby
56
+ SiteHealth.check_urls(urls) do |nurse|
57
+ nurse.clerk do |clerk|
58
+ clerk.every_issue { |issue| puts "#{issue.severity}, #{issue.title}" }
59
+ end
60
+ end
61
+ ```
62
+
63
+ Simple issue reports
64
+ ```ruby
65
+ nurse = SiteHealth.check("https://example.com")
66
+ report = SiteHealth::IssuesReport.new(nurse.issue) do |r|
67
+ r.fields = %i[url title detail] # issue fields
68
+ r.select { |issue| issue.url.include?('blog/') }
69
+ end
70
+
71
+ report.to_a
72
+ report.to_csv
73
+ report.to_json
74
+ ```
75
+
76
+ Event handlers
77
+
78
+ ```ruby
79
+ urls = ["https://example.com"]
80
+ nurse = SiteHealth.check_urls(urls) do |nurse|
81
+ nurse.clerk do |clerk|
82
+ clerk.every_journal do |journal, page|
83
+ time_in_seconds = journal[:runtime_in_seconds]
84
+ puts "Found page #{page.title} - #{page.url} (checks took #{time_in_seconds})"
85
+ end
86
+
87
+ clerk.every_check do |check|
88
+ puts "Ran check: #{check.name}"
89
+ end
90
+
91
+ clerk.every_failed_url do |url|
92
+ puts "Failed to fetch: #{url}"
93
+ end
94
+ end
95
+ end
96
+ ```
97
+
98
+ Write page speed summary CSV
99
+
30
100
  ```ruby
31
- journal = SiteHealth.check('https://example.com')
101
+ nurse = SiteHealth.check("https://example.com")
102
+ summary = SiteHealth::PageSpeedSummarizer.new(nurse.journal)
103
+ File.write("page_size_summary.csv", summary.to_csv)
104
+ ```
32
105
 
33
- # HTML
34
- journal.missing_html_title # List of URLs that are missing the HTML title
35
- journal.html_error_urls # List of URLs with HTML errors in them
106
+ ## Configuration
36
107
 
37
- # CSS
38
- journal.css_error_urls # List of URLs with CSS errors in them
108
+ All configuration is optional.
39
109
 
40
- # XML
41
- journal.xml_error_urls # List of URLs with XML errors in them
110
+ ```ruby
111
+ SiteHealth.configure do |config|
112
+ # Override default checkers
113
+ config.checkers = [:json_syntax, :html]
114
+
115
+ # Configure logger
116
+ config.logger = Logger.new(STDOUT).tap do |logger|
117
+ logger.progname = 'SiteHealth'
118
+ logger.level = Logger::INFO
119
+ end
120
+
121
+ # Configure HTMLProofer
122
+ config.html_proofer do |proofer_config|
123
+ proofer_config.log_level = :info
124
+ proofer_config.check_opengraph = false
125
+ end
126
+
127
+ # Configure W3C HTML/CSS validator
128
+ config.w3c_validators do |w3c_config|
129
+ w3c_config.css_uri = 'http://localhost:8888/check'
130
+ w3c_config.html_uri = 'http://localhost:8888/check'
131
+ end
132
+ end
133
+ ```
42
134
 
43
- # Broken URLs
44
- broken = journal.broken_urls.first
45
- broken.url # The URL that failed
46
- broken.exists_on # Array of URLs where the broken URL was present
135
+ __Load non-default checkers__:
47
136
 
48
- # HTTP
49
- journal.http_error_urls # All URLs with HTTP status code >= 400
137
+ A few of the non-default checkers available in this gem require 3rd-party dependencies which aren't installed by default.
138
+
139
+ | Checker name | Gem |
140
+ | ------------------ | ------------------ |
141
+ | google_page_speed | google-api-client |
142
+ | html_proofer | html-proofer |
143
+ | w3c_html | w3c_validators |
144
+ | w3c_css | w3c_validators |
145
+
146
+ If you intend to use any of those checkers make sure to install the gem first. For example to use the `google_page_speed` checker add `google-api-client` to your Gemfile or install it manually with `gem install google-api-client`. Then you register the checker for use.
147
+
148
+ ```ruby
149
+ SiteHealth.config.register_checker :google_page_speed
150
+ # LoadError is raised if google-api-client is *not* installed
151
+ ```
152
+
153
+ __Add your own checker__:
154
+
155
+ ```ruby
156
+ class ProfanityChecker < SiteHealth::Checker
157
+ name "profanity"
158
+ types %i[html json xml css javascript]
159
+
160
+ def check
161
+ add_data(profanity: {
162
+ damn: page.body.include?(" damn "),
163
+ shit: page.body.include?(" shit ")
164
+ })
165
+ end
166
+ end
167
+
168
+ # Then register it
169
+ SiteHealth.configure do |config|
170
+ config.register_checker ProfanityChecker
171
+ end
172
+ ```
173
+
174
+ ## CLI
175
+
176
+ ```
177
+ Usage: site_health --help
178
+ --url=val0
179
+ --fields=priority,title,url Issue fields to include - by default all fields are included
180
+ --output=result.csv Output format, .csv or .json
181
+ --[no-]progress
182
+ -h, --help How to use
50
183
  ```
51
184
 
52
185
  ## Development
53
186
 
54
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
187
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `bundle exec rake` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
55
188
 
56
189
  To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
57
190
 
@@ -62,3 +195,14 @@ Bug reports and pull requests are welcome on GitHub at https://github.com/buren/
62
195
  ## License
63
196
 
64
197
  The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
198
+
199
+ ---
200
+
201
+ ## TODO
202
+
203
+ - Good way to render result/reports data
204
+ - Improve logger support
205
+ - Checkers
206
+ * canonical URL
207
+ * http vs https links
208
+ * links matching a pattern