locale 2.1.2 → 2.1.3

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
- SHA1:
3
- metadata.gz: 530d2db4f5bc7f68d06654f0a8ec730479e79860
4
- data.tar.gz: 72a52587e7410335944d6ac1ab1a769633598c58
2
+ SHA256:
3
+ metadata.gz: 6ec4fc8d1cf8b1f7c4a9a1f52571c25ac8fea84cf2a834eb5ce1bd28ad7650f3
4
+ data.tar.gz: c983bc5f2e425cfd999548fc25b77e6f17032c24ea403e91d4f258089fa16876
5
5
  SHA512:
6
- metadata.gz: 1f3cf2b1775cd5245c7e72ac837e2ec81af7db1b89abeb6771d74393bddde9d28ca4c1d0f73d2a615a474325c726ba37edebcce9551ba84d08b1c97941b244c2
7
- data.tar.gz: c2c19cd4920438188f0f9cb7dff4cff07e1e87b8a15c3feb07bd49e9e3c7a4badfc6e950d5477f85e75a8a4134dc24a929782b4a2449d1f7b174dde471b8aef8
6
+ metadata.gz: 200a569b57b3dcd15bae51bea2011f1a7aa5772719d3333d3a282d608577a91620cfbca5b21ba5531f888aad85f6d851de0348edf6a343adc7b4ea9c5b9cb71d
7
+ data.tar.gz: 94f77b80770f5ae2c7508c00304b57a29863b4eef4d6a852a64a62c01e8915d09d280da786c496d137ee7d2d6573909639d85e21ecbdd2ac9606cf336441ab88
data/Rakefile CHANGED
@@ -35,7 +35,6 @@ end
35
35
 
36
36
  helper = Bundler::GemHelper.new(base_dir)
37
37
  helper.install
38
- spec = helper.gemspec
39
38
 
40
39
  desc "Run tests"
41
40
  task :test do
@@ -1,5 +1,11 @@
1
1
  # News
2
2
 
3
+ ## <a id="2-1-3">2.1.3</a>: 2020-02-12
4
+
5
+ ### Improvements
6
+
7
+ * Suppressed warnings.
8
+
3
9
  ## <a id="2-1-2">2.1.2</a>: 2015-09-15
4
10
 
5
11
  ### Improvements
@@ -2,6 +2,7 @@
2
2
  locale/tag/cldr.rb - Locale::Tag::CLDR
3
3
 
4
4
  Copyright (C) 2008,2009 Masao Mutoh
5
+ Copyright (C) 2018 Kouhei Sutou <kou@clear-code.com>
5
6
 
6
7
  You may redistribute it and/or modify it under the same
7
8
  license terms as Ruby.
@@ -28,9 +29,10 @@ module Locale
28
29
  class << self
29
30
  # Parse the language tag and return the new Locale::Tag::CLDR.
30
31
  def parse(tag)
31
- if tag =~ /\APOSIX\Z/ # This is the special case of POSIX locale but match this regexp.
32
+ case tag
33
+ when /\APOSIX\Z/ # This is the special case of POSIX locale but match this regexp.
32
34
  nil
33
- elsif tag =~ TAG_RE
35
+ when TAG_RE
34
36
  lang, script, region, subtag = $1, $2, $3, $4
35
37
 
36
38
  extensions = {}
@@ -2,6 +2,7 @@
2
2
  locale/tag/common.rb - Locale::Tag::Common
3
3
 
4
4
  Copyright (C) 2008,2009 Masao Mutoh
5
+ Copyright (C) 2018 Kouhei Sutou <kou@clear-code.com>
5
6
 
6
7
  You may redistribute it and/or modify it under the same
7
8
  license terms as Ruby.
@@ -35,9 +36,10 @@ module Locale
35
36
  class << self
36
37
  # Parse the language tag and return the new Locale::Tag::Common.
37
38
  def parse(tag)
38
- if tag =~ /\APOSIX\Z/ # This is the special case of POSIX locale but match this regexp.
39
+ case tag
40
+ when /\APOSIX\Z/ # This is the special case of POSIX locale but match this regexp.
39
41
  nil
40
- elsif tag =~ TAG_RE
42
+ when TAG_RE
41
43
  lang, script, region, subtag = $1, $2, $3, $4
