bashtetikn 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: fc75d218e10330346836e8cad06bc5d0b732733c1c0df23391aa76ecd5ed4129
4
+ data.tar.gz: f0275de15fbe2ee55fc13cb0cf00920c75532e4ca36fb7ac3b9843ccee0f68dc
5
+ SHA512:
6
+ metadata.gz: 8284e3805468e7b2223e29baa6c2ae0eaa2ab00153c41d58b969687c4045d5da3a15c802f7f47b5b2aef523cdf71132a6bbb9d6199e1783cd9c266179e34df3e
7
+ data.tar.gz: 8ee24c51f263cc75db77cedea1d75b328f3fec7e5ba1ff1dd65b49f27f5ff4d54b8d3b6cb38d8edc8b0881b2d02d2a095aa1a2daaca65902f50228831736e50f
@@ -0,0 +1,24 @@
1
+ # See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.194.3/containers/ruby/.devcontainer/base.Dockerfile
2
+
3
+ # [Choice] Ruby version: 3, 3.0, 2, 2.7, 2.6
4
+ ARG VARIANT="3.0"
5
+ FROM mcr.microsoft.com/vscode/devcontainers/ruby:0-${VARIANT}
6
+
7
+ # [Choice] Node.js version: none, lts/*, 16, 14, 12, 10
8
+ ARG NODE_VERSION="none"
9
+ RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi
10
+
11
+ # [Optional] Uncomment this section to install additional OS packages.
12
+ # RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
13
+ # && apt-get -y install --no-install-recommends <your-package-list-here>
14
+
15
+ # [Optional] Uncomment this line to install additional gems.
16
+ # RUN gem install <your-gem-names-here>
17
+
18
+ # [Optional] Uncomment this line to install global node packages.
19
+ # RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g <your-package-here>" 2>&1
20
+
21
+ WORKDIR /tmp/app_dependencies
22
+ COPY Gemfile* .
23
+ # TODO: install gems in image. Why can't it find Gemfile at this point?
24
+ # RUN bundle install
@@ -0,0 +1,53 @@
1
+ // For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
2
+ // https://github.com/microsoft/vscode-dev-containers/tree/v0.194.3/containers/ruby
3
+ {
4
+ "name": "bashtetikn",
5
+ "build": {
6
+ "dockerfile": "Dockerfile",
7
+ "args": {
8
+ // Update 'VARIANT' to pick a Ruby version: 3, 3.0, 2, 2.7, 2.6
9
+ "VARIANT": "3",
10
+ // Options
11
+ "NODE_VERSION": "lts/*"
12
+ }
13
+ },
14
+
15
+ // Set *default* container specific settings.json values on container create.
16
+ "settings": {
17
+ "[ruby]": {
18
+ "editor.insertSpaces": true,
19
+ "editor.tabSize": 2
20
+ },
21
+ "editor.formatOnSave": true,
22
+ // Configure rebornix.ruby extension
23
+ "ruby.useBundler": true, //run non-lint commands with bundle exec
24
+ "ruby.useLanguageServer": true, // use the internal language server (see below)
25
+ "ruby.lint": {
26
+ "rubocop": {
27
+ "useBundler": true // enable rubocop via bundler
28
+ },
29
+ "reek": {
30
+ "useBundler": true // enable reek via bundler
31
+ }
32
+ },
33
+ "ruby.format": "rubocop", // use rubocop for formatting
34
+ },
35
+
36
+ // Add the IDs of extensions you want installed when the container is created.
37
+ "extensions": [
38
+ "editorconfig.editorconfig",
39
+ "rebornix.Ruby",
40
+
41
+ ],
42
+
43
+ // Use 'forwardPorts' to make a list of ports inside the container available locally.
44
+ // "forwardPorts": [],
45
+
46
+ // Use 'postCreateCommand' to run commands after the container is created.
47
+ // "postCreateCommand": "ruby --version",
48
+ "postCreateCommand": "bin/setup",
49
+
50
+ // Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
51
+ "remoteUser": "vscode"
52
+
53
+ }
data/.editorconfig ADDED
@@ -0,0 +1,8 @@
1
+ [*]
2
+ indent_style = space
3
+ indent_size = 2
4
+ insert_final_newline = true
5
+ trim_trailing_whitespace = true
6
+
7
+ [*.go]
8
+ indent_style = tab
data/.rubocop.yml ADDED
@@ -0,0 +1,17 @@
1
+ AllCops:
2
+ NewCops: enable
3
+ TargetRubyVersion: 2.6
4
+
5
+ Layout/LineLength:
6
+ Max: 120
7
+
8
+ Metrics/BlockLength:
9
+ IgnoredMethods: ['describe', 'context', 'let', 'shared_examples'] # from rspec
10
+
11
+ Style/StringLiterals:
12
+ Enabled: true
13
+ EnforcedStyle: double_quotes
14
+
15
+ Style/StringLiteralsInInterpolation:
16
+ Enabled: true
17
+ EnforcedStyle: double_quotes
data/CHANGELOG.md ADDED
@@ -0,0 +1,14 @@
1
+ - # Change Log
2
+ All notable changes to this project will be documented in this file.
3
+
4
+ The format is based on [Keep a CHANGELOG](http://keepachangelog.com/)
5
+ and this project adheres to [Semantic Versioning](http://semver.org/).
6
+
7
+
8
+ ## [0.1.0] - 2021-10-20
9
+
10
+ - Initial release
11
+ - Bashtetikn::HtmlValidatorFromW3C#validate_text
12
+ - Bashtetikn::HtmlValidatorFromW3C#validate_uri
13
+ - Both return collection of warnings and errors
14
+ - WARNING: API is subject to frequent change
@@ -0,0 +1,84 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
+
7
+ We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8
+
9
+ ## Our Standards
10
+
11
+ Examples of behavior that contributes to a positive environment for our community include:
12
+
13
+ * Demonstrating empathy and kindness toward other people
14
+ * Being respectful of differing opinions, viewpoints, and experiences
15
+ * Giving and gracefully accepting constructive feedback
16
+ * Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17
+ * Focusing on what is best not just for us as individuals, but for the overall community
18
+
19
+ Examples of unacceptable behavior include:
20
+
21
+ * The use of sexualized language or imagery, and sexual attention or
22
+ advances of any kind
23
+ * Trolling, insulting or derogatory comments, and personal or political attacks
24
+ * Public or private harassment
25
+ * Publishing others' private information, such as a physical or email
26
+ address, without their explicit permission
27
+ * Other conduct which could reasonably be considered inappropriate in a
28
+ professional setting
29
+
30
+ ## Enforcement Responsibilities
31
+
32
+ Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
33
+
34
+ Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
35
+
36
+ ## Scope
37
+
38
+ This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
39
+
40
+ ## Enforcement
41
+
42
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at matt@scilipoti.name. All complaints will be reviewed and investigated promptly and fairly.
43
+
44
+ All community leaders are obligated to respect the privacy and security of the reporter of any incident.
45
+
46
+ ## Enforcement Guidelines
47
+
48
+ Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
49
+
50
+ ### 1. Correction
51
+
52
+ **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
53
+
54
+ **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
55
+
56
+ ### 2. Warning
57
+
58
+ **Community Impact**: A violation through a single incident or series of actions.
59
+
60
+ **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
61
+
62
+ ### 3. Temporary Ban
63
+
64
+ **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
65
+
66
+ **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
67
+
68
+ ### 4. Permanent Ban
69
+
70
+ **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
71
+
72
+ **Consequence**: A permanent ban from any sort of public interaction within the community.
73
+
74
+ ## Attribution
75
+
76
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
77
+ available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
78
+
79
+ Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
80
+
81
+ [homepage]: https://www.contributor-covenant.org
82
+
83
+ For answers to common questions about this code of conduct, see the FAQ at
84
+ https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
data/Gemfile ADDED
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ # Specify your gem's dependencies in bashtetikn.gemspec
6
+ gemspec
7
+
8
+ # This section is for development dependencies
9
+ gem "pry-byebug", "~> 3.9"
10
+ gem "rake", "~> 13.0"
11
+ gem "reek", "~> 6.0"
12
+ gem "rspec", "~> 3.0"
13
+ gem "rspec-its", require: false
14
+ gem "rubocop", "~> 1.21"
15
+ gem "vcr", "~> 6.0"
16
+ gem "webmock", "3.14"
data/Gemfile.lock ADDED
@@ -0,0 +1,97 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ bashtetikn (0.1.0)
5
+ w3c_validators (~> 1.3)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ addressable (2.8.0)
11
+ public_suffix (>= 2.0.2, < 5.0)
12
+ ast (2.4.2)
13
+ byebug (11.1.3)
14
+ coderay (1.1.3)
15
+ crack (0.4.5)
16
+ rexml
17
+ diff-lcs (1.4.4)
18
+ hashdiff (1.0.1)
19
+ json (2.5.1)
20
+ kwalify (0.7.2)
21
+ method_source (1.0.0)
22
+ nokogiri (1.12.5-x86_64-linux)
23
+ racc (~> 1.4)
24
+ parallel (1.21.0)
25
+ parser (3.0.2.0)
26
+ ast (~> 2.4.1)
27
+ pry (0.13.1)
28
+ coderay (~> 1.1)
29
+ method_source (~> 1.0)
30
+ pry-byebug (3.9.0)
31
+ byebug (~> 11.0)
32
+ pry (~> 0.13.0)
33
+ public_suffix (4.0.6)
34
+ racc (1.5.2)
35
+ rainbow (3.0.0)
36
+ rake (13.0.6)
37
+ reek (6.0.6)
38
+ kwalify (~> 0.7.0)
39
+ parser (~> 3.0.0)
40
+ rainbow (>= 2.0, < 4.0)
41
+ regexp_parser (2.1.1)
42
+ rexml (3.2.5)
43
+ rspec (3.10.0)
44
+ rspec-core (~> 3.10.0)
45
+ rspec-expectations (~> 3.10.0)
46
+ rspec-mocks (~> 3.10.0)
47
+ rspec-core (3.10.1)
48
+ rspec-support (~> 3.10.0)
49
+ rspec-expectations (3.10.1)
50
+ diff-lcs (>= 1.2.0, < 2.0)
51
+ rspec-support (~> 3.10.0)
52
+ rspec-its (1.3.0)
53
+ rspec-core (>= 3.0.0)
54
+ rspec-expectations (>= 3.0.0)
55
+ rspec-mocks (3.10.2)
56
+ diff-lcs (>= 1.2.0, < 2.0)
57
+ rspec-support (~> 3.10.0)
58
+ rspec-support (3.10.2)
59
+ rubocop (1.22.1)
60
+ parallel (~> 1.10)
61
+ parser (>= 3.0.0.0)
62
+ rainbow (>= 2.2.2, < 4.0)
63
+ regexp_parser (>= 1.8, < 3.0)
64
+ rexml
65
+ rubocop-ast (>= 1.12.0, < 2.0)
66
+ ruby-progressbar (~> 1.7)
67
+ unicode-display_width (>= 1.4.0, < 3.0)
68
+ rubocop-ast (1.12.0)
69
+ parser (>= 3.0.1.1)
70
+ ruby-progressbar (1.11.0)
71
+ unicode-display_width (2.1.0)
72
+ vcr (6.0.0)
73
+ w3c_validators (1.3.6)
74
+ json (>= 1.8)
75
+ nokogiri (~> 1.6)
76
+ rexml (~> 3.2)
77
+ webmock (3.14.0)
78
+ addressable (>= 2.8.0)
79
+ crack (>= 0.3.2)
80
+ hashdiff (>= 0.4.0, < 2.0.0)
81
+
82
+ PLATFORMS
83
+ x86_64-linux
84
+
85
+ DEPENDENCIES
86
+ bashtetikn!
87
+ pry-byebug (~> 3.9)
88
+ rake (~> 13.0)
89
+ reek (~> 6.0)
90
+ rspec (~> 3.0)
91
+ rspec-its
92
+ rubocop (~> 1.21)
93
+ vcr (~> 6.0)
94
+ webmock (= 3.14)
95
+
96
+ BUNDLED WITH
97
+ 2.2.22
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2021 Matt Scilipoti
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,85 @@
1
+ # Bashtetikn
2
+
3
+ Tools to help validate web pages. Gathers validation results from multiple sources, providing a single interface for both requests and responses.
4
+
5
+ > bashtetikn (Yiddish, _verb_, /bɛ-oSH-tɛk-in/): To validate, certify, or confirm
6
+
7
+ ![status](https://github.com/mattscilipoti/bashtetikn/actions/workflows/main.yml/badge.svg)
8
+
9
+ ## Installation
10
+
11
+ Add this line to your application's Gemfile:
12
+
13
+ ```ruby
14
+ gem 'bashtetikn'
15
+ ```
16
+
17
+ And then execute:
18
+
19
+ $ bundle install
20
+
21
+ Or install it yourself as:
22
+
23
+ $ gem install bashtetikn
24
+
25
+ ## Usage
26
+
27
+ ```ruby
28
+ require 'bashtetikn'
29
+ validator = Bashtetikn::HtmlValidatorFromW3C.new
30
+ suspect_url = "https://w3c-validators.github.io/w3c_validators/invalid_html5.html"
31
+
32
+ results = validator.validate_uri(suspect_url)
33
+ ```
34
+
35
+ `puts results.errors`
36
+ ```
37
+ ERROR; URI: https://w3c-validators.github.io/w3c_validators/invalid_html5.html; line 15: End tag for “body” seen, but there were unclosed elements.
38
+ ERROR; URI: https://w3c-validators.github.io/w3c_validators/invalid_html5.html; line 10: Unclosed element “section”.
39
+ ```
40
+
41
+ `puts results.warnings`
42
+ ```shell
43
+ => nil
44
+ ```
45
+
46
+ ## Supported Validators
47
+
48
+ | Content | Page | Fragment |
49
+ | ------- | ---- | -------- |
50
+ | [HTML (W3C)](https://validator.w3.org/unicorn/) | :white_check_mark: | :white_check_mark: |
51
+ | Accessibility (WAVE) | :soon: | :soon: |
52
+
53
+
54
+ ## Development
55
+
56
+ We are dockerized! If using VS Code, this should automatically load inside a Dev Environment (see: https://code.visualstudio.com/docs/remote/containers).
57
+
58
+ - Run `rake spec` to run the tests.
59
+ - You can also run `bin/console` for an interactive prompt that will allow you to experiment.
60
+
61
+ ### If you don't want to use Docker...
62
+
63
+ After checking out the repo, run `bin/setup` to install dependencies.
64
+
65
+ ## Contributing
66
+
67
+ Bug reports and pull requests are welcome on GitHub at https://github.com/mattscilipoti/bashtetikn. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/mattscilipoti/bashtetikn/blob/deploy/CODE_OF_CONDUCT.md).
68
+
69
+ ### Release Managers
70
+
71
+ - To install this gem onto your local machine, run `bundle exec rake install`.
72
+ - 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 the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
73
+
74
+
75
+ ## License
76
+
77
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
78
+
79
+ ## Code of Conduct
80
+
81
+ Everyone interacting in the Bashtetikn project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/mattscilipoti/bashtetikn/blob/deploy/CODE_OF_CONDUCT.md).
82
+
83
+ <hr/>
84
+
85
+ [![I love Validator](https://validator.w3.org/unicorn/images/I_heart_validator.png)](https://www.w3.org/support/)
data/Rakefile ADDED
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ require "rspec/core/rake_task"
5
+
6
+ RSpec::Core::RakeTask.new(:spec)
7
+
8
+ require "rubocop/rake_task"
9
+
10
+ RuboCop::RakeTask.new
11
+
12
+ task default: %i[spec rubocop]
@@ -0,0 +1,43 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "lib/bashtetikn/version"
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = "bashtetikn"
7
+ spec.version = Bashtetikn::VERSION
8
+ spec.authors = ["Matt Scilipoti"]
9
+ spec.email = ["matt@scilipoti.name"]
10
+
11
+ spec.summary = "Tools to help validate web pages."
12
+ spec.description = <<-DESC
13
+ Tools to help validate web pages.
14
+ Gathers validation results from multiple sources, providing a single interface for both requests and responses.
15
+ DESC
16
+ spec.homepage = "https://github.com/mattscilipoti/bashtetikn"
17
+ spec.license = "MIT"
18
+ spec.required_ruby_version = ">= 2.6.0"
19
+
20
+ # spec.metadata["allowed_push_host"] = "TODO: Set to your gem server 'https://example.com'"
21
+
22
+ spec.metadata["homepage_uri"] = spec.homepage
23
+ spec.metadata["source_code_uri"] = "https://github.com/mattscilipoti/bashtetikn"
24
+ spec.metadata["changelog_uri"] = "https://github.com/mattscilipoti/bashtetikn/blob/deploy/CHANGELOG.md"
25
+
26
+ # Specify which files should be added to the gem when it is released.
27
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
28
+ spec.files = Dir.chdir(File.expand_path(__dir__)) do
29
+ `git ls-files -z`.split("\x0").reject do |f|
30
+ (f == __FILE__) || f.match(%r{\A(?:(?:test|spec|features)/|\.(?:git|travis|circleci)|appveyor)})
31
+ end
32
+ end
33
+ spec.bindir = "exe"
34
+ spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
35
+ spec.require_paths = ["lib"]
36
+
37
+ # Uncomment to register a new dependency of your gem
38
+ # spec.add_dependency "example-gem", "~> 1.0"
39
+ spec.add_dependency "w3c_validators", "~> 1.3"
40
+
41
+ # For more information and examples about making a new gem, checkout our
42
+ # guide at: https://bundler.io/guides/creating_gem.html
43
+ end
data/bin/console ADDED
@@ -0,0 +1,15 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require "bundler/setup"
5
+ require "bashtetikn"
6
+
7
+ # You can add fixtures and/or initialization code here to make experimenting
8
+ # with your gem easier. You can also use a different console, if you like.
9
+
10
+ # (If you use this, don't forget to add pry to your Gemfile!)
11
+ # require "pry"
12
+ # Pry.start
13
+
14
+ require "irb"
15
+ IRB.start(__FILE__)
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "w3c_validators"
4
+
5
+ module Bashtetikn
6
+ # Uses validator provided by W3C to validate HTML
7
+ class HtmlValidatorFromW3C
8
+ # Validates html text
9
+ def validate_text(text_to_validate)
10
+ validator.validate_text(text_to_validate)
11
+ end
12
+
13
+ def validate_uri(uri)
14
+ validator.validate_uri(uri)
15
+ end
16
+
17
+ # The validator used to process the page
18
+ def validator
19
+ W3CValidators::NuValidator.new
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Bashtetikn
4
+ VERSION = "0.1.0"
5
+ end
data/lib/bashtetikn.rb ADDED
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "bashtetikn/version"
4
+ require_relative "bashtetikn/html_validator_from_w3c"
5
+
6
+ module Bashtetikn
7
+ class Error < StandardError; end
8
+ # Your code goes here...
9
+ end
metadata ADDED
@@ -0,0 +1,79 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: bashtetikn
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Matt Scilipoti
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2021-10-21 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: w3c_validators
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.3'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.3'
27
+ description: |2
28
+ Tools to help validate web pages.
29
+ Gathers validation results from multiple sources, providing a single interface for both requests and responses.
30
+ email:
31
+ - matt@scilipoti.name
32
+ executables: []
33
+ extensions: []
34
+ extra_rdoc_files: []
35
+ files:
36
+ - ".devcontainer/Dockerfile"
37
+ - ".devcontainer/devcontainer.json"
38
+ - ".editorconfig"
39
+ - ".rubocop.yml"
40
+ - CHANGELOG.md
41
+ - CODE_OF_CONDUCT.md
42
+ - Gemfile
43
+ - Gemfile.lock
44
+ - LICENSE.txt
45
+ - README.md
46
+ - Rakefile
47
+ - bashtetikn.gemspec
48
+ - bin/console
49
+ - bin/setup
50
+ - lib/bashtetikn.rb
51
+ - lib/bashtetikn/html_validator_from_w3c.rb
52
+ - lib/bashtetikn/version.rb
53
+ homepage: https://github.com/mattscilipoti/bashtetikn
54
+ licenses:
55
+ - MIT
56
+ metadata:
57
+ homepage_uri: https://github.com/mattscilipoti/bashtetikn
58
+ source_code_uri: https://github.com/mattscilipoti/bashtetikn
59
+ changelog_uri: https://github.com/mattscilipoti/bashtetikn/blob/deploy/CHANGELOG.md
60
+ post_install_message:
61
+ rdoc_options: []
62
+ require_paths:
63
+ - lib
64
+ required_ruby_version: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: 2.6.0
69
+ required_rubygems_version: !ruby/object:Gem::Requirement
70
+ requirements:
71
+ - - ">="
72
+ - !ruby/object:Gem::Version
73
+ version: '0'
74
+ requirements: []
75
+ rubygems_version: 3.2.22
76
+ signing_key:
77
+ specification_version: 4
78
+ summary: Tools to help validate web pages.
79
+ test_files: []