http_headers-link 0.1.0 → 0.2.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: 2875d845511b20ab55730ab0dba06b321ebe41fa6f02ab39f07291dc658997a7
4
- data.tar.gz: d231b9f2aecc5ec130cc96c0564b649702eb8262af863ac16ffa8a2a99ad6e4b
3
+ metadata.gz: 3a78f6aa6dcfa12dd456ef07612ba6b467af0be65e6b3bf0b243bd6a0ae32036
4
+ data.tar.gz: 84ce5e87908a42c4be76ff22bc96dc093b51fb302c9dbab4e6dcfe29087058d6
5
5
  SHA512:
6
- metadata.gz: e6251c5f9641acd410fcb70fb191ba1cb3210f2b54fce3f03c3c690b936e30a4d2f49fbff9a9c54366bf94cde51bfbfa3b29713cf02156f59c67c702a5a36d63
7
- data.tar.gz: b0ca23bc9081c9a742a7c33dd8eadb6759d174f0ae519c8474b2bb1a4cf704aa959b734531865f71ed8200836283bd5cc769abd4c24f5b9b8d5ffec8666ff0c1
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>
@@ -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.1.0, ruby-2.5.3-p105) [gem]" level="application" />
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
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.2.0
4
+
5
+ - Update to `utils` version 0.2.0
6
+ - Delegate directly to `Array`
7
+
3
8
  ## 0.1.0
4
9
 
5
- :baby: initial release
10
+ :baby: Initial release
data/Gemfile.lock CHANGED
@@ -1,13 +1,13 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- http_headers-link (0.1.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.1.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
 
@@ -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"
@@ -1,11 +1,12 @@
1
1
  require 'http_headers/utils/list'
2
+ require 'delegate'
2
3
 
3
4
  module HttpHeaders
4
- class Link < Utils::List
5
- VERSION = "0.1.0"
5
+ class Link < DelegateClass(Array)
6
+ VERSION = '0.2.0'
6
7
 
7
8
  def initialize(value)
8
- super value, entry_klazz: Link::Entry
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 inspect
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, :index
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.1.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-15 00:00:00.000000000 Z
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"