currencyFormatter-rails 0.2.0 → 0.3.0

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
  SHA1:
3
- metadata.gz: 0a7409cd475c5b9ba48bec12d850d53c1d1ed71d
4
- data.tar.gz: 3ca2aca505548fc914905ac3a094f57bd7c8111d
3
+ metadata.gz: 38296e4a758529f3f63b665a5a4c969792056b8f
4
+ data.tar.gz: ce2472444cef84a94828a75cbcc1e59f8c9b0aad
5
5
  SHA512:
6
- metadata.gz: d1536ddb782c5d1280a72e50365a61d93b8f369bd5191e9d90c7aaae8e62cae9727c1adeb57644ca8f1a72ef497d9c1e68bfb9da6fdaf4f6d25cdb628c852141
7
- data.tar.gz: c08a8eb01fbfa6578d3fc570019d4f733883a7b21d91f725aca9cc5d83eff64e84868389fa47a969f93caea6f4eb5b2044c3747245106996a5c54ae81dc69782
6
+ metadata.gz: dafbe10219d92bdd6b3ec2dbfc4f73dac00a8e330ededf27d27662f267d816f3a5443e4c027436138f0a3d679b85415fa87666ec8df3c756288140c56da2adce
7
+ data.tar.gz: 2379c01565a58cf053e2bb29eb3c350f66102763d108615d3a45bf4cf7dc148c3c37bb505a38f51e8e2bc28b231fa156741647ee4ec94b72199b380fa494cd95
@@ -4,4 +4,5 @@
4
4
  |--------|-----------|
5
5
  | 0.1.0 | 2.0.0
6
6
  | 0.2.0 | 2.1.0
7
+ | 0.3.0 | 2.2.0
7
8
 
@@ -1,5 +1,5 @@
1
1
  module CurrencyFormatter
2
2
  module Rails
3
- VERSION = "0.2.0"
3
+ VERSION = "0.3.0"
4
4
  end
5
5
  end
@@ -1068,7 +1068,7 @@ OSREC.CurrencyFormatter = {
1068
1068
  locale = locales[locale.h];
1069
1069
  } // Locale inheritance
1070
1070
 
1071
- symbol = p.symbol || symbols[currency] || currency;
1071
+ symbol = typeof p.symbol === 'undefined' ? symbols[currency] || currency : p.symbol === null ? '' : p.symbol;
1072
1072
  pattern = p.pattern || locale.p;
1073
1073
  decimal = p.decimal || locale.d;
1074
1074
  group = p.group || locale.g;
@@ -1179,7 +1179,7 @@ OSREC.CurrencyFormatter = {
1179
1179
 
1180
1180
  var formattedNumber = f.frontPadding + segment + (typeof splitNumber[1] === 'undefined' ? '' : f.decimal + splitNumber[1]) + f.backPadding;
1181
1181
 
1182
- return formattedNumber.replace(/\!/g, symbol);
1182
+ return formattedNumber.replace(/\!/g, symbol).trim();
1183
1183
  };
1184
1184
 
1185
1185
  // Use encode function to work out pattern
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: currencyFormatter-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - tanvir hasan
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-07-06 00:00:00.000000000 Z
11
+ date: 2018-11-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler