tapsoob 0.5.10-java → 0.5.13-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: 4742e33589f57660f7b747d99108441d0326a22c5a395f9b94d5774477c68cca
4
- data.tar.gz: 88479c54f89eb1ed9456d8fa767d8de445e89ba04b37ffe18d0285b48c437a9e
3
+ metadata.gz: f15f95d497c0a2645e9dd902ecfb2198664762fcd0701c9f01d409921a2b0653
4
+ data.tar.gz: 1ab90f1ecce4dd79ffc900302b73c8ed16d6abcd8c04176fd51eb1e9ae6cee32
5
5
  SHA512:
6
- metadata.gz: ecf33bcd63931ccc04966b27423acaa7f18da3ef7931c4d21da518d7bc8d7ca5e49e27f501f3b6f2671fb6f99c7f4f22472328e0fd920c2030a23619e04874e4
7
- data.tar.gz: 80b5de273251dcd40987b87f549aa17a20a6b2d8d4b106209a3d5ca0d4816c23017e83879816655a26f69d3a19702252a2b1526edcff986ed7f166d38d2c0239
6
+ metadata.gz: 7a67d2f2b8665393d5c3541bcb3912f732ae2a3e036a9dd60e3551bb566e5698a19a13c57afc0b497389959a48a070785738fe0e0218713c4c4c728638223ff8
7
+ data.tar.gz: 7b364e06053d1b961fd5d5a4fbb393e896aba41903b5bc4c7373e077878d04ece4f27ebbb1587f5d2a4a40ccbc4f97f222beb675e7af88f94fd0f55885b5b6b6
@@ -14,8 +14,14 @@ module Tapsoob
14
14
  end
15
15
 
16
16
  desc "dump DATABASE_URL", "Dump a database using a database URL"
17
+ option :indexes, type: :boolean, default: false
18
+ option :"same-db", type: :boolean, default: false
17
19
  def dump(database_url)
18
- puts Tapsoob::Schema.dump(database_url)
20
+ opts = {}
21
+ opts[:indexes] = options[:"indexes"]
22
+ opts[:same_db] = options[:"same-db"]
23
+
24
+ puts Tapsoob::Schema.dump(database_url, opts)
19
25
  end
20
26
 
21
27
  desc "dump_table DATABASE_URL TABLE", "Dump a table from a database using a database URL"
@@ -118,6 +118,7 @@ module Tapsoob
118
118
 
119
119
  def db
120
120
  @db ||= Sequel.connect(database_url)
121
+ @db.extension :schema_dumper
121
122
  @db.loggers << Tapsoob.log if opts[:debug]
122
123
 
123
124
  # Set parameters
@@ -296,7 +297,7 @@ module Tapsoob
296
297
  end
297
298
 
298
299
  def fetch_tables_info
299
- tables = db.tables
300
+ tables = db.send(:sort_dumped_tables, db.tables, {})
300
301
 
301
302
  data = {}
302
303
  apply_table_filter(tables).each do |table_name|
@@ -9,14 +9,14 @@ module Tapsoob
9
9
  module Schema
10
10
  extend self
11
11
 
12
- def dump(database_url)
12
+ def dump(database_url, options = {})
13
13
  db = Sequel.connect(database_url)
14
14
  db.extension :schema_dumper
15
15
  template = ERB.new <<-END_MIG
16
16
  Class.new(Sequel::Migration) do
17
17
  def up
18
18
  <% db.send(:sort_dumped_tables, db.tables, {}).each do |table| %>
19
- <%= db.dump_table_schema(table, indexes: false) %>
19
+ <%= db.dump_table_schema(table, options) %>
20
20
  <% end %>
21
21
  end
22
22
 
@@ -1,4 +1,4 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
  module Tapsoob
3
- VERSION = "0.5.10".freeze
3
+ VERSION = "0.5.13".freeze
4
4
  end
data/tapsoob.gemspec CHANGED
@@ -21,7 +21,7 @@ Gem::Specification.new do |s|
21
21
 
22
22
  # Dependencies
23
23
  s.add_dependency "ripl", "~> 0.7.1"
24
- s.add_dependency "sequel", "~> 5.55.0"
24
+ s.add_dependency "sequel", "~> 5.59.0"
25
25
  s.add_dependency "thor", "~> 1.2.1"
26
26
 
27
27
  if (RUBY_PLATFORM =~ /java/).nil?
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.10
4
+ version: 0.5.13
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: 2022-04-27 00:00:00.000000000 Z
12
+ date: 2022-08-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  requirement: !ruby/object:Gem::Requirement
@@ -30,7 +30,7 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 5.55.0
33
+ version: 5.59.0
34
34
  name: sequel
35
35
  prerelease: false
36
36
  type: :runtime
@@ -38,7 +38,7 @@ dependencies:
38
38
  requirements:
39
39
  - - "~>"
40
40
  - !ruby/object:Gem::Version
41
- version: 5.55.0
41
+ version: 5.59.0
42
42
  - !ruby/object:Gem::Dependency
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
@@ -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.2.29
152
+ rubygems_version: 3.1.6
153
153
  signing_key:
154
154
  specification_version: 4
155
155
  summary: Simple tool to import/export databases.