tapsoob 0.3.19 → 0.3.20
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: 52d4bfd61d315b90beb05943e4ed8d450ea6fef3f3d8cf8e685a36aace4a67d8
|
4
|
+
data.tar.gz: 73a623f81cfd0b8b5238ecfa06e0933d0033128ea7bd573f29f801294049ed46
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: df06895063ad4caf4fd7270a27771dc82f52d2b2d7e035c2a7a5651c2e6dc336e11741285e8a86a12b4af205391e472029c3941cc96412c7f7dbacd3ba6fca07
|
7
|
+
data.tar.gz: 4ae7a6b34fce4d1f267f8fd95c2cf895608232d9dd687427c3e9ed33a7a35402f33c5db87a7bd9a6cb924cf8c961973fe73303a30d2d3b0f282c84127850c859
|
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: ruby
|
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
|
name: ripl
|
@@ -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.
|