link-header-parser 5.1.0 → 6.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 +9 -0
- data/README.md +2 -2
- data/lib/link-header-parser.rb +1 -0
- data/lib/link_header_parser/link_header.rb +3 -3
- data/lib/link_header_parser/link_header_parameter.rb +2 -2
- data/lib/link_header_parser/link_headers_collection.rb +1 -1
- data/lib/link_header_parser/version.rb +1 -1
- data/link-header-parser.gemspec +5 -4
- metadata +6 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ab2f4b179db55bc5037418bbfb6f05e5c761c5e077fe4157e78a06b3014fc72d
|
4
|
+
data.tar.gz: 716a3e1599e166ccfece4e7d59d8d42bf0d33fcb893760b5232ac97ac0cf23d5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1c8d6a2845fe75c0e5c64c62c67a3e797f88e53d2e035a40a04ec00d4fdf5c45d39321eb95d49e818e6cf593e4db9f06655e40e9e1599f230870c3e96716bbdc
|
7
|
+
data.tar.gz: 3428ca930309fe78d5baa05deb648d76d3980578490e8e9e197066bddecb5f5beb2c7a26cef4f37d386fc2878b5f2f9d42c715146d352f7172da0db7917a1988
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,14 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
> [!NOTE]
|
4
|
+
> From v6.0.0, changes are documented using [GitHub Releases](https://github.com/jgarber623/link-header-parser-ruby/releases). For a given release, metadata on RubyGems.org will link to that version's Release page.
|
5
|
+
|
6
|
+
## 5.1.1 / 2024-01-01
|
7
|
+
|
8
|
+
- RuboCop: Style/WordArray (7b5964f)
|
9
|
+
- RuboCop: Style/StringLiteralsInInterpolation (152a44c)
|
10
|
+
- Add source_code_uri to metadata (207db81)
|
11
|
+
|
3
12
|
## 5.1.0 / 2023-12-12
|
4
13
|
|
5
14
|
- Remove upper Ruby version constraint (#52) (f34716e)
|
data/README.md
CHANGED
@@ -8,9 +8,9 @@
|
|
8
8
|
|
9
9
|
## Getting Started
|
10
10
|
|
11
|
-
Before installing and using link-header-parser-ruby, you'll want to have [Ruby](https://www.ruby-lang.org)
|
11
|
+
Before installing and using link-header-parser-ruby, you'll want to have [Ruby](https://www.ruby-lang.org) 3.0 (or newer) installed. Using 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) is recommended.
|
12
12
|
|
13
|
-
link-header-parser-ruby is developed using Ruby
|
13
|
+
link-header-parser-ruby is developed using Ruby 3.3.1 and is tested against additional Ruby versions using [GitHub Actions](https://github.com/jgarber623/link-header-parser-ruby/actions).
|
14
14
|
|
15
15
|
## Installation
|
16
16
|
|
data/lib/link-header-parser.rb
CHANGED
@@ -2,10 +2,10 @@
|
|
2
2
|
|
3
3
|
module LinkHeaderParser
|
4
4
|
class LinkHeader
|
5
|
-
FIELD_VALUE_REGEXP_PATTERN = /^\s*<\s*(?<target_string>[^>]+)\s*>\s*(?<parameters>;\s*.*)
|
5
|
+
FIELD_VALUE_REGEXP_PATTERN = /^\s*<\s*(?<target_string>[^>]+)\s*>\s*(?<parameters>;\s*.*)$/
|
6
6
|
private_constant :FIELD_VALUE_REGEXP_PATTERN
|
7
7
|
|
8
|
-
PARAMETERS_REGEXP_PATTERN = /(?<!;)\s*[^;]
|
8
|
+
PARAMETERS_REGEXP_PATTERN = /(?<!;)\s*[^;]+/
|
9
9
|
private_constant :PARAMETERS_REGEXP_PATTERN
|
10
10
|
|
11
11
|
# The +String+ value used to create this {LinkHeader}.
|
@@ -48,7 +48,7 @@ module LinkHeaderParser
|
|
48
48
|
|
49
49
|
# @return [String]
|
50
50
|
def inspect
|
51
|
-
"#<#{self.class.name}:#{format(
|
51
|
+
"#<#{self.class.name}:#{format("%#0x", object_id)} " \
|
52
52
|
"target_uri: #{target_uri.inspect}, " \
|
53
53
|
"relation_types: #{relation_types.inspect}>"
|
54
54
|
end
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
module LinkHeaderParser
|
4
4
|
class LinkHeaderParameter
|
5
|
-
PARAMETER_REGEXP_PATTERN = /^(?<name>.+?)(?:="?(?<value>.*?)"?)
|
5
|
+
PARAMETER_REGEXP_PATTERN = /^(?<name>.+?)(?:="?(?<value>.*?)"?)?$/
|
6
6
|
private_constant :PARAMETER_REGEXP_PATTERN
|
7
7
|
|
8
8
|
# The +String+ value used to create this {LinkHeaderParameter}.
|
@@ -19,7 +19,7 @@ module LinkHeaderParser
|
|
19
19
|
|
20
20
|
# @return [String]
|
21
21
|
def inspect
|
22
|
-
"#<#{self.class.name}:#{format(
|
22
|
+
"#<#{self.class.name}:#{format("%#0x", object_id)} " \
|
23
23
|
"name: #{name.inspect}, " \
|
24
24
|
"value: #{value.inspect}>"
|
25
25
|
end
|
@@ -39,7 +39,7 @@ module LinkHeaderParser
|
|
39
39
|
|
40
40
|
# @return [String]
|
41
41
|
def inspect
|
42
|
-
"#<#{self.class.name}:#{format(
|
42
|
+
"#<#{self.class.name}:#{format("%#0x", object_id)} " \
|
43
43
|
"headers: #{headers.inspect}, " \
|
44
44
|
"relation_types: #{relation_types.inspect}>"
|
45
45
|
end
|
data/link-header-parser.gemspec
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
require_relative "lib/link_header_parser/version"
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
|
-
spec.required_ruby_version = ">=
|
6
|
+
spec.required_ruby_version = ">= 3.0"
|
7
7
|
|
8
8
|
spec.name = "link-header-parser"
|
9
9
|
spec.version = LinkHeaderParser::VERSION
|
@@ -16,14 +16,15 @@ Gem::Specification.new do |spec|
|
|
16
16
|
spec.license = "MIT"
|
17
17
|
|
18
18
|
spec.files = Dir["lib/**/*"].reject { |f| File.directory?(f) }
|
19
|
-
spec.files +=
|
20
|
-
spec.files +=
|
19
|
+
spec.files += ["LICENSE", "CHANGELOG.md", "README.md"]
|
20
|
+
spec.files += ["link-header-parser.gemspec"]
|
21
21
|
|
22
22
|
spec.require_paths = ["lib"]
|
23
23
|
|
24
24
|
spec.metadata = {
|
25
25
|
"bug_tracker_uri" => "#{spec.homepage}/issues",
|
26
26
|
"changelog_uri" => "#{spec.homepage}/blob/v#{spec.version}/CHANGELOG.md",
|
27
|
-
"rubygems_mfa_required" => "true"
|
27
|
+
"rubygems_mfa_required" => "true",
|
28
|
+
"source_code_uri" => "#{spec.homepage}/tree/v#{spec.version}"
|
28
29
|
}
|
29
30
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: link-header-parser
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 6.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: 2024-05-08 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Parse HTTP Link headers.
|
14
14
|
email:
|
@@ -31,8 +31,9 @@ licenses:
|
|
31
31
|
- MIT
|
32
32
|
metadata:
|
33
33
|
bug_tracker_uri: https://github.com/jgarber623/link-header-parser-ruby/issues
|
34
|
-
changelog_uri: https://github.com/jgarber623/link-header-parser-ruby/blob/
|
34
|
+
changelog_uri: https://github.com/jgarber623/link-header-parser-ruby/blob/v6.0.0/CHANGELOG.md
|
35
35
|
rubygems_mfa_required: 'true'
|
36
|
+
source_code_uri: https://github.com/jgarber623/link-header-parser-ruby/tree/v6.0.0
|
36
37
|
post_install_message:
|
37
38
|
rdoc_options: []
|
38
39
|
require_paths:
|
@@ -41,14 +42,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
41
42
|
requirements:
|
42
43
|
- - ">="
|
43
44
|
- !ruby/object:Gem::Version
|
44
|
-
version: '
|
45
|
+
version: '3.0'
|
45
46
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
46
47
|
requirements:
|
47
48
|
- - ">="
|
48
49
|
- !ruby/object:Gem::Version
|
49
50
|
version: '0'
|
50
51
|
requirements: []
|
51
|
-
rubygems_version: 3.
|
52
|
+
rubygems_version: 3.5.9
|
52
53
|
signing_key:
|
53
54
|
specification_version: 4
|
54
55
|
summary: Parse HTTP Link headers.
|