embulk-parser-xpath2 0.0.2 → 0.0.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3c6ca2b4389dd1a0c784bd26735599b07bca338a
|
4
|
+
data.tar.gz: f9514cf861f316e940779590896042e8b005ab4a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 62cb373a04138dba8e690592f23a15259eb9d95bda20c9a1cffdd3f6e4da5e36e897bd4931258f576dd5e09007e67907e0b92c98df1caba41d6eb4c4ec02ab1b
|
7
|
+
data.tar.gz: 44c6b99ddbdedbe24d42e4dc9fc2bdf70ee6c14032feeed191a582f190d0e8bfbf5a73236def253d7528a4fc5c7113aa3181bbe636d4c94d545a585a69b646d4
|
data/build.gradle
CHANGED
@@ -6,12 +6,9 @@ import com.fasterxml.jackson.annotation.{JsonCreator, JsonValue}
|
|
6
6
|
import com.google.common.base.Optional
|
7
7
|
import org.embulk.config.{Config, ConfigDefault, ConfigSource}
|
8
8
|
import org.embulk.spi.`type`.{TimestampType, Type}
|
9
|
-
import org.embulk.spi.time.TimestampParser
|
10
|
-
import org.embulk.spi.time.TimestampParser.{Task, TimestampColumnOption}
|
9
|
+
import org.embulk.spi.time.TimestampParser.TimestampColumnOption
|
11
10
|
import org.joda.time.DateTimeZone
|
12
11
|
|
13
|
-
import scala.beans.BeanProperty
|
14
|
-
|
15
12
|
case class SchemaConfig @JsonCreator()(columns: java.util.List[ColumnConfig]) {
|
16
13
|
@JsonValue()
|
17
14
|
def getColumns: util.List[ColumnConfig] = columns
|
@@ -33,7 +30,10 @@ private class TimestampColumnOptionImpl(timezone: Optional[DateTimeZone], format
|
|
33
30
|
|
34
31
|
@JsonCreator()
|
35
32
|
def this(src: ConfigSource) = {
|
36
|
-
this(
|
33
|
+
this(
|
34
|
+
src.get(classOf[Optional[String]], "timezone", Optional.absent[String]()).transform(x => DateTimeZone.forID(x)),
|
35
|
+
src.get(classOf[Optional[String]], "format", Optional.absent[String]()),
|
36
|
+
src.get(classOf[Optional[String]], "date", Optional.absent[String]()))
|
37
37
|
}
|
38
38
|
|
39
39
|
@Config("timezone")
|
@@ -56,4 +56,4 @@ object ColumnConfig {
|
|
56
56
|
}
|
57
57
|
|
58
58
|
private def getOption(src: ConfigSource) = src.deepCopy().remove("path").remove("name").remove("type")
|
59
|
-
}
|
59
|
+
}
|
@@ -32,7 +32,7 @@ class XPath2ParserPluginSpec {
|
|
32
32
|
Map("path" -> "ns2:id", "name" -> "id", "type" -> "long").asJava,
|
33
33
|
Map("path" -> "ns2:title", "name" -> "title", "type" -> "string").asJava,
|
34
34
|
Map("path" -> "ns2:meta/ns2:author", "name" -> "author", "type" -> "string").asJava,
|
35
|
-
Map("path" -> "ns2:date", "name" -> "date", "type" -> "timestamp", "format" -> "%Y%m%d").asJava,
|
35
|
+
Map("path" -> "ns2:date", "name" -> "date", "type" -> "timestamp", "format" -> "%Y%m%d", "timezone" -> "UTC").asJava,
|
36
36
|
Map("path" -> "ns2:list/ns2:value", "name" -> "list", "type" -> "json").asJava,
|
37
37
|
).asJava)
|
38
38
|
.set("namespaces", Map[String, String]("ns1" -> "http://example.com/ns1/", "ns2" -> "http://example.com/ns2/").asJava)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: embulk-parser-xpath2
|
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
|
- maji-KY
|
@@ -64,7 +64,7 @@ files:
|
|
64
64
|
- src/test/resources/data.xml
|
65
65
|
- src/test/scala/org/embulk/parser/xpath2/UnitSpec.scala
|
66
66
|
- src/test/scala/org/embulk/parser/xpath2/XPath2ParserPluginSpec.scala
|
67
|
-
- classpath/embulk-parser-xpath2-0.0.
|
67
|
+
- classpath/embulk-parser-xpath2-0.0.3.jar
|
68
68
|
- classpath/scala-library-2.12.3.jar
|
69
69
|
homepage: https://github.com/maji-KY/embulk-parser-xpath2
|
70
70
|
licenses:
|