embulk-parser-jsonpath 0.2.0 → 0.3.0

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: 5a5c5cf3bdba81a3a1bb16dae74d6c4a7af3379c
4
- data.tar.gz: e041030833ba05bcc5967e84d4d0e6604b10094c
3
+ metadata.gz: 49180c10e5303a641a121a2a3cc25d3d295f2340
4
+ data.tar.gz: 963973743caae051e01e91d886dd47879cb5dd2f
5
5
  SHA512:
6
- metadata.gz: 2a532592bc7672a092c43da076b51a0773284a55db1e1b3a4a547247031f981a3acdde9afa53ed5653f4742b94d7abc9ed76bb93ac4cae1ed58bff6eb3242a54
7
- data.tar.gz: 428416e6b448f50458c7e36e0b1de078fb110737ae081b3a92e70751639216efd49f91017743ecfdcb20d23bdfab16d168621daf45981b7c8c70318a5af74604
6
+ metadata.gz: fbc51f30d1b62484f8a4241b9efb9685913ac0b10ce398109ded932f0887c9d80e0bf810627de8deec0d89bb9cff7736c5459ddb7e22139ca71204dee0e359d5
7
+ data.tar.gz: 2b073ca42f004f64db8238ecf85e047765f06d34c090bda759bc322129b0188b5f3c526560e822c290dbd725da3cef0d60791317fcee00bf4fdca651b52c3e48
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # ChangeLog
2
2
 
3
+ ## 0.3.0 (2018-06-11)
4
+
5
+ * Upgrade Embulk version to 0.9.7
6
+
3
7
  ## 0.2.0 (2017-03-13)
4
8
 
5
9
  * Support `path` parameter in column config. (@takumakanari)
data/build.gradle CHANGED
@@ -14,20 +14,20 @@ configurations {
14
14
  provided
15
15
  }
16
16
 
17
- version = "0.2.0"
17
+ version = "0.3.0"
18
18
 
19
19
  sourceCompatibility = 1.7
20
20
  targetCompatibility = 1.7
21
21
 
22
22
  dependencies {
23
- compile "org.embulk:embulk-core:0.8.13"
24
- provided "org.embulk:embulk-core:0.8.13"
23
+ compile "org.embulk:embulk-core:0.9.7"
24
+ provided "org.embulk:embulk-core:0.9.7"
25
25
 
26
26
  compile 'com.jayway.jsonpath:json-path:2.2.0'
27
27
 
28
28
  testCompile "junit:junit:4.+"
29
- testCompile "org.embulk:embulk-core:0.8.13:tests"
30
- testCompile "org.embulk:embulk-standards:0.8.13"
29
+ testCompile "org.embulk:embulk-core:0.9.7:tests"
30
+ testCompile "org.embulk:embulk-standards:0.9.7"
31
31
  }
32
32
 
