embulk-parser-flexml 0.2.2 → 0.2.3

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: 5b0fa387accb2417fa52c186d799930350988543
4
- data.tar.gz: 530f5f92aa261d28d36ae4536218861e79ba66e8
3
+ metadata.gz: 2c38653cf5150955c6f0bb9955fc3c2abd43229b
4
+ data.tar.gz: 78febb4d3da68e4c378fa4f0c2dfc2e0e332315b
5
5
  SHA512:
6
- metadata.gz: 809850f391e9964b4a0420bc86d31e4f86eb4b2a750332e1d1ddef14b904d03b61192e1c99da739f98dc1fee5e4c9d9bd9ab45da871057b4c30698d41d8c7d21
7
- data.tar.gz: 370de18ca67cee63979c7f42d67833875aaf50ce6384d360881e7e1a3c133ac19f460f525504cf829d95cbb2385d7c811cf6765f481e8e79dc61f62bd924c680
6
+ metadata.gz: 67e3a09cffe108cc20722dd2007380f830d706fc3affc9fcf49fb50d67dadc07e2c68d2c8ba4f5adc7f0e12dd05b484b635a7a495cc96e073fab6eb16ab6e8ef
7
+ data.tar.gz: 3f98920cf3f2afd4ff67cbf8643bb9a65ec2c8ed6aa62bac8be74bfce5dbb9b6b163c1a13bc954335c45713b13a681a7dd50b207cddcc6c4452246a15d31d9a8
@@ -3,7 +3,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
3
 
4
4
  Gem::Specification.new do |spec|
5
5
  spec.name = "embulk-parser-flexml"
6
- spec.version = "0.2.2"
6
+ spec.version = "0.2.3"
7
7
  spec.authors = ["Surya Asriadie"]
8
8
  spec.email = ["surya.asriadie@gmail.com"]
9
9
  spec.summary = %q{Flexible Embulk parser plugin for XML}
@@ -42,12 +42,16 @@ module Embulk
42
42
  e
43
43
  end
44
44
 
45
- val = if c.has_key?("attribute")
46
- row&.attributes&.dig(c["attribute"])
45
+ unless row.nil?
46
+ val = if c.has_key?("attribute")
47
+ row.attributes[c["attribute"]]
48
+ else
49
+ row.text
50
+ end
51
+ convert(val, c)
47
52
  else
48
- row&.text
53
+ nil
49
54
  end
50
- convert(val, c)
51
55
  end
52
56
 
53
57
  @page_builder.add(values)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: embulk-parser-flexml
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Surya Asriadie