tapsoob 0.1.12 → 0.1.13

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
  SHA1:
3
- metadata.gz: 33c2f36a76cc420056355b9f307e313af7c876d2
4
- data.tar.gz: a637a17fbde848d0a3cbe961a9e5b9418c78ea34
3
+ metadata.gz: 1199fcc85e66eb6763d636e929dcb0a3c582c05b
4
+ data.tar.gz: 9b490940aff9b8add1a2ddc2b224b236c681f614
5
5
  SHA512:
6
- metadata.gz: 11dea38d1c70aa1558b91bb7428b5a2c9c690503b30c56274df9541c2bc058aae675576ec845aed2a6b24955869ce862512732225a82293146b7b3170308a78d
7
- data.tar.gz: 71c9b6cefe09dfe4996dd09b4b0aaed99fbde3c7409cec750e0252752287c1559df0468b12f18f20b97b6121ff60de2533b6ad27dd863326aeff155d43b45a72
6
+ metadata.gz: 4b65e41bb09ecdef2de1b7b843c0e323898bf897f48bc70f387939de9009a115c71ae5d0224003ff743fb534ac9463f1db3571fb7b2c3524cb7f309301f9a51b
7
+ data.tar.gz: b8508d83ea20a830b231d74c8df9954e3184163e5639dc62ba6f451711781ae81f6600c1cd6d87f4de214948f4a564e32fbc721e9138b98ee1081e2d36e74acf
@@ -119,6 +119,8 @@ module Tapsoob
119
119
  @db << "ALTER SESSION SET NLS_DATE_FORMAT='YYYY-MM-DD HH24:MI:SS'"
120
120
  @db << "ALTER SESSION SET NLS_TIMESTAMP_FORMAT='YYYY-MM-DD HH24:MI:SS:FF6'"
121
121
  end
122
+
123
+ @db
122
124
  end
123
125
 
124
126
  def format_number(num)
@@ -463,10 +465,14 @@ module Tapsoob
463
465
 
464
466
  def fetch_local_tables_info
465
467
  tables_with_counts = {}
466
- tbls = Dir.glob(File.join(dump_path, "data", "*")).map { |path| File.basename(path, ".json") }
468
+ tbls = Dir.glob(File.join(dump_path, "schemas", "*")).map { |path| File.basename(path, ".rb") }
467
469
  tbls.each do |table|
468
- data = JSON.parse(File.read(File.join(dump_path, "data", "#{table}.json")))
469
- tables_with_counts[table] = data.size
470
+ if File.exists?(File.join(dump_path, "data", "#{table}.json"))
471
+ data = JSON.parse(File.read(File.join(dump_path, "data", "#{table}.json")))
472
+ tables_with_counts[table] = data.size
473
+ else
474
+ tables_with_counts[table] = 0
475
+ end
470
476
  end
471
477
  apply_table_filter(tables_with_counts)
472
478
  end
data/lib/tapsoob/utils.rb CHANGED
@@ -156,7 +156,11 @@ Data : #{data}
156
156
 
157
157
  def schema_bin(*args)
158
158
  bin_path = File.expand_path("#{File.dirname(__FILE__)}/../../bin/#{bin('schema')}")
159
- `"#{bin_path}" #{args.map { |a| "'#{a}'" }.join(' ')}`
159
+ if RUBY_PLATFORM =~ /java/i
160
+ `jruby -S "#{bin_path}" #{args.map { |a| "'#{a}'" }.join(' ') }`
161
+ else
162
+ `"#{bin_path}" #{args.map { |a| "'#{a}'" }.join(' ') }`
163
+ end
160
164
  end
161
165
 
162
166
  def primary_key(db, table)
@@ -1,4 +1,4 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
  module Tapsoob
3
- VERSION = "0.1.12".freeze
3
+ VERSION = "0.1.13".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.1.12
4
+ version: 0.1.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Félix Bellanger