embulk-parser-xpath2 0.2.0 → 0.2.1
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
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: a0e0dbcb54ada87e5fcd76ab0e9492b683b1dd22d39656e017db35782bd6037a
|
|
4
|
+
data.tar.gz: b3666e978c4d259e5e862fd02853735e9505dd7031e891ca5e11bf56144b153e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7fc5dcb13d54624ce70420362a670cd5a5053e82c45bf034a80040fb354ee20a207ef8ba890db472483dd1dd42090984b0e9a0031df130282d5401de167d5201
|
|
7
|
+
data.tar.gz: 6cb7bebd1c5da82b8c74c6e8262604cc3d1c77b6593a705c533af5f9adeb24fcb071ac24db51287a5039de032722f93df05269d8a10a7c52b98344bd38fe6a8c
|
data/.travis.yml
CHANGED
data/build.gradle
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
plugins {
|
|
2
|
-
id "com.jfrog.bintray" version "1.
|
|
3
|
-
id "com.github.jruby-gradle.base" version "
|
|
2
|
+
id "com.jfrog.bintray" version "1.8.4"
|
|
3
|
+
id "com.github.jruby-gradle.base" version "1.6.0"
|
|
4
4
|
id "java"
|
|
5
5
|
id "scala"
|
|
6
6
|
}
|
|
@@ -13,9 +13,9 @@ configurations {
|
|
|
13
13
|
provided
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
version = "0.2.
|
|
16
|
+
version = "0.2.1"
|
|
17
17
|
ext {
|
|
18
|
-
embulkVersion = "0.
|
|
18
|
+
embulkVersion = "0.9.12"
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
sourceCompatibility = 1.8
|
|
@@ -27,10 +27,10 @@ dependencies {
|
|
|
27
27
|
provided "org.embulk:embulk-core:${embulkVersion}"
|
|
28
28
|
testCompile "org.embulk:embulk-core:${embulkVersion}:tests"
|
|
29
29
|
testCompile "org.embulk:embulk-standards:${embulkVersion}"
|
|
30
|
-
testCompile "junit:junit:4
|
|
30
|
+
testCompile "junit:junit:4.12"
|
|
31
31
|
|
|
32
|
-
compile group: 'org.scala-lang', name: 'scala-library', version: '2.12.
|
|
33
|
-
testCompile group: 'org.scalatest', name: 'scalatest_2.12', version: '3.0.
|
|
32
|
+
compile group: 'org.scala-lang', name: 'scala-library', version: '2.12.8'
|
|
33
|
+
testCompile group: 'org.scalatest', name: 'scalatest_2.12', version: '3.0.5'
|
|
34
34
|
|
|
35
35
|
}
|
|
36
36
|
|
|
@@ -49,14 +49,16 @@ test {
|
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
task gem(type: JRubyExec, dependsOn: ["gemspec", "classpath"]) {
|
|
52
|
-
jrubyArgs "-
|
|
53
|
-
script "
|
|
52
|
+
jrubyArgs "-S"
|
|
53
|
+
script "gem"
|
|
54
|
+
scriptArgs "build", "${project.name}.gemspec"
|
|
54
55
|
doLast { ant.move(file: "${project.name}-${project.version}.gem", todir: "pkg") }
|
|
55
56
|
}
|
|
56
57
|
|
|
57
58
|
task gemPush(type: JRubyExec, dependsOn: ["gem"]) {
|
|
58
|
-
jrubyArgs "-
|
|
59
|
-
script "
|
|
59
|
+
jrubyArgs "-S"
|
|
60
|
+
script "gem"
|
|
61
|
+
scriptArgs "push", "pkg/${project.name}-${project.version}.gem"
|
|
60
62
|
}
|
|
61
63
|
|
|
62
64
|
task "package"(dependsOn: ["gemspec", "classpath"]) {
|
data/build.sbt
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
val embulkVersion = "0.
|
|
1
|
+
val embulkVersion = "0.9.12"
|
|
2
2
|
|
|
3
3
|
lazy val commonSettings = Seq(
|
|
4
4
|
organization := "com.github.maji-KY",
|
|
5
|
-
scalaVersion := "2.12.
|
|
5
|
+
scalaVersion := "2.12.8",
|
|
6
6
|
version := "CANNOT_RELEASE",
|
|
7
7
|
scalacOptions ++= Seq(
|
|
8
8
|
"-deprecation",
|
|
@@ -19,8 +19,8 @@ lazy val commonSettings = Seq(
|
|
|
19
19
|
"com.ximpleware" % "vtd-xml" % "2.13.4",
|
|
20
20
|
"org.embulk" % "embulk-core" % embulkVersion,
|
|
21
21
|
"org.embulk" % "embulk-core" % embulkVersion classifier "tests",
|
|
22
|
-
"junit" % "junit" % "4
|
|
23
|
-
"org.scalatest" %% "scalatest" % "3.0.
|
|
22
|
+
"junit" % "junit" % "4.12" % "test",
|
|
23
|
+
"org.scalatest" %% "scalatest" % "3.0.5" % "test"
|
|
24
24
|
)
|
|
25
25
|
)
|
|
26
26
|
|
data/project/build.properties
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
sbt.version=1.
|
|
1
|
+
sbt.version=1.2.8
|
|
@@ -32,7 +32,7 @@ class XPath2ParserPlugin extends ParserPlugin {
|
|
|
32
32
|
val stopOnInvalidRecord: Boolean = task.getStopOnInvalidRecord
|
|
33
33
|
|
|
34
34
|
val timestampParsers: Map[String, TimestampParser] = task.getSchema.columns.asScala
|
|
35
|
-
.collect { case ColumnConfig(_, name, _, Some(timestampColumnOption), _, _) => (name,
|
|
35
|
+
.collect { case ColumnConfig(_, name, _, Some(timestampColumnOption), _, _) => (name, TimestampParser.of(task, timestampColumnOption)) }.toMap
|
|
36
36
|
|
|
37
37
|
val jsonStructures: Map[String, Seq[JsonStructureElement]] = task.getSchema.columns.asScala
|
|
38
38
|
.collect { case ColumnConfig(_, name, _, _, Some(jsonColumnOption), _) => (name, jsonColumnOption.structure.asScala) }.toMap
|
|
@@ -7,7 +7,6 @@ import com.google.common.base.Optional
|
|
|
7
7
|
import org.embulk.config.{Config, ConfigDefault, ConfigSource}
|
|
8
8
|
import org.embulk.spi.`type`.{JsonType, TimestampType, Type}
|
|
9
9
|
import org.embulk.spi.time.TimestampParser.TimestampColumnOption
|
|
10
|
-
import org.joda.time.DateTimeZone
|
|
11
10
|
|
|
12
11
|
case class SchemaConfig @JsonCreator()(columns: java.util.List[ColumnConfig]) {
|
|
13
12
|
@JsonValue()
|
|
@@ -33,19 +32,19 @@ case class ColumnConfig(path: String, name: String, `type`: Type, timestampOptio
|
|
|
33
32
|
|
|
34
33
|
}
|
|
35
34
|
|
|
36
|
-
private class TimestampColumnOptionImpl(timezone: Optional[
|
|
35
|
+
private class TimestampColumnOptionImpl(timezone: Optional[String], format: Optional[String], date: Optional[String]) extends TimestampColumnOption {
|
|
37
36
|
|
|
38
37
|
@JsonCreator()
|
|
39
38
|
def this(src: ConfigSource) = {
|
|
40
39
|
this(
|
|
41
|
-
src.get(classOf[Optional[String]], "timezone", Optional.absent[String]())
|
|
40
|
+
src.get(classOf[Optional[String]], "timezone", Optional.absent[String]()),
|
|
42
41
|
src.get(classOf[Optional[String]], "format", Optional.absent[String]()),
|
|
43
42
|
src.get(classOf[Optional[String]], "date", Optional.absent[String]()))
|
|
44
43
|
}
|
|
45
44
|
|
|
46
45
|
@Config("timezone")
|
|
47
46
|
@ConfigDefault("null")
|
|
48
|
-
override val
|
|
47
|
+
override val getTimeZoneId = timezone
|
|
49
48
|
|
|
50
49
|
@Config("format")
|
|
51
50
|
@ConfigDefault("null")
|
metadata
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: embulk-parser-xpath2
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- maji-KY
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2019-01-12 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
|
15
15
|
requirements:
|
|
16
|
-
- - ~>
|
|
16
|
+
- - "~>"
|
|
17
17
|
- !ruby/object:Gem::Version
|
|
18
18
|
version: '1.0'
|
|
19
19
|
name: bundler
|
|
@@ -21,13 +21,13 @@ dependencies:
|
|
|
21
21
|
type: :development
|
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
23
|
requirements:
|
|
24
|
-
- - ~>
|
|
24
|
+
- - "~>"
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
26
|
version: '1.0'
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
28
|
requirement: !ruby/object:Gem::Requirement
|
|
29
29
|
requirements:
|
|
30
|
-
- -
|
|
30
|
+
- - ">="
|
|
31
31
|
- !ruby/object:Gem::Version
|
|
32
32
|
version: '10.0'
|
|
33
33
|
name: rake
|
|
@@ -35,7 +35,7 @@ dependencies:
|
|
|
35
35
|
type: :development
|
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
|
37
37
|
requirements:
|
|
38
|
-
- -
|
|
38
|
+
- - ">="
|
|
39
39
|
- !ruby/object:Gem::Version
|
|
40
40
|
version: '10.0'
|
|
41
41
|
description: Parses XML files read by other file input plugins.
|
|
@@ -45,13 +45,16 @@ executables: []
|
|
|
45
45
|
extensions: []
|
|
46
46
|
extra_rdoc_files: []
|
|
47
47
|
files:
|
|
48
|
-
- .gitignore
|
|
49
|
-
- .travis.yml
|
|
48
|
+
- ".gitignore"
|
|
49
|
+
- ".travis.yml"
|
|
50
50
|
- LICENSE
|
|
51
51
|
- README.md
|
|
52
52
|
- benchmark/src/main/scala/org/embulk/parser/xpath2/ParseBenchmark.scala
|
|
53
53
|
- build.gradle
|
|
54
54
|
- build.sbt
|
|
55
|
+
- classpath/embulk-parser-xpath2-0.2.1.jar
|
|
56
|
+
- classpath/scala-library-2.12.8.jar
|
|
57
|
+
- classpath/vtd-xml-2.13.4.jar
|
|
55
58
|
- gradle/wrapper/gradle-wrapper.jar
|
|
56
59
|
- gradle/wrapper/gradle-wrapper.properties
|
|
57
60
|
- gradlew
|
|
@@ -77,9 +80,6 @@ files:
|
|
|
77
80
|
- src/test/scala/org/embulk/parser/xpath2/UnitSpec.scala
|
|
78
81
|
- src/test/scala/org/embulk/parser/xpath2/XPath2ParserPluginJsonSpec.scala
|
|
79
82
|
- src/test/scala/org/embulk/parser/xpath2/XPath2ParserPluginSpec.scala
|
|
80
|
-
- classpath/vtd-xml-2.13.4.jar
|
|
81
|
-
- classpath/scala-library-2.12.4.jar
|
|
82
|
-
- classpath/embulk-parser-xpath2-0.2.0.jar
|
|
83
83
|
homepage: https://github.com/maji-KY/embulk-parser-xpath2
|
|
84
84
|
licenses:
|
|
85
85
|
- GPL-2.0
|
|
@@ -90,17 +90,17 @@ require_paths:
|
|
|
90
90
|
- lib
|
|
91
91
|
required_ruby_version: !ruby/object:Gem::Requirement
|
|
92
92
|
requirements:
|
|
93
|
-
- -
|
|
93
|
+
- - ">="
|
|
94
94
|
- !ruby/object:Gem::Version
|
|
95
95
|
version: '0'
|
|
96
96
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
97
97
|
requirements:
|
|
98
|
-
- -
|
|
98
|
+
- - ">="
|
|
99
99
|
- !ruby/object:Gem::Version
|
|
100
100
|
version: '0'
|
|
101
101
|
requirements: []
|
|
102
102
|
rubyforge_project:
|
|
103
|
-
rubygems_version: 2.
|
|
103
|
+
rubygems_version: 2.6.13
|
|
104
104
|
signing_key:
|
|
105
105
|
specification_version: 4
|
|
106
106
|
summary: Embulk parser plugin for XML
|