indieweb-endpoints 4.0.0 → 7.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +23 -0
- data/CONTRIBUTING.md +3 -3
- data/README.md +12 -14
- data/indieweb-endpoints.gemspec +15 -11
- data/lib/indieweb/endpoints/client.rb +8 -12
- data/lib/indieweb/endpoints/exceptions.rb +6 -8
- data/lib/indieweb/endpoints/parsers/authorization_endpoint_parser.rb +2 -0
- data/lib/indieweb/endpoints/parsers/base_parser.rb +19 -5
- data/lib/indieweb/endpoints/parsers/micropub_parser.rb +2 -0
- data/lib/indieweb/endpoints/parsers/microsub_parser.rb +2 -0
- data/lib/indieweb/endpoints/parsers/redirect_uri_parser.rb +3 -1
- data/lib/indieweb/endpoints/parsers/token_endpoint_parser.rb +2 -0
- data/lib/indieweb/endpoints/parsers/webmention_parser.rb +3 -1
- data/lib/indieweb/endpoints/parsers.rb +2 -0
- data/lib/indieweb/endpoints/services/response_parser_service.rb +9 -11
- data/lib/indieweb/endpoints/version.rb +3 -1
- data/lib/indieweb/endpoints.rb +14 -13
- metadata +15 -40
- data/.editorconfig +0 -14
- data/.github/CODEOWNERS +0 -1
- data/.gitignore +0 -34
- data/.reek.yml +0 -6
- data/.rspec +0 -2
- data/.rubocop +0 -3
- data/.rubocop.yml +0 -29
- data/.ruby-version +0 -1
- data/.simplecov +0 -13
- data/.travis.yml +0 -15
- data/Gemfile +0 -15
- data/Rakefile +0 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 151e40ea1ac993997ee70da6c2f997609fb1311f33ab4f10d9090d76a555c3ec
|
4
|
+
data.tar.gz: 73547ed72b54f2c2b954bc89df1b697bd22fbc02ea59104b6dc841b7ec9ab6ab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 34e13013f71ae9d4ea89fbf1ba2a40619579023203a95a72b30c552b80ce3442e13d4eceeef4eaeceed074f3e9e39300a0b45c42e50a16c072a72f9f863b8809
|
7
|
+
data.tar.gz: 2f3c6b0e7267e69096f348210bf087b171c2d4acb64577bcc1a9440b0367655c85c62c23d837f054984389b4b484e39daab085db4112bd2f5777b3ce0cd33534
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,28 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 7.0.0 / 2022-01-06
|
4
|
+
|
5
|
+
- Update runtime dependency versions (5c9430f)
|
6
|
+
- **Breaking change:** Update development Ruby version to 2.6.9 and minimum Ruby version to 2.6 (ed17ab1 and 7e4a621)
|
7
|
+
- Migrate to GitHub Actions from Travis CI (c019756)
|
8
|
+
- Add `rubygems_mfa_required` to gemspec metadata (1f0a40f)
|
9
|
+
|
10
|
+
## 6.1.0 / 2021-05-25
|
11
|
+
|
12
|
+
- Add support for Ruby 3.0 (3394252)
|
13
|
+
|
14
|
+
## 6.0.0 / 2021-05-25
|
15
|
+
|
16
|
+
- Refactor parsers (e22e0af)
|
17
|
+
- Simplify exception handling (65361ee)
|
18
|
+
- Update http dependency to 5.0 (44f2d23)
|
19
|
+
- **Breaking change:** Favor Addressable::URI.join over Absolutely (0bc5049)
|
20
|
+
- Update development Ruby version to 2.5.9 (3439cce)
|
21
|
+
|
22
|
+
## 5.0.0 / 2020-11-11
|
23
|
+
|
24
|
+
- Update absolutely and link-header-parser dependencies (064696e)
|
25
|
+
|
3
26
|
## 4.0.0 / 2020-07-21
|
4
27
|
|
5
28
|
- **Breaking change:** Return a Hash of endpoints instead of an OpenStruct (15dc387)
|
data/CONTRIBUTING.md
CHANGED
@@ -8,9 +8,9 @@ There are a couple ways you can help improve indieweb-endpoints-ruby:
|
|
8
8
|
|
9
9
|
## Getting Started
|
10
10
|
|
11
|
-
indieweb-endpoints-ruby is developed using Ruby 2.
|
11
|
+
indieweb-endpoints-ruby is developed using Ruby 2.6.9 and is additionally tested against Ruby 2.7, 3.0, and 3.1 using [GitHub Actions](https://github.com/indieweb/indieweb-endpoints-ruby/actions).
|
12
12
|
|
13
|
-
Before making changes to indieweb-endpoints-ruby, you'll want to install Ruby 2.
|
13
|
+
Before making changes to indieweb-endpoints-ruby, you'll want to install Ruby 2.6.9. It's recommended that you use a Ruby version managment tool like [rbenv](https://github.com/rbenv/rbenv), [chruby](https://github.com/postmodern/chruby), or [rvm](https://github.com/rvm/rvm). Once you've installed Ruby 2.6.9 using your method of choice, install the project's gems by running:
|
14
14
|
|
15
15
|
```sh
|
16
16
|
bundle install
|
@@ -22,7 +22,7 @@ bundle install
|
|
22
22
|
1. Install development dependencies as outlined above.
|
23
23
|
1. Create a feature branch for the code changes you're looking to make: `git checkout -b my-new-feature`.
|
24
24
|
1. _Write some code!_
|
25
|
-
1. If your changes would benefit from testing, add the necessary tests and verify everything passes by running `
|
25
|
+
1. If your changes would benefit from testing, add the necessary tests and verify everything passes by running `bin/ci`.
|
26
26
|
1. Commit your changes: `git commit -am 'Add some new feature or fix some issue'`. _(See [this excellent article](https://chris.beams.io/posts/git-commit/) for tips on writing useful Git commit messages.)_
|
27
27
|
1. Push the branch to your fork: `git push -u origin my-new-feature`.
|
28
28
|
1. Create a new [pull request][pulls] and we'll review your changes.
|
data/README.md
CHANGED
@@ -2,23 +2,23 @@
|
|
2
2
|
|
3
3
|
**A Ruby gem for discovering a URL's [IndieAuth](https://indieweb.org/IndieAuth), [Micropub](https://indieweb.org/Micropub), [Microsub](https://indieweb.org/Microsub), and [Webmention](https://indieweb.org/Webmention) endpoints.**
|
4
4
|
|
5
|
-
[![Gem](https://img.shields.io/gem/v/indieweb-endpoints.svg?style=for-the-badge)](https://rubygems.org/gems/indieweb-endpoints)
|
6
|
-
[![Downloads](https://img.shields.io/gem/dt/indieweb-endpoints.svg?style=for-the-badge)](https://rubygems.org/gems/indieweb-endpoints)
|
7
|
-
[![Build](https://img.shields.io/
|
8
|
-
[![Maintainability](https://img.shields.io/codeclimate/maintainability/indieweb/indieweb-endpoints-ruby.svg?style=for-the-badge)](https://codeclimate.com/github/indieweb/indieweb-endpoints-ruby)
|
9
|
-
[![Coverage](https://img.shields.io/codeclimate/c/indieweb/indieweb-endpoints-ruby.svg?style=for-the-badge)](https://codeclimate.com/github/indieweb/indieweb-endpoints-ruby/code)
|
5
|
+
[![Gem](https://img.shields.io/gem/v/indieweb-endpoints.svg?logo=rubygems&style=for-the-badge)](https://rubygems.org/gems/indieweb-endpoints)
|
6
|
+
[![Downloads](https://img.shields.io/gem/dt/indieweb-endpoints.svg?logo=rubygems&style=for-the-badge)](https://rubygems.org/gems/indieweb-endpoints)
|
7
|
+
[![Build](https://img.shields.io/github/workflow/status/indieweb/indieweb-endpoints-ruby/CI?logo=github&style=for-the-badge)](https://github.com/indieweb/indieweb-endpoints-ruby/actions/workflows/ci.yml)
|
8
|
+
[![Maintainability](https://img.shields.io/codeclimate/maintainability/indieweb/indieweb-endpoints-ruby.svg?logo=code-climate&style=for-the-badge)](https://codeclimate.com/github/indieweb/indieweb-endpoints-ruby)
|
9
|
+
[![Coverage](https://img.shields.io/codeclimate/c/indieweb/indieweb-endpoints-ruby.svg?logo=code-climate&style=for-the-badge)](https://codeclimate.com/github/indieweb/indieweb-endpoints-ruby/code)
|
10
10
|
|
11
11
|
## Key Features
|
12
12
|
|
13
13
|
- Compliant with [Section 4.1](https://www.w3.org/TR/indieauth/#discovery-by-clients) and [Section 4.2.2](https://www.w3.org/TR/indieauth/#redirect-url) of [the W3C's IndieAuth Working Group Note](https://www.w3.org/TR/indieauth/), [Section 5.3](https://www.w3.org/TR/micropub/#endpoint-discovery) of [the W3C's Micropub Recommendation](https://www.w3.org/TR/micropub/), and [Section 3.1.2](https://www.w3.org/TR/webmention/#sender-discovers-receiver-webmention-endpoint) of [the W3C's Webmention Recommendation](https://www.w3.org/TR/webmention/).
|
14
14
|
- Passes all Endpoint Discovery tests on [webmention.rocks](https://webmention.rocks).
|
15
|
-
- Supports Ruby 2.
|
15
|
+
- Supports Ruby 2.6 and newer.
|
16
16
|
|
17
17
|
## Getting Started
|
18
18
|
|
19
|
-
Before installing and using indieweb-endpoints-ruby, you'll want to have [Ruby](https://www.ruby-lang.org) 2.
|
19
|
+
Before installing and using indieweb-endpoints-ruby, you'll want to have [Ruby](https://www.ruby-lang.org) 2.6 (or newer) installed. It's recommended that you use a Ruby version managment tool like [rbenv](https://github.com/rbenv/rbenv), [chruby](https://github.com/postmodern/chruby), or [rvm](https://github.com/rvm/rvm).
|
20
20
|
|
21
|
-
indieweb-endpoints-ruby is developed using Ruby 2.
|
21
|
+
indieweb-endpoints-ruby is developed using Ruby 2.6.9 and is additionally tested against Ruby 2.7, 3.0, and 3.1 using [GitHub Actions](https://github.com/indieweb/indieweb-endpoints-ruby/actions).
|
22
22
|
|
23
23
|
## Installation
|
24
24
|
|
@@ -70,21 +70,19 @@ client.endpoints
|
|
70
70
|
|
71
71
|
### Exception Handling
|
72
72
|
|
73
|
-
There are several exceptions that may be raised by indieweb-endpoints-ruby's underlying dependencies. These errors are raised as subclasses of `
|
73
|
+
There are several exceptions that may be raised by indieweb-endpoints-ruby's underlying dependencies. These errors are raised as subclasses of `IndieWeb::Endpoints::Error` (which itself is a subclass of `StandardError`).
|
74
74
|
|
75
|
-
From [
|
75
|
+
From [sporkmonger/addressable](https://github.com/sporkmonger/addressable):
|
76
76
|
|
77
77
|
- `IndieWeb::Endpoints::InvalidURIError`
|
78
78
|
|
79
79
|
From [httprb/http](https://github.com/httprb/http):
|
80
80
|
|
81
|
-
- `IndieWeb::Endpoints::
|
82
|
-
- `IndieWeb::Endpoints::TimeoutError`
|
83
|
-
- `IndieWeb::Endpoints::TooManyRedirectsError`
|
81
|
+
- `IndieWeb::Endpoints::HttpError`
|
84
82
|
|
85
83
|
## Contributing
|
86
84
|
|
87
|
-
Interested in helping improve indieweb-endpoints-ruby? Awesome! Your help is greatly appreciated. See [CONTRIBUTING.md](https://github.com/indieweb/indieweb-endpoints-ruby/blob/
|
85
|
+
Interested in helping improve indieweb-endpoints-ruby? Awesome! Your help is greatly appreciated. See [CONTRIBUTING.md](https://github.com/indieweb/indieweb-endpoints-ruby/blob/main/CONTRIBUTING.md) for details.
|
88
86
|
|
89
87
|
By contributing to and participating in the development of indieweb-endpoints-ruby, you acknowledge that you have read and agree to the [IndieWeb Code of Conduct](https://indieweb.org/code-of-conduct).
|
90
88
|
|
data/indieweb-endpoints.gemspec
CHANGED
@@ -1,7 +1,9 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require_relative 'lib/indieweb/endpoints/version'
|
2
4
|
|
3
5
|
Gem::Specification.new do |spec|
|
4
|
-
spec.required_ruby_version =
|
6
|
+
spec.required_ruby_version = '>= 2.6', '< 4'
|
5
7
|
|
6
8
|
spec.name = 'indieweb-endpoints'
|
7
9
|
spec.version = IndieWeb::Endpoints::VERSION
|
@@ -13,18 +15,20 @@ Gem::Specification.new do |spec|
|
|
13
15
|
spec.homepage = 'https://github.com/indieweb/indieweb-endpoints-ruby'
|
14
16
|
spec.license = 'MIT'
|
15
17
|
|
16
|
-
spec.files = Dir.
|
17
|
-
|
18
|
-
|
18
|
+
spec.files = Dir['lib/**/*'].reject { |f| File.directory?(f) }
|
19
|
+
spec.files += %w[LICENSE CHANGELOG.md CODE_OF_CONDUCT.md CONTRIBUTING.md README.md]
|
20
|
+
spec.files += %w[indieweb-endpoints.gemspec]
|
19
21
|
|
20
22
|
spec.require_paths = ['lib']
|
21
23
|
|
22
|
-
spec.metadata
|
23
|
-
|
24
|
+
spec.metadata = {
|
25
|
+
'bug_tracker_uri' => "#{spec.homepage}/issues",
|
26
|
+
'changelog_uri' => "#{spec.homepage}/blob/v#{spec.version}/CHANGELOG.md",
|
27
|
+
'rubygems_mfa_required' => 'true'
|
28
|
+
}
|
24
29
|
|
25
|
-
spec.add_runtime_dependency '
|
26
|
-
spec.add_runtime_dependency '
|
27
|
-
spec.add_runtime_dependency '
|
28
|
-
spec.add_runtime_dependency '
|
29
|
-
spec.add_runtime_dependency 'nokogiri', '~> 1.10'
|
30
|
+
spec.add_runtime_dependency 'addressable', '~> 2.8'
|
31
|
+
spec.add_runtime_dependency 'http', '~> 5.0'
|
32
|
+
spec.add_runtime_dependency 'link-header-parser', '~> 4.0'
|
33
|
+
spec.add_runtime_dependency 'nokogiri', '~> 1.12'
|
30
34
|
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module IndieWeb
|
2
4
|
module Endpoints
|
3
5
|
class Client
|
@@ -12,16 +14,12 @@ module IndieWeb
|
|
12
14
|
#
|
13
15
|
# @param url [String] an absolute URL
|
14
16
|
def initialize(url)
|
15
|
-
|
16
|
-
|
17
|
-
@url = url
|
18
|
-
|
19
|
-
raise ArgumentError, "url (#{url}) must be an absolute URL (e.g. https://example.com)" unless uri.absolute? && uri.scheme.match?(/^https?$/)
|
17
|
+
@url = url.to_str
|
20
18
|
end
|
21
19
|
|
22
20
|
# @return [String]
|
23
21
|
def inspect
|
24
|
-
|
22
|
+
"#<#{self.class.name}:#{format('%#0x', object_id)} url: #{url.inspect}>"
|
25
23
|
end
|
26
24
|
|
27
25
|
# @return [Hash{Symbol => String, Array, nil}]
|
@@ -34,10 +32,8 @@ module IndieWeb
|
|
34
32
|
# @return [HTTP::Response]
|
35
33
|
def response
|
36
34
|
@response ||= HTTP.follow(max_hops: 20).headers(HTTP_HEADERS_OPTS).timeout(connect: 5, read: 5).get(uri)
|
37
|
-
rescue HTTP::
|
38
|
-
|
39
|
-
HTTP::Redirector::TooManyRedirectsError => exception
|
40
|
-
raise IndieWeb::Endpoints.const_get(exception.class.name.split('::').last), exception
|
35
|
+
rescue HTTP::Error => e
|
36
|
+
raise HttpError, e
|
41
37
|
end
|
42
38
|
|
43
39
|
private
|
@@ -46,8 +42,8 @@ module IndieWeb
|
|
46
42
|
|
47
43
|
def uri
|
48
44
|
@uri ||= Addressable::URI.parse(url)
|
49
|
-
rescue Addressable::URI::InvalidURIError =>
|
50
|
-
raise InvalidURIError,
|
45
|
+
rescue Addressable::URI::InvalidURIError => e
|
46
|
+
raise InvalidURIError, e
|
51
47
|
end
|
52
48
|
end
|
53
49
|
end
|
@@ -1,15 +1,13 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module IndieWeb
|
2
4
|
module Endpoints
|
3
|
-
class
|
4
|
-
|
5
|
-
class ArgumentError < IndieWebEndpointsError; end
|
6
|
-
|
7
|
-
class ConnectionError < IndieWebEndpointsError; end
|
5
|
+
class Error < StandardError; end
|
8
6
|
|
9
|
-
class
|
7
|
+
class ArgumentError < Error; end
|
10
8
|
|
11
|
-
class
|
9
|
+
class HttpError < Error; end
|
12
10
|
|
13
|
-
class
|
11
|
+
class InvalidURIError < Error; end
|
14
12
|
end
|
15
13
|
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module IndieWeb
|
2
4
|
module Endpoints
|
3
5
|
module Parsers
|
@@ -23,17 +25,29 @@ module IndieWeb
|
|
23
25
|
attr_reader :response
|
24
26
|
|
25
27
|
def mapped_results
|
26
|
-
@mapped_results ||= results_from_http_request.map { |endpoint|
|
27
|
-
rescue
|
28
|
-
raise InvalidURIError,
|
28
|
+
@mapped_results ||= results_from_http_request.map { |endpoint| Addressable::URI.join(response.uri, endpoint).to_s }.uniq.sort
|
29
|
+
rescue Addressable::URI::InvalidURIError => e
|
30
|
+
raise InvalidURIError, e
|
31
|
+
end
|
32
|
+
|
33
|
+
def parsed_response_body
|
34
|
+
@parsed_response_body ||= Nokogiri::HTML(response.body.to_s)
|
35
|
+
end
|
36
|
+
|
37
|
+
def parsed_response_headers
|
38
|
+
@parsed_response_headers ||= LinkHeaderParser.parse(response.headers.get('link'), base: response.uri)
|
29
39
|
end
|
30
40
|
|
31
41
|
def results_from_body
|
32
|
-
|
42
|
+
return if response.mime_type != 'text/html'
|
43
|
+
|
44
|
+
Services::ResponseParserService.parse_body(parsed_response_body, self.class.identifier)
|
33
45
|
end
|
34
46
|
|
35
47
|
def results_from_headers
|
36
|
-
|
48
|
+
return if parsed_response_headers.none?
|
49
|
+
|
50
|
+
Services::ResponseParserService.parse_headers(parsed_response_headers.group_by_relation_type, self.class.identifier)
|
37
51
|
end
|
38
52
|
|
39
53
|
def results_from_http_request
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module IndieWeb
|
2
4
|
module Endpoints
|
3
5
|
module Parsers
|
@@ -8,7 +10,7 @@ module IndieWeb
|
|
8
10
|
|
9
11
|
# @return [Array<String>, nil]
|
10
12
|
def results
|
11
|
-
return
|
13
|
+
return if mapped_results.none?
|
12
14
|
|
13
15
|
mapped_results
|
14
16
|
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module IndieWeb
|
2
4
|
module Endpoints
|
3
5
|
module Parsers
|
@@ -9,7 +11,7 @@ module IndieWeb
|
|
9
11
|
private
|
10
12
|
|
11
13
|
def results_for_node(node)
|
12
|
-
Services::ResponseParserService.parse_body(
|
14
|
+
Services::ResponseParserService.parse_body(parsed_response_body, self.class.identifier, node)
|
13
15
|
end
|
14
16
|
|
15
17
|
# https://www.w3.org/TR/webmention/#sender-discovers-receiver-webmention-endpoint
|
@@ -1,27 +1,25 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module IndieWeb
|
2
4
|
module Endpoints
|
3
5
|
module Services
|
4
6
|
class ResponseParserService
|
5
|
-
# @param
|
7
|
+
# @param body [Nokogiri::HTML::Document]
|
6
8
|
# @param identifier [Symbol]
|
7
9
|
# @return [Array<String>]
|
8
|
-
def self.parse_body(
|
9
|
-
return unless response.mime_type == 'text/html'
|
10
|
-
|
10
|
+
def self.parse_body(body, identifier, node = 'link')
|
11
11
|
# Reject endpoints that contain a fragment identifier
|
12
|
-
|
12
|
+
body.css(%(#{node}[rel~="#{identifier}"][href]:not([href*="#"]))).map { |element| element['href'] }
|
13
13
|
end
|
14
14
|
|
15
|
-
# @param
|
15
|
+
# @param headers [Hash{Symbol => Array<LinkHeaderParser::LinkHeader}]
|
16
16
|
# @param identifier [Symbol]
|
17
17
|
# @return [Array<String>, nil]
|
18
|
-
def self.parse_headers(
|
19
|
-
|
20
|
-
|
21
|
-
return unless headers
|
18
|
+
def self.parse_headers(headers, identifier)
|
19
|
+
return unless headers.key?(identifier)
|
22
20
|
|
23
21
|
# Reject endpoints that contain a fragment identifier
|
24
|
-
headers.reject { |header| Addressable::URI.parse(header.target_uri).fragment }.map(&:target_uri)
|
22
|
+
headers[identifier].reject { |header| Addressable::URI.parse(header.target_uri).fragment }.map(&:target_uri)
|
25
23
|
end
|
26
24
|
end
|
27
25
|
end
|
data/lib/indieweb/endpoints.rb
CHANGED
@@ -1,24 +1,25 @@
|
|
1
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
2
3
|
require 'addressable/uri'
|
3
4
|
require 'http'
|
4
5
|
require 'link-header-parser'
|
5
6
|
require 'nokogiri'
|
6
7
|
|
7
|
-
|
8
|
-
|
8
|
+
require_relative 'endpoints/version'
|
9
|
+
require_relative 'endpoints/exceptions'
|
9
10
|
|
10
|
-
|
11
|
+
require_relative 'endpoints/services/response_parser_service'
|
11
12
|
|
12
|
-
|
13
|
-
|
13
|
+
require_relative 'endpoints/client'
|
14
|
+
require_relative 'endpoints/parsers'
|
14
15
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
16
|
+
require_relative 'endpoints/parsers/base_parser'
|
17
|
+
require_relative 'endpoints/parsers/authorization_endpoint_parser'
|
18
|
+
require_relative 'endpoints/parsers/micropub_parser'
|
19
|
+
require_relative 'endpoints/parsers/microsub_parser'
|
20
|
+
require_relative 'endpoints/parsers/redirect_uri_parser'
|
21
|
+
require_relative 'endpoints/parsers/token_endpoint_parser'
|
22
|
+
require_relative 'endpoints/parsers/webmention_parser'
|
22
23
|
|
23
24
|
module IndieWeb
|
24
25
|
module Endpoints
|
metadata
CHANGED
@@ -1,85 +1,71 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: indieweb-endpoints
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 7.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jason Garber
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-01-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
-
- !ruby/object:Gem::Dependency
|
14
|
-
name: absolutely
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - "~>"
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '4.0'
|
20
|
-
type: :runtime
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - "~>"
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: '4.0'
|
27
13
|
- !ruby/object:Gem::Dependency
|
28
14
|
name: addressable
|
29
15
|
requirement: !ruby/object:Gem::Requirement
|
30
16
|
requirements:
|
31
17
|
- - "~>"
|
32
18
|
- !ruby/object:Gem::Version
|
33
|
-
version: '2.
|
19
|
+
version: '2.8'
|
34
20
|
type: :runtime
|
35
21
|
prerelease: false
|
36
22
|
version_requirements: !ruby/object:Gem::Requirement
|
37
23
|
requirements:
|
38
24
|
- - "~>"
|
39
25
|
- !ruby/object:Gem::Version
|
40
|
-
version: '2.
|
26
|
+
version: '2.8'
|
41
27
|
- !ruby/object:Gem::Dependency
|
42
28
|
name: http
|
43
29
|
requirement: !ruby/object:Gem::Requirement
|
44
30
|
requirements:
|
45
31
|
- - "~>"
|
46
32
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
33
|
+
version: '5.0'
|
48
34
|
type: :runtime
|
49
35
|
prerelease: false
|
50
36
|
version_requirements: !ruby/object:Gem::Requirement
|
51
37
|
requirements:
|
52
38
|
- - "~>"
|
53
39
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
40
|
+
version: '5.0'
|
55
41
|
- !ruby/object:Gem::Dependency
|
56
42
|
name: link-header-parser
|
57
43
|
requirement: !ruby/object:Gem::Requirement
|
58
44
|
requirements:
|
59
45
|
- - "~>"
|
60
46
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
47
|
+
version: '4.0'
|
62
48
|
type: :runtime
|
63
49
|
prerelease: false
|
64
50
|
version_requirements: !ruby/object:Gem::Requirement
|
65
51
|
requirements:
|
66
52
|
- - "~>"
|
67
53
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
54
|
+
version: '4.0'
|
69
55
|
- !ruby/object:Gem::Dependency
|
70
56
|
name: nokogiri
|
71
57
|
requirement: !ruby/object:Gem::Requirement
|
72
58
|
requirements:
|
73
59
|
- - "~>"
|
74
60
|
- !ruby/object:Gem::Version
|
75
|
-
version: '1.
|
61
|
+
version: '1.12'
|
76
62
|
type: :runtime
|
77
63
|
prerelease: false
|
78
64
|
version_requirements: !ruby/object:Gem::Requirement
|
79
65
|
requirements:
|
80
66
|
- - "~>"
|
81
67
|
- !ruby/object:Gem::Version
|
82
|
-
version: '1.
|
68
|
+
version: '1.12'
|
83
69
|
description: Discover a URL’s IndieAuth, Micropub, Microsub, and Webmention endpoints.
|
84
70
|
email:
|
85
71
|
- jason@sixtwothree.org
|
@@ -87,23 +73,11 @@ executables: []
|
|
87
73
|
extensions: []
|
88
74
|
extra_rdoc_files: []
|
89
75
|
files:
|
90
|
-
- ".editorconfig"
|
91
|
-
- ".github/CODEOWNERS"
|
92
|
-
- ".gitignore"
|
93
|
-
- ".reek.yml"
|
94
|
-
- ".rspec"
|
95
|
-
- ".rubocop"
|
96
|
-
- ".rubocop.yml"
|
97
|
-
- ".ruby-version"
|
98
|
-
- ".simplecov"
|
99
|
-
- ".travis.yml"
|
100
76
|
- CHANGELOG.md
|
101
77
|
- CODE_OF_CONDUCT.md
|
102
78
|
- CONTRIBUTING.md
|
103
|
-
- Gemfile
|
104
79
|
- LICENSE
|
105
80
|
- README.md
|
106
|
-
- Rakefile
|
107
81
|
- indieweb-endpoints.gemspec
|
108
82
|
- lib/indieweb/endpoints.rb
|
109
83
|
- lib/indieweb/endpoints/client.rb
|
@@ -123,7 +97,8 @@ licenses:
|
|
123
97
|
- MIT
|
124
98
|
metadata:
|
125
99
|
bug_tracker_uri: https://github.com/indieweb/indieweb-endpoints-ruby/issues
|
126
|
-
changelog_uri: https://github.com/indieweb/indieweb-endpoints-ruby/blob/
|
100
|
+
changelog_uri: https://github.com/indieweb/indieweb-endpoints-ruby/blob/v7.0.0/CHANGELOG.md
|
101
|
+
rubygems_mfa_required: 'true'
|
127
102
|
post_install_message:
|
128
103
|
rdoc_options: []
|
129
104
|
require_paths:
|
@@ -132,17 +107,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
132
107
|
requirements:
|
133
108
|
- - ">="
|
134
109
|
- !ruby/object:Gem::Version
|
135
|
-
version: '2.
|
110
|
+
version: '2.6'
|
136
111
|
- - "<"
|
137
112
|
- !ruby/object:Gem::Version
|
138
|
-
version: '
|
113
|
+
version: '4'
|
139
114
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
140
115
|
requirements:
|
141
116
|
- - ">="
|
142
117
|
- !ruby/object:Gem::Version
|
143
118
|
version: '0'
|
144
119
|
requirements: []
|
145
|
-
rubygems_version: 3.
|
120
|
+
rubygems_version: 3.2.33
|
146
121
|
signing_key:
|
147
122
|
specification_version: 4
|
148
123
|
summary: Discover a URL’s IndieAuth, Micropub, Microsub, and Webmention endpoints.
|
data/.editorconfig
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
# EditorConfig is awesome: https://EditorConfig.org
|
2
|
-
root = true
|
3
|
-
|
4
|
-
[*]
|
5
|
-
charset = utf-8
|
6
|
-
end_of_line = lf
|
7
|
-
insert_final_newline = true
|
8
|
-
indent_size = 2
|
9
|
-
indent_style = space
|
10
|
-
trim_trailing_whitespace = true
|
11
|
-
|
12
|
-
[*.md]
|
13
|
-
indent_size = 4
|
14
|
-
indent_style = tab
|
data/.github/CODEOWNERS
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
* jgarber623
|
data/.gitignore
DELETED
@@ -1,34 +0,0 @@
|
|
1
|
-
*.gem
|
2
|
-
*.rbc
|
3
|
-
/.config
|
4
|
-
/coverage/
|
5
|
-
/InstalledFiles
|
6
|
-
/pkg/
|
7
|
-
/spec/reports/
|
8
|
-
/spec/examples.txt
|
9
|
-
/test/tmp/
|
10
|
-
/test/version_tmp/
|
11
|
-
/tmp/
|
12
|
-
|
13
|
-
# Used by dotenv library to load environment variables.
|
14
|
-
# .env
|
15
|
-
|
16
|
-
# Documentation cache and generated files:
|
17
|
-
/.yardoc/
|
18
|
-
/_yardoc/
|
19
|
-
/doc/
|
20
|
-
/rdoc/
|
21
|
-
|
22
|
-
# Environment normalization:
|
23
|
-
/.bundle/
|
24
|
-
/vendor/bundle
|
25
|
-
/lib/bundler/man/
|
26
|
-
|
27
|
-
# for a library or gem, you might want to ignore these files since the code is
|
28
|
-
# intended to run in multiple environments; otherwise, check them in:
|
29
|
-
Gemfile.lock
|
30
|
-
# .ruby-version
|
31
|
-
# .ruby-gemset
|
32
|
-
|
33
|
-
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
|
34
|
-
.rvmrc
|
data/.reek.yml
DELETED
data/.rspec
DELETED
data/.rubocop
DELETED
data/.rubocop.yml
DELETED
@@ -1,29 +0,0 @@
|
|
1
|
-
require:
|
2
|
-
- rubocop-performance
|
3
|
-
- rubocop-rspec
|
4
|
-
|
5
|
-
AllCops:
|
6
|
-
NewCops: enable
|
7
|
-
|
8
|
-
Layout/LineLength:
|
9
|
-
Enabled: false
|
10
|
-
|
11
|
-
Metrics/BlockLength:
|
12
|
-
Exclude:
|
13
|
-
- spec/**/*.rb
|
14
|
-
|
15
|
-
Naming/RescuedExceptionsVariableName:
|
16
|
-
PreferredName: exception
|
17
|
-
|
18
|
-
RSpec/FilePath:
|
19
|
-
Exclude:
|
20
|
-
- spec/lib/indieweb/**/*_spec.rb
|
21
|
-
|
22
|
-
Style/Documentation:
|
23
|
-
Enabled: false
|
24
|
-
|
25
|
-
Style/FrozenStringLiteralComment:
|
26
|
-
Enabled: false
|
27
|
-
|
28
|
-
Style/SymbolArray:
|
29
|
-
Enabled: false
|
data/.ruby-version
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
2.5.8
|
data/.simplecov
DELETED
@@ -1,13 +0,0 @@
|
|
1
|
-
require 'simplecov-console'
|
2
|
-
|
3
|
-
formatters = [SimpleCov::Formatter::HTMLFormatter]
|
4
|
-
|
5
|
-
# rubocop:disable Style/IfUnlessModifier
|
6
|
-
if RSpec.configuration.files_to_run.length > 1
|
7
|
-
formatters << SimpleCov::Formatter::Console
|
8
|
-
end
|
9
|
-
# rubocop:enable Style/IfUnlessModifier
|
10
|
-
|
11
|
-
SimpleCov.start do
|
12
|
-
formatter SimpleCov::Formatter::MultiFormatter.new(formatters)
|
13
|
-
end
|
data/.travis.yml
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
dist: bionic
|
2
|
-
language: ruby
|
3
|
-
rvm:
|
4
|
-
- 2.5
|
5
|
-
- 2.6
|
6
|
-
- 2.7
|
7
|
-
cache: bundler
|
8
|
-
before_script:
|
9
|
-
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
|
10
|
-
- chmod +x ./cc-test-reporter
|
11
|
-
- ./cc-test-reporter before-build
|
12
|
-
after_script:
|
13
|
-
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
|
14
|
-
notifications:
|
15
|
-
email: false
|
data/Gemfile
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
source 'https://rubygems.org'
|
2
|
-
|
3
|
-
# Specify your gem's dependencies in indieweb-endpoints.gemspec
|
4
|
-
gemspec
|
5
|
-
|
6
|
-
gem 'pry-byebug', '~> 3.9'
|
7
|
-
gem 'rake', '~> 13.0'
|
8
|
-
gem 'reek', '~> 6.0'
|
9
|
-
gem 'rspec', '~> 3.9'
|
10
|
-
gem 'rubocop', '~> 0.88.0'
|
11
|
-
gem 'rubocop-performance', '~> 1.7'
|
12
|
-
gem 'rubocop-rspec', '~> 1.42'
|
13
|
-
gem 'simplecov', '~> 0.18.5'
|
14
|
-
gem 'simplecov-console', '~> 0.7.2'
|
15
|
-
gem 'webmock', '~> 3.8'
|
data/Rakefile
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
require 'bundler/gem_tasks'
|
2
|
-
|
3
|
-
require 'reek/rake/task'
|
4
|
-
require 'rspec/core/rake_task'
|
5
|
-
require 'rubocop/rake_task'
|
6
|
-
|
7
|
-
Reek::Rake::Task.new do |task|
|
8
|
-
task.fail_on_error = false
|
9
|
-
end
|
10
|
-
|
11
|
-
RSpec::Core::RakeTask.new
|
12
|
-
|
13
|
-
RuboCop::RakeTask.new do |task|
|
14
|
-
task.fail_on_error = false
|
15
|
-
end
|
16
|
-
|
17
|
-
task default: [:rubocop, :reek, :spec]
|