search-engine-for-typesense 30.1.6.8 → 30.1.6.9

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: ed93c9aa019a0f633ad5c7cc47ec08ea303f5e51491cfc3130e677271b000e1f
4
- data.tar.gz: 6446746c790fc6b1c0fa084a5ba9bebd555f5e298738f7b8800fd2717257659f
3
+ metadata.gz: 5bb490748566039ece84701b5b0beadf44b4599241070b304fe70a4c9054e48e
4
+ data.tar.gz: 79bbd57c5283c993936e6323382497ffcfcde6b92b82529f78806593e49080bc
5
5
  SHA512:
6
- metadata.gz: 99aa8f0be6a9b43d0de16e402fe22cb60614861c73f26f122f0c155e3d35de33053a7822170c440bb407bcac73d7a5ba42f57ba0eda825a49fa210e369ba7ea3
7
- data.tar.gz: a6526cc8752cdc5a8f61c03a55519e5cf18da1ac538e1028a881b8e5a2d147d5c44cb26b3f4fbbb46907589985564baa895166320b3c1eee230d6557f1890976
6
+ metadata.gz: bf5b198699c76de8fc76ce275e3db96b44a740c316f482a42d1ba0a8fb2c7d7e2f5179cce08ea45089142d37bbdaadb9a627443e748375bcfe08ee59ffddfeb6
7
+ data.tar.gz: dc02cbe9b460941d9c4eb0236fb8164815d6c5ec3429d1d879b751eee2865d874469a4e8b2e3d5e257349d728a13ac1574058bc16ed1862b42c8407c0105ff0c
@@ -395,16 +395,15 @@ module SearchEngine
395
395
  end
396
396
 
397
397
  def build_progress_part
398
- if @docs_estimate&.positive? && @docs_total.positive?
399
- ratio = @docs_total.to_f / @docs_estimate
398
+ if @docs_estimate&.positive?
399
+ ratio = @docs_total.positive? ? @docs_total.to_f / @docs_estimate : 0.0
400
400
  pct = [100, (ratio * 100).round].min
401
401
  filled = [(ratio * BAR_WIDTH).round, BAR_WIDTH].min
402
402
  empty = BAR_WIDTH - filled
403
403
  bar = "\u2588" * filled + "\u2591" * empty
404
- batch_info = @batches_done.positive? ? "#{@batches_done} batches " : ''
405
- "#{bar} #{pct}% #{batch_info}(#{@docs_total}/#{@docs_estimate} docs)"
404
+ "#{bar} #{pct}% (#{@docs_total}/#{@docs_estimate} docs)"
406
405
  elsif @batches_done.positive?
407
- "#{@batches_done} batches (#{@docs_total} docs)"
406
+ "(#{@docs_total} docs)"
408
407
  else
409
408
  ''
410
409
  end
@@ -3,5 +3,5 @@
3
3
  module SearchEngine
4
4
  # Current gem version.
5
5
  # @return [String]
6
- VERSION = '30.1.6.8'
6
+ VERSION = '30.1.6.9'
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: search-engine-for-typesense
3
3
  version: !ruby/object:Gem::Version
4
- version: 30.1.6.8
4
+ version: 30.1.6.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nikita Shkoda