rocketvalidator 0.1.0 → 0.2.0
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.
- checksums.yaml +4 -4
 - data/Gemfile.lock +1 -1
 - data/README.md +6 -8
 - data/lib/rocketvalidator.rb +9 -30
 - data/lib/rocketvalidator/configuration.rb +2 -0
 - data/lib/rocketvalidator/v0/a11y_issue.rb +8 -0
 - data/lib/rocketvalidator/v0/common_a11y_issue.rb +7 -0
 - data/lib/rocketvalidator/v0/common_html_issue.rb +7 -0
 - data/lib/rocketvalidator/v0/html_issue.rb +8 -0
 - data/lib/rocketvalidator/v0/report.rb +6 -0
 - data/lib/rocketvalidator/v0/resource.rb +14 -0
 - data/lib/rocketvalidator/v0/web_page.rb +7 -0
 - data/lib/rocketvalidator/version.rb +2 -2
 - data/rocketvalidator.gemspec +1 -1
 - metadata +10 -2
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 39b4a780276b46638489a877009039dc0b4b22569c3a47e91997ec70ee032830
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 198ab807eb9e87f76cb816722e26e3f8cd7d1556b29e55edf6d6ac0a6d1cf1df
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: b648c82b295c5b4f59ef577ed4ded56b87a8b7202f2a2e03e1c4dcec617170b08ab26dbe6a0122ce3a6b323e2f638039689fe91e369243342ad554937c258fe9
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: c2e0eeb30038a433908b03b0731a299c6fa92914eb9d12dcbe1d881ac4b3c4d981dd3b807df07d5babed682469161cc22590baad08f657998cc3bc990b4428c5
         
     | 
    
        data/Gemfile.lock
    CHANGED
    
    
    
        data/README.md
    CHANGED
    
    | 
         @@ -1,8 +1,6 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            #  
     | 
| 
      
 1 
     | 
    
         
            +
            # Rocket Validator
         
     | 
| 
       2 
2 
     | 
    
         | 
| 
       3 
     | 
    
         
            -
            Welcome to  
     | 
| 
       4 
     | 
    
         
            -
             
     | 
| 
       5 
     | 
    
         
            -
            TODO: Delete this and the text above, and describe your gem
         
     | 
| 
      
 3 
     | 
    
         
            +
            Welcome to the official [Rocket Validator API](https://docs.rocketvalidator.com/api) gem!
         
     | 
| 
       6 
4 
     | 
    
         | 
| 
       7 
5 
     | 
    
         
             
            ## Installation
         
     | 
| 
       8 
6 
     | 
    
         | 
| 
         @@ -22,9 +20,9 @@ Or install it yourself as: 
     | 
|
| 
       22 
20 
     | 
    
         | 
| 
       23 
21 
     | 
    
         
             
            ## Usage
         
     | 
| 
       24 
22 
     | 
    
         | 
| 
       25 
     | 
    
         
            -
             
     | 
| 
      
 23 
     | 
    
         
            +
            Watch out this space for examples :)
         
     | 
| 
       26 
24 
     | 
    
         | 
| 
       27 
     | 
    
         
            -
            ## Development
         
     | 
| 
      
 25 
     | 
    
         
            +
            ## Gem Development
         
     | 
| 
       28 
26 
     | 
    
         | 
| 
       29 
27 
     | 
    
         
             
            After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
         
     | 
| 
       30 
28 
     | 
    
         | 
| 
         @@ -32,7 +30,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To 
     | 
|
| 
       32 
30 
     | 
    
         | 
| 
       33 
31 
     | 
    
         
             
            ## Contributing
         
     | 
| 
       34 
32 
     | 
    
         | 
| 
       35 
     | 
    
         
            -
            Bug reports and pull requests are welcome on GitHub at https://github.com/ 
     | 
| 
      
 33 
     | 
    
         
            +
            Bug reports and pull requests are welcome on GitHub at https://github.com/rocketvalidator/rocketvalidator-ruby. 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/rocketvalidator/rocketvalidator-ruby/blob/master/CODE_OF_CONDUCT.md).
         
     | 
| 
       36 
34 
     | 
    
         | 
| 
       37 
35 
     | 
    
         | 
| 
       38 
36 
     | 
    
         
             
            ## License
         
     | 
| 
         @@ -41,4 +39,4 @@ The gem is available as open source under the terms of the [MIT License](https:/ 
     | 
|
| 
       41 
39 
     | 
    
         | 
| 
       42 
40 
     | 
    
         
             
            ## Code of Conduct
         
     | 
| 
       43 
41 
     | 
    
         | 
| 
       44 
     | 
    
         
            -
            Everyone interacting in the Rocketvalidator project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/ 
     | 
| 
      
 42 
     | 
    
         
            +
            Everyone interacting in the Rocketvalidator project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/rocketvalidator/rocketvalidator-ruby/blob/master/CODE_OF_CONDUCT.md).
         
     | 
    
        data/lib/rocketvalidator.rb
    CHANGED
    
    | 
         @@ -1,35 +1,14 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            require "rocketvalidator/version"
         
     | 
| 
       2 
1 
     | 
    
         
             
            require "json_api_client"
         
     | 
| 
       3 
2 
     | 
    
         | 
| 
       4 
     | 
    
         
            -
             
     | 
| 
       5 
     | 
    
         
            -
             
     | 
| 
      
 3 
     | 
    
         
            +
            require "rocketvalidator/version"
         
     | 
| 
      
 4 
     | 
    
         
            +
            require "rocketvalidator/configuration"
         
     | 
| 
      
 5 
     | 
    
         
            +
            require "rocketvalidator/v0/resource"
         
     | 
| 
      
 6 
     | 
    
         
            +
            require "rocketvalidator/v0/report"
         
     | 
| 
      
 7 
     | 
    
         
            +
            require "rocketvalidator/v0/web_page"
         
     | 
| 
      
 8 
     | 
    
         
            +
            require "rocketvalidator/v0/common_a11y_issue"
         
     | 
| 
      
 9 
     | 
    
         
            +
            require "rocketvalidator/v0/common_html_issue"
         
     | 
| 
      
 10 
     | 
    
         
            +
            require "rocketvalidator/v0/a11y_issue"
         
     | 
| 
      
 11 
     | 
    
         
            +
            require "rocketvalidator/v0/html_issue"
         
     | 
| 
       6 
12 
     | 
    
         | 
| 
       7 
13 
     | 
    
         
             
            module RocketValidator
         
     | 
| 
       8 
     | 
    
         
            -
              class Base < JsonApiClient::Resource
         
     | 
| 
       9 
     | 
    
         
            -
                self.site = "https://rocketvalidator.dev/api/v0/"
         
     | 
| 
       10 
     | 
    
         
            -
                self.paginator = JsonApiClient::Paginating::NestedParamPaginator
         
     | 
| 
       11 
     | 
    
         
            -
              end
         
     | 
| 
       12 
     | 
    
         
            -
             
     | 
| 
       13 
     | 
    
         
            -
              class Report < Base
         
     | 
| 
       14 
     | 
    
         
            -
              end
         
     | 
| 
       15 
     | 
    
         
            -
             
     | 
| 
       16 
     | 
    
         
            -
              class WebPage < Base
         
     | 
| 
       17 
     | 
    
         
            -
                belongs_to :report
         
     | 
| 
       18 
     | 
    
         
            -
                belongs_to :common_html_issue
         
     | 
| 
       19 
     | 
    
         
            -
              end
         
     | 
| 
       20 
     | 
    
         
            -
             
     | 
| 
       21 
     | 
    
         
            -
              class CommonHtmlIssue < Base
         
     | 
| 
       22 
     | 
    
         
            -
                belongs_to :report
         
     | 
| 
       23 
     | 
    
         
            -
              end
         
     | 
| 
       24 
     | 
    
         
            -
             
     | 
| 
       25 
     | 
    
         
            -
              class HtmlIssue < Base
         
     | 
| 
       26 
     | 
    
         
            -
                belongs_to :report
         
     | 
| 
       27 
     | 
    
         
            -
                belongs_to :web_page
         
     | 
| 
       28 
     | 
    
         
            -
              end
         
     | 
| 
       29 
     | 
    
         
            -
             
     | 
| 
       30 
     | 
    
         
            -
              def self.with_api_token(api_token, &block)
         
     | 
| 
       31 
     | 
    
         
            -
                RocketValidator::Base.with_headers("Authorization" => "Bearer #{api_token}") do
         
     | 
| 
       32 
     | 
    
         
            -
                  block.call
         
     | 
| 
       33 
     | 
    
         
            -
                end
         
     | 
| 
       34 
     | 
    
         
            -
              end
         
     | 
| 
       35 
14 
     | 
    
         
             
            end
         
     | 
