webmention-verification 4.0.0 → 6.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2063cd50c99a812e53c8dbeb25b5ad18ff41dd3fb2b8038041b69a69aa50e4a7
4
- data.tar.gz: 4c5461865432816ae6c9fdd6244fe96494ee749b9b060a2fce17215beb7ca591
3
+ metadata.gz: f93e78febe8a0d3a67bb30bd277a4b2ee5b47ca9df408a2e2a0bf1ebd2e1bce1
4
+ data.tar.gz: cc0c4e92839f0ad2ec361e4b4aa8162c71c4ace2012ac26e84bf04659d9d87bf
5
5
  SHA512:
6
- metadata.gz: 41e456ed1fdac332e76d1acb4b3b62b52a1d648e7c40113c65b03f35cf66d605f282a8601040bcc931b1c2b24391a0f68bf7fb4f55e2d3a40803997c5e0264f3
7
- data.tar.gz: 39864e52e855443a515e160013beb9352e798c028c3786c7fd17672f2645508695a94c180676e6f0fb7d1713e3f54bf2a74c85f02057b75edc3fcdfa0d148a11
6
+ metadata.gz: b02d679f87278ac58d1f29e51f3ad84d6cdaccf1c3699b57dee4ca119d7c8c4ce0afc8508cf44394307dfb1667c93f57ca6ed6040b914109098ce02b33eb93c7
7
+ data.tar.gz: '0828eaaf46782bd00c29234632155eaaf32ff2c7d80341efb7cd1ce56ca50af3857b2e7a99da6c18e25c246f834cda8ba0637be23a40a2934f3a8fe7af0827e4'
data/CHANGELOG.md CHANGED
@@ -1,5 +1,28 @@
1
1
  # Changelog
2
2
 
