tapsoob 0.5.28-java → 0.5.29-java

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: 7554a38a7588261f53f4d653a513c7befc0fe900bd4ca2e12707623f3e574d82
4
- data.tar.gz: df55e85a95cba4f95c30a9eeabd3d7523949ff492422159d997a6d848bb1c39f
3
+ metadata.gz: f222b256d2bc44c66a833cb52cb11f5a4ca0c2cd5f629dd3b99b09e2a4514cfa
4
+ data.tar.gz: a70f4cafee12c2be3541e0628612e0ae5ccf29600b5378f0c9d58a6feea24be8
5
5
  SHA512:
6
- metadata.gz: 804658b12d9d1f43fbc80670645854ccaa54e3cc915e754e3433efa61738a646d73afa2ddf28fee2f317ffc3e8d269778a9533e31aa9bc7cf2b7cfb8f1d04ffc
7
- data.tar.gz: ac1ff9b60b5b52fcadd568b772337a8257b814fa23cc2d6b035fabf5d2c99de320ea1054e45fae4c955ec1a2de2de1ff3a34f9eba947b4fbfaeb721b9d01f3f8
6
+ metadata.gz: 1d47b6f360c042e49b7fb11174f07c05b822715c9132b07e1f89017c0f72d1807c1a68a5002f12e53f2e96ec744950491e2fe948717212dd9fd6e817452b0290
7
+ data.tar.gz: c2c5ae50991609f6ebf6a8eaf61ad6da8717097d3aad50b8be9b6a79bd20a596dc2ebc9207f51e25ded59d79856692945daab7fcf5ebc7f15a427fdf31ec959d
@@ -436,7 +436,9 @@ module Tapsoob
436
436
  log.info "#{tables.size} tables, #{format_number(record_count)} records"
437
437
 
438
438
  tables.each do |table_name, count|
439
- next unless File.exist?(File.join(dump_path, "data", "#{table_name}.json")) || File.exist?(File.join(dump_path, "data", "#{table_name}.json")) && JSON.parse(File.read(File.join(dump_path, "data", "#{table_name}.json")))["data"].size == 0
439
+ # Skip if data file doesn't exist or has no data
440
+ data_file = File.join(dump_path, "data", "#{table_name}.json")
441
+ next unless File.exist?(data_file) && count > 0
440
442
  db[table_name.to_sym].truncate if @opts[:purge]
441
443
  stream = Tapsoob::DataStream.factory(db, {
442
444
  :table_name => table_name,
@@ -532,8 +534,13 @@ module Tapsoob
532
534
  tbls = Dir.glob(File.join(dump_path, "schemas", "*")).map { |path| File.basename(path, ".rb") }
533
535
  tbls.each do |table|
534
536
  if File.exist?(File.join(dump_path, "data", "#{table}.json"))
535
- data = JSON.parse(File.read(File.join(dump_path, "data", "#{table}.json")))
536
- tables_with_counts[table] = data["data"].size
537
+ # Read NDJSON format - each line is a separate JSON chunk
538
+ total_rows = 0
539
+ File.readlines(File.join(dump_path, "data", "#{table}.json")).each do |line|
540
+ chunk = JSON.parse(line.strip)
541
+ total_rows += chunk["data"].size if chunk["data"]
542
+ end
543
+ tables_with_counts[table] = total_rows
537
544
  else
538
545
  tables_with_counts[table] = 0
539
546
  end
@@ -1,4 +1,4 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
  module Tapsoob
3
- VERSION = "0.5.28".freeze
3
+ VERSION = "0.5.29".freeze
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tapsoob
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.28
4
+ version: 0.5.29
5
5
  platform: java
6
6
  authors:
7
7
  - Félix Bellanger
8
8
  - Michael Chrisco
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 1980-01-02 00:00:00.000000000 Z
11
+ date: 2025-10-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sequel
@@ -133,7 +133,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
133
133
  - !ruby/object:Gem::Version
134
134
  version: '0'
135
135
  requirements: []
136
- rubygems_version: 3.6.9
136
+ rubygems_version: 3.6.3
137
137
  specification_version: 4
138
138
  summary: Simple tool to import/export databases.
139
139
  test_files: