embulk-parser-xml 0.0.3 → 0.0.4

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
  SHA1:
3
- metadata.gz: 6c4e0d9efb02a3715e390cfbc351bd1d31885a0d
4
- data.tar.gz: d6888ad9f410e6260bc4537288fa55f389b503f9
3
+ metadata.gz: ace02cec80163c6715578043b31500af1783e4bd
4
+ data.tar.gz: 8ebd59d04f9ac7ae966b1c5bfff085a4dae0f1fa
5
5
  SHA512:
6
- metadata.gz: 1e1ddb9d1aa62f5ec1ead3d6b33b6ad37d79bab7b46341bd2d9d1f09f5a135085590dc19973b821082bfc1b87ad77f99b60fe10d29e6f9cba7a991ab8068d7d8
7
- data.tar.gz: 435a05ab478d752bab97da963f5a4e9da7ce7501f3bc77ef3bc81b5706933855cd345b9199a39344dbd35cd9f4a0d55469d7dca5d8b8e40616fb23811b0b2f4b
6
+ metadata.gz: ed2ee84816accf96eb8b391f7bc11f2a771d545a1f48ebb994a25ff7c0ed9042ccc0030caaa4a1a567b5688c0f79c12665971c8d063205e6d1b1683663fef0ff
7
+ data.tar.gz: fa8dfb6de0f1953f2eaffb3c1003081c3095d8dc27d9097c500327dadb46c4460ad99700703ea8f70f5ce3b76c443034e8d785ffb03be389fafc064921eb3211
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "embulk-parser-xml"
7
- spec.version = "0.0.3"
7
+ spec.version = "0.0.4"
8
8
  spec.authors = ["Takuma kanari"]
9
9
  spec.email = ["chemtrails.t@gmail.com"]
10
10
  spec.summary = %q{Embulk parser plugin for XML}
@@ -30,8 +30,11 @@ module Embulk
30
30
  @task["schema"], on_new_record)
31
31
  parser = Nokogiri::XML::SAX::Parser.new(doc)
32
32
  while file = file_input.next_file
33
- parser.parse(file.read)
34
- doc.clear
33
+ data = file.read
34
+ if !data.nil? && !data.empty?
35
+ doc.clear
36
+ parser.parse(data)
37
+ end
35
38
  end
36
39
  @page_builder.finish
37
40
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: embulk-parser-xml
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Takuma kanari
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-18 00:00:00.000000000 Z
11
+ date: 2015-08-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -86,7 +86,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
86
86
  version: '0'
87
87
  requirements: []
88
88
  rubyforge_project:
89
- rubygems_version: 2.4.3
89
+ rubygems_version: 2.2.2
90
90
  signing_key:
91
91
  specification_version: 4
92
92
  summary: Embulk parser plugin for XML