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 +4 -4
- data/lib/tapsoob/operation.rb +10 -3
- data/lib/tapsoob/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f222b256d2bc44c66a833cb52cb11f5a4ca0c2cd5f629dd3b99b09e2a4514cfa
|
|
4
|
+
data.tar.gz: a70f4cafee12c2be3541e0628612e0ae5ccf29600b5378f0c9d58a6feea24be8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1d47b6f360c042e49b7fb11174f07c05b822715c9132b07e1f89017c0f72d1807c1a68a5002f12e53f2e96ec744950491e2fe948717212dd9fd6e817452b0290
|
|
7
|
+
data.tar.gz: c2c5ae50991609f6ebf6a8eaf61ad6da8717097d3aad50b8be9b6a79bd20a596dc2ebc9207f51e25ded59d79856692945daab7fcf5ebc7f15a427fdf31ec959d
|
data/lib/tapsoob/operation.rb
CHANGED
|
@@ -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
|
-
|
|
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
|
-
|
|
536
|
-
|
|
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
|
data/lib/tapsoob/version.rb
CHANGED
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.
|
|
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:
|
|
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.
|
|
136
|
+
rubygems_version: 3.6.3
|
|
137
137
|
specification_version: 4
|
|
138
138
|
summary: Simple tool to import/export databases.
|
|
139
139
|
test_files:
|