| 
         @@ -0,0 +1,14 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            module RocketValidator
         
     | 
| 
      
 2 
     | 
    
         
            +
              module V0
         
     | 
| 
      
 3 
     | 
    
         
            +
                class Resource < JsonApiClient::Resource
         
     | 
| 
      
 4 
     | 
    
         
            +
                  self.site = "https://rocketvalidator.dev/api/v0/"
         
     | 
| 
      
 5 
     | 
    
         
            +
                  self.paginator = JsonApiClient::Paginating::NestedParamPaginator
         
     | 
| 
      
 6 
     | 
    
         
            +
             
     | 
| 
      
 7 
     | 
    
         
            +
                  def self.with_api_token(token)
         
     | 
| 
      
 8 
     | 
    
         
            +
                    with_headers(authorization: "Bearer #{token}") do
         
     | 
| 
      
 9 
     | 
    
         
            +
                      yield
         
     | 
| 
      
 10 
     | 
    
         
            +
                    end
         
     | 
| 
      
 11 
     | 
    
         
            +
                  end
         
     | 
| 
      
 12 
     | 
    
         
            +
                end
         
     | 
| 
      
 13 
     | 
    
         
            +
              end
         
     | 
| 
      
 14 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -1,3 +1,3 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            module  
     | 
| 
       2 
     | 
    
         
            -
              VERSION = "0. 
     | 
| 
      
 1 
     | 
    
         
            +
            module RocketValidator
         
     | 
| 
      
 2 
     | 
    
         
            +
              VERSION = "0.2.0"
         
     | 
| 
       3 
3 
     | 
    
         
             
            end
         
     | 
    
        data/rocketvalidator.gemspec
    CHANGED
    
    | 
         @@ -2,7 +2,7 @@ require_relative 'lib/rocketvalidator/version' 
     | 
|
| 
       2 
2 
     | 
    
         | 
| 
       3 
3 
     | 
    
         
             
            Gem::Specification.new do |spec|
         
     | 
| 
       4 
4 
     | 
    
         
             
              spec.name          = "rocketvalidator"
         
     | 
| 
       5 
     | 
    
         
            -
              spec.version       =  
     | 
| 
      
 5 
     | 
    
         
            +
              spec.version       = RocketValidator::VERSION
         
     | 
| 
       6 
6 
     | 
    
         
             
              spec.authors       = ["Jaime Iniesta"]
         
     | 
| 
       7 
7 
     | 
    
         
             
              spec.email         = ["jaimeiniesta@gmail.com"]
         
     | 
| 
       8 
8 
     | 
    
         | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: rocketvalidator
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 0. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.2.0
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Jaime Iniesta
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: exe
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date: 2020-04- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2020-04-09 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: json_api_client
         
     | 
| 
         @@ -48,6 +48,14 @@ files: 
     | 
|
| 
       48 
48 
     | 
    
         
             
            - bin/console
         
     | 
| 
       49 
49 
     | 
    
         
             
            - bin/setup
         
     | 
| 
       50 
50 
     | 
    
         
             
            - lib/rocketvalidator.rb
         
     | 
| 
      
 51 
     | 
    
         
            +
            - lib/rocketvalidator/configuration.rb
         
     | 
| 
      
 52 
     | 
    
         
            +
            - lib/rocketvalidator/v0/a11y_issue.rb
         
     | 
| 
      
 53 
     | 
    
         
            +
            - lib/rocketvalidator/v0/common_a11y_issue.rb
         
     | 
| 
      
 54 
     | 
    
         
            +
            - lib/rocketvalidator/v0/common_html_issue.rb
         
     | 
| 
      
 55 
     | 
    
         
            +
            - lib/rocketvalidator/v0/html_issue.rb
         
     | 
| 
      
 56 
     | 
    
         
            +
            - lib/rocketvalidator/v0/report.rb
         
     | 
| 
      
 57 
     | 
    
         
            +
            - lib/rocketvalidator/v0/resource.rb
         
     | 
| 
      
 58 
     | 
    
         
            +
            - lib/rocketvalidator/v0/web_page.rb
         
     | 
| 
       51 
59 
     | 
    
         
             
            - lib/rocketvalidator/version.rb
         
     | 
| 
       52 
60 
     | 
    
         
             
            - rocketvalidator.gemspec
         
     | 
| 
       53 
61 
     | 
    
         
             
            homepage: https://docs.rocketvalidator.com/api
         
     |