singleton-cldr-rb 0.0.7 → 0.0.8

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: d25719965f417362efd0275285f560fa415a2a879c77d5304406a27d2e87d030
4
- data.tar.gz: bc7983ea4c2f89241b5fac24a4aec217872d290cbba26a1e032a80ebd5e44105
3
+ metadata.gz: a11b0c87eda1d838bda30a9593ab573a6317ece76f64301866cf19b14c2e419c
4
+ data.tar.gz: 9ab8fe0d1d31b8cdfea5b24e67e7cdce6f600a27e3e9921662812a77e99e3af5
5
5
  SHA512:
6
- metadata.gz: 013c74b43588bbb2246c7231d9dae919775df89607f7489489c5a87d7e1bc3549c931e3b52cfdba8e7c65d8eb42f170cadc835ff86d674a0d8401b03422740b9
7
- data.tar.gz: c55dedf91585fad5915d1c60dfd042f07611ff3944227de62c3c4ae535e302dd0303850dc2719156fbe30b5cc4c5601b5f9d8f768b1038ec93e4f2535fe87188
6
+ metadata.gz: fe7c170760798d22d64ac439b129a317c039af91d4027927124d4c60203d673ff5c4a5c401f22950ca7866f7fb7ef851c7acedb8eb48e7d7bbe87cb094365320
7
+ data.tar.gz: 4166be54ecc061b529c9ad21351815bf9c58be9998af2f712bfde006e7efa3b5ea11ea5cda5279a7866150fd20eb16026f498366518afd963013c0206e152d20
@@ -10,25 +10,6 @@ module SgtnCldr
10
10
  @locale = TwitterCldr.convert_locale(locale)
11
11
  end
12
12
 
13
- def deep_symbolize_keys(arg)
14
- #puts 3221
15
- case arg
16
- when Array
17
- # puts 44
18
- arg.map { |elem| deep_symbolize_keys(elem) }
19
- when Hash
20
- # puts 77
21
- # puts arg
22
- # Hash[arg.map { |k, v| [k.is_a?(String) ? k.to_sym : k, deep_symbolize_keys(v)] }]
23
- # puts arg
24
- Hash[arg.map { |k, v| [k.is_a?(String) ? k.to_sym : k, deep_symbolize_keys(v)] }]
25
- else
26
- # puts 99
27
- # puts arg
28
- arg
29
- end
30
- end
31
-
32
13
  def num_s(string, replacements)
33
14
  reg = Regexp.union(
34
15
  /%<(\{.*?\})>/
@@ -45,13 +26,6 @@ module SgtnCldr
45
26
  raise ArgumentError.new('invalide format')
46
27
  end
47
28
  count = replacements[count_placeholder.to_sym].to_s
48
- puts 11
49
- puts count
50
- puts patterns
51
- puts deep_symbolize_keys(patterns)[count.to_sym]
52
- puts 0
53
- puts locale
54
- puts TwitterCldr::Formatters::Plurals::Rules.rule_for(count, locale)
55
29
  if patterns.is_a?(Hash)
56
30
  return TwitterCldr::Utils.deep_symbolize_keys(patterns)[count.to_sym]
57
31
  else
data/lib/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
 
2
- VERSION_INFO = [0, 0, 7].freeze
2
+ VERSION_INFO = [0, 0, 8].freeze
3
3
  VERSION = VERSION_INFO.map(&:to_s).join('.').freeze
@@ -17,11 +17,6 @@ describe SgtnCldr do
17
17
  expect(str.to_plural_s(:cy, { :cat_count => 2 })).to eq 'there are two cats in the room'
18
18
  s = '%<{"count": {"0": "no horse", "one": "one horse", "other": "%{count} horses"}}>'
19
19
  expect(s.to_plural_s(:cy, { :count => 0 })).to eq 'no horse'
20
- puts 0
21
- puts "5" + s.to_plural_s(:pt, { :count => 0 })
22
- puts TwitterCldr::Formatters::Plurals::Rules.all_for(:pt_PT)
23
- puts 0.localize("it").plural_rule
24
- puts (0).floor
25
20
  end
26
21
  end
27
22
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: singleton-cldr-rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - VMware G11n Team