indieweb-endpoints 6.1.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 +7 -0
- data/CONTRIBUTING.md +2 -2
- data/README.md +4 -4
- data/indieweb-endpoints.gemspec +11 -6
- data/lib/indieweb/endpoints/client.rb +7 -5
- data/lib/indieweb/endpoints/exceptions.rb +2 -0
- data/lib/indieweb/endpoints/parsers/authorization_endpoint_parser.rb +2 -0
- data/lib/indieweb/endpoints/parsers/base_parser.rb +4 -2
- 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 +2 -0
- data/lib/indieweb/endpoints/parsers/token_endpoint_parser.rb +2 -0
- data/lib/indieweb/endpoints/parsers/webmention_parser.rb +2 -0
- data/lib/indieweb/endpoints/parsers.rb +2 -0
- data/lib/indieweb/endpoints/services/response_parser_service.rb +2 -0
- data/lib/indieweb/endpoints/version.rb +3 -1
- data/lib/indieweb/endpoints.rb +14 -12
- metadata +15 -14
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,12 @@
|
|
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
|
+
|
3
10
|
## 6.1.0 / 2021-05-25
|
4
11
|
|
5
12
|
- Add support for Ruby 3.0 (3394252)
|
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
|
data/README.md
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
[![Gem](https://img.shields.io/gem/v/indieweb-endpoints.svg?logo=rubygems&style=for-the-badge)](https://rubygems.org/gems/indieweb-endpoints)
|
6
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/
|
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
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
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
|
|
@@ -12,13 +12,13 @@
|
|
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
|
|
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
|
@@ -19,11 +21,14 @@ Gem::Specification.new do |spec|
|
|
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 'addressable', '~> 2.
|
30
|
+
spec.add_runtime_dependency 'addressable', '~> 2.8'
|
26
31
|
spec.add_runtime_dependency 'http', '~> 5.0'
|
27
|
-
spec.add_runtime_dependency 'link-header-parser', '~>
|
28
|
-
spec.add_runtime_dependency 'nokogiri', '~> 1.
|
32
|
+
spec.add_runtime_dependency 'link-header-parser', '~> 4.0'
|
33
|
+
spec.add_runtime_dependency 'nokogiri', '~> 1.12'
|
29
34
|
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module IndieWeb
|
2
4
|
module Endpoints
|
3
5
|
class Client
|
@@ -17,7 +19,7 @@ module IndieWeb
|
|
17
19
|
|
18
20
|
# @return [String]
|
19
21
|
def inspect
|
20
|
-
|
22
|
+
"#<#{self.class.name}:#{format('%#0x', object_id)} url: #{url.inspect}>"
|
21
23
|
end
|
22
24
|
|
23
25
|
# @return [Hash{Symbol => String, Array, nil}]
|
@@ -30,8 +32,8 @@ module IndieWeb
|
|
30
32
|
# @return [HTTP::Response]
|
31
33
|
def response
|
32
34
|
@response ||= HTTP.follow(max_hops: 20).headers(HTTP_HEADERS_OPTS).timeout(connect: 5, read: 5).get(uri)
|
33
|
-
rescue HTTP::Error =>
|
34
|
-
raise HttpError,
|
35
|
+
rescue HTTP::Error => e
|
36
|
+
raise HttpError, e
|
35
37
|
end
|
36
38
|
|
37
39
|
private
|
@@ -40,8 +42,8 @@ module IndieWeb
|
|
40
42
|
|
41
43
|
def uri
|
42
44
|
@uri ||= Addressable::URI.parse(url)
|
43
|
-
rescue Addressable::URI::InvalidURIError =>
|
44
|
-
raise InvalidURIError,
|
45
|
+
rescue Addressable::URI::InvalidURIError => e
|
46
|
+
raise InvalidURIError, e
|
45
47
|
end
|
46
48
|
end
|
47
49
|
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module IndieWeb
|
2
4
|
module Endpoints
|
3
5
|
module Parsers
|
@@ -24,8 +26,8 @@ module IndieWeb
|
|
24
26
|
|
25
27
|
def mapped_results
|
26
28
|
@mapped_results ||= results_from_http_request.map { |endpoint| Addressable::URI.join(response.uri, endpoint).to_s }.uniq.sort
|
27
|
-
rescue Addressable::URI::InvalidURIError =>
|
28
|
-
raise InvalidURIError,
|
29
|
+
rescue Addressable::URI::InvalidURIError => e
|
30
|
+
raise InvalidURIError, e
|
29
31
|
end
|
30
32
|
|
31
33
|
def parsed_response_body
|
data/lib/indieweb/endpoints.rb
CHANGED
@@ -1,23 +1,25 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'addressable/uri'
|
2
4
|
require 'http'
|
3
5
|
require 'link-header-parser'
|
4
6
|
require 'nokogiri'
|
5
7
|
|
6
|
-
|
7
|
-
|
8
|
+
require_relative 'endpoints/version'
|
9
|
+
require_relative 'endpoints/exceptions'
|
8
10
|
|
9
|
-
|
11
|
+
require_relative 'endpoints/services/response_parser_service'
|
10
12
|
|
11
|
-
|
12
|
-
|
13
|
+
require_relative 'endpoints/client'
|
14
|
+
require_relative 'endpoints/parsers'
|
13
15
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
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'
|
21
23
|
|
22
24
|
module IndieWeb
|
23
25
|
module Endpoints
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
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
|
-
autorequire:
|
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
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '2.
|
19
|
+
version: '2.8'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '2.
|
26
|
+
version: '2.8'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: http
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -44,28 +44,28 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '4.0'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '4.0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: nokogiri
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '1.
|
61
|
+
version: '1.12'
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '1.
|
68
|
+
version: '1.12'
|
69
69
|
description: Discover a URL’s IndieAuth, Micropub, Microsub, and Webmention endpoints.
|
70
70
|
email:
|
71
71
|
- jason@sixtwothree.org
|
@@ -97,8 +97,9 @@ licenses:
|
|
97
97
|
- MIT
|
98
98
|
metadata:
|
99
99
|
bug_tracker_uri: https://github.com/indieweb/indieweb-endpoints-ruby/issues
|
100
|
-
changelog_uri: https://github.com/indieweb/indieweb-endpoints-ruby/blob/
|
101
|
-
|
100
|
+
changelog_uri: https://github.com/indieweb/indieweb-endpoints-ruby/blob/v7.0.0/CHANGELOG.md
|
101
|
+
rubygems_mfa_required: 'true'
|
102
|
+
post_install_message:
|
102
103
|
rdoc_options: []
|
103
104
|
require_paths:
|
104
105
|
- lib
|
@@ -106,7 +107,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
106
107
|
requirements:
|
107
108
|
- - ">="
|
108
109
|
- !ruby/object:Gem::Version
|
109
|
-
version: '2.
|
110
|
+
version: '2.6'
|
110
111
|
- - "<"
|
111
112
|
- !ruby/object:Gem::Version
|
112
113
|
version: '4'
|
@@ -116,8 +117,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
116
117
|
- !ruby/object:Gem::Version
|
117
118
|
version: '0'
|
118
119
|
requirements: []
|
119
|
-
rubygems_version: 3.2.
|
120
|
-
signing_key:
|
120
|
+
rubygems_version: 3.2.33
|
121
|
+
signing_key:
|
121
122
|
specification_version: 4
|
122
123
|
summary: Discover a URL’s IndieAuth, Micropub, Microsub, and Webmention endpoints.
|
123
124
|
test_files: []
|