embulk-parser-xml 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +9 -8
- data/embulk-parser-xml.gemspec +1 -1
- data/lib/embulk/parser/xml.rb +2 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6c4e0d9efb02a3715e390cfbc351bd1d31885a0d
|
4
|
+
data.tar.gz: d6888ad9f410e6260bc4537288fa55f389b503f9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1e1ddb9d1aa62f5ec1ead3d6b33b6ad37d79bab7b46341bd2d9d1f09f5a135085590dc19973b821082bfc1b87ad77f99b60fe10d29e6f9cba7a991ab8068d7d8
|
7
|
+
data.tar.gz: 435a05ab478d752bab97da963f5a4e9da7ce7501f3bc77ef3bc81b5706933855cd345b9199a39344dbd35cd9f4a0d55469d7dca5d8b8e40616fb23811b0b2f4b
|
data/README.md
CHANGED
@@ -34,19 +34,20 @@ Then you can fetch entries from the following xml:
|
|
34
34
|
<students>
|
35
35
|
<student>
|
36
36
|
<name>John</name>
|
37
|
-
<age>10</
|
38
|
-
|
37
|
+
<age>10</age>
|
38
|
+
</student>
|
39
39
|
<student>
|
40
40
|
<name>Paul</name>
|
41
|
-
<age>16</
|
42
|
-
|
41
|
+
<age>16</age>
|
42
|
+
</student>
|
43
43
|
<student>
|
44
44
|
<name>George</name>
|
45
|
-
<age>17</
|
46
|
-
|
45
|
+
<age>17</age>
|
46
|
+
</student>
|
47
47
|
<student>
|
48
48
|
<name>Ringo</name>
|
49
|
-
<age>18</
|
50
|
-
|
49
|
+
<age>18</age>
|
50
|
+
</student>
|
51
51
|
</students>
|
52
|
+
</data>
|
52
53
|
```
|
data/embulk-parser-xml.gemspec
CHANGED
@@ -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.
|
7
|
+
spec.version = "0.0.3"
|
8
8
|
spec.authors = ["Takuma kanari"]
|
9
9
|
spec.email = ["chemtrails.t@gmail.com"]
|
10
10
|
spec.summary = %q{Embulk parser plugin for XML}
|
data/lib/embulk/parser/xml.rb
CHANGED
@@ -82,7 +82,7 @@ module Embulk
|
|
82
82
|
@enter = false
|
83
83
|
@on_new_record.call(@current_data.map{|k, v| v})
|
84
84
|
@current_data = new_map_by_schema
|
85
|
-
elsif !@current_element_name.nil?
|
85
|
+
elsif !@current_element_name.nil? && @schema.key?(name)
|
86
86
|
@current_data[name] = convert(@current_data[name], @schema[name])
|
87
87
|
end
|
88
88
|
end
|
@@ -111,7 +111,7 @@ module Embulk
|
|
111
111
|
when "timestamp"
|
112
112
|
v.empty? ? nil : Time.strptime(v, c["format"])
|
113
113
|
else
|
114
|
-
raise "Unsupported type #{type}"
|
114
|
+
raise "Unsupported type '#{type}'"
|
115
115
|
end
|
116
116
|
end
|
117
117
|
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.
|
4
|
+
version: 0.0.3
|
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-
|
11
|
+
date: 2015-06-18 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.
|
89
|
+
rubygems_version: 2.4.3
|
90
90
|
signing_key:
|
91
91
|
specification_version: 4
|
92
92
|
summary: Embulk parser plugin for XML
|