twitter_cldr 2.1.0 → 2.1.1
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.
data/History.txt
CHANGED
@@ -17,9 +17,13 @@ module TwitterCldr
|
|
17
17
|
nil
|
18
18
|
else
|
19
19
|
cache_key = TwitterCldr::Utils.compute_cache_key(goal_pattern)
|
20
|
-
pattern_cache[cache_key] ||=
|
21
|
-
|
22
|
-
|
20
|
+
pattern_cache[cache_key] ||= if @pattern_hash.include?(goal_pattern.to_sym)
|
21
|
+
goal_pattern
|
22
|
+
else
|
23
|
+
rank(goal_pattern).min do |(p1, score1), (p2, score2)|
|
24
|
+
score1 <=> score2
|
25
|
+
end.first
|
26
|
+
end
|
23
27
|
end
|
24
28
|
end
|
25
29
|
|
data/lib/twitter_cldr/version.rb
CHANGED
@@ -90,6 +90,7 @@ describe AdditionalDateFormatSelector do
|
|
90
90
|
|
91
91
|
describe "#find_closest" do
|
92
92
|
it "returns an exact match if it exists" do
|
93
|
+
selector.find_closest("h").should == "h"
|
93
94
|
selector.find_closest("MMMd").should == "MMMd"
|
94
95
|
selector.find_closest("Hms").should == "Hms"
|
95
96
|
selector.find_closest("yQQQQ").should == "yQQQQ"
|
metadata
CHANGED
@@ -1,48 +1,40 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: twitter_cldr
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 2.1.1
|
5
5
|
prerelease:
|
6
|
-
segments:
|
7
|
-
- 2
|
8
|
-
- 1
|
9
|
-
- 0
|
10
|
-
version: 2.1.0
|
11
6
|
platform: ruby
|
12
|
-
authors:
|
7
|
+
authors:
|
13
8
|
- Cameron Dutro
|
14
9
|
autorequire:
|
15
10
|
bindir: bin
|
16
11
|
cert_chain: []
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2013-02-13 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
21
15
|
name: json
|
22
|
-
|
23
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
24
17
|
none: false
|
25
|
-
requirements:
|
26
|
-
- -
|
27
|
-
- !ruby/object:Gem::Version
|
28
|
-
hash: 1
|
29
|
-
segments:
|
30
|
-
- 1
|
31
|
-
- 1
|
32
|
-
- 9
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
33
21
|
version: 1.1.9
|
34
22
|
type: :runtime
|
35
|
-
|
36
|
-
|
37
|
-
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 1.1.9
|
30
|
+
description: Ruby implementation of the ICU (International Components for Unicode)
|
31
|
+
that uses the Common Locale Data Repository to format dates, plurals, and more.
|
32
|
+
email:
|
38
33
|
- cdutro@twitter.com
|
39
34
|
executables: []
|
40
|
-
|
41
35
|
extensions: []
|
42
|
-
|
43
36
|
extra_rdoc_files: []
|
44
|
-
|
45
|
-
files:
|
37
|
+
files:
|
46
38
|
- lib/twitter_cldr/collation/collator.rb
|
47
39
|
- lib/twitter_cldr/collation/implicit_collation_elements.rb
|
48
40
|
- lib/twitter_cldr/collation/sort_key_builder.rb
|
@@ -1071,36 +1063,27 @@ files:
|
|
1071
1063
|
- twitter_cldr.gemspec
|
1072
1064
|
homepage: http://twitter.com
|
1073
1065
|
licenses: []
|
1074
|
-
|
1075
1066
|
post_install_message:
|
1076
1067
|
rdoc_options: []
|
1077
|
-
|
1078
|
-
require_paths:
|
1068
|
+
require_paths:
|
1079
1069
|
- lib
|
1080
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
1070
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
1081
1071
|
none: false
|
1082
|
-
requirements:
|
1083
|
-
- -
|
1084
|
-
- !ruby/object:Gem::Version
|
1085
|
-
|
1086
|
-
|
1087
|
-
- 0
|
1088
|
-
version: "0"
|
1089
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
1072
|
+
requirements:
|
1073
|
+
- - ! '>='
|
1074
|
+
- !ruby/object:Gem::Version
|
1075
|
+
version: '0'
|
1076
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
1090
1077
|
none: false
|
1091
|
-
requirements:
|
1092
|
-
- -
|
1093
|
-
- !ruby/object:Gem::Version
|
1094
|
-
|
1095
|
-
segments:
|
1096
|
-
- 0
|
1097
|
-
version: "0"
|
1078
|
+
requirements:
|
1079
|
+
- - ! '>='
|
1080
|
+
- !ruby/object:Gem::Version
|
1081
|
+
version: '0'
|
1098
1082
|
requirements: []
|
1099
|
-
|
1100
1083
|
rubyforge_project:
|
1101
|
-
rubygems_version: 1.8.
|
1084
|
+
rubygems_version: 1.8.25
|
1102
1085
|
signing_key:
|
1103
1086
|
specification_version: 3
|
1104
|
-
summary: Ruby implementation of the ICU (International Components for Unicode) that
|
1087
|
+
summary: Ruby implementation of the ICU (International Components for Unicode) that
|
1088
|
+
uses the Common Locale Data Repository to format dates, plurals, and more.
|
1105
1089
|
test_files: []
|
1106
|
-
|