tapsoob 0.3.19-java → 0.3.20-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/tapsoob/cli/root.rb +4 -0
- data/lib/tapsoob/operation.rb +1 -0
- 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: a764dbe840834497a89fa5b22862cc3a0f1525606cab9e395b3dee38c5a5b1d7
|
4
|
+
data.tar.gz: f62b37a1ac1229751eb79d0a828eb5d5acc048d1f12279e888a024ff459607ec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 14f6c283d2f67d3f6f5576e87cbe7ea4a2b23185f45f215f2493a5929cd5e109bed97cf18543f38216991e953238e672d4344215907388bb4cc56ca608a0c70c
|
7
|
+
data.tar.gz: baa89887c4baad4d90a4ba2429718be9c30eb52c111eeafba9d5ea5ab757fe40ebe8d5dca937e1e6b3fcd31b8a062f7c0236fd4afc653af0341d69bd074aacb3
|
data/lib/tapsoob/cli/root.rb
CHANGED
@@ -38,6 +38,7 @@ module Tapsoob
|
|
38
38
|
option :filter, desc: "Regex Filter for tables", type: :string, aliases: "-f"
|
39
39
|
option :tables, desc: "Shortcut to filter on a list of tables", type: :array, aliases: "-t"
|
40
40
|
option :"exclude-tables", desc: "Shortcut to exclude a list of tables", type: :array, aliases: "-e"
|
41
|
+
option :purge, desc: "Purge data in tables prior to performing the import", default: false, type: :boolean, aliases: "-p"
|
41
42
|
option :debug, desc: "Enable debug messages", default: false, type: :boolean, aliases: "-d"
|
42
43
|
def push(dump_path, database_url)
|
43
44
|
opts = parse_opts(options)
|
@@ -70,6 +71,9 @@ module Tapsoob
|
|
70
71
|
debug: options[:debug]
|
71
72
|
}
|
72
73
|
|
74
|
+
# Purge (push only)
|
75
|
+
opts[:purge] = options[:purge] if options.key?(:purge)
|
76
|
+
|
73
77
|
# Resume
|
74
78
|
if options[:resume]
|
75
79
|
if File.exists?(options[:resume])
|
data/lib/tapsoob/operation.rb
CHANGED
@@ -393,6 +393,7 @@ module Tapsoob
|
|
393
393
|
|
394
394
|
tables.each do |table_name, count|
|
395
395
|
next unless File.exists?(File.join(dump_path, "data", "#{table_name}.json"))
|
396
|
+
db[table_name.to_sym].truncate if @opts[:purge]
|
396
397
|
stream = Tapsoob::DataStream.factory(db,
|
397
398
|
:table_name => table_name,
|
398
399
|
:chunksize => default_chunksize)
|
data/lib/tapsoob/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tapsoob
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.20
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Félix Bellanger
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2021-06-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
@@ -149,7 +149,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
149
149
|
- !ruby/object:Gem::Version
|
150
150
|
version: '0'
|
151
151
|
requirements: []
|
152
|
-
rubygems_version: 3.1.
|
152
|
+
rubygems_version: 3.1.6
|
153
153
|
signing_key:
|
154
154
|
specification_version: 4
|
155
155
|
summary: Simple tool to import/export databases.
|