tapsoob 0.3.19-java → 0.3.20-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: edc018c5a29b9591b4f6f8c5eaf01f2d275c430c9397b0c19c09d21da5fdb75c
4
- data.tar.gz: 30bddf91e43eaef5bcacd9b7cb16a84dd4ad44f88e2ac678004317d9fdab8e60
3
+ metadata.gz: a764dbe840834497a89fa5b22862cc3a0f1525606cab9e395b3dee38c5a5b1d7
4
+ data.tar.gz: f62b37a1ac1229751eb79d0a828eb5d5acc048d1f12279e888a024ff459607ec
5
5
  SHA512:
6
- metadata.gz: 83033d2182ed00d868a5c380a58758ad7e93de9542f35db9e0819e123982dd75297ee716f202bf0fbe6e2ac5f7d05296a052f1669860f9e2a09f5d76b0edee27
7
- data.tar.gz: 57a6a3355f4702753e1d028abec752bee789a6bd8e1daf8b959a40ae4fe75099db1891545c7a24851f518e1557d19b9843a0d3fe6c5fff1091a18d7556cd26ae
6
+ metadata.gz: 14f6c283d2f67d3f6f5576e87cbe7ea4a2b23185f45f215f2493a5929cd5e109bed97cf18543f38216991e953238e672d4344215907388bb4cc56ca608a0c70c
7
+ data.tar.gz: baa89887c4baad4d90a4ba2429718be9c30eb52c111eeafba9d5ea5ab757fe40ebe8d5dca937e1e6b3fcd31b8a062f7c0236fd4afc653af0341d69bd074aacb3
@@ -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])
@@ -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)
@@ -1,4 +1,4 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
  module Tapsoob
3
- VERSION = "0.3.19".freeze
3
+ VERSION = "0.3.20".freeze
4
4
  end
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.19
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: 2020-10-02 00:00:00.000000000 Z
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.4
152
+ rubygems_version: 3.1.6
153
153
  signing_key:
154
154
  specification_version: 4
155
155
  summary: Simple tool to import/export databases.