accept_language 2.0.3 → 2.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE.md +2 -2
- data/README.md +50 -27
- data/lib/accept_language/matcher.rb +17 -9
- data/lib/accept_language/parser.rb +22 -11
- data/lib/accept_language.rb +19 -5
- metadata +5 -145
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c0ab90b33cf7595d9009aff633cd9bd812a4be94c9192f79b31713c05e1e7306
|
4
|
+
data.tar.gz: c5520587db201a89994e3fcc4b4cb9211c1f32fa8361fbf0c900dedbf2b7d5b6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bfc609d573a6febdf82e00fab5513f18aacc7746ed11f9e4c4200bdb7e82ec65a98764145fb9c0193e9af204b69f9f25842c6cccdfb1f85cfb042bd434f11cfe
|
7
|
+
data.tar.gz: 067ae6e1d8e55bce2de8477122bb93006c54582bb63450ce392d7776ebe3e38c8e02cdaf6e6e1aafe46fece34f84c429a0ba74cd95ed2f004e04c5c8a66ddbfe
|
data/LICENSE.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
The MIT License
|
1
|
+
# The MIT License
|
2
2
|
|
3
|
-
Copyright (c) 2019-
|
3
|
+
Copyright (c) 2019-2023 Cyril Kato
|
4
4
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
data/README.md
CHANGED
@@ -1,22 +1,32 @@
|
|
1
1
|
# Accept Language 🌐
|
2
2
|
|
3
|
-
|
3
|
+
Web applications often need to cater to users from around the world. One of the ways they can provide a better user experience is by presenting the content in the user's preferred language. This is where the `Accept-Language` HTTP header comes into play. Sent by the client (usually a web browser), this header tells the server the list of languages the user understands, and the user's preference order.
|
4
|
+
|
5
|
+
Parsing the `Accept-Language` header can be complex due to its flexible format defined in [RFC 2616](https://tools.ietf.org/html/rfc2616#section-14.4). For instance, it can specify languages, countries, and scripts with varying degrees of preference (quality values).
|
6
|
+
|
7
|
+
`Accept Language` is a lightweight, thread-safe Ruby library designed to parse the `Accept-Language` header, making it easier for your application to determine the best language to respond with. It calculates the intersection of the languages the user prefers and the languages your application supports, handling all the complexity of quality values and wildcards.
|
8
|
+
|
9
|
+
Whether you're building a multilingual web application or just trying to make your service more accessible to users worldwide, `Accept Language` offers a reliable, simple solution.
|
4
10
|
|
5
11
|
## Status
|
6
12
|
|
7
|
-
[![Version](https://img.shields.io/github/v/tag/cyril/accept_language.rb?label=Version&logo=github)](https://github.com/cyril/accept_language.rb/
|
13
|
+
[![Version](https://img.shields.io/github/v/tag/cyril/accept_language.rb?label=Version&logo=github)](https://github.com/cyril/accept_language.rb/tags)
|
8
14
|
[![Yard documentation](https://img.shields.io/badge/Yard-documentation-blue.svg?logo=github)](https://rubydoc.info/github/cyril/accept_language.rb/main)
|
9
|
-
[![
|
15
|
+
[![Ruby](https://github.com/cyril/accept_language.rb/workflows/Ruby/badge.svg?branch=main)](https://github.com/cyril/accept_language.rb/actions?query=workflow%3Aruby+branch%3Amain)
|
10
16
|
[![RuboCop](https://github.com/cyril/accept_language.rb/workflows/RuboCop/badge.svg?branch=main)](https://github.com/cyril/accept_language.rb/actions?query=workflow%3Arubocop+branch%3Amain)
|
11
17
|
[![License](https://img.shields.io/github/license/cyril/accept_language.rb?label=License&logo=github)](https://github.com/cyril/accept_language.rb/raw/main/LICENSE.md)
|
12
18
|
|
13
19
|
## Why this tool?
|
14
20
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
-
|
21
|
+
## Why Choose Accept Language?
|
22
|
+
|
23
|
+
There are a myriad of tools out there, so why should you consider Accept Language for your next project? Here's why:
|
24
|
+
|
25
|
+
- **Thread-Safe**: Multithreading can present unique challenges when dealing with shared resources. Our implementation is designed to be thread-safe, preventing potential concurrency issues.
|
26
|
+
- **Compact and Robust**: Despite being small in size, Accept Language can handle even the trickiest cases with grace, ensuring you have a reliable tool at your disposal.
|
27
|
+
- **Case-Insensitive Matching**: In line with the principle of robustness, our tool matches both strings and symbols regardless of case, providing greater flexibility.
|
28
|
+
- **Independent of Framework**: While many tools require Rails, Rack, or i18n to function, Accept Language stands on its own. It works perfectly well without these dependencies, increasing its adaptability.
|
29
|
+
- **BCP 47 Support**: BCP 47 defines a standard for language tags. This is crucial for specifying languages unambiguously. Accept Language complies with this standard, ensuring accurate language identification.
|
20
30
|
|
21
31
|
## Installation
|
22
32
|
|
@@ -40,28 +50,41 @@ gem install accept_language
|
|
40
50
|
|
41
51
|
## Usage
|
42
52
|
|
43
|
-
|
44
|
-
|
45
|
-
In order to help facilitate better i18n, the lib try to find the intersection of the languages the user prefers and the languages your application supports.
|
53
|
+
`Accept Language` library is primarily designed to assist web servers in serving multilingual content based on user preferences expressed in the `Accept-Language` header. This library finds the best matching language from the available languages your application supports and the languages the user prefers.
|
46
54
|
|
47
|
-
|
55
|
+
Below are some examples of how you might use the library:
|
48
56
|
|
49
57
|
```ruby
|
50
|
-
|
51
|
-
|
52
|
-
AcceptLanguage.parse("da, en-GB;q=0.8, en;q=0.7").match(:
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
AcceptLanguage.parse("
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
AcceptLanguage.parse("
|
61
|
-
|
62
|
-
|
58
|
+
# The user prefers Danish, then British English, and finally any kind of English.
|
59
|
+
# Since your application supports English and Danish, it selects Danish as it's the user's first choice.
|
60
|
+
AcceptLanguage.parse("da, en-GB;q=0.8, en;q=0.7").match(:en, :da) # => :da
|
61
|
+
|
62
|
+
# The user prefers Danish, then English, and finally Uyghur. Your application supports British English and Chinese Uyghur.
|
63
|
+
# Here, the library will return Chinese Uyghur because it's the highest ranked language in the user's list that your application supports.
|
64
|
+
AcceptLanguage.parse("da, en;q=0.8, ug;q=0.9").match("en-GB", "ug-CN") # => "ug-CN"
|
65
|
+
|
66
|
+
# The user prefers Danish, then British English, and finally any kind of English. Your application only supports Japanese.
|
67
|
+
# Since none of the user's preferred languages are supported, it returns nil.
|
68
|
+
AcceptLanguage.parse("da, en-GB;q=0.8, en;q=0.7").match(:ja) # => nil
|
69
|
+
|
70
|
+
# The user only accepts Swiss French, but your application only supports French. Since Swiss French and French are not the same, it returns nil.
|
71
|
+
AcceptLanguage.parse("fr-CH").match(:fr) # => nil
|
72
|
+
|
73
|
+
# The user prefers German, then any language except French. Your application supports French.
|
74
|
+
# Even though the user specified a wildcard, they explicitly excluded French. Therefore, it returns nil.
|
75
|
+
AcceptLanguage.parse("de, zh;q=0.4, *;q=0.5, fr;q=0").match(:fr) # => nil
|
76
|
+
|
77
|
+
# The user prefers Uyghur (in Latin script, as used in Uzbekistan). Your application supports this exact variant of Uyghur.
|
78
|
+
# Since the user's first choice matches a language your application supports, it returns that language.
|
79
|
+
AcceptLanguage.parse("uz-latn-uz").match("uz-Latn-UZ") # => "uz-Latn-UZ"
|
80
|
+
|
81
|
+
# The user doesn't mind what language they get, but they'd prefer not to have English. Your application supports English.
|
82
|
+
# Even though the user specified a wildcard, they explicitly excluded English. Therefore, it returns nil.
|
83
|
+
AcceptLanguage.parse("*, en;q=0").match("en") # => nil
|
63
84
|
```
|
64
85
|
|
86
|
+
These examples show the flexibility and power of `Accept Language`. By giving your application a deep understanding of the user's language preferences, `Accept Language` can significantly improve user satisfaction and engagement with your application.
|
87
|
+
|
65
88
|
### Rails integration example
|
66
89
|
|
67
90
|
```ruby
|
@@ -92,8 +115,8 @@ end
|
|
92
115
|
|
93
116
|
## Read more
|
94
117
|
|
95
|
-
|
96
|
-
|
118
|
+
- [Language negotiation with Ruby](https://dev.to/cyri_/language-negotiation-with-ruby-5166)
|
119
|
+
- [Rubyで言語ネゴシエーション](https://qiita.com/cyril/items/45dc233edb7be9d614e7)
|
97
120
|
|
98
121
|
## Versioning
|
99
122
|
|
@@ -1,9 +1,10 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module AcceptLanguage
|
4
|
-
#
|
5
|
-
#
|
6
|
-
#
|
4
|
+
# A utility class that provides functionality to match the Accept-Language header value
|
5
|
+
# against the languages supported by your application. This helps in identifying the most
|
6
|
+
# suitable languages to present to the user based on their preferences.
|
7
|
+
#
|
7
8
|
# @example
|
8
9
|
# Matcher.new("da" => 1.0, "en-GB" => 0.8, "en" => 0.7).call(:ug, :kk, :ru, :en) # => :en
|
9
10
|
# Matcher.new("da" => 1.0, "en-GB" => 0.8, "en" => 0.7).call(:fr, :en, :"en-GB") # => :"en-GB"
|
@@ -12,8 +13,11 @@ module AcceptLanguage
|
|
12
13
|
|
13
14
|
attr_reader :excluded_langtags, :preferred_langtags
|
14
15
|
|
15
|
-
#
|
16
|
-
#
|
16
|
+
# Initialize a new Matcher object with the languages_range parameter representing the user's
|
17
|
+
# preferred languages and their respective quality values.
|
18
|
+
#
|
19
|
+
# @param [Hash<String, BigDecimal>] languages_range A hash where keys represent languages and
|
20
|
+
# values are the quality of preference for each language. A value of zero means the language is not acceptable.
|
17
21
|
def initialize(**languages_range)
|
18
22
|
@excluded_langtags = ::Set[]
|
19
23
|
langtags = []
|
@@ -30,11 +34,15 @@ module AcceptLanguage
|
|
30
34
|
@preferred_langtags = langtags.compact.reverse
|
31
35
|
end
|
32
36
|
|
33
|
-
#
|
34
|
-
#
|
35
|
-
#
|
37
|
+
# Matches the user's preferred languages against the available languages of your application.
|
38
|
+
# It prioritizes higher quality values and returns the most suitable match.
|
39
|
+
#
|
40
|
+
# @param [Array<String, Symbol>] available_langtags An array representing the languages available in your application.
|
41
|
+
#
|
42
|
+
# @example When Uyghur, Kazakh, Russian and English languages are available.
|
36
43
|
# call(:ug, :kk, :ru, :en)
|
37
|
-
#
|
44
|
+
#
|
45
|
+
# @return [String, Symbol, nil] The language that best matches the user's preferences, or nil if there is no match.
|
38
46
|
def call(*available_langtags)
|
39
47
|
available_langtags = drop_unacceptable(*available_langtags)
|
40
48
|
|
@@ -3,10 +3,14 @@
|
|
3
3
|
require "bigdecimal"
|
4
4
|
|
5
5
|
module AcceptLanguage
|
6
|
-
#
|
6
|
+
# Parser is a utility class responsible for parsing Accept-Language header fields.
|
7
|
+
# It processes the field to extract language tags and their respective quality values.
|
8
|
+
#
|
7
9
|
# @example
|
8
|
-
# Parser.new("da, en-GB;q=0.8, en;q=0.7")
|
9
|
-
# @
|
10
|
+
# Parser.new("da, en-GB;q=0.8, en;q=0.7")
|
11
|
+
# # => #<AcceptLanguage::Parser:0x00007 @languages_range={"da"=>1.0, "en-GB"=>0.8, "en"=>0.7}>
|
12
|
+
#
|
13
|
+
# @see https://tools.ietf.org/html/rfc2616#section-14.4 for more information on Accept-Language header fields.
|
10
14
|
class Parser
|
11
15
|
DEFAULT_QUALITY = BigDecimal("1")
|
12
16
|
SEPARATOR = ","
|
@@ -15,27 +19,34 @@ module AcceptLanguage
|
|
15
19
|
|
16
20
|
attr_reader :languages_range
|
17
21
|
|
22
|
+
# Initializes a new Parser instance by importing and processing the given Accept-Language header field.
|
23
|
+
#
|
18
24
|
# @param [String] field The Accept-Language header field to parse.
|
19
|
-
# @see https://tools.ietf.org/html/rfc2616#section-14.4
|
20
25
|
def initialize(field)
|
21
26
|
@languages_range = import(field)
|
22
27
|
end
|
23
28
|
|
24
|
-
#
|
25
|
-
#
|
26
|
-
# @
|
29
|
+
# Uses the Matcher class to find the best language match from the list of available languages.
|
30
|
+
#
|
31
|
+
# @param [Array<String, Symbol>] available_langtags An array of language tags that are available for matching.
|
32
|
+
#
|
33
|
+
# @example When Uyghur, Kazakh, Russian and English languages are available.
|
27
34
|
# match(:ug, :kk, :ru, :en)
|
28
|
-
#
|
35
|
+
#
|
36
|
+
# @return [String, Symbol, nil] The language tag that best matches the parsed languages from the Accept-Language header, or nil if no match found.
|
29
37
|
def match(*available_langtags)
|
30
38
|
Matcher.new(**languages_range).call(*available_langtags)
|
31
39
|
end
|
32
40
|
|
33
41
|
private
|
34
42
|
|
43
|
+
# Processes the Accept-Language header field to extract language tags and their respective quality values.
|
44
|
+
#
|
35
45
|
# @example
|
36
|
-
# import('da, en-GB;q=0.8, en;q=0.7')
|
37
|
-
#
|
38
|
-
#
|
46
|
+
# import('da, en-GB;q=0.8, en;q=0.7')
|
47
|
+
# # => {"da"=>1.0, "en-GB"=>0.8, "en"=>0.7}
|
48
|
+
#
|
49
|
+
# @return [Hash<String, BigDecimal>] A hash where keys represent language tags and values are their respective quality values.
|
39
50
|
def import(field)
|
40
51
|
field.delete(SPACE).split(SEPARATOR).inject({}) do |hash, lang|
|
41
52
|
tag, quality = lang.split(SUFFIX)
|
data/lib/accept_language.rb
CHANGED
@@ -1,17 +1,31 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
#
|
3
|
+
# This module provides a tiny library for parsing the Accept-Language header as specified in RFC 2616.
|
4
|
+
# It transforms the Accept-Language header field into a language range, providing a flexible way to determine
|
5
|
+
# user's language preferences and match them with the available languages in your application.
|
6
|
+
#
|
4
7
|
# @example
|
5
|
-
# AcceptLanguage.parse("da, en-GB;q=0.8, en;q=0.7")
|
8
|
+
# AcceptLanguage.parse("da, en-GB;q=0.8, en;q=0.7")
|
9
|
+
# # => #<AcceptLanguage::Parser:0x00007 @languages_range={"da"=>1.0, "en-GB"=>0.8, "en"=>0.7}>
|
10
|
+
#
|
6
11
|
# @see https://tools.ietf.org/html/rfc2616#section-14.4
|
7
12
|
module AcceptLanguage
|
8
|
-
#
|
13
|
+
# Parses an Accept-Language header field value into a Parser object, which can then be used to match
|
14
|
+
# user's preferred languages against the languages your application supports.
|
15
|
+
# This method accepts a string argument in the format as described in RFC 2616 Section 14.4, and returns
|
16
|
+
# a Parser object which responds to the #match method.
|
17
|
+
#
|
18
|
+
# @param field [String] the Accept-Language header field value.
|
19
|
+
#
|
9
20
|
# @example
|
10
|
-
# parse("da, en-GB;q=0.8, en;q=0.7")
|
11
|
-
#
|
21
|
+
# AcceptLanguage.parse("da, en-GB;q=0.8, en;q=0.7")
|
22
|
+
# # => #<AcceptLanguage::Parser:0x00007 @languages_range={"da"=>1.0, "en-GB"=>0.8, "en"=>0.7}>
|
23
|
+
#
|
24
|
+
# @return [Parser] a Parser object that responds to #match method.
|
12
25
|
def self.parse(field)
|
13
26
|
Parser.new(field)
|
14
27
|
end
|
15
28
|
end
|
16
29
|
|
30
|
+
# Load the Parser class
|
17
31
|
require_relative File.join("accept_language", "parser")
|
metadata
CHANGED
@@ -1,155 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: accept_language
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cyril Kato
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
12
|
-
dependencies:
|
13
|
-
- !ruby/object:Gem::Dependency
|
14
|
-
name: bundler
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - ">="
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '0'
|
20
|
-
type: :development
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - ">="
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: '0'
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: rake
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - ">="
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '0'
|
34
|
-
type: :development
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - ">="
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: '0'
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: r_spec-clone
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - ">="
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '0'
|
48
|
-
type: :development
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - ">="
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: '0'
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: rubocop-md
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - ">="
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '0'
|
62
|
-
type: :development
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - ">="
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: '0'
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: rubocop-performance
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - ">="
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: '0'
|
76
|
-
type: :development
|
77
|
-
prerelease: false
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - ">="
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: '0'
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
|
-
name: rubocop-rake
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
86
|
-
requirements:
|
87
|
-
- - ">="
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version: '0'
|
90
|
-
type: :development
|
91
|
-
prerelease: false
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
93
|
-
requirements:
|
94
|
-
- - ">="
|
95
|
-
- !ruby/object:Gem::Version
|
96
|
-
version: '0'
|
97
|
-
- !ruby/object:Gem::Dependency
|
98
|
-
name: rubocop-rspec
|
99
|
-
requirement: !ruby/object:Gem::Requirement
|
100
|
-
requirements:
|
101
|
-
- - ">="
|
102
|
-
- !ruby/object:Gem::Version
|
103
|
-
version: '0'
|
104
|
-
type: :development
|
105
|
-
prerelease: false
|
106
|
-
version_requirements: !ruby/object:Gem::Requirement
|
107
|
-
requirements:
|
108
|
-
- - ">="
|
109
|
-
- !ruby/object:Gem::Version
|
110
|
-
version: '0'
|
111
|
-
- !ruby/object:Gem::Dependency
|
112
|
-
name: rubocop-thread_safety
|
113
|
-
requirement: !ruby/object:Gem::Requirement
|
114
|
-
requirements:
|
115
|
-
- - ">="
|
116
|
-
- !ruby/object:Gem::Version
|
117
|
-
version: '0'
|
118
|
-
type: :development
|
119
|
-
prerelease: false
|
120
|
-
version_requirements: !ruby/object:Gem::Requirement
|
121
|
-
requirements:
|
122
|
-
- - ">="
|
123
|
-
- !ruby/object:Gem::Version
|
124
|
-
version: '0'
|
125
|
-
- !ruby/object:Gem::Dependency
|
126
|
-
name: simplecov
|
127
|
-
requirement: !ruby/object:Gem::Requirement
|
128
|
-
requirements:
|
129
|
-
- - ">="
|
130
|
-
- !ruby/object:Gem::Version
|
131
|
-
version: '0'
|
132
|
-
type: :development
|
133
|
-
prerelease: false
|
134
|
-
version_requirements: !ruby/object:Gem::Requirement
|
135
|
-
requirements:
|
136
|
-
- - ">="
|
137
|
-
- !ruby/object:Gem::Version
|
138
|
-
version: '0'
|
139
|
-
- !ruby/object:Gem::Dependency
|
140
|
-
name: yard
|
141
|
-
requirement: !ruby/object:Gem::Requirement
|
142
|
-
requirements:
|
143
|
-
- - ">="
|
144
|
-
- !ruby/object:Gem::Version
|
145
|
-
version: '0'
|
146
|
-
type: :development
|
147
|
-
prerelease: false
|
148
|
-
version_requirements: !ruby/object:Gem::Requirement
|
149
|
-
requirements:
|
150
|
-
- - ">="
|
151
|
-
- !ruby/object:Gem::Version
|
152
|
-
version: '0'
|
11
|
+
date: 2023-05-24 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
153
13
|
description: Parses the Accept-Language header from an HTTP request and produces a
|
154
14
|
hash of languages and qualities.
|
155
15
|
email: contact@cyril.email
|
@@ -175,14 +35,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
175
35
|
requirements:
|
176
36
|
- - ">="
|
177
37
|
- !ruby/object:Gem::Version
|
178
|
-
version:
|
38
|
+
version: 3.1.4
|
179
39
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
180
40
|
requirements:
|
181
41
|
- - ">="
|
182
42
|
- !ruby/object:Gem::Version
|
183
43
|
version: '0'
|
184
44
|
requirements: []
|
185
|
-
rubygems_version: 3.
|
45
|
+
rubygems_version: 3.3.26
|
186
46
|
signing_key:
|
187
47
|
specification_version: 4
|
188
48
|
summary: "Parser for Accept-Language request HTTP header \U0001F310"
|