embulk-filter-expand_json 0.2.1 → 0.2.2

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: ab391ec7a08e2c564a88ab1984b2331df266d360
4
- data.tar.gz: 34c7c68b0ebb842a0b7e50866ba07f05a3565036
3
+ metadata.gz: c82efb599e6e9e1cd6f02219354383e4d7d1b966
4
+ data.tar.gz: 1111d92e7fcf2e9df01ac7b0e7e2a27439d71421
5
5
  SHA512:
6
- metadata.gz: 50363ce3c2f5ba54554f4e8aa31f7d9a7ac7a1f58588e0004e6210d4cd3dddf2c8197517924dfb7de99d19a9704c969cad75246a791304c2d2a72fac75d6a974
7
- data.tar.gz: 668b2b73ba967ca41b27902456290ead55fd4678ddfc2ebe4758448674b214a78a5beae3886fd46e07691720c0beff26a7165404713ca8b2ed9fb0676cc2e589
6
+ metadata.gz: 0e274e928beefad9aacd00b8ef11cbfb5b3772018841d4f7775afd0f03fcb70124ebbea0e5317b401d7dc77b493ab1d56dc445430ebb68a12d7c7798a8fdb2b2
7
+ data.tar.gz: afebf67519d74a5a86c0e9ad217b2afe66bf7011c6faca6c1f6dc2291ee07afd5f5acb089b168632e2a14b58fc399ceb9ad0dd555923b50e79f9e45acc8e49c3
@@ -1,3 +1,10 @@
1
+ 0.2.2 (2017-09-14)
2
+ ==================
3
+ - [Enhancement] Use TimestampParser's constructor without JRuby ScriptingContainer
4
+ - https://github.com/civitaspo/embulk-filter-expand_json/pull/37
5
+ - [Enhancement] embulk migrate .
6
+ - https://github.com/civitaspo/embulk-filter-expand_json/pull/36
7
+
1
8
  0.2.1 (2017-09-12)
2
9
  ==================
3
10
  - [Enhancement] Support type conversion from floating point numbers to integers
@@ -15,16 +15,16 @@ configurations {
15
15
  provided
16
16
  }
17
17
 
18
- version = "0.2.1"
18
+ version = "0.2.2"
19
19
  sourceCompatibility = 1.7
20
20
  targetCompatibility = 1.7
21
21
 
22
22
  dependencies {
23
- compile "org.embulk:embulk-core:0.8.6"
24
- provided "org.embulk:embulk-core:0.8.6"
23
+ compile "org.embulk:embulk-core:0.8.32"
24
+ provided "org.embulk:embulk-core:0.8.32"
25
25
  compile "com.jayway.jsonpath:json-path:2.+"
26
26
  testCompile "junit:junit:4.+"
27
- testCompile "org.embulk:embulk-core:0.8.6:tests"
27
+ testCompile "org.embulk:embulk-core:0.8.32:tests"
28
28
  }
29
29
 