33
33
  findbugs {
Binary file
@@ -1,6 +1,6 @@
1
- #Wed Jan 13 12:41:02 JST 2016
1
+ #Mon Jun 11 08:53:57 JST 2018
2
2
  distributionBase=GRADLE_USER_HOME
3
3
  distributionPath=wrapper/dists
4
4
  zipStoreBase=GRADLE_USER_HOME
5
5
  zipStorePath=wrapper/dists
6
- distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-bin.zip
6
+ distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
data/gradlew CHANGED
@@ -1,4 +1,4 @@
1
- #!/usr/bin/env bash
1
+ #!/usr/bin/env sh
2
2
 
3
3
  ##############################################################################
4
4
  ##
@@ -6,20 +6,38 @@
6
6
  ##
7
7
  ##############################################################################
8
8
 
9
- # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
10
- DEFAULT_JVM_OPTS=""
9
+ # Attempt to set APP_HOME
10
+ # Resolve links: $0 may be a link
11
+ PRG="$0"
12
+ # Need this for relative symlinks.
13
+ while [ -h "$PRG" ] ; do
14
+ ls=`ls -ld "$PRG"`
15
+ link=`expr "$ls" : '.*-> \(.*\)$'`
16
+ if expr "$link" : '/.*' > /dev/null; then
17
+ PRG="$link"
18
+ else
19
+ PRG=`dirname "$PRG"`"/$link"
20
+ fi
21
+ done
22
+ SAVED="`pwd`"
23
+ cd "`dirname \"$PRG\"`/" >/dev/null
24
+ APP_HOME="`pwd -P`"
25
+ cd "$SAVED" >/dev/null
11
26
 
12
27
  APP_NAME="Gradle"
13
28
  APP_BASE_NAME=`basename "$0"`
14
29
 
30
+ # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
31
+ DEFAULT_JVM_OPTS=""
32
+
15
33
  # Use the maximum available, or set MAX_FD != -1 to use that value.
16
34
  MAX_FD="maximum"
17
35
 
18
- warn ( ) {
36
+ warn () {
19
37
  echo "$*"
20
38
  }
21
39
 
22
- die ( ) {
40
+ die () {
23
41
  echo
24
42
  echo "$*"
25
43
  echo
@@ -30,6 +48,7 @@ die ( ) {
30
48
  cygwin=false
31
49
  msys=false
32
50
  darwin=false
51
+ nonstop=false
33
52
  case "`uname`" in
34
53
  CYGWIN* )
35
54
  cygwin=true
@@ -40,26 +59,11 @@ case "`uname`" in
40
59
  MINGW* )
41
60
  msys=true
42
61
  ;;
62
+ NONSTOP* )
63
+ nonstop=true
64
+ ;;
43
65
  esac
44
66
 
45
- # Attempt to set APP_HOME
46
- # Resolve links: $0 may be a link
47
- PRG="$0"
48
- # Need this for relative symlinks.
49
- while [ -h "$PRG" ] ; do
50
- ls=`ls -ld "$PRG"`
51
- link=`expr "$ls" : '.*-> \(.*\)$'`
52
- if expr "$link" : '/.*' > /dev/null; then
53
- PRG="$link"
54
- else
55
- PRG=`dirname "$PRG"`"/$link"
56
- fi
57
- done
58
- SAVED="`pwd`"
59
- cd "`dirname \"$PRG\"`/" >/dev/null
60
- APP_HOME="`pwd -P`"
61
- cd "$SAVED" >/dev/null
62
-
63
67
  CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
64
68
 
65
69
  # Determine the Java command to use to start the JVM.
@@ -85,7 +89,7 @@ location of your Java installation."
85
89
  fi
86
90
 
87
91
  # Increase the maximum file descriptors if we can.
88
- if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
92
+ if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
89
93
  MAX_FD_LIMIT=`ulimit -H -n`
90
94
  if [ $? -eq 0 ] ; then
91
95
  if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
@@ -150,11 +154,19 @@ if $cygwin ; then
150
154
  esac
151
155
  fi
152
156
 
153
- # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
154
- function splitJvmOpts() {
155
- JVM_OPTS=("$@")
157
+ # Escape application args
158
+ save () {
159
+ for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
160
+ echo " "
156
161
  }
157
- eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
158
- JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
162
+ APP_ARGS=$(save "$@")
163
+
164
+ # Collect all arguments for the java command, following the shell quoting and substitution rules
165
+ eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
166
+
167
+ # by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
168
+ if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
169
+ cd "$(dirname "$0")"
170
+ fi
159
171
 
160
- exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
172
+ exec "$JAVACMD" "$@"
@@ -5,7 +5,6 @@ import org.embulk.spi.DataException;
5
5
  import org.embulk.spi.time.Timestamp;
6
6
  import org.embulk.spi.time.TimestampParser;
7
7
  import org.joda.time.DateTimeZone;
8
- import org.jruby.embed.ScriptingContainer;
9
8
  import org.junit.Before;
10
9
  import org.junit.Rule;
11
10
  import org.junit.Test;
@@ -23,19 +22,17 @@ public class TestColumnCaster
23
22
  public EmbulkTestRuntime runtime = new EmbulkTestRuntime();
24
23
  public MapValue mapValue;
25
24
  public DataException thrown;
26
- public ScriptingContainer jruby;
27
25
  public TimestampParser parser;
28
26
 
29
27
  @Before
30
28
  public void createResource()
31
29
  {
32
- jruby = new ScriptingContainer();
33
30
  thrown = new DataException("any");
34
31
  Value[] kvs = new Value[2];
35
32
  kvs[0] = ValueFactory.newString("k");
36
33
  kvs[1] = ValueFactory.newString("v");
37
34
  mapValue = ValueFactory.newMap(kvs);
38
- parser = new TimestampParser(jruby, "%Y-%m-%d %H:%M:%S.%N", DateTimeZone.UTC);
35
+ parser = TimestampParser.of("%Y-%m-%d %H:%M:%S.%N", DateTimeZone.UTC.toString());
39
36
  }
40
37
 
41
38
  @Test
@@ -5,8 +5,6 @@ import org.embulk.spi.DataException;
5
5
  import org.embulk.spi.time.Timestamp;
6
6
  import org.embulk.spi.time.TimestampParser;
7
7
  import org.joda.time.DateTimeZone;
8
- import org.jruby.embed.ScriptingContainer;
9
- import org.junit.Before;
10
8
  import org.junit.Rule;
11
9
  import org.junit.Test;
12
10
 
@@ -18,13 +16,6 @@ public class TestStringCast
18
16
  {
19
17
  @Rule
20
18
  public EmbulkTestRuntime runtime = new EmbulkTestRuntime();
21
- public ScriptingContainer jruby;
22
-
23
- @Before
24
- public void createResource()
25
- {
26
- jruby = new ScriptingContainer();
27
- }
28
19
 
29
20
  @Test
30
21
  public void asBoolean()
@@ -89,7 +80,7 @@ public class TestStringCast
89
80
  public void asTimestamp()
90
81
  {
91
82
  Timestamp expected = Timestamp.ofEpochSecond(1463084053, 123456000);
92
- TimestampParser parser = new TimestampParser(jruby, "%Y-%m-%d %H:%M:%S.%N", DateTimeZone.UTC);
83
+ TimestampParser parser = TimestampParser.of("%Y-%m-%d %H:%M:%S.%N", DateTimeZone.UTC.toString());
93
84
  assertEquals(expected, StringCast.asTimestamp("2016-05-12 20:14:13.123456", parser));
94
85
 
95
86
  try {
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: embulk-parser-jsonpath
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hiroyuki Sato
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-03-13 00:00:00.000000000 Z
12
+ date: 2018-06-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  requirement: !ruby/object:Gem::Requirement
@@ -110,12 +110,12 @@ files:
110
110
  - src/test/java/org/embulk/parser/jsonpath/cast/TestJsonCast.java
111
111
  - src/test/java/org/embulk/parser/jsonpath/cast/TestLongCast.java
112
112
  - src/test/java/org/embulk/parser/jsonpath/cast/TestStringCast.java
113
- - classpath/accessors-smart-1.1.jar
114
- - classpath/asm-5.0.3.jar
115
- - classpath/embulk-parser-jsonpath-0.2.0.jar
116
113
  - classpath/json-path-2.2.0.jar
114
+ - classpath/embulk-parser-jsonpath-0.3.0.jar
115
+ - classpath/asm-5.0.3.jar
117
116
  - classpath/json-smart-2.2.1.jar
118
117
  - classpath/slf4j-api-1.7.16.jar
118
+ - classpath/accessors-smart-1.1.jar
119
119
  homepage: https://github.com/hiroyuki-sato/embulk-parser-jsonpath
120
120
  licenses:
121
121
  - MIT