cldr-plurals 1.0.1 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -11,7 +11,7 @@ end
11
11
  def each_rule
12
12
  samples.each_pair do |locales, rules|
13
13
  rules.each do |rule|
14
- next if rule[:text].empty? # @TODO handle this case
14
+ next if rule[:text].empty? # skip other rule test, as it's a fallback
15
15
  tokens = CldrPlurals::Compiler::Tokenizer.tokenize(rule[:text])
16
16
  rule_ast = CldrPlurals::Compiler::Parser.new(tokens).parse
17
17
  yield locales, rule_ast, rule[:samples]
@@ -25,9 +25,8 @@ def each_rule_list
25
25
  samples = {}
26
26
 
27
27
  rules.each do |rule|
28
- next if rule[:text].empty? # @TODO: handle this case
29
- rule_list.add_rule(rule[:name], rule[:text])
30
28
  samples[rule[:name]] = rule[:samples]
29
+ rule_list.add_rule(rule[:name], rule[:text]) unless rule[:text].empty?
31
30
  end
32
31
 
33
32
  samples_per_name = samples.each_with_object({}) do |(name, samples), ret|
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cldr-plurals
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cameron Dutro
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-13 00:00:00.000000000 Z
11
+ date: 2016-04-22 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Tokenizes and parses CLDR plural rules and provides a mechanism for emitting
14
14
  them as source code
@@ -56,9 +56,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
56
56
  version: '0'
57
57
  requirements: []
58
58
  rubyforge_project:
59
- rubygems_version: 2.4.8
59
+ rubygems_version: 2.2.3
60
60
  signing_key:
61
61
  specification_version: 4
62
62
  summary: Tokenizes and parses CLDR plural rules and provides a mechanism for emitting
63
63
  them as source code
64
64
  test_files: []
65
+ has_rdoc: true