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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 68b624745bcd22e8111fc985132ffa0bc3074af3
4
- data.tar.gz: cfad026deb4b6355ba405ec5d20879a51ceb9ce6
3
+ metadata.gz: 5b8a9547a3d6a67df4625d6dab4dc0cf349d3a98
4
+ data.tar.gz: 7bb60dad2dbd894f8e6507a269a89e5fb7920539
5
5
  SHA512:
6
- metadata.gz: 57778cf554336ddf7be48aeccf0d00cb263447a8d193f27c966d86afb08369a8bc43deb2bc474edfb8be846c36bab366e148fce06eda3b43b91aa5ef8b7ef971
7
- data.tar.gz: 6a334c4e870965cb3f993b0de21288ed8888145d53b610c783685f50b635983edaf62668e1539927fec273633e9bff73adc8ed4e370b9956462327671bc0f0ae
6
+ metadata.gz: 5561964ac6f5b4596a1fe417c19538f6e3f01d831d4ebbfe1d04767a8464502e929a5e5fd871afce0f31c95993fbacc321a61c522c83af6054cb169d067357a1
7
+ data.tar.gz: a4701b0b27e4e94e36311b976098ee512ff90c21245ca1def2db7f16499df8c96bc18c0f3cc0783352356dd98d437dc69e3363c7f6cac80ace7d75f4663ff701
@@ -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}_#{options[:country].upcase}"
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")
@@ -1,3 +1,3 @@
1
1
  module Maguire
2
- VERSION = '0.2.0'
2
+ VERSION = '0.2.1'
3
3
  end
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.0
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-08 00:00:00.000000000 Z
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/en_US.json
425
+ - locale/en-US.json
426
426
  homepage: http://github.com/paddle8/maguire
427
427
  licenses: []
428
428
  metadata: {}