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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4aedbc6ca2a95747ff55d0e87e26c3c56c48ee637ef954961a53c3b0eef6f258
4
- data.tar.gz: 977a495eb2224080c69d7d97b7efedc1eb69443a32d9d532381407df514a068e
3
+ metadata.gz: 39b4a780276b46638489a877009039dc0b4b22569c3a47e91997ec70ee032830
4
+ data.tar.gz: 198ab807eb9e87f76cb816722e26e3f8cd7d1556b29e55edf6d6ac0a6d1cf1df
5
5
  SHA512:
6
- metadata.gz: 5fa36ec9d1b035e0b0176f541ee56104cdfecdb611d661aaa9b35bfa2615dcb0c59c7dc49f491a0d0105bc47a6dd228252f84770f4b247a9e680521674f8a55f
7
- data.tar.gz: 54d2b6994dd5d11ee02356d862bbf6a582b680dcde962fbaaa372b71d9ecd0e812250e022dd85bec32f9e5c14f6eb130145dff4279de8c7301f0a6076f8f04a9
6
+ metadata.gz: b648c82b295c5b4f59ef577ed4ded56b87a8b7202f2a2e03e1c4dcec617170b08ab26dbe6a0122ce3a6b323e2f638039689fe91e369243342ad554937c258fe9
7
+ data.tar.gz: c2e0eeb30038a433908b03b0731a299c6fa92914eb9d12dcbe1d881ac4b3c4d981dd3b807df07d5babed682469161cc22590baad08f657998cc3bc990b4428c5
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rocketvalidator (0.1.0)
4
+ rocketvalidator (0.2.0)
5
5
  json_api_client (~> 1.16, >= 1.16.1)
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -1,8 +1,6 @@
1
- # Rocketvalidator
1
+ # Rocket Validator
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/rocketvalidator`. To experiment with that code, run `bin/console` for an interactive prompt.
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
- TODO: Write usage instructions here
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/jaimeiniesta/rocketvalidator. 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/jaimeiniesta/rocketvalidator/blob/master/CODE_OF_CONDUCT.md).
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/jaimeiniesta/rocketvalidator/blob/master/CODE_OF_CONDUCT.md).
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).
@@ -1,35 +1,14 @@
1
- require "rocketvalidator/version"
2
1
  require "json_api_client"
3
2
 
4
- JsonApiClient::Paginating::NestedParamPaginator.page_param = "number"
5
- JsonApiClient::Paginating::NestedParamPaginator.per_page_param = "size"
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,2 @@
1
+ JsonApiClient::Paginating::NestedParamPaginator.page_param = "number"
2
+ JsonApiClient::Paginating::NestedParamPaginator.per_page_param = "size"
@@ -0,0 +1,8 @@
1
+ module RocketValidator
2
+ module V0
3
+ class A11yIssue < Resource
4
+ belongs_to :report
5
+ belongs_to :web_page
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,7 @@
1
+ module RocketValidator
2
+ module V0
3
+ class CommonA11yIssue < Resource
4
+ belongs_to :report
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,7 @@
1
+ module RocketValidator
2
+ module V0
3
+ class CommonHtmlIssue < Resource
4
+ belongs_to :report
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,8 @@
1
+ module RocketValidator
2
+ module V0
3
+ class HtmlIssue < Resource
4
+ belongs_to :report
5
+ belongs_to :web_page
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,6 @@
1
+ module RocketValidator
2
+ module V0
3
+ class Report < Resource
4
+ end
5
+ end
6
+ 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
@@ -0,0 +1,7 @@
1
+ module RocketValidator
2
+ module V0
3
+ class WebPage < Resource
4
+ belongs_to :report
5
+ end
6
+ end
7
+ end
@@ -1,3 +1,3 @@
1
- module Rocketvalidator
2
- VERSION = "0.1.0"
1
+ module RocketValidator
2
+ VERSION = "0.2.0"
3
3
  end
@@ -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 = Rocketvalidator::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.1.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-08 00:00:00.000000000 Z
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