maguire 0.2.0 → 0.2.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.
- checksums.yaml +4 -4
- data/lib/maguire/locale.rb +6 -1
- data/lib/maguire/version.rb +1 -1
- data/locale/{en_US.json → en-US.json} +0 -0
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5b8a9547a3d6a67df4625d6dab4dc0cf349d3a98
|
|
4
|
+
data.tar.gz: 7bb60dad2dbd894f8e6507a269a89e5fb7920539
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5561964ac6f5b4596a1fe417c19538f6e3f01d831d4ebbfe1d04767a8464502e929a5e5fd871afce0f31c95993fbacc321a61c522c83af6054cb169d067357a1
|
|
7
|
+
data.tar.gz: a4701b0b27e4e94e36311b976098ee512ff90c21245ca1def2db7f16499df8c96bc18c0f3cc0783352356dd98d437dc69e3363c7f6cac80ace7d75f4663ff701
|
data/lib/maguire/locale.rb
CHANGED
|
@@ -54,6 +54,10 @@ module Maguire
|
|
|
54
54
|
strip_insignificant_zeros = true
|
|
55
55
|
end
|
|
56
56
|
|
|
57
|
+
if major_value == 0 && minor_value == 0 && options[:free]
|
|
58
|
+
return options[:free]
|
|
59
|
+
end
|
|
60
|
+
|
|
57
61
|
if strip_insignificant_zeros && minor_value == 0
|
|
58
62
|
minor_value = ""
|
|
59
63
|
decimal_symbol = ""
|
|
@@ -80,6 +84,7 @@ module Maguire
|
|
|
80
84
|
|
|
81
85
|
def as_json
|
|
82
86
|
{
|
|
87
|
+
id: @locale,
|
|
83
88
|
positive: @positive_formatting,
|
|
84
89
|
negative: @negative_formatting,
|
|
85
90
|
zero: @zero_formatting
|
|
@@ -198,7 +203,7 @@ module Maguire
|
|
|
198
203
|
|
|
199
204
|
class << self
|
|
200
205
|
def lookup(options)
|
|
201
|
-
locale = "#{options[:lang].downcase}
|
|
206
|
+
locale = "#{options[:lang].downcase}-#{options[:country].upcase}"
|
|
202
207
|
data = Maguire.locale_paths.load(locale)
|
|
203
208
|
if data.nil?
|
|
204
209
|
raise Locale::NotSupportedError.new("The locale #{locale} isn't supported")
|
data/lib/maguire/version.rb
CHANGED
|
File without changes
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: maguire
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Tim Evans
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2014-10-
|
|
11
|
+
date: 2014-10-10 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: nokogiri
|
|
@@ -422,7 +422,7 @@ files:
|
|
|
422
422
|
- lib/maguire/hash.rb
|
|
423
423
|
- lib/maguire/locale.rb
|
|
424
424
|
- lib/maguire/version.rb
|
|
425
|
-
- locale/
|
|
425
|
+
- locale/en-US.json
|
|
426
426
|
homepage: http://github.com/paddle8/maguire
|
|
427
427
|
licenses: []
|
|
428
428
|
metadata: {}
|