http_headers-link 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.idea/.rakeTasks +7 -0
- data/.idea/http_headers-link.iml +1 -1
- data/CHANGELOG.md +6 -1
- data/Gemfile.lock +3 -3
- data/README.md +1 -0
- data/http_headers-link.gemspec +1 -1
- data/lib/http_headers/link.rb +8 -7
- metadata +9 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3a78f6aa6dcfa12dd456ef07612ba6b467af0be65e6b3bf0b243bd6a0ae32036
|
4
|
+
data.tar.gz: 84ce5e87908a42c4be76ff22bc96dc093b51fb302c9dbab4e6dcfe29087058d6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fa91293396663d975b0571d66db097ed56c126562038d45e9dae10215c73fc79c574163c6790ed30f73abc2e2eb9ebef7b54412583bb07e6f49671b10488cb8a
|
7
|
+
data.tar.gz: d10b078292178bf20259efbb9e97ded752eeaaecfd3d76008ceacfe11d7c7462d1326493c81c30029abcf08d1b916d4ff8400ebc0f796f4ec6c788d46b1f2824
|
data/.idea/.rakeTasks
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<Settings><!--This file was automatically generated by Ruby plugin.
|
3
|
+
You are allowed to:
|
4
|
+
1. Remove rake task
|
5
|
+
2. Add existing rake tasks
|
6
|
+
To add existing rake tasks automatically delete this file and reload the project.
|
7
|
+
--><RakeGroup description="" fullCmd="" taksId="rake" /></Settings>
|
data/.idea/http_headers-link.iml
CHANGED
@@ -8,7 +8,7 @@
|
|
8
8
|
<orderEntry type="jdk" jdkName="ruby-2.5.3-p105" jdkType="RUBY_SDK" />
|
9
9
|
<orderEntry type="sourceFolder" forTests="false" />
|
10
10
|
<orderEntry type="library" scope="PROVIDED" name="bundler (v2.0.1, ruby-2.5.3-p105) [gem]" level="application" />
|
11
|
-
<orderEntry type="library" scope="PROVIDED" name="http_headers-utils (v0.
|
11
|
+
<orderEntry type="library" scope="PROVIDED" name="http_headers-utils (v0.2.0, ruby-2.5.3-p105) [gem]" level="application" />
|
12
12
|
<orderEntry type="library" scope="PROVIDED" name="minitest (v5.11.3, ruby-2.5.3-p105) [gem]" level="application" />
|
13
13
|
<orderEntry type="library" scope="PROVIDED" name="rake (v10.5.0, ruby-2.5.3-p105) [gem]" level="application" />
|
14
14
|
</component>
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
http_headers-link (0.
|
5
|
-
http_headers-utils (< 1.0.0)
|
4
|
+
http_headers-link (0.2.0)
|
5
|
+
http_headers-utils (>= 0.2.0, < 1.0.0)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
|
-
http_headers-utils (0.
|
10
|
+
http_headers-utils (0.2.0)
|
11
11
|
minitest (5.11.3)
|
12
12
|
rake (10.5.0)
|
13
13
|
|
data/README.md
CHANGED
@@ -66,6 +66,7 @@ The resulting collection works both as an `Array` and `Hash` by `rel`.
|
|
66
66
|
- [HttpHeaders::Utils](https://github.com/XPBytes/http_headers-utils): :nut_and_bolt: Utility belt for the HttpHeader libraries
|
67
67
|
- [HttpHeaders::Accept](https://github.com/XPBytes/http_headers-accept): :nut_and_bolt: Utility to parse and sort the "Accept" HTTP Header
|
68
68
|
- [HttpHeaders::AcceptLanguage](https://github.com/XPBytes/http_headers-accept_language): :nut_and_bolt: Utility to parse and sort the "Accept-Language" HTTP Header
|
69
|
+
- [HttpHeaders::ContentType](https://github.com/XPBytes/http_headers-content_type): :nut_and_bolt: Utility to parse and sort the "Content-Type" HTTP Header
|
69
70
|
|
70
71
|
## Development
|
71
72
|
|
data/http_headers-link.gemspec
CHANGED
@@ -35,7 +35,7 @@ Gem::Specification.new do |spec|
|
|
35
35
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
36
36
|
spec.require_paths = ["lib"]
|
37
37
|
|
38
|
-
spec.add_dependency 'http_headers-utils', '< 1.0.0'
|
38
|
+
spec.add_dependency 'http_headers-utils', '>= 0.2.0', '< 1.0.0'
|
39
39
|
|
40
40
|
spec.add_development_dependency "bundler", "~> 2.0"
|
41
41
|
spec.add_development_dependency "rake", "~> 10.0"
|
data/lib/http_headers/link.rb
CHANGED
@@ -1,11 +1,12 @@
|
|
1
1
|
require 'http_headers/utils/list'
|
2
|
+
require 'delegate'
|
2
3
|
|
3
4
|
module HttpHeaders
|
4
|
-
class Link <
|
5
|
-
VERSION =
|
5
|
+
class Link < DelegateClass(Array)
|
6
|
+
VERSION = '0.2.0'
|
6
7
|
|
7
8
|
def initialize(value)
|
8
|
-
|
9
|
+
__setobj__ HttpHeaders::Utils::List.new(value, entry_klazz: Link::Entry)
|
9
10
|
indexify!
|
10
11
|
end
|
11
12
|
|
@@ -25,7 +26,7 @@ module HttpHeaders
|
|
25
26
|
freeze
|
26
27
|
end
|
27
28
|
|
28
|
-
attr_reader :href
|
29
|
+
attr_reader :href, :index
|
29
30
|
|
30
31
|
# noinspection RubyInstanceMethodNamingConvention
|
31
32
|
def rel
|
@@ -40,7 +41,7 @@ module HttpHeaders
|
|
40
41
|
parameters.fetch(String(parameter).to_sym)
|
41
42
|
end
|
42
43
|
|
43
|
-
def
|
44
|
+
def to_header
|
44
45
|
to_s
|
45
46
|
end
|
46
47
|
|
@@ -50,8 +51,8 @@ module HttpHeaders
|
|
50
51
|
|
51
52
|
private
|
52
53
|
|
53
|
-
attr_writer :href
|
54
|
-
attr_accessor :parameters
|
54
|
+
attr_writer :href, :index
|
55
|
+
attr_accessor :parameters
|
55
56
|
end
|
56
57
|
|
57
58
|
private
|
metadata
CHANGED
@@ -1,19 +1,22 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: http_headers-link
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Derk-Jan Karrenbeld
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-02-
|
11
|
+
date: 2019-02-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: http_headers-utils
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 0.2.0
|
17
20
|
- - "<"
|
18
21
|
- !ruby/object:Gem::Version
|
19
22
|
version: 1.0.0
|
@@ -21,6 +24,9 @@ dependencies:
|
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 0.2.0
|
24
30
|
- - "<"
|
25
31
|
- !ruby/object:Gem::Version
|
26
32
|
version: 1.0.0
|
@@ -74,6 +80,7 @@ extensions: []
|
|
74
80
|
extra_rdoc_files: []
|
75
81
|
files:
|
76
82
|
- ".gitignore"
|
83
|
+
- ".idea/.rakeTasks"
|
77
84
|
- ".idea/http_headers-link.iml"
|
78
85
|
- ".idea/inspectionProfiles/Project_Default.xml"
|
79
86
|
- ".idea/misc.xml"
|