tapsoob 0.5.2-java → 0.5.3-java

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 60db77b693b29afa6f92e80b3236b903cd93bf9ceb110d54095ecde174f5207c
4
- data.tar.gz: 741dbca318123fc2a9d27b81ebcbbe5ea096c3c2d679ba56394e7596197e4e22
3
+ metadata.gz: 2c2fd6bc0ee522b1688f7e5545ff53d675a4d8f33fdccda8c9e881792f1ff0c4
4
+ data.tar.gz: 8cd9ca207b7b415da7405bcf01c2031e0b789e428493fdc649b78a39c3007480
5
5
  SHA512:
6
- metadata.gz: a58ca6c767b9cb9f1e35719af347d4dd5971a736bc56c7c979f846e0a2b7e22383f7670a2ef624c04b9d1068830b856b33ed51960c76df7ead65cbd52f4fb22d
7
- data.tar.gz: b07264f21368c3ce71f876651e65f111e65cfd801757a364b8fd37aba1bffc4f4cec77e2a77f125c06b84b38fab9a998e7c7e56aa5f1238907fab8e67506f943
6
+ metadata.gz: b6427c733ba4f6ed9390edbbaabbcc80b9ed2dae52ed2bc8cf390f1654527d3f63828f6a75c396250d3846ec8667c407b6139d3dcf94e6befafeea93d382442e
7
+ data.tar.gz: 880938fb5dedfc48671f01cad691d44a72f8c1aa4fd023b15fecba8a69dc4602f852e1f19403b6b0538e3a1d127c521bd71e89ea43ef75099697c6b21bf4f83c
@@ -26,7 +26,7 @@ module Tapsoob
26
26
  option :tables, desc: "Shortcut to filter on a list of tables", type: :array, aliases: "-t"
27
27
  option :"exclude-tables", desc: "Shortcut to exclude a list of tables", type: :array, aliases: "-e"
28
28
  option :progress, desc: "Show progress", default: true, type: :boolean, aliases: "-p"
29
- option :purge, desc: "Purge data in tables prior to performing the import", default: false, type: :boolean, aliases: "-p"
29
+ option :purge, desc: "Purge data in tables prior to performing the import", default: false, type: :boolean
30
30
  option :"skip-duplicates", desc: "Remove duplicates when loading data", default: false, type: :boolean
31
31
  option :"discard-identity", desc: "Remove identity when pushing data (may result in creating duplicates)", default: false, type: :boolean
32
32
  option :debug, desc: "Enable debug messages", default: false, type: :boolean, aliases: "-d"
@@ -10,8 +10,8 @@ module Tapsoob
10
10
  module CLI
11
11
  class Root < Thor
12
12
  desc "pull DUMP_PATH DATABASE_URL", "Pull a dump from a database to a folder"
13
- option :"schema-only", desc: "Don't transfer the data just schema", default: false, type: :boolean
14
- option :"skip-schema", desc: "Don't transfer the schema just data", default: false, type: :boolean, aliases: "-s"
13
+ option :data, desc: "Pull the data to the database", default: true, type: :boolean, aliases: '-d'
14
+ option :schema, desc: "Pull the schema to the database", default: true, type: :boolean, aliases: "-s"
15
15
  option :"indexes-first", desc: "Transfer indexes first before data", default: false, type: :boolean, aliases: "-i"
16
16
  option :resume, desc: "Resume a Tapsoob Session from a stored file", type: :string, aliases: "-r"
17
17
  option :chunksize, desc: "Initial chunksize", default: 1000, type: :numeric, aliases: "-c"
@@ -19,7 +19,7 @@ module Tapsoob
19
19
  option :tables, desc: "Shortcut to filter on a list of tables", type: :array, aliases: "-t"
20
20
  option :"exclude-tables", desc: "Shortcut to exclude a list of tables", type: :array, aliases: "-e"
21
21
  option :progress, desc: "Show progress", default: true, type: :boolean
22
- option :debug, desc: "Enable debug messages", default: false, type: :boolean, aliases: "-d"
22
+ option :debug, desc: "Enable debug messages", default: false, type: :boolean
23
23
  def pull(dump_path, database_url)
24
24
  opts = parse_opts(options)
25
25
  Tapsoob.log.level = Logger::DEBUG if opts[:debug]
@@ -31,8 +31,8 @@ module Tapsoob
31
31
  end
