link-header-parser 3.0.0 → 5.0.0

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: 6b2127eef719541b0ed02c6cb37c7271ed1c1bac8358f5808fb50c08d5ccada3
4
- data.tar.gz: 999fdc8ea6ad395fe72e88094ed4e924063844600b25df4df5822b2e85b6c2aa
3
+ metadata.gz: a3bede096a22050eb158b8c5e55a8467cf2a0abb91a7058962ab99b1aebe9162
4
+ data.tar.gz: 02a647ff14be96c4dfc11f571694d90ef2e75fe2b3930ceb09c0ecb0ab55d92a
5
5
  SHA512:
6
- metadata.gz: 90a5edd9b4ea7802818d84d858a365f365c6aee0cdcb9ec453feb5620ef7c6b2957da0063a8eaa2847318b69be5e668874a1bf4dc5b01cb36ff75cfd6190a33d
7
- data.tar.gz: 676c81a374430b522d62d2cc569e149e4c18d5eead47db851cadc1fe509ff787d02b3ecdb823a1e70f8244a6f4d3fb8b122a18ca2dd4ea697eff6faa8c9e22a5
6
+ metadata.gz: af0da321a1652d3f6740fb4396a95d66213334b04eec1bd794652de894f2c7b6d9effd52701722ca851fbb01bcc38601e4c80b20290cede4b4856f36e6436520
7
+ data.tar.gz: ea527e8a58c23acafc460a73224d72204d9b82074dfa53275518eea5fd1aad940489d4efc5b770700a7aaf120160e8f589c36f56d9965ffba47d23174a09c73a
data/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## 5.0.0 / 2022-11-09
4
+
5
+ - **Breaking change:** Add `#to_ary`/`#to_a` method to `LinkHeadersCollection` (6a478ed)
6
+ - Note: marking this as a breaking change since it changes the existing behavior to return an `Array` of `Hash`es instead of an `Array` of `LinkHeader`s
7
+ - **Breaking change:** Update project Ruby version to 2.7.6 and minimum Ruby version to 2.7 (1e9df45)
8
+ - Improve documentation and privatize constants (8a68aa0)
9
+ - Remove Reek development dependency (423bc7a)
10
+ - Use ruby/debug gem instead of pry-byebug (4cd9d26)
11
+
12
+ ## 4.0.0 / 2022-01-06
13
+
14
+ - Remove Addressable dependency (daedf22)
15
+ - **Breaking change:** Update minimum Ruby version to 2.6 (e2343ed)
16
+ - Migrate to GitHub Actions (509b2c4)
17
+ - Update project Ruby version to 2.6.10 (c39bc66)
18
+
3
19
  ## 3.0.0 / 2021-05-22
4
20
 
5
21
  - Add implicit type conversion methods, alias explicit methods, and update specs (d132535)
data/CONTRIBUTING.md CHANGED
@@ -8,9 +8,9 @@ There are a couple ways you can help improve link-header-parser-ruby:
8
8
 
9
9
  ## Getting Started
10
10
 