30
30
  jacocoTestReport {
@@ -1,6 +1,5 @@
1
- #Sun Jan 08 00:35:58 PST 2017
2
1
  distributionBase=GRADLE_USER_HOME
3
2
  distributionPath=wrapper/dists
4
3
  zipStoreBase=GRADLE_USER_HOME
5
4
  zipStorePath=wrapper/dists
6
- distributionUrl=https\://services.gradle.org/distributions/gradle-3.2.1-bin.zip
5
+ distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-bin.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,31 +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
- # For Cygwin, ensure paths are in UNIX format before anything is touched.
46
- if $cygwin ; then
47
- [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
48
- fi
49
-
50
- # Attempt to set APP_HOME
51
- # Resolve links: $0 may be a link
52
- PRG="$0"
53
- # Need this for relative symlinks.
54
- while [ -h "$PRG" ] ; do
55
- ls=`ls -ld "$PRG"`
56
- link=`expr "$ls" : '.*-> \(.*\)$'`
57
- if expr "$link" : '/.*' > /dev/null; then
58
- PRG="$link"
59
- else
60
- PRG=`dirname "$PRG"`"/$link"
61
- fi
62
- done
63
- SAVED="`pwd`"
64
- cd "`dirname \"$PRG\"`/" >&-
65
- APP_HOME="`pwd -P`"
66
- cd "$SAVED" >&-
67
-
68
67
  CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
69
68
 
70
69
  # Determine the Java command to use to start the JVM.
@@ -90,7 +89,7 @@ location of your Java installation."
90
89
  fi
91
90
 
92
91
  # Increase the maximum file descriptors if we can.
93
- if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
92
+ if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
94
93
  MAX_FD_LIMIT=`ulimit -H -n`
95
94
  if [ $? -eq 0 ] ; then
96
95
  if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
@@ -114,6 +113,7 @@ fi
114
113
  if $cygwin ; then
115
114
  APP_HOME=`cygpath --path --mixed "$APP_HOME"`
116
115
  CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
116
+ JAVACMD=`cygpath --unix "$JAVACMD"`
117
117
 
118
118
  # We build the pattern for arguments to be converted via cygpath
119
119
  ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
@@ -154,11 +154,19 @@ if $cygwin ; then
154
154
  esac
155
155
  fi
156
156
 
157
- # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
158
- function splitJvmOpts() {
159
- JVM_OPTS=("$@")
157
+ # Escape application args
158
+ save () {
159
+ for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
160
+ echo " "
160
161
  }
161
- eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
162
- 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
163
171
 
164
- exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
172
+ exec "$JAVACMD" "$@"
@@ -4,14 +4,12 @@ import com.fasterxml.jackson.core.JsonProcessingException;
4
4
  import com.fasterxml.jackson.databind.ObjectMapper;
5
5
  import com.google.common.base.Optional;
6
6
  import com.google.common.base.Strings;
7
- import com.google.common.base.Throwables;
8
7
  import com.google.common.collect.ImmutableList;
9
8
  import com.jayway.jsonpath.Configuration;
10
9
  import com.jayway.jsonpath.JsonPath;
11
10
  import com.jayway.jsonpath.Option;
12
11
  import com.jayway.jsonpath.ParseContext;
13
12
  import com.jayway.jsonpath.ReadContext;
14
- import org.embulk.config.ConfigSource;
15
13
  import org.embulk.config.Task;
16
14
  import org.embulk.spi.Column;
17
15
  import org.embulk.spi.ColumnConfig;
@@ -27,7 +25,6 @@ import org.embulk.spi.json.JsonParser;
27
25
  import org.embulk.spi.time.TimestampParseException;
28
26
  import org.embulk.spi.time.TimestampParser;
29
27
  import org.embulk.spi.type.Types;
30
- import org.joda.time.DateTimeZone;
31
28
  import org.slf4j.Logger;
32
29
 
33
30
  import java.util.List;
@@ -118,9 +115,7 @@ public class FilteredPageOutput
118
115
  final ColumnConfig columnConfig)
119
116
  {
120
117
  final TimestampColumnOption columnOption = columnConfig.getOption().loadConfig(TimestampColumnOption.class);
121
- final String format = columnOption.getFormat().or(task.getDefaultTimestampFormat());
122
- final DateTimeZone dateTimeZone = columnOption.getTimeZone().or(task.getDefaultTimeZone());
123
- return new TimestampParser(task.getJRuby(), format, dateTimeZone);
118
+ return new TimestampParser(task, columnOption);
124
119
  }
125
120
 
126
121
  private final Logger logger = Exec.getLogger(FilteredPageOutput.class);
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: embulk-filter-expand_json
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Civitaspo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-09-12 00:00:00.000000000 Z
11
+ date: 2017-09-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
@@ -65,7 +65,7 @@ files:
65
65
  - src/test/java/org/embulk/filter/expand_json/TestExpandJsonFilterPlugin.java
66
66
  - classpath/accessors-smart-1.2.jar
67
67
  - classpath/asm-5.0.4.jar
68
- - classpath/embulk-filter-expand_json-0.2.1.jar
68
+ - classpath/embulk-filter-expand_json-0.2.2.jar
69
69
  - classpath/json-path-2.4.0.jar
70
70
  - classpath/json-smart-2.3.jar
71
71
  - classpath/slf4j-api-1.7.25.jar