tapsoob 0.4.18-java → 0.4.22-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 +4 -4
 - data/lib/tapsoob/operation.rb +2 -2
 - data/lib/tapsoob/utils.rb +3 -2
 - data/lib/tapsoob/version.rb +1 -1
 - metadata +2 -2
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 24ebcbf2da1819077b890ed4cd70f997c2198ea2199721ff082f3b27838b86f3
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 4374df62d0b72a66144d7cc96ce73f66c65e77aad417d85eae9e029f3c729d5c
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 16630f8226647e49146656d6d6a93602aba3d2154e50bd73f7744fbf11bb942004292fe8e5a2a43e1d2f4c4686cbc3fd6694abc24f241b8c56c9e165455d8d37
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 48ced3dcfc19dcba1196961ee2fa0544a490f56a4357d3c5cec52ea5759ba3e499fd9fa4fc89e3a260549326034938c9c0bd29840f05f8ba5148af2564c09114
         
     | 
    
        data/lib/tapsoob/operation.rb
    CHANGED
    
    | 
         @@ -393,7 +393,7 @@ module Tapsoob 
     | 
|
| 
       393 
393 
     | 
    
         
             
                  log.info "#{tables.size} tables, #{format_number(record_count)} records"
         
     | 
| 
       394 
394 
     | 
    
         | 
| 
       395 
395 
     | 
    
         
             
                  tables.each do |table_name, count|
         
     | 
| 
       396 
     | 
    
         
            -
                    next unless File.exists?(File.join(dump_path, "data", "#{table_name}.json"))
         
     | 
| 
      
 396 
     | 
    
         
            +
                    next unless File.exists?(File.join(dump_path, "data", "#{table_name}.json")) || JSON.parse(File.read(File.join(dump_path, "data", "#{table_name}.json")))["data"].size == 0
         
     | 
| 
       397 
397 
     | 
    
         
             
                    db[table_name.to_sym].truncate if @opts[:purge]
         
     | 
| 
       398 
398 
     | 
    
         
             
                    stream = Tapsoob::DataStream.factory(db, {
         
     | 
| 
       399 
399 
     | 
    
         
             
                      :table_name => table_name,
         
     | 
| 
         @@ -485,7 +485,7 @@ module Tapsoob 
     | 
|
| 
       485 
485 
     | 
    
         | 
| 
       486 
486 
     | 
    
         
             
                def fetch_local_tables_info
         
     | 
| 
       487 
487 
     | 
    
         
             
                  tables_with_counts = {}
         
     | 
| 
       488 
     | 
    
         
            -
                  tbls = Dir.glob(File.join(dump_path, " 
     | 
| 
      
 488 
     | 
    
         
            +
                  tbls = Dir.glob(File.join(dump_path, "schemas", "*")).map { |path| File.basename(path, ".rb") }
         
     | 
| 
       489 
489 
     | 
    
         
             
                  tbls.each do |table|
         
     | 
| 
       490 
490 
     | 
    
         
             
                    if File.exists?(File.join(dump_path, "data", "#{table}.json"))
         
     | 
| 
       491 
491 
     | 
    
         
             
                      data = JSON.parse(File.read(File.join(dump_path, "data", "#{table}.json")))
         
     | 
    
        data/lib/tapsoob/utils.rb
    CHANGED
    
    | 
         @@ -75,8 +75,9 @@ Data : #{data} 
     | 
|
| 
       75 
75 
     | 
    
         
             
                  res = { table_name: table, header: header, data: only_data }
         
     | 
| 
       76 
76 
     | 
    
         | 
| 
       77 
77 
     | 
    
         
             
                  # Add types if schema isn't empty
         
     | 
| 
      
 78 
     | 
    
         
            +
                  db.extension :schema_dumper # Add schema dumper extension in case it hasn't been added until now
         
     | 
| 
       78 
79 
     | 
    
         
             
                  res[:types] = schema.map do |c|
         
     | 
| 
       79 
     | 
    
         
            -
                    case db.column_schema_to_ruby_type(c.last 
     | 
| 
      
 80 
     | 
    
         
            +
                    case db.column_schema_to_ruby_type(c.last)[:type]
         
     | 
| 
       80 
81 
     | 
    
         
             
                    when BigDecimal
         
     | 
| 
       81 
82 
     | 
    
         
             
                      "float"
         
     | 
| 
       82 
83 
     | 
    
         
             
                    when :Bignum
         
     | 
| 
         @@ -86,7 +87,7 @@ Data : #{data} 
     | 
|
| 
       86 
87 
     | 
    
         
             
                    when TrueClass
         
     | 
| 
       87 
88 
     | 
    
         
             
                      "boolean"
         
     | 
| 
       88 
89 
     | 
    
         
             
                    else
         
     | 
| 
       89 
     | 
    
         
            -
                      db.column_schema_to_ruby_type(c.last 
     | 
| 
      
 90 
     | 
    
         
            +
                      db.column_schema_to_ruby_type(c.last)[:type].to_s.downcase
         
     | 
| 
       90 
91 
     | 
    
         
             
                    end
         
     | 
| 
       91 
92 
     | 
    
         
             
                  end unless schema.empty?
         
     | 
| 
       92 
93 
     | 
    
         | 
    
        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.4. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.4.22
         
     | 
| 
       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: 2021-10- 
     | 
| 
      
 12 
     | 
    
         
            +
            date: 2021-10-20 00:00:00.000000000 Z
         
     | 
| 
       13 
13 
     | 
    
         
             
            dependencies:
         
     | 
| 
       14 
14 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       15 
15 
     | 
    
         
             
              requirement: !ruby/object:Gem::Requirement
         
     |