istox 0.2.17 → 0.3.0

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
  SHA256:
3
- metadata.gz: 2bb366596fe8f9d32466b7b2f128f3f254d4bf21d85860f19ccbb70aacf6d9d6
4
- data.tar.gz: 86347798b3f88ed5a0841d67724d8c6a31343022b7d97acee45183ff1e749168
3
+ metadata.gz: bf92c8de5dc5407049f3a216cbf0d63df754aa1c4d23473a2a87a9628d71bbc8
4
+ data.tar.gz: 2cfce3c6ef9c45edcff3f9c34d8e27def16e6ed6cf94343acd9d810052d2ecb8
5
5
  SHA512:
6
- metadata.gz: f23208024a894a2faf7ad5165b442b2f1c24e43943409fd0df84eeb87bcaefd3f2b5fd6871e27f20c2872a07be560ea115d009b6636f18ea916769c586f1a3fc
7
- data.tar.gz: c924441ebf62cb571fbfb2adf706bc0ac3f373e40a1b6878a3c3de437cd859db0c4dcebaec46e7b07b56ffc30305cec0c0df14e0ef4272978ffcd1dac720088b
6
+ metadata.gz: f91e99b9bb7ae5fab66068e14d7c049187662b7265afcb45c7538af6b72bbd4c0e8d60eb7b0afd0e3eb60412709b32a42f38a3eebab8f07d8ef56d64f5fa76cd
7
+ data.tar.gz: 7f48b151239306cdfe9b754c195f7f2d01608efddec8342aaf10f779f6693fdf4b9ece2cf3208345e79ae3e605cc94b9ec5382ed229895a7fc7e28645bc5afe0
data/.gitignore CHANGED
File without changes
data/.rubocop.yml CHANGED
File without changes
data/.solargraph.yml CHANGED
File without changes
data/CODE_OF_CONDUCT.md CHANGED
File without changes
data/Gemfile CHANGED
File without changes
data/README.md CHANGED
File without changes
data/Rakefile CHANGED
File without changes
File without changes
@@ -80,11 +80,11 @@ module Istox
80
80
  ::BigDecimal.new(x.to_s).round(digits).to_s
81
81
  end
82
82
 
83
- # rounding mechanism can be :down, :up, or :natural
83
+ # rounding mechanism can be 'down', 'up', or 'natural'
84
84
  # by default will be :down
85
- def round(x, digits, rounding_mechanism: :down)
86
- return round_up(x, digits) if rounding_mechanism == :up
87
- return round_half_up(x, digits) if rounding_mechanism == :natural
85
+ def round(x, digits, rounding_mechanism: 'down')
86
+ return round_up(x, digits) if rounding_mechanism == 'up'
87
+ return round_half_up(x, digits) if rounding_mechanism == 'natural'
88
88
 
89
89
  round_down(x, digits)
90
90
  end
@@ -3,14 +3,14 @@ module Istox
3
3
  def before_server_start(server:)
4
4
  # do my thing before the server starts
5
5
 
6
- @listener = ::Listen.to('app/rpc') do |modified, added, removed|
7
- puts "modified absolute path: #{modified}"
8
- puts "added absolute path: #{added}"
9
- puts "removed absolute path: #{removed}"
6
+ # @listener = ::Listen.to('app/rpc') do |modified, added, removed|
7
+ # puts "modified absolute path: #{modified}"
8
+ # puts "added absolute path: #{added}"
9
+ # puts "removed absolute path: #{removed}"
10
10
 
11
- server.init_restart
12
- end
13
- @listener.start # not blocking
11
+ # server.init_restart
12
+ # end
13
+ # @listener.start # not blocking
14
14
  end
15
15
 
16
16
  def after_server_stop(server:)
File without changes
File without changes
File without changes
@@ -32,7 +32,7 @@ module Istox
32
32
  current_page = 1 if current_page <= 0
33
33
 
34
34
  offset = (current_page - 1) * meta.limit
35
- total = query.count
35
+ total = query.count(:all)
36
36
  data = query.limit(meta.limit).offset(offset)
37
37
 
38
38
  page_count = (total + meta.limit - 1) / meta.limit
File without changes
File without changes
data/lib/istox/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Istox
2
- VERSION = '0.2.17'.freeze
2
+ VERSION = '0.3.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: istox
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.17
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Siong Leng
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-08-25 00:00:00.000000000 Z
11
+ date: 2022-01-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: amazing_print
@@ -534,7 +534,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
534
534
  - !ruby/object:Gem::Version
535
535
  version: '0'
536
536
  requirements: []
537
- rubygems_version: 3.2.11
537
+ rubygems_version: 3.0.6
538
538
  signing_key:
539
539
  specification_version: 4
540
540
  summary: istox backend shared gem