3
+ ## 6.0.1 / unreleased
4
+
5
+ - Add deprecation notice (0ba33f2)
6
+
7
+ ## 6.0.0 / 2022-05-03
8
+
9
+ - Move/rename BaseVerifier to Verifier class (6965e98)
10
+ - Remove addressable dependency (38a004e)
11
+ - Raise Webmention::Verification::SSLError on SSL errors (be9d922)
12
+ - Update ~~Addressable and~~ Nokogiri dependency constraints (822b7ae)
13
+ - **Breaking change:** Update minimum supported Ruby to 2.6 (07a7c5e)
14
+ - Update development Ruby version to 2.6.10 (d67d583)
15
+ - Remove Reek (b10b648)
16
+
17
+ ## 5.0.0 / 2021-06-08
18
+
19
+ - Add `Webmention::Verification::Client#inspect` method (361c437)
20
+ - Update [HTTP](https://github.com/httprb/http) gem constraint to ~> 5.0 (4063764)
21
+ - Simplify exception handling (3f8f12c)
22
+ - Rename base `WebmentionVerificationError` class to `Error` (2b12338)
23
+ - Add support for Ruby 3.0 (05baf08)
24
+ - Update development Ruby version to 2.5.9 (821a488)
25
+
3
26
  ## 4.0.0 / 2020-08-23
4
27
 
5
28
  - **Breaking Change:** Update minimum supported Ruby version to 2.5 (096012e)
data/CONTRIBUTING.md CHANGED
@@ -8,9 +8,9 @@ There are a couple ways you can help improve webmention-verification-ruby:
8
8
 
9
9
  ## Getting Started
10
10
 
11
- webmention-verification-ruby is developed using Ruby 2.5.8 and is additionally tested against Ruby 2.6 and 2.7 using [Travis CI](https://travis-ci.com/jgarber623/webmention-verification-ruby).
11
+ webmention-verification-ruby is developed using Ruby 2.6.10 and is additionally tested against Ruby 2.7, 3.0, and 3.1 using [GitHub Actions](https://github.com/jgarber623/webmention-verification-ruby/actions).
12
12
 
13
- Before making changes to webmention-verification-ruby, you'll want to install Ruby 2.5.8. 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.5.8 using your method of choice, install the project's gems by running:
13
+ Before making changes to webmention-verification-ruby, you'll want to install Ruby 2.6.10. 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.10 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
@@ -1,24 +1,27 @@
1
1
  # webmention-verification-ruby
2
2
 
3
+ ⚠️ **Deprecation Notice (2022-05-13)** ⚠️ This gem is deprecated in favor of [indieweb/webmention-client-ruby](https://github.com/indieweb/webmention-client-ruby) and will no longer receive updates.
4
+
5
+ ---
6
+
3
7
  **A Ruby gem for verifying a received [webmention](https://indieweb.org/Webmention).**
4
8
 
5
- [![Gem](https://img.shields.io/gem/v/webmention-verification.svg?style=for-the-badge)](https://rubygems.org/gems/webmention-verification)
6
- [![Downloads](https://img.shields.io/gem/dt/webmention-verification.svg?style=for-the-badge)](https://rubygems.org/gems/webmention-verification)
7
- [![Build](https://img.shields.io/travis/com/jgarber623/webmention-verification-ruby/main.svg?style=for-the-badge)](https://travis-ci.com/jgarber623/webmention-verification-ruby)
8
- [![Dependencies](https://img.shields.io/depfu/jgarber623/webmention-verification-ruby.svg?style=for-the-badge)](https://depfu.com/github/jgarber623/webmention-verification-ruby)
9
- [![Maintainability](https://img.shields.io/codeclimate/maintainability/jgarber623/webmention-verification-ruby.svg?style=for-the-badge)](https://codeclimate.com/github/jgarber623/webmention-verification-ruby)
10
- [![Coverage](https://img.shields.io/codeclimate/c/jgarber623/webmention-verification-ruby.svg?style=for-the-badge)](https://codeclimate.com/github/jgarber623/webmention-verification-ruby/code)
9
+ [![Gem](https://img.shields.io/gem/v/webmention-verification.svg?logo=rubygems&style=for-the-badge)](https://rubygems.org/gems/webmention-verification)
10
+ [![Downloads](https://img.shields.io/gem/dt/webmention-verification.svg?logo=rubygems&style=for-the-badge)](https://rubygems.org/gems/webmention-verification)
11
+ [![Build](https://img.shields.io/github/workflow/status/jgarber623/webmention-verification-ruby/CI?logo=github&style=for-the-badge)](https://github.com/jgarber623/webmention-verification-ruby/actions/workflows/ci.yml)
12
+ [![Maintainability](https://img.shields.io/codeclimate/maintainability/jgarber623/webmention-verification-ruby.svg?logo=code-climate&style=for-the-badge)](https://codeclimate.com/github/jgarber623/webmention-verification-ruby)
13
+ [![Coverage](https://img.shields.io/codeclimate/c/jgarber623/webmention-verification-ruby.svg?logo=code-climate&style=for-the-badge)](https://codeclimate.com/github/jgarber623/webmention-verification-ruby/code)
11
14
 
12
15
  ## Key Features
13
16
 
14
17
  - Compliant with [Section 3.2.2](https://www.w3.org/TR/webmention/#webmention-verification) of [the W3C's Webmention Recommendation](https://www.w3.org/TR/webmention/).
15
- - Supports Ruby 2.5 and newer.
18
+ - Supports Ruby 2.6 and newer.
16
19
 
17
20
  ## Getting Started
18
21
 
19
- Before installing and using webmention-verification-ruby, you'll want to have [Ruby](https://www.ruby-lang.org) 2.5 (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).
22
+ Before installing and using webmention-verification-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
23
 
21
- webmention-verification-ruby is developed using Ruby 2.5.8 and is additionally tested against Ruby 2.6 and 2.7 using [Travis CI](https://travis-ci.com/jgarber623/webmention-verification-ruby).
24
+ webmention-verification-ruby is developed using Ruby 2.6.10 and is additionally tested against Ruby 2.7, 3.0, and 3.1 using [GitHub Actions](https://github.com/jgarber623/webmention-verification-ruby/actions).
22
25
 
23
26
  ## Installation
24
27
 
@@ -70,8 +73,8 @@ client = Webmention::Verification::Client.new(source, target)
70
73
  puts client.source # => 'https://source.example.com/post/100'
71
74
  puts client.target # => 'https://target.example.com/post/100'
72
75
 
73
- puts client.source_uri # => #<Addressable::URI>
74
- puts client.target_uri # => #<Addressable::URI>
76
+ puts client.source_uri # => #<HTTP::URI>
77
+ puts client.target_uri # => #<HTTP::URI>
75
78
 
76
79
  puts client.response # => #<HTTP::Response>
77
80
 
@@ -139,7 +142,7 @@ In the example above, `verifier.results` will return an array of HTML elements t
139
142
 
140
143
  ### Exception Handling
141
144
 
142
- There are several exceptions that may be raised by webmention-verification-ruby's underlying dependencies. These errors are raised as subclasses of `WebmentionVerificationError` (which itself is a subclass of `StandardError`).
145
+ There are several exceptions that may be raised by webmention-verification-ruby's underlying dependencies. These errors are raised as subclasses of `Webmention::Verification::Error` (which itself is a subclass of `StandardError`).
143
146
 
144
147
  From [sporkmonger/addressable](https://github.com/sporkmonger/addressable):
145
148
 
@@ -147,9 +150,11 @@ From [sporkmonger/addressable](https://github.com/sporkmonger/addressable):
147
150
 
148
151
  From [httprb/http](https://github.com/httprb/http):
149
152
 
150
- - `Webmention::Verification::ConnectionError`
151
- - `Webmention::Verification::TimeoutError`
152
- - `Webmention::Verification::TooManyRedirectsError`
153
+ - `Webmention::Verification::HttpError`
154
+
155
+ From the Ruby Standard Library's [`OpenSSL::SSL::SSLError`](https://ruby-doc.org/stdlib-2.6.10/libdoc/openssl/rdoc/OpenSSL/SSL/SSLError.html):
156
+
157
+ - `Webmention::Verification::SSLError`
153
158
 
154
159
  webmention-verification-ruby will also raise a `Webmention::Verification::UnsupportedMimeTypeError` when encountering an `HTTP::Response` instance with an unsupported MIME type.
155
160
 
@@ -1,13 +1,25 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Webmention
2
4
  module Verification
3
5
  class Client
4
6
  HTTP_CLIENT_HEADERS = {
5
- accept: '*/*',
7
+ accept: '*/*',
6
8
  user_agent: 'Webmention Verification Client (https://rubygems.org/gems/webmention-verification)'
7
9
  }.freeze
8
10
 
11
+ @registered_verifiers = {}
12
+
13
+ class << self
14
+ attr_reader :registered_verifiers
15
+ end
16
+
9
17
  attr_reader :source, :target
10
18
 
19
+ def self.register_verifier(klass)
20
+ klass.mime_types.each { |mime_type| @registered_verifiers[mime_type] = klass }
21
+ end
22
+
11
23
  # Create a client used to determine whether or not source URI links to target URI.
12
24
  #
13
25
  # @example
@@ -24,55 +36,65 @@ module Webmention
24
36
  # @param options [Hash]
25
37
  # @option options [Boolean] :strict (true)
26
38
  def initialize(source, target, **options)
27
- raise ArgumentError, "source must be a String (given #{source.class.name})" unless source.is_a?(String)
28
- raise ArgumentError, "target must be a String (given #{target.class.name})" unless target.is_a?(String)
29
-
30
- @source = source
31
- @target = target
39
+ @source = source.to_str
40
+ @target = target.to_str
32
41
  @options = options
33
42
 
34
- raise ArgumentError, 'source must be an absolute URI (e.g. https://example.com/post/100)' unless source_uri.absolute?
35
- raise ArgumentError, 'target must be an absolute URI (e.g. https://example.com/post/100)' unless target_uri.absolute?
43
+ message = 'must be an absolute URI (e.g. https://example.com/post/100)'
44
+
45
+ raise ArgumentError, "source #{message}" unless absolute?(source_uri)
46
+ raise ArgumentError, "target #{message}" unless absolute?(target_uri)
47
+ end
48
+
49
+ # @return [String]
50
+ def inspect
51
+ "#<#{self.class.name}:#{format('%#0x', object_id)} " \
52
+ "source: #{source.inspect} " \
53
+ "target: #{target.inspect} " \
54
+ "options: #{@options.inspect}>"
36
55
  end
37
56
 
38
57
  # @return [HTTP::Response]
39
- # @raise [Webmention::Verification::ConnectionError, Webmention::Verification::TimeoutError, Webmention::Verification::TooManyRedirectsError]
58
+ # @raise [Webmention::Verification::HttpError, Webmention::Verification::SSLError]
40
59
  def response
41
60
  @response ||= HTTP.follow.headers(HTTP_CLIENT_HEADERS).timeout(connect: 10, read: 10).get(source_uri)
42
- rescue HTTP::ConnectionError,
43
- HTTP::TimeoutError,
44
- HTTP::Redirector::TooManyRedirectsError => exception
45
- raise Webmention::Verification.const_get(exception.class.name.split('::').last), exception
61
+ rescue HTTP::Error => e
62
+ raise HttpError, e
63
+ rescue OpenSSL::SSL::SSLError => e
64
+ raise SSLError, e
46
65
  end
47
66
 
48
- # @return [Addressable::URI]
67
+ # @return [HTTP::URI]
49
68
  # @raise [Webmention::Verification::InvalidURIError]
50
69
  def source_uri
51
- @source_uri ||= Addressable::URI.parse(source)
52
- rescue Addressable::URI::InvalidURIError => exception
53
- raise InvalidURIError, exception
70
+ @source_uri ||= HTTP::URI.parse(source)
71
+ rescue Addressable::URI::InvalidURIError => e
72
+ raise InvalidURIError, e
54
73
  end
55
74
 
56
- # @return [Addressable::URI]
75
+ # @return [HTTP::URI]
57
76
  # @raise [Webmention::Verification::InvalidURIError]
58
77
  def target_uri
59
- @target_uri ||= Addressable::URI.parse(target)
60
- rescue Addressable::URI::InvalidURIError => exception
61
- raise InvalidURIError, exception
78
+ @target_uri ||= HTTP::URI.parse(target)
79
+ rescue Addressable::URI::InvalidURIError => e
80
+ raise InvalidURIError, e
62
81
  end
63
82
 
64
83
  # @return [Boolean]
65
84
  # @raise [Webmention::Verification::UnsupportedMimeTypeError]
66
85
  def verified?
67
- raise UnsupportedMimeTypeError, "Unsupported MIME Type: #{response.mime_type}" unless verifier_for_mime_type
68
-
69
- verifier_for_mime_type.new(response, target, @options).verified?
86
+ self.class
87
+ .registered_verifiers[response.mime_type]
88
+ .new(response, target, **@options)
89
+ .verified?
90
+ rescue NoMethodError
91
+ raise UnsupportedMimeTypeError, "Unsupported MIME Type: #{response.mime_type}"
70
92
  end
71
93
 
72
94
  private
73
95
 
74
- def verifier_for_mime_type
75
- @verifier_for_mime_type ||= Verifiers.registered[response.mime_type]
96
+ def absolute?(uri)
97
+ uri.http? || uri.https?
76
98
  end
77
99
  end
78
100
  end
@@ -1,19 +1,16 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Webmention
2
4
  module Verification
3
- class BaseVerifier
5
+ class Verifier
4
6
  class << self
5
7
  attr_reader :mime_types
6
8
  end
7
9
 
8
10
  def initialize(response, target, **options)
9
- raise ArgumentError, "response must be an HTTP::Response (given #{response.class.name})" unless response.is_a?(HTTP::Response)
10
- raise ArgumentError, "target must be a String (given #{target.class.name})" unless target.is_a?(String)
11
-
12
11
  @response = response
13
- @target = target
12
+ @target = target.to_str
14
13
  @options = options
15
-
16
- raise UnsupportedMimeTypeError, "Unsupported MIME Type: #{response.mime_type}" unless self.class.mime_types.include?(response.mime_type)
17
14
  end
18
15
 
19
16
  def results
@@ -1,18 +1,20 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Webmention
2
4
  module Verification
3
5
  module Verifiers
4
- class HtmlVerifier < BaseVerifier
6
+ class HtmlVerifier < Verifier
5
7
  @mime_types = ['text/html']
6
8
 
7
- Verifiers.register(self)
9
+ Client.register_verifier(self)
8
10
 
9
11
  HTML_ATTRIBUTE_MAP = {
10
- cite: %w[blockquote del ins q],
11
- data: %w[object],
12
- href: %w[a area],
13
- poster: %w[video],
14
- src: %w[audio embed img source track video],
15
- srcset: %w[img source]
12
+ 'cite' => %w[blockquote del ins q],
13
+ 'data' => %w[object],
14
+ 'href' => %w[a area],
15
+ 'poster' => %w[video],
16
+ 'src' => %w[audio embed img source track video],
17
+ 'srcset' => %w[img source]
16
18
  }.freeze
17
19
 
18
20
  private
@@ -26,7 +28,7 @@ module Webmention
26
28
  end
27
29
 
28
30
  def search_doc(attribute, elements)
29
- regexp = attribute == :srcset ? srcset_attribute_regexp : target_regexp
31
+ regexp = attribute == 'srcset' ? srcset_attribute_regexp : target_regexp
30
32
 
31
33
  doc.css(*elements.map { |element| "#{element}[#{attribute}]" }).find_all do |node|
32
34
  node[attribute].match?(regexp)
@@ -1,10 +1,12 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Webmention
2
4
  module Verification
3
5
  module Verifiers
4
- class JsonVerifier < BaseVerifier
6
+ class JsonVerifier < Verifier
5
7
  @mime_types = ['application/json']
6
8
 
7
- Verifiers.register(self)
9
+ Client.register_verifier(self)
8
10
 
9
11
  private
10
12
 
@@ -28,7 +30,6 @@ module Webmention
28
30
 
29
31
  private
30
32
 
31
- # :reek:TooManyStatements { max_statements: 6 }
32
33
  def build_results(comparator, object, matches = [])
33
34
  return matches unless object.is_a?(Enumerable)
34
35
 
@@ -1,10 +1,12 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Webmention
2
4
  module Verification
3
5
  module Verifiers
4
- class PlaintextVerifier < BaseVerifier
6
+ class PlaintextVerifier < Verifier
5
7
  @mime_types = ['text/plain']
6
8
 
7
- Verifiers.register(self)
9
+ Client.register_verifier(self)
8
10
 
9
11
  private
10
12
 
@@ -1,5 +1,7 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Webmention
2
4
  module Verification
3
- VERSION = '4.0.0'.freeze
5
+ VERSION = '6.0.1'
4
6
  end
5
7
  end
@@ -1,21 +1,27 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'json'
2
4
 
3
- require 'addressable/uri'
4
5
  require 'http'
5
6
  require 'nokogiri'
6
7
 
7
- require 'webmention/verification/version'
8
- require 'webmention/verification/exceptions'
8
+ require_relative 'verification/version'
9
9
 
10
- require 'webmention/verification/client'
11
- require 'webmention/verification/verifiers'
12
- require 'webmention/verification/verifiers/base_verifier'
13
- require 'webmention/verification/verifiers/html_verifier'
14
- require 'webmention/verification/verifiers/json_verifier'
15
- require 'webmention/verification/verifiers/plaintext_verifier'
10
+ require_relative 'verification/client'
11
+ require_relative 'verification/verifier'
12
+ require_relative 'verification/verifiers/html_verifier'
13
+ require_relative 'verification/verifiers/json_verifier'
14
+ require_relative 'verification/verifiers/plaintext_verifier'
16
15
 
17
16
  module Webmention
18
17
  module Verification
18
+ class Error < StandardError; end
19
+ class ArgumentError < Error; end
20
+ class HttpError < Error; end
21
+ class InvalidURIError < Error; end
22
+ class SSLError < Error; end
23
+ class UnsupportedMimeTypeError < Error; end
24
+
19
25
  # Determine whether or not source URI links to target URI.
20
26
  #
21
27
  # @example
@@ -1,28 +1,44 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require_relative 'lib/webmention/verification/version'
2
4
 
3
5
  Gem::Specification.new do |spec|
4
- spec.required_ruby_version = Gem::Requirement.new('>= 2.5', '< 2.8')
6
+ spec.required_ruby_version = '>= 2.6', '< 4'
5
7
 
6
8
  spec.name = 'webmention-verification'
7
9
  spec.version = Webmention::Verification::VERSION
8
10
  spec.authors = ['Jason Garber']
9
11
  spec.email = ['jason@sixtwothree.org']
10
12
 
11
- spec.summary = 'Verify a received webmention.'
13
+ spec.summary = 'Deprecated in favor of indieweb-endpoints from 2022-05-13. Verify a received webmention.'
12
14
  spec.description = spec.summary
13
15
  spec.homepage = 'https://github.com/jgarber623/webmention-verification-ruby'
14
16
  spec.license = 'MIT'
15
17
 
16
- spec.files = Dir.chdir(File.expand_path(__dir__)) do
17
- `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(bin|spec)/}) }
18
- end
18
+ spec.files = Dir['lib/**/*'].reject { |f| File.directory?(f) }
19
+ spec.files += %w[LICENSE CHANGELOG.md CONTRIBUTING.md README.md]
20
+ spec.files += %w[webmention-verification.gemspec]
19
21
 
20
22
  spec.require_paths = ['lib']
21
23
 
22
- spec.metadata['bug_tracker_uri'] = "#{spec.homepage}/issues"
23
- spec.metadata['changelog_uri'] = "#{spec.homepage}/blob/v#{spec.version}/CHANGELOG.md"
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
+ }
29
+
30
+ spec.post_install_message = <<NOTICE
31
+
32
+ +----------------------------------------------------------+
33
+ | |
34
+ | webmention-verification is deprecated from 2022-05-13. |
35
+ | |
36
+ | Please use the webmention gem instead. |
37
+ | |
38
+ +----------------------------------------------------------+
39
+
40
+ NOTICE
24
41
 
25
- spec.add_runtime_dependency 'addressable', '~> 2.7'
26
- spec.add_runtime_dependency 'http', '~> 4.4'
27
- spec.add_runtime_dependency 'nokogiri', '~> 1.10'
42
+ spec.add_runtime_dependency 'http', '~> 5.0'
43
+ spec.add_runtime_dependency 'nokogiri', '~> 1.13'
28
44
  end
metadata CHANGED
@@ -1,84 +1,58 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: webmention-verification
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.0
4
+ version: 6.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jason Garber
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-08-24 00:00:00.000000000 Z
11
+ date: 2022-05-14 00:00:00.000000000 Z
12
12
  dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: addressable
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: '2.7'
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - "~>"
25
- - !ruby/object:Gem::Version
26
- version: '2.7'
27
13
  - !ruby/object:Gem::Dependency
28
14
  name: http
29
15
  requirement: !ruby/object:Gem::Requirement
30
16
  requirements:
31
17
  - - "~>"
32
18
  - !ruby/object:Gem::Version
33
- version: '4.4'
19
+ version: '5.0'
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: '4.4'
26
+ version: '5.0'
41
27
  - !ruby/object:Gem::Dependency
42
28
  name: nokogiri
43
29
  requirement: !ruby/object:Gem::Requirement
44
30
  requirements:
45
31
  - - "~>"
46
32
  - !ruby/object:Gem::Version
47
- version: '1.10'
33
+ version: '1.13'
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: '1.10'
55
- description: Verify a received webmention.
40
+ version: '1.13'
41
+ description: Deprecated in favor of indieweb-endpoints from 2022-05-13. Verify a received
42
+ webmention.
56
43
  email:
57
44
  - jason@sixtwothree.org
58
45
  executables: []
59
46
  extensions: []
60
47
  extra_rdoc_files: []
61
48
  files:
62
- - ".editorconfig"
63
- - ".gitignore"
64
- - ".reek.yml"
65
- - ".rspec"
66
- - ".rubocop"
67
- - ".rubocop.yml"
68
- - ".ruby-version"
69
- - ".simplecov"
70
- - ".travis.yml"
71
49
  - CHANGELOG.md
72
50
  - CONTRIBUTING.md
73
- - Gemfile
74
51
  - LICENSE
75
52
  - README.md
76
- - Rakefile
77
53
  - lib/webmention/verification.rb
78
54
  - lib/webmention/verification/client.rb
79
- - lib/webmention/verification/exceptions.rb
80
- - lib/webmention/verification/verifiers.rb
81
- - lib/webmention/verification/verifiers/base_verifier.rb
55
+ - lib/webmention/verification/verifier.rb
82
56
  - lib/webmention/verification/verifiers/html_verifier.rb
83
57
  - lib/webmention/verification/verifiers/json_verifier.rb
84
58
  - lib/webmention/verification/verifiers/plaintext_verifier.rb
@@ -89,8 +63,18 @@ licenses:
89
63
  - MIT
90
64
  metadata:
91
65
  bug_tracker_uri: https://github.com/jgarber623/webmention-verification-ruby/issues
92
- changelog_uri: https://github.com/jgarber623/webmention-verification-ruby/blob/v4.0.0/CHANGELOG.md
93
- post_install_message:
66
+ changelog_uri: https://github.com/jgarber623/webmention-verification-ruby/blob/v6.0.1/CHANGELOG.md
67
+ rubygems_mfa_required: 'true'
68
+ post_install_message: |2+
69
+
70
+ +----------------------------------------------------------+
71
+ | |
72
+ | webmention-verification is deprecated from 2022-05-13. |
73
+ | |
74
+ | Please use the webmention gem instead. |
75
+ | |
76
+ +----------------------------------------------------------+
77
+
94
78
  rdoc_options: []
95
79
  require_paths:
96
80
  - lib
@@ -98,18 +82,19 @@ required_ruby_version: !ruby/object:Gem::Requirement
98
82
  requirements:
99
83
  - - ">="
100
84
  - !ruby/object:Gem::Version
101
- version: '2.5'
85
+ version: '2.6'
102
86
  - - "<"
103
87
  - !ruby/object:Gem::Version
104
- version: '2.8'
88
+ version: '4'
105
89
  required_rubygems_version: !ruby/object:Gem::Requirement
106
90
  requirements:
107
91
  - - ">="
108
92
  - !ruby/object:Gem::Version
109
93
  version: '0'
110
94
  requirements: []
111
- rubygems_version: 3.1.2
95
+ rubygems_version: 3.3.12
112
96
  signing_key:
113
97
  specification_version: 4
114
- summary: Verify a received webmention.
98
+ summary: Deprecated in favor of indieweb-endpoints from 2022-05-13. Verify a received
99
+ webmention.
115
100
  test_files: []
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/.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
@@ -1,8 +0,0 @@
1
- detectors:
2
- DuplicateMethodCall:
3
- max_calls: 3
4
- IrresponsibleModule:
5
- enabled: false
6
-
7
- exclude_paths:
8
- - vendor/
data/.rspec DELETED
@@ -1,2 +0,0 @@
1
- --order random
2
- --require spec_helper
data/.rubocop DELETED
@@ -1,3 +0,0 @@
1
- --display-style-guide
2
- --extra-details
3
- --parallel
data/.rubocop.yml DELETED
@@ -1,31 +0,0 @@
1
- require:
2
- - rubocop-performance
3
- - rubocop-rspec
4
-
5
- AllCops:
6
- NewCops: enable
7
-
8
- Layout/HashAlignment:
9
- EnforcedColonStyle: table
10
-
11
- Layout/LineLength:
12
- Enabled: false
13
-
14
- Metrics/BlockLength:
15
- Exclude:
16
- - spec/**/*.rb
17
-
18
- Naming/RescuedExceptionsVariableName:
19
- PreferredName: exception
20
-
21
- RSpec/NestedGroups:
22
- Max: 4
23
-
24
- Style/Documentation:
25
- Enabled: false
26
-
27
- Style/FrozenStringLiteralComment:
28
- Enabled: false
29
-
30
- Style/SymbolArray:
31
- 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,18 +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
16
- slack:
17
- rooms:
18
- secure: sZ7DfokMwpZOjZ1jHD4RF58PtNGu+knqrv194+WLmfqV+MVPU38L04EGP1c/Kj7rIOtTQnbkDC10TjJNfl+OcRbUKYT19SBN3OqJJbAe5H46nhvNCfISKG54fEpbEMTcOsljSLcKB6FR3o/RiJUorY2BwS3aMCsf8NDhm08Nnxub5abpFvpgiXCfGSRklxt/dfuJmHB0kt3B8EEH3UzuAeaJoFOiV5RYnCUG0z5GXgHeZqZBs5sxmsmQhrDh5o/Yr0FSd9vcHDLD8EgArw//KyV10cF84NSEWtvPpFCcTnMpcfIuzkN/vgLoIbgYbyhczktCXiySHZDOzYBsCngzLN6DjD+5SdQgrrvtUF/Qsi9JUc6ij1EVHhcZjis7x6kGGtPL35nsM3D0KYwTXzlDIfj/RybQpLCaLL78lrkTiL2OnR1CfKXPwS58+sv0raUJOlWJP50WIL6Fe3J4L+3NWNVfpHdU2SV1cP1/UIs+Pwn4LUOwhSUn+rGsG1UKB/ZDezUMLes9PNclOmDVs8GgT7Lkn2N43mIqVQOyeHrUAVvWiI6M8xOTiAbNGP9sjOj4yJzhOwOToP5Id3ts9GvMoayHd8d8cyECQ9dotNh3VlX73p+Yjkz6rEvo/bsXfzx8gmsl0QQ6P7b4afFRwm1GC+nIofm6BNUS6cfg0xPrmMs=
data/Gemfile DELETED
@@ -1,15 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- # Specify your gem's dependencies in webmention-verification.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.89.1'
11
- gem 'rubocop-performance', '~> 1.7'
12
- gem 'rubocop-rspec', '~> 1.43'
13
- gem 'simplecov', '~> 0.19.0'
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]
@@ -1,17 +0,0 @@
1
- module Webmention
2
- module Verification
3
- class WebmentionVerificationError < StandardError; end
4
-
5
- class ArgumentError < WebmentionVerificationError; end
6
-
7
- class ConnectionError < WebmentionVerificationError; end
8
-
9
- class InvalidURIError < WebmentionVerificationError; end
10
-
11
- class TimeoutError < WebmentionVerificationError; end
12
-
13
- class TooManyRedirectsError < WebmentionVerificationError; end
14
-
15
- class UnsupportedMimeTypeError < WebmentionVerificationError; end
16
- end
17
- end
@@ -1,13 +0,0 @@
1
- module Webmention
2
- module Verification
3
- module Verifiers
4
- def self.register(klass)
5
- klass.mime_types.each { |mime_type| registered[mime_type] = klass }
6
- end
7
-
8
- def self.registered
9
- @registered ||= {}
10
- end
11
- end
12
- end
13
- end