11
- link-header-parser-ruby is developed using Ruby 2.5.9 and is additionally tested against Ruby 2.6, 2.7, and 3.0 using [CircleCI](https://app.circleci.com/pipelines/github/jgarber623/link-header-parser-ruby).
11
+ link-header-parser-ruby is developed using Ruby 2.7.6 and is additionally tested against Ruby 3.0 and 3.1 using [GitHub Actions](https://github.com/jgarber623/link-header-parser-ruby/actions).
12
12
 
13
- Before making changes to link-header-parser-ruby, you'll want to install Ruby 2.5.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.5.9 using your method of choice, install the project's gems by running:
13
+ Before making changes to link-header-parser-ruby, you'll want to install Ruby 2.7.6. 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.7.6 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 `bin/ci`.
25
+ 1. If your changes would benefit from testing, add the necessary tests and verify everything passes by running `bundle exec rspec`.
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
@@ -4,15 +4,15 @@
4
4
 
5
5
  [![Gem](https://img.shields.io/gem/v/link-header-parser.svg?logo=rubygems&style=for-the-badge)](https://rubygems.org/gems/link-header-parser)
6
6
  [![Downloads](https://img.shields.io/gem/dt/link-header-parser.svg?logo=rubygems&style=for-the-badge)](https://rubygems.org/gems/link-header-parser)
7
- [![Build](https://img.shields.io/circleci/build/github/jgarber623/link-header-parser-ruby?logo=circleci&style=for-the-badge)](https://app.circleci.com/pipelines/github/jgarber623/link-header-parser-ruby)
7
+ [![Build](https://img.shields.io/github/workflow/status/jgarber623/link-header-parser-ruby/CI?logo=github&style=for-the-badge)](https://github.com/jgarber623/link-header-parser-ruby/actions/workflows/ci.yml)
8
8
  [![Maintainability](https://img.shields.io/codeclimate/maintainability/jgarber623/link-header-parser-ruby.svg?logo=code-climate&style=for-the-badge)](https://codeclimate.com/github/jgarber623/link-header-parser-ruby)
9
9
  [![Coverage](https://img.shields.io/codeclimate/c/jgarber623/link-header-parser-ruby.svg?logo=code-climate&style=for-the-badge)](https://codeclimate.com/github/jgarber623/link-header-parser-ruby/code)
10
10
 
11
11
  ## Getting Started
12
12
 
13
- Before installing and using link-header-parser-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).
13
+ Before installing and using link-header-parser-ruby, you'll want to have [Ruby](https://www.ruby-lang.org) 2.7 (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).
14
14
 
15
- link-header-parser-ruby is developed using Ruby 2.5.9 and is additionally tested against Ruby 2.6, 2.7, and 3.0 using [CircleCI](https://app.circleci.com/pipelines/github/jgarber623/link-header-parser-ruby).
15
+ link-header-parser-ruby is developed using Ruby 2.7.6 and is additionally tested against Ruby 3.0 and 3.1 using [GitHub Actions](https://github.com/jgarber623/link-header-parser-ruby/actions).
16
16
 
17
17
  ## Installation
18
18
 
@@ -35,14 +35,13 @@ $ bundle install
35
35
  With link-header-parser-ruby added to your project's `Gemfile` and installed, you may parse a URL's HTTP Link headers by doing:
36
36
 
37
37
  ```ruby
38
- require 'http'
38
+ require 'net/http'
39
39
  require 'link-header-parser'
40
40
 
41
- response = HTTP.get('https://sixtwothree.org')
41
+ url = 'https://sixtwothree.org'
42
+ link_headers = Net::HTTP.get_response(URI.parse(url)).get_fields('Link')
42
43
 
43
- link_headers = response.headers.get('link')
44
-
45
- collection = LinkHeaderParser.parse(link_headers, base: response.uri)
44
+ collection = LinkHeaderParser.parse(link_headers, base: url)
46
45
  ```
47
46
 
48
47
  The `parse` method accepts two arguments:
@@ -1,19 +1,28 @@
1
- require 'forwardable'
1
+ # frozen_string_literal: true
2
2
 
3
- require 'addressable/uri'
3
+ require 'forwardable'
4
4
 
5
- require 'link_header_parser/version'
5
+ require_relative 'link_header_parser/version'
6
6
 
7
- require 'link_header_parser/link_header'
8
- require 'link_header_parser/link_header_parameter'
9
- require 'link_header_parser/link_headers_collection'
7
+ require_relative 'link_header_parser/link_header'
8
+ require_relative 'link_header_parser/link_header_parameter'
9
+ require_relative 'link_header_parser/link_headers_collection'
10
10
 
11
11
  module LinkHeaderParser
12
- # Parse an array of HTTP Link headers
12
+ # Parse an array of HTTP Link headers.
13
+ #
14
+ # Convenience method for {LinkHeaderParser::LinkHeadersCollection#initialize}.
15
+ #
16
+ # @example
17
+ # require 'net/http'
18
+ #
19
+ # url = 'https://sixtwothree.org'
20
+ # link_headers = Net::HTTP.get_response(URI.parse(url)).get_fields('Link')
21
+ #
22
+ # LinkHeaderParser.parse(link_headers, base: url)
13
23
  #
14
- # @param headers [Array<String>]
15
- # @param base [String]
16
- # @return [LinkHeaderParser::LinkHeadersCollection]
24
+ # @param (see LinkHeaderParser::LinkHeadersCollection#initialize)
25
+ # @return (see LinkHeaderParser::LinkHeadersCollection#initialize)
17
26
  def self.parse(*headers, base:)
18
27
  LinkHeadersCollection.new(*headers, base: base)
19
28
  end
@@ -1,80 +1,114 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module LinkHeaderParser
2
4
  class LinkHeader
3
5
  FIELD_VALUE_REGEXP_PATTERN = /^\s*<\s*(?<target_string>[^>]+)\s*>\s*(?<parameters>;\s*.*)$/.freeze
6
+ private_constant :FIELD_VALUE_REGEXP_PATTERN
7
+
4
8
  PARAMETERS_REGEXP_PATTERN = /(?<!;)\s*([^;]+)/.freeze
9
+ private_constant :PARAMETERS_REGEXP_PATTERN
5
10
 
11
+ # The +String+ value used to create this {LinkHeader}.
12
+ #
13
+ # @return [String]
6
14
  attr_reader :field_value
7
15
 
8
- # Create a new parsed Link header
16
+ # Create a new parsed Link header.
17
+ #
9
18
  # @see https://tools.ietf.org/html/rfc8288#appendix-B.2
19
+ # IETF RFC 8288 Web Linking Appendix B.2 Parsing a Link Field Value
10
20
  #
11
- # @param field_value [String]
12
- # @param base [String]
21
+ # @param field_value [String, #to_str]
22
+ # @param base [String, #to_str]
13
23
  def initialize(field_value, base:)
14
24
  @field_value = field_value.to_str
15
25
  @base = base.to_str
16
26
  end
17
27
 
18
- # The context URL for this Link header extracted from field_value (or target URL if no context URL is present)
19
- # @see https://tools.ietf.org/html/rfc8288#appendix-B.2 (Appendix B.2.2.11)
28
+ # The context URL for this Link header extracted from +field_value+ (or
29
+ # target URL if no context URL is present).
30
+ #
31
+ # @see https://tools.ietf.org/html/rfc8288#appendix-B.2
32
+ # IETF RFC 8288 Web Linking Appendix B.2.2.11 Parsing a Link Field Value
20
33
  #
21
34
  # @return [String]
22
35
  def context_string
23
36
  @context_string ||= grouped_link_parameters[:anchor]&.first || target_string
24
37
  end
25
38
 
26
- # The resolved context URL for this Link header
27
- # @see https://tools.ietf.org/html/rfc8288#appendix-B.2 (Appendix B.2.2.12)
39
+ # The resolved context URL for this Link header.
40
+ #
41
+ # @see https://tools.ietf.org/html/rfc8288#appendix-B.2
42
+ # IETF RFC 8288 Web Linking Appendix B.2.2.12 Parsing a Link Field Value
28
43
  #
29
44
  # @return [String]
30
45
  def context_uri
31
- @context_uri ||= Addressable::URI.join(target_uri, context_string).normalize.to_s
46
+ @context_uri ||= URI.join(target_uri, context_string).normalize.to_s
32
47
  end
33
48
 
49
+ # @return [String]
34
50
  def inspect
35
- format(%(#<#{self.class.name}:%#0x target_uri: #{target_uri.inspect}, relation_types: #{relation_types.inspect}>), object_id)
51
+ "#<#{self.class.name}:#{format('%#0x', object_id)} " \
52
+ "target_uri: #{target_uri.inspect}, " \
53
+ "relation_types: #{relation_types.inspect}>"
36
54
  end
37
55
 
38
- # The parsed parameters for this Link header extracted from field_value
56
+ # The parsed parameters for this Link header extracted from +field_value+.
57
+ #
39
58
  # @see https://tools.ietf.org/html/rfc8288#appendix-B.3
59
+ # IETF RFC 8288 Web Linking Appendix B.3 Parsing Parameters
40
60
  #
41
61
  # @return [Array<LinkHeaderParser::LinkHeaderParameter>]
42
62
  def link_parameters
43
- @link_parameters ||= field_value_match_data[:parameters].scan(PARAMETERS_REGEXP_PATTERN).flatten.map { |parameter| LinkHeaderParameter.new(parameter) }
63
+ @link_parameters ||= field_value_match_data[:parameters].scan(PARAMETERS_REGEXP_PATTERN)
64
+ .flatten
65
+ .map { |parameter| LinkHeaderParameter.new(parameter) }
44
66
  end
45
67
 
46
- # The relations_string value returned as an Array
47
- # @see https://tools.ietf.org/html/rfc8288#appendix-B.2 (Appendix B.2.2.10 and Appendix B.2.2.17.1)
68
+ # The +relations_string+ value returned as an +Array+.
69
+ #
70
+ # @see LinkHeader#relations_string
71
+ #
72
+ # @see https://tools.ietf.org/html/rfc8288#appendix-B.2
73
+ # IETF RFC 8288 Web Linking Appendix B.2.2.10 and Appendix B.2.2.17.1 Parsing a Link Field Value
48
74
  #
49
75
  # @return [Array<String>]
50
76
  def relation_types
51
77
  @relation_types ||= relations_string.split.map(&:downcase)
52
78
  end
53
79
 
54
- # The relation types for this Link header extracted from field_value
55
- # @see https://tools.ietf.org/html/rfc8288#appendix-B.2 (Appendix B.2.2.9)
80
+ # The relation types for this Link header extracted from +field_value+.
81
+ #
82
+ # @see https://tools.ietf.org/html/rfc8288#appendix-B.2
83
+ # IETF RFC 8288 Web Linking Appendix B.2.2.9 Parsing a Link Field Value
56
84
  #
57
85
  # @return [String]
58
86
  def relations_string
59
87
  @relations_string ||= grouped_link_parameters[:rel]&.first.to_s
60
88
  end
61
89
 
62
- # The target URL for this Link header extracted from field_value
63
- # @see https://tools.ietf.org/html/rfc8288#appendix-B.2 (Appendix B.2.2.4)
90
+ # The target URL for this Link header extracted from +field_value+
91
+ #
92
+ # @see https://tools.ietf.org/html/rfc8288#appendix-B.2
93
+ # IETF RFC 8288 Web Linking Appendix B.2.2.4 Parsing a Link Field Value
64
94
  #
65
95
  # @return [String]
66
96
  def target_string
67
97
  @target_string ||= field_value_match_data[:target_string]
68
98
  end
69
99
 
70
- # The resolved target URL for this Link header
71
- # @see https://tools.ietf.org/html/rfc8288#appendix-B.2 (Appendix B.2.2.8)
100
+ # The resolved target URL for this Link header.
101
+ #
102
+ # @see https://tools.ietf.org/html/rfc8288#appendix-B.2
103
+ # IETF RFC 8288 Web Linking Appendix B.2.2.8 Parsing a Link Field Value
72
104
  #
73
105
  # @return [String]
74
106
  def target_uri
75
- @target_uri ||= Addressable::URI.join(base, target_string).normalize.to_s
107
+ @target_uri ||= URI.join(base, target_string).normalize.to_s
76
108
  end
77
109
 
110
+ # Return a +Hash+ representation of this {LinkHeader}.
111
+ #
78
112
  # @return [Hash{Symbol => String, Array, Hash{Symbol => Array}}]
79
113
  def to_hash
80
114
  {
@@ -99,7 +133,10 @@ module LinkHeaderParser
99
133
  end
100
134
 
101
135
  def grouped_link_parameters
102
- @grouped_link_parameters ||= link_parameters.map(&:to_a).group_by(&:shift).transform_keys(&:to_sym).transform_values(&:flatten)
136
+ @grouped_link_parameters ||= link_parameters.map(&:to_a)
137
+ .group_by(&:shift)
138
+ .transform_keys(&:to_sym)
139
+ .transform_values(&:flatten)
103
140
  end
104
141
  end
105
142
  end
@@ -1,32 +1,47 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module LinkHeaderParser
2
4
  class LinkHeaderParameter
3
5
  PARAMETER_REGEXP_PATTERN = /^(?<name>.+?)(?:="?(?<value>.*?)"?)?$/.freeze
6
+ private_constant :PARAMETER_REGEXP_PATTERN
4
7
 
8
+ # The +String+ value used to create this {LinkHeaderParameter}.
9
+ #
10
+ # @return [String]
5
11
  attr_reader :parameter
6
12
 
7
- # @param parameter [String]
13
+ # Create a new parsed Link header parameter.
14
+ #
15
+ # @param parameter [String, #to_str]
8
16
  def initialize(parameter)
9
17
  @parameter = parameter.to_str
10
18
  end
11
19
 
20
+ # @return [String]
12
21
  def inspect
13
- format(%(#<#{self.class.name}:%#0x name: #{name.inspect}, value: #{value.inspect}>), object_id)
22
+ "#<#{self.class.name}:#{format('%#0x', object_id)} " \
23
+ "name: #{name.inspect}, " \
24
+ "value: #{value.inspect}>"
14
25
  end
15
26
 
16
- # @see https://tools.ietf.org/html/rfc8288#appendix-B.3 (Appendix B.3.2.9)
27
+ # @see https://tools.ietf.org/html/rfc8288#appendix-B.3
28
+ # IETF RFC 8288 Web Linking Appendix B.3.2.9 Parsing Parameters
17
29
  #
18
30
  # @return [String]
19
31
  def name
20
32
  @name ||= parameter_match_data[:name].downcase
21
33
  end
22
34
 
23
- # @see https://tools.ietf.org/html/rfc8288#appendix-B.3 (Appendix B.3.2.8)
35
+ # @see https://tools.ietf.org/html/rfc8288#appendix-B.3
36
+ # IETF RFC 8288 Web Linking Appendix B.3.2.8 Parsing Parameters
24
37
  #
25
38
  # @return [String]
26
39
  def value
27
40
  @value ||= parameter_match_data[:value].to_s
28
41
  end
29
42
 
43
+ # Return an +Array+ representation of this {LinkHeaderParameter}.
44
+ #
30
45
  # @return [Array<String>]
31
46
  def to_ary
32
47
  [name, value]
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module LinkHeaderParser
2
4
  class LinkHeadersCollection
3
5
  extend Forwardable
@@ -6,43 +8,74 @@ module LinkHeaderParser
6
8
 
7
9
  def_delegators :members, :[], :<<, :each, :last, :length, :push
8
10
 
11
+ # The +Array+ of HTTP Link headers used to create this
12
+ # {LinkHeadersCollection}.
13
+ #
14
+ # @return [Array<String>]
9
15
  attr_reader :headers
10
16
 
11
- # @param headers [Array<String>]
12
- # @param base [String]
17
+ # Parse an array of HTTP Link headers.
18
+ #
19
+ # @param headers [Array<String, #to_str>]
20
+ # @param base [String, #to_str]
13
21
  def initialize(*headers, base:)
14
22
  @headers = headers.to_ary.flatten.map(&:to_str)
15
23
  @base = base.to_str
16
24
 
17
- distinct_headers.each { |header| push(LinkHeader.new(header, base: base)) }
25
+ push(*distinct_link_headers)
18
26
  end
19
27
 
28
+ # Retrieve a +Hash+ of this collection's {LinkHeader}s grouped by their
29
+ # relation type(s).
30
+ #
20
31
  # @return [Hash{Symbol => Array<LinkHeaderParser::LinkHeader>}]
21
32
  def group_by_relation_type
22
- relation_types.map do |relation_type|
23
- [relation_type, find_all { |member| member.relation_types.include?(relation_type) }]
24
- end.to_h.transform_keys(&:to_sym)
33
+ relation_types.to_h do |relation_type|
34
+ [relation_type.to_sym, select_by_relation_type(relation_type)]
35
+ end
25
36
  end
26
37
 
38
+ # @return [String]
27
39
  def inspect
28
- format(%(#<#{self.class.name}:%#0x headers: #{headers.inspect}, relation_types: #{relation_types.inspect}>), object_id)
40
+ "#<#{self.class.name}:#{format('%#0x', object_id)} " \
41
+ "headers: #{headers.inspect}, " \
42
+ "relation_types: #{relation_types.inspect}>"
29
43
  end
30
44
 
45
+ # Retrieve a unique sorted +Array+ of this collection's {LinkHeader}
46
+ # relation types.
47
+ #
31
48
  # @return [Array<String>]
32
49
  def relation_types
33
50
  @relation_types ||= flat_map(&:relation_types).uniq.sort
34
51
  end
35
52
 
53
+ # Return an +Array+ representation of this {LinkHeadersCollection}.
54
+ #
55
+ # @see LinkHeader#to_hash
56
+ #
57
+ # @return [Array<Hash>}>]
58
+ def to_ary
59
+ map(&:to_hash)
60
+ end
61
+
62
+ alias to_a to_ary
63
+
36
64
  private
37
65
 
38
66
  attr_reader :base
39
67
 
40
- def distinct_headers
41
- @distinct_headers ||= headers.flat_map { |header| header.split(/,(?=[\s|<])/) }.map(&:strip)
68
+ def distinct_link_headers
69
+ headers.flat_map { |header| header.split(/,(?=[\s|<])/) }
70
+ .map { |header| LinkHeader.new(header.strip, base: base) }
42
71
  end
43
72
 
44
73
  def members
45
74
  @members ||= []
46
75
  end
76
+
77
+ def select_by_relation_type(relation_type)
78
+ select { |member| member.relation_types.include?(relation_type) }
79
+ end
47
80
  end
48
81
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module LinkHeaderParser
2
- VERSION = '3.0.0'.freeze
4
+ VERSION = '5.0.0'
3
5
  end
@@ -1,7 +1,9 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require_relative 'lib/link_header_parser/version'
2
4
 
3
5
  Gem::Specification.new do |spec|
4
- spec.required_ruby_version = Gem::Requirement.new('>= 2.5', '< 4')
6
+ spec.required_ruby_version = '>= 2.7', '< 4'
5
7
 
6
8
  spec.name = 'link-header-parser'
7
9
  spec.version = LinkHeaderParser::VERSION
@@ -19,8 +21,9 @@ Gem::Specification.new do |spec|
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
-
25
- spec.add_runtime_dependency 'addressable', '~> 2.7'
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
+ }
26
29
  end
metadata CHANGED
@@ -1,29 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: link-header-parser
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 5.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: 2021-05-22 00:00:00.000000000 Z
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'
11
+ date: 2022-11-09 00:00:00.000000000 Z
12
+ dependencies: []
27
13
  description: Parse HTTP Link headers.
28
14
  email:
29
15
  - jason@sixtwothree.org
@@ -46,8 +32,9 @@ licenses:
46
32
  - MIT
47
33
  metadata:
48
34
  bug_tracker_uri: https://github.com/jgarber623/link-header-parser-ruby/issues
49
- changelog_uri: https://github.com/jgarber623/link-header-parser-ruby/blob/v3.0.0/CHANGELOG.md
50
- post_install_message:
35
+ changelog_uri: https://github.com/jgarber623/link-header-parser-ruby/blob/v5.0.0/CHANGELOG.md
36
+ rubygems_mfa_required: 'true'
37
+ post_install_message:
51
38
  rdoc_options: []
52
39
  require_paths:
53
40
  - lib
@@ -55,7 +42,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
55
42
  requirements:
56
43
  - - ">="
57
44
  - !ruby/object:Gem::Version
58
- version: '2.5'
45
+ version: '2.7'
59
46
  - - "<"
60
47
  - !ruby/object:Gem::Version
61
48
  version: '4'
@@ -65,8 +52,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
65
52
  - !ruby/object:Gem::Version
66
53
  version: '0'
67
54
  requirements: []
68
- rubygems_version: 3.2.16
69
- signing_key:
55
+ rubygems_version: 3.3.16
56
+ signing_key:
70
57
  specification_version: 4
71
58
  summary: Parse HTTP Link headers.
72
59
  test_files: []