42
44
  variants = subtag.scan(/(^|[-_])#{VARIANT}(?=([-_]|$))/i).collect{|v| v[1]}
43
45
 
@@ -2,6 +2,7 @@
2
2
  locale/tag/posix.rb - Locale::Tag::Posix
3
3
 
4
4
  Copyright (C) 2008 Masao Mutoh
5
+ Copyright (C) 2018 Kouhei Sutou <kou@clear-code.com>
5
6
 
6
7
  You may redistribute it and/or modify it under the same
7
8
  license terms as Ruby.
@@ -30,11 +31,12 @@ module Locale
30
31
  end
31
32
 
32
33
  def self.parse(tag)
33
- if tag =~ /^(C|POSIX)$/
34
+ case tag
35
+ when /^(C|POSIX)$/
34
36
  ret = self.new("en", "US")
35
37
  ret.tag = tag
36
38
  ret
37
- elsif tag =~ TAG_RE
39
+ when TAG_RE
38
40
  ret = self.new($1, $2, $3, $4)
39
41
  ret.tag = tag
40
42
  ret
@@ -2,6 +2,7 @@
2
2
  locale/tag/rfc.rb - Locale::Tag::Rfc
3
3
 
4
4
  Copyright (C) 2008,2009 Masao Mutoh
5
+ Copyright (C) 2018 Kouhei Sutou <kou@clear-code.com>
5
6
 
6
7
  You may redistribute it and/or modify it under the same
7
8
  license terms as Ruby.
@@ -29,9 +30,10 @@ module Locale
29
30
  class << self
30
31
  # Parse the language tag and return the new Locale::Tag::Rfc.
31
32
  def parse(tag)
32
- if tag =~ /\APOSIX\Z/ # This is the special case of POSIX locale but match this regexp.
33
+ case tag
34
+ when /\APOSIX\Z/ # This is the special case of POSIX locale but match this regexp.
33
35
  nil
34
- elsif tag =~ TAG_RE
36
+ when TAG_RE
35
37
  lang, script, region, subtag = $1, $2, $3, $4
36
38
  extensions = []
37
39
  variants = []
@@ -2,6 +2,7 @@
2
2
  locale/tag/simple.rb - Locale::Tag::Simple
3
3
 
4
4
  Copyright (C) 2008,2009 Masao Mutoh
5
+ Copyright (C) 2018 Kouhei Sutou <kou@clear-code.com>
5
6
 
6
7
  You may redistribute it and/or modify it under the same
7
8
  license terms as Ruby.
@@ -52,7 +53,8 @@ module Locale
52
53
  class << self
53
54
  # Parse the language tag and return the new Locale::Tag::Simple.
54
55
  def parse(tag)
55
- if tag =~ TAG_RE
56
+ case tag
57
+ when TAG_RE
56
58
  ret = self.new($1, $2)
57
59
  ret.tag = tag
58
60
  ret
@@ -8,6 +8,6 @@
8
8
  license terms as Ruby.
9
9
  =end
10
10
  module Locale
11
- VERSION = "2.1.2"
11
+ VERSION = "2.1.3"
12
12
  end
13
13
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: locale
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.2
4
+ version: 2.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kouhei Sutou
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-09-15 00:00:00.000000000 Z
12
+ date: 2020-02-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -109,8 +109,9 @@ dependencies:
109
109
  - - ">="
110
110
  - !ruby/object:Gem::Version
111
111
  version: '0'
112
- description: |
113
- Ruby-Locale is the pure ruby library which provides basic APIs for localization.
112
+ description: 'Ruby-Locale is the pure ruby library which provides basic APIs for localization.
113
+
114
+ '
114
115
  email:
115
116
  - kou@clear-code.com
116
117
  - mutomasa at gmail.com
@@ -190,18 +191,17 @@ required_rubygems_version: !ruby/object:Gem::Requirement
190
191
  version: '0'
191
192
  requirements: []
192
193
  rubyforge_project:
193
- rubygems_version: 2.2.2
194
+ rubygems_version: 2.7.6.2
194
195
  signing_key:
195
196
  specification_version: 4
196
197
  summary: Ruby-Locale is the pure ruby library which provides basic APIs for localization.
197
198
  test_files:
199
+ - test/test_locale.rb
200
+ - test/test_driver_win32.rb
198
201
  - test/test_tag.rb
199
- - test/test_detect_cgi.rb
200
- - test/test_info.rb
201
202
  - test/test_thread.rb
202
- - test/test_driver_jruby.rb
203
203
  - test/test_taglist.rb
204
- - test/test_driver_win32.rb
205
204
  - test/test_detect_general.rb
206
- - test/test_locale.rb
207
- has_rdoc:
205
+ - test/test_driver_jruby.rb
206
+ - test/test_info.rb
207
+ - test/test_detect_cgi.rb