istox 0.1.156 → 0.1.156.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.
@@ -7,7 +7,8 @@ import os
7
7
 
8
8
  # HOW TO RUN: python bulk-update-version.py <version updating to, eg. 0.1.150.2>
9
9
 
10
- SERVICES = ["client-api", "admin-api", "message-api", "auth", "admin-auth"]
10
+ SERVICES = ["client-api", "admin-api", "message-api",
11
+ "auth", "admin-auth", "banking-api", "trading-api"]
11
12
 
12
13
 
13
14
  def replace(file_path, pattern, subst):
@@ -1,8 +1,6 @@
1
1
  module Istox
2
2
  class Formatter
3
3
  class << self
4
- include ActionView::Helpers::NumberHelper
5
-
6
4
  # format a number, eg. 20000.134 > 20,000.14
7
5
  def number(input, round_mode: :half_up, precision: 2)
8
6
  BigDecimal.mode(BigDecimal::ROUND_MODE, round_mode)
@@ -11,7 +9,9 @@ module Istox
11
9
 
12
10
  input = ::BigDecimal.new(input.to_s).round(precision, round_mode)
13
11
 
14
- number_with_precision(input, precision: precision, delimiter: ',')
12
+ result = format("%.#{precision}f", input)
13
+
14
+ result.to_s.reverse.gsub(/(\d{3})(?=\d)/, '\\1,').reverse
15
15
  end
16
16
 
17
17
  # format a money, eg. 20000.134 > SGD 20,000.14, position can be :front or :behind
@@ -1,3 +1,3 @@
1
1
  module Istox
2
- VERSION = '0.1.156'.freeze
2
+ VERSION = '0.1.156.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,11 +1,11 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: istox
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.156
4
+ version: 0.1.156.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Siong Leng
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
11
  date: 2020-07-09 00:00:00.000000000 Z
@@ -524,7 +524,7 @@ files:
524
524
  homepage: http://www.abc.com
525
525
  licenses: []
526
526
  metadata: {}
527
- post_install_message:
527
+ post_install_message:
528
528
  rdoc_options: []
529
529
  require_paths:
530
530
  - lib
@@ -539,8 +539,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
539
539
  - !ruby/object:Gem::Version
540
540
  version: '0'
541
541
  requirements: []
542
- rubygems_version: 3.0.8
543
- signing_key:
542
+ rubygems_version: 3.0.6
543
+ signing_key:
544
544
  specification_version: 4
545
545
  summary: istox backend shared gem
546
546
  test_files: []