embulk 0.7.5-java → 0.7.6-java

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: 63f5bc3b3bb2ba976677b032b93b0cb74d42a320
4
- data.tar.gz: a0e9978b430cbca4901d709691fabbb5950981eb
3
+ metadata.gz: 6e299148e196ac4521c81da16fe9073af066027e
4
+ data.tar.gz: 968cca1d984cfbf079a26cee217656f56b69ab53
5
5
  SHA512:
6
- metadata.gz: 56244b996db3d9381cbf9ef601458f361a36faa607f804ade930b41a489070cf968e61a9084a9841ab9d5954c785adbda6f68b388662b187da253b5802cd1460
7
- data.tar.gz: 5fa872f8a6f9485e639831ae099429c8e47697638cd746647befc88a5bbe2d07ac3849b77d514b9dcd2621d0811c0e074f33385b61cf15a892c4bca797cc727f
6
+ metadata.gz: 28b9b3db6b11bedf305be41986d89941a404743a1d463a0f573e1bfc808ccc6503ebb8d05f7c83dbdb3403e9d8985e88194cd6e9ac1be65aa5507e89db2dd951
7
+ data.tar.gz: 63e207246f689796fc132b43d4398fcd2725fc31d4a76e050e8b868de1572543add56ed15dc31b93c4db4164693dc100da448335db8e058ecbbe10046aa10156
@@ -16,7 +16,7 @@ def release_projects = [project(":embulk-core"), project(":embulk-standards")]
16
16
 
17
17
  allprojects {
18
18
  group = 'org.embulk'
19
- version = '0.7.5'
19
+ version = '0.7.6'
20
20
 
21
21
  ext {
22
22
  jrubyVersion = '9.0.0.0'
@@ -42,7 +42,7 @@ java %java_args% -jar %this% %jruby_args% %args%
42
42
 
43
43
  endlocal
44
44
 
45
- exit /b
45
+ exit /b %ERRORLEVEL%
46
46
 
47
47
  :check_arg
48
48
  set arg=%*
@@ -4,7 +4,7 @@ public class UserDataExceptions
4
4
  {
5
5
  private UserDataExceptions() { }
6
6
 
7
- public boolean isUserDataException(Throwable exception)
7
+ public static boolean isUserDataException(Throwable exception)
8
8
  {
9
9
  while (exception != null) {
10
10
  if (exception instanceof UserDataException) {
@@ -162,7 +162,7 @@ Options
162
162
  +============================+==========+================================================================================================================+========================+
163
163
  | delimiter | string | Delimiter character such as ``,`` for CSV, ``"\t"`` for TSV, ``"|"`` or any single-byte character | ``,`` by default |
164
164
  +----------------------------+----------+----------------------------------------------------------------------------------------------------------------+------------------------+
165
- | quote | string | The character surrounding a quoted value. Setting ``null`` disables quoting. | ``\"`` by default |
165
+ | quote | string | The character surrounding a quoted value. Setting ``null`` disables quoting. | ``"`` by default |
166
166
  +----------------------------+----------+----------------------------------------------------------------------------------------------------------------+------------------------+
167
167
  | escape | string | Escape character to escape a special character. Setting ``null`` disables escaping. | ``\\`` by default |
168
168
  +----------------------------+----------+----------------------------------------------------------------------------------------------------------------+------------------------+
@@ -319,31 +319,33 @@ The ``csv`` formatter plugin formats records using CSV or TSV format.
319
319
  Options
320
320
  ~~~~~~~~~~~~~~~~~~
321
321
 
322
- +----------------------+---------+-------------------------------------------------------------------------------------------------------+------------------------+
323
- | name | type | description | required? |
324
- +======================+=========+=======================================================================================================+========================+
325
- | delimiter | string | Delimiter character such as ``,`` for CSV, ``"\t"`` for TSV, ``"|"`` or any single-byte character | ``,`` by default |
326
- +----------------------+---------+-------------------------------------------------------------------------------------------------------+------------------------+
327
- | quote | string | The character surrounding a quoted value | ``\"`` by default |
328
- +----------------------+---------+-------------------------------------------------------------------------------------------------------+------------------------+
329
- | quote\_policy | enum | Policy for quote (ALL, MINIMAL, NONE) (see below) | ``MINIMAL`` by default |
330
- +----------------------+---------+-------------------------------------------------------------------------------------------------------+------------------------+
331
- | escape | string | Escape character to escape a quote character when quote\_policy is ALL or MINIMAL | ``\"`` by default |
332
- +----------------------+---------+-------------------------------------------------------------------------------------------------------+------------------------+
333
- | header\_line | boolean | If true, write the header line with column name at the first line | ``true`` by default |
334
- +----------------------+---------+-------------------------------------------------------------------------------------------------------+------------------------+
335
- | null_string | string | Expression of NULL values | empty by default |
336
- +----------------------+---------+-------------------------------------------------------------------------------------------------------+------------------------+
337
- | newline | enum | Newline character (CRLF, LF or CR) | ``CRLF`` by default |
338
- +----------------------+---------+-------------------------------------------------------------------------------------------------------+------------------------+
339
- | newline\_in\_field | enum | Newline character in each field (CRLF, LF, CR) | ``LF`` by default |
340
- +----------------------+---------+-------------------------------------------------------------------------------------------------------+------------------------+
341
- | charset | enum | Character encoding (eg. ISO-8859-1, UTF-8) | ``UTF-8`` by default |
342
- +----------------------+---------+-------------------------------------------------------------------------------------------------------+------------------------+
343
- | default\_timezone | string | Time zone of timestamp columns. This can be overwritten for each column using ``column_options`` | ``UTC`` by default |
344
- +----------------------+---------+-------------------------------------------------------------------------------------------------------+------------------------+
345
- | column\_options | hash | See bellow | optional |
346
- +----------------------+---------+-------------------------------------------------------------------------------------------------------+------------------------+
322
+ +----------------------+---------+-------------------------------------------------------------------------------------------------------+-------------------------------+
323
+ | name | type | description | required? |
324
+ +======================+=========+=======================================================================================================+===============================+
325
+ | delimiter | string | Delimiter character such as ``,`` for CSV, ``"\t"`` for TSV, ``"|"`` or any single-byte character | ``,`` by default |
326
+ +----------------------+---------+-------------------------------------------------------------------------------------------------------+-------------------------------+
327
+ | quote | string | The character surrounding a quoted value | ``"`` by default |
328
+ +----------------------+---------+-------------------------------------------------------------------------------------------------------+-------------------------------+
329
+ | quote\_policy | enum | Policy for quote (ALL, MINIMAL, NONE) (see below) | ``MINIMAL`` by default |
330
+ +----------------------+---------+-------------------------------------------------------------------------------------------------------+-------------------------------+
331
+ | escape | string | Escape character to escape quote character | same with quote default (\*1) |
332
+ +----------------------+---------+-------------------------------------------------------------------------------------------------------+-------------------------------+
333
+ | header\_line | boolean | If true, write the header line with column name at the first line | ``true`` by default |
334
+ +----------------------+---------+-------------------------------------------------------------------------------------------------------+-------------------------------+
335
+ | null_string | string | Expression of NULL values | empty by default |
336
+ +----------------------+---------+-------------------------------------------------------------------------------------------------------+-------------------------------+
337
+ | newline | enum | Newline character (CRLF, LF or CR) | ``CRLF`` by default |
338
+ +----------------------+---------+-------------------------------------------------------------------------------------------------------+-------------------------------+
339
+ | newline\_in\_field | enum | Newline character in each field (CRLF, LF, CR) | ``LF`` by default |
340
+ +----------------------+---------+-------------------------------------------------------------------------------------------------------+-------------------------------+
341
+ | charset | enum | Character encoding (eg. ISO-8859-1, UTF-8) | ``UTF-8`` by default |
342
+ +----------------------+---------+-------------------------------------------------------------------------------------------------------+-------------------------------+
343
+ | default\_timezone | string | Time zone of timestamp columns. This can be overwritten for each column using ``column_options`` | ``UTC`` by default |
344
+ +----------------------+---------+-------------------------------------------------------------------------------------------------------+-------------------------------+
345
+ | column\_options | hash | See bellow | optional |
346
+ +----------------------+---------+-------------------------------------------------------------------------------------------------------+-------------------------------+
347
+
348
+ (\*1): if quote\_policy is NONE, ``quote`` option is ignored, and default ``escape`` is ``\``.
347
349
 
348
350
  The ``quote_policy`` option is used to determine field type to quote.
349
351
 
@@ -4,6 +4,7 @@ Release Notes
4
4
  .. toctree::
5
5
  :maxdepth: 1
6
6
 
7
+ release/release-0.7.6
7
8
  release/release-0.7.5
8
9
  release/release-0.7.4
9
10
  release/release-0.7.3
@@ -0,0 +1,18 @@
1
+ Release 0.7.6
2
+ ==================================
3
+
4
+ General Changes
5
+ ------------------
6
+
7
+ * On Cygwin/Windows environment, embulk command returns exit code 1 correctly if a transaction fails (@hishidama++)
8
+
9
+
10
+ Built-in plugins
11
+ ------------------
12
+
13
+ * ``formatter-csv``: fixed a problem where a ``"`` character is escaped when ``quote_plicy: NONE`` is set. The fixed behavior is that, if ``quote_plicy: NONE`` is set, ``quote`` option (which means ``"`` character) is completely ignored, and only newline and delimiter are escaped ([#327] @sonots++).
14
+
15
+
16
+ Release Date
17
+ ------------------
18
+ 2015-10-27
@@ -108,7 +108,7 @@ public class CsvFormatterPlugin
108
108
  final char delimiter = task.getDelimiterChar();
109
109
  final QuotePolicy quotePolicy = task.getQuotePolicy();
110
110
  final char quote = task.getQuoteChar() != '\0' ? task.getQuoteChar() : '"';
111
- final char escape = task.getEscapeChar().or(quotePolicy == QuotePolicy.NONE ? '\\' : '\"');
111
+ final char escape = task.getEscapeChar().or(quotePolicy == QuotePolicy.NONE ? '\\' : quote);
112
112
  final String newlineInField = task.getNewlineInField().getString();
113
113
  final String nullString = task.getNullString();
114
114
 
@@ -235,7 +235,7 @@ public class CsvFormatterPlugin
235
235
  for (int i = 0; i < v.length(); i++) {
236
236
  char c = v.charAt(i);
237
237
 
238
- if (c == quote) {
238
+ if (policy != QuotePolicy.NONE && c == quote) {
239
239
  escapedValue.append(escape);
240
240
  escapedValue.append(c);
241
241
  isRequireQuote = true;
@@ -194,7 +194,7 @@ public class TestCsvFormatterPlugin
194
194
 
195
195
  char delimiter = ',';
196
196
  char quote = '"';
197
- char escape = '"';
197
+ char escape = '\\';
198
198
  CsvFormatterPlugin.QuotePolicy policy = CsvFormatterPlugin.QuotePolicy.NONE;
199
199
  String newline = Newline.LF.getString();
200
200
  String nullString = "";
@@ -211,10 +211,10 @@ public class TestCsvFormatterPlugin
211
211
  ImmutableMap.of("expected", "0x4d2", "actual", "0x4d2"),
212
212
  ImmutableMap.of("expected", "123L", "actual", "123L"),
213
213
  ImmutableMap.of("expected", "3.141592", "actual", "3.141592"),
214
- ImmutableMap.of("expected", "1\",000", "actual", "1,000"),
214
+ ImmutableMap.of("expected", "1\\,000", "actual", "1,000"),
215
215
  ImmutableMap.of("expected", "ABC", "actual", "ABC"),
216
- ImmutableMap.of("expected", "ABC\"\"DEF", "actual", "ABC\"DEF"),
217
- ImmutableMap.of("expected", "ABC\"\nDEF", "actual", "ABC\nDEF"),
216
+ ImmutableMap.of("expected", "ABC\"DEF", "actual", "ABC\"DEF"),
217
+ ImmutableMap.of("expected", "ABC\\\nDEF", "actual", "ABC\nDEF"),
218
218
  ImmutableMap.of("expected", "", "actual", ""),
219
219
  ImmutableMap.of("expected", "NULL", "actual", "NULL"),
220
220
  ImmutableMap.of("expected", "2015-01-01 12:01:01", "actual", "2015-01-01 12:01:01"),
@@ -1,3 +1,3 @@
1
1
  module Embulk
2
- VERSION = '0.7.5'
2
+ VERSION = '0.7.6'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: embulk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.5
4
+ version: 0.7.6
5
5
  platform: java
6
6
  authors:
7
7
  - Sadayuki Furuhashi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-02 00:00:00.000000000 Z
11
+ date: 2015-10-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: liquid
@@ -133,8 +133,8 @@ files:
133
133
  - classpath/bval-jsr303-0.5.jar
134
134
  - classpath/commons-beanutils-core-1.8.3.jar
135
135
  - classpath/commons-lang3-3.1.jar
136
- - classpath/embulk-core-0.7.5.jar
137
- - classpath/embulk-standards-0.7.5.jar
136
+ - classpath/embulk-core-0.7.6.jar
137
+ - classpath/embulk-standards-0.7.6.jar
138
138
  - classpath/guava-18.0.jar
139
139
  - classpath/guice-4.0.jar
140
140
  - classpath/guice-multibindings-4.0.jar
@@ -437,6 +437,7 @@ files:
437
437
  - embulk-docs/src/release/release-0.7.3.rst
438
438
  - embulk-docs/src/release/release-0.7.4.rst
439
439
  - embulk-docs/src/release/release-0.7.5.rst
440
+ - embulk-docs/src/release/release-0.7.6.rst
440
441
  - embulk-standards/build.gradle
441
442
  - embulk-standards/src/main/java/org/embulk/standards/CsvFormatterPlugin.java
442
443
  - embulk-standards/src/main/java/org/embulk/standards/CsvParserPlugin.java