http_headers-accept_language 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: 8a854f26c581e892bf6f0a913b00f93e69a20967211b26628a3692e8aaa5281c
4
- data.tar.gz: e7e6c272d798ab54be6604e5b2b237e3e337d534f7f21b929204d841b684803f
3
+ metadata.gz: da5da728fa3c44c5969938a8974488b885e07a0d1b46dce5ec117cab74ddd136
4
+ data.tar.gz: 4a635fc81239c6e6aa5d1363cce006eb1c1c7ff08d983cf5da5d1cc198d9086b
5
5
  SHA512:
6
- metadata.gz: effba618460177770b00647301681a9776d86bf0bca39c284c5112b82f1bf1c93dafc10005b07c97e0f174cdea04c0090943f73d19926b6c1ac61011bc480d17
7
- data.tar.gz: fbbc51764e27f609b9aaa9a62ad7df95bc388d77514b69914d99672b7569dbe8ea009611ccfec4182c1a7405e7470a5671acdf79049c97a128a8d2f6a875f083
6
+ metadata.gz: dc3d5748db64c7e74746f28b36b8c3113e20b201e94fb0c670f6ef42e7ab70dfd4c2a7cf5987294fa990d0a2d17c2a7e06e3a7bb698de2d7587851be7abf32ad
7
+ data.tar.gz: f726785bc095011cefbe2f944b0c72bb46a0a601ec0ee2cb2e7bbaa2c2a79096356ba369572ba36408f219727e316bb2304735555d35f5984567480e1d61ce63
@@ -27,7 +27,7 @@
27
27
  <orderEntry type="jdk" jdkName="ruby-2.5.3-p105" jdkType="RUBY_SDK" />
28
28
  <orderEntry type="sourceFolder" forTests="false" />
29
29
  <orderEntry type="library" scope="PROVIDED" name="bundler (v2.0.1, ruby-2.5.3-p105) [gem]" level="application" />
30
- <orderEntry type="library" scope="PROVIDED" name="http_headers-utils (v0.1.0, ruby-2.5.3-p105) [gem]" level="application" />
30
+ <orderEntry type="library" scope="PROVIDED" name="http_headers-utils (v0.2.0, ruby-2.5.3-p105) [gem]" level="application" />
31
31
  <orderEntry type="library" scope="PROVIDED" name="minitest (v5.11.3, ruby-2.5.3-p105) [gem]" level="application" />
32
32
  <orderEntry type="library" scope="PROVIDED" name="rake (v10.5.0, ruby-2.5.3-p105) [gem]" level="application" />
33
33
  </component>
data/CHANGELOG.md ADDED
@@ -0,0 +1,10 @@
1
+ # Changelog
2
+
3
+ ## 0.2.0
4
+
5
+ - Update to `utils` version 0.2.0
6
+ - Delegate directly to `Array`
7
+
8
+ ## 0.1.0
9
+
10
+ :baby: Initial release
data/Gemfile.lock CHANGED
@@ -1,13 +1,13 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- http_headers-accept_language (0.1.0)
5
- http_headers-utils (< 1.0.0)
4
+ http_headers-accept_language (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
@@ -4,7 +4,7 @@
4
4
  [![Gem Version](https://badge.fury.io/rb/http_headers-accept_language.svg)](https://badge.fury.io/rb/http_headers-accept)
5
5
  [![MIT license](http://img.shields.io/badge/license-MIT-brightgreen.svg)](http://opensource.org/licenses/MIT)
6
6
 
7
- Authorize a certain block with cancan
7
+ :nut_and_bolt: Utility to parse and sort the "Accept-Language" HTTP Header
8
8
 
9
9
  ## Installation
10
10
 
@@ -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,12 +1,12 @@
1
1
  require 'http_headers/utils'
2
+ require 'delegate'
2
3
 
3
4
  module HttpHeaders
4
- class AcceptLanguage < Utils::List
5
- VERSION = "0.1.0"
5
+ class AcceptLanguage < DelegateClass(Array)
6
+ VERSION = '0.2.0'
6
7
 
7
8
  def initialize(value)
8
- super value, entry_klazz: AcceptLanguage::Entry
9
- sort!
9
+ __setobj__ HttpHeaders::Utils::List.new(value, entry_klazz: Entry)
10
10
  end
11
11
 
12
12
  class Entry
@@ -40,7 +40,7 @@ module HttpHeaders
40
40
  parameters.fetch(String(parameter).to_sym)
41
41
  end
42
42
 
43
- def inspect
43
+ def to_header
44
44
  to_s
45
45
  end
46
46
 
metadata CHANGED
@@ -1,19 +1,22 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: http_headers-accept_language
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
@@ -82,6 +88,7 @@ files:
82
88
  - ".idea/runConfigurations/test.xml"
83
89
  - ".idea/vcs.xml"
84
90
  - ".travis.yml"
91
+ - CHANGELOG.md
85
92
  - CODE_OF_CONDUCT.md
86
93
  - Gemfile
87
94
  - Gemfile.lock