tapsoob 0.4.6-java → 0.4.11-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: 23758087d2ab0e0bcbb62fab53c82050b95a672beef2e494d4270d9cc23ddc4c
4
- data.tar.gz: 852eaf58cafbb99de7c39ed905486f04a329c99812cd8901104d115b7f865db4
3
+ metadata.gz: a2cf4e1a477702c83fef41cbd102880abb239bdece3c43dc0fe0a48eb8f2f520
4
+ data.tar.gz: d5b04a8141562e8ed0e395d51e9471d05af508d05b98599b79245f1bda840f5e
5
5
  SHA512:
6
- metadata.gz: b85de76b17288c4cb2dae29fca2d4acef194943c951e27d4e270b834f10d93abb5ee1650861a505e5db2bab209182a9e6aaff147699ad2dc3a441d0ba8c050ab
7
- data.tar.gz: 6e7922952e53f067790dcb1dd9b44c8b5c16b08af338e363da02388ae70856e5dae86a8398680041a3f3c3aff1c1cdb44b3b1dbc8bb828cc2459920e1dd8184a
6
+ metadata.gz: e7960436ecedda8258161b36eb53d3fc0edc36bddc88ca0efc0f22ae3fe55bc0bb00de21d4483a6927d7441689f2d8d6c40d6a8f925ba698278eab0a0ff89ae8
7
+ data.tar.gz: cfda973434523bef491cea4d4bcbd7112b35c5f6d6fb41c54bf030af21467811007b09e5cf05295b8520835bf3fa185c56b29ff83958761e114548ab8ca9eae4
@@ -159,8 +159,8 @@ module Tapsoob
159
159
 
160
160
  unless @complete
161
161
  yield rows if block_given?
162
- state[:offset] += rows[:data].size
163
- rows[:data].size
162
+ state[:offset] += (rows[:data].size.nil? ? 0 : rows[:data].size)
163
+ rows[:data].size || 0
164
164
  else
165
165
  0
166
166
  end
data/lib/tapsoob/utils.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
  require 'zlib'
3
- require 'active_support/core_ext/file/atomic.rb'
3
+ #require 'active_support/core_ext/file/atomic.rb'
4
4
 
5
5
  require 'tapsoob/errors'
6
6
  require 'tapsoob/chunksize'
@@ -144,10 +144,10 @@ Data : #{data}
144
144
  data = row_data
145
145
  if File.exists?(File.join(dump_path, "data", "#{table}.json"))
146
146
  previous_data = JSON.parse(File.read(File.join(dump_path, "data", "#{table}.json")))
147
- data[:data] = (previous_data["data"].nil? ? row_data[:data] : previous_data["data"] + row_data[:data])
147
+ data[:data] = previous_data["data"] + row_data[:data]
148
148
  end
149
149
 
150
- File.atomic_write(File.join(dump_path, "data", "#{table}.json")) do |file|
150
+ File.open(File.join(dump_path, "data", "#{table}.json"), 'w') do |file|
151
151
  file.write(JSON.generate(data))
152
152
  end
153
153
  end
@@ -1,4 +1,4 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
  module Tapsoob
3
- VERSION = "0.4.6".freeze
3
+ VERSION = "0.4.11".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.4.6
4
+ version: 0.4.11
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-07-01 00:00:00.000000000 Z
12
+ date: 2021-07-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  requirement: !ruby/object:Gem::Requirement