32
32
 
33
33
  desc "push DUMP_PATH DATABASE_URL", "Push a previously tapsoob dump to a database"
34
- option :"schema-only", desc: "Don't transfer the data just schema", default: false, type: :boolean
35
- option :"skip-schema", desc: "Don't transfer the schema just data", default: false, type: :boolean, aliases: "-s"
34
+ option :data, desc: "Push the data to the database", default: true, type: :boolean, aliases: '-d'
35
+ option :schema, desc: "Push the schema to the database", default: true, type: :boolean, aliases: "-s"
36
36
  option :"indexes-first", desc: "Transfer indexes first before data", default: false, type: :boolean, aliases: "-i"
37
37
  option :resume, desc: "Resume a Tapsoob Session from a stored file", type: :string, aliases: "-r"
38
38
  option :chunksize, desc: "Initial chunksize", default: 1000, type: :numeric, aliases: "-c"
@@ -43,7 +43,7 @@ module Tapsoob
43
43
  option :"skip-duplicates", desc: "Remove duplicates when loading data", default: false, type: :boolean
44
44
  option :"discard-identity", desc: "Remove identity when pushing data (may result in creating duplicates)", default: false, type: :boolean
45
45
  option :progress, desc: "Show progress", default: true, type: :boolean
46
- option :debug, desc: "Enable debug messages", default: false, type: :boolean, aliases: "-d"
46
+ option :debug, desc: "Enable debug messages", default: false, type: :boolean
47
47
  def push(dump_path, database_url)
48
48
  opts = parse_opts(options)
49
49
  Tapsoob.log.level = Logger::DEBUG if opts[:debug]
@@ -69,8 +69,8 @@ module Tapsoob
69
69
  def parse_opts(options)
70
70
  # Default options
71
71
  opts = {
72
- schema_only: options[:"schema-only"],
73
- skip_schema: options[:"skip-schema"],
72
+ data: options[:data],
73
+ data: options[:schema],
74
74
  indexes_first: options[:"indexes_first"],
75
75
  disable_compression: options[:"disable-compression"],
76
76
  tables: options[:tables],
@@ -21,12 +21,12 @@ module Tapsoob
21
21
  "op"
22
22
  end
23
23
 
24
- def schema_only?
25
- !!opts[:schema_only]
24
+ def data?
25
+ opts[:data]
26
26
  end
27
27
 
28
- def skip_schema?
29
- !!opts[:skip_schema]
28
+ def schema?
29
+ opts[:schema]
30
30
  end
31
31
 
32
32
  def indexes_first?
@@ -166,13 +166,13 @@ module Tapsoob
166
166
  def run
167
167
  catch_errors do
168
168
  unless resuming?
169
- pull_schema if !skip_schema?
170
- pull_indexes if indexes_first? && !skip_schema?
169
+ pull_schema if schema?
170
+ pull_indexes if indexes_first? && schema?
171
171
  end
172
172
  setup_signal_trap
173
- pull_partial_data if resuming?
174
- pull_data unless schema_only?
175
- pull_indexes if !indexes_first? && !skip_schema?
173
+ pull_partial_data if data? && resuming?
174
+ pull_data if data?
175
+ pull_indexes if !indexes_first? && schema?
176
176
  pull_reset_sequences
177
177
  end
178
178
  end
@@ -359,13 +359,13 @@ module Tapsoob
359
359
  def run
360
360
  catch_errors do
361
361
  unless resuming?
362
- push_schema if !skip_schema?
363
- push_indexes if indexes_first? && !skip_schema?
362
+ push_schema if schema?
363
+ push_indexes if indexes_first? && schema?
364
364
  end
365
365
  setup_signal_trap
366
- push_partial_data if resuming?
367
- push_data unless schema_only?
368
- push_indexes if !indexes_first? && !skip_schema?
366
+ push_partial_data if data? && resuming?
367
+ push_data if data?
368
+ push_indexes if !indexes_first? && schema?
369
369
  push_reset_sequences
370
370
  end
371
371
  end
@@ -1,4 +1,4 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
  module Tapsoob
3
- VERSION = "0.5.2".freeze
3
+ VERSION = "0.5.3".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.5.2
4
+ version: 0.5.3
5
5
  platform: java
6
6
  authors:
7
7
  - Félix Bellanger