embulk 0.7.5 → 0.7.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0fc04e8ab92c677b7c5891a2818354f81da3ef70
4
- data.tar.gz: 4a43292bb55fec0d3d981089572e574dcafa525d
3
+ metadata.gz: 29b4fbf4ef36c7354cf89e39b25212d5dbf6a0fa
4
+ data.tar.gz: 8e2387077d348272bf6e09736f51b48722b9287a
5
5
  SHA512:
6
- metadata.gz: 122d1f4632210c5d807d3301fdab9046a509420e9557caff224696f35a1f21eac9731dade238044fd36f70e0b24e382b276e3da4165f680d76875a8a7d399440
7
- data.tar.gz: 6a671967d0c53640f977e286d0dd874712454af12ba361a7d6db85599be510da2bfdd67bc685803e0d5426b8b8b7f17e2e01c1aa3172f23c55635b8e1af8697e
6
+ metadata.gz: c39a0c665331889057cd4c2c74cfb7610f56dc1665c3e8e4fae8513f8a37f7dab7f463d68d814794b4a2b5a8401ca6ddbb366ade4ab0d2ef85a82d6f895776d6
7
+ data.tar.gz: 491c5c617a8868ac232fca6a7034263ef338e6213bca61806223acd10dd5a59a61e5fed8f09e86809bdc5c880906baf4122563d4c7187413a660a3d55eebf127
@@ -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: ruby
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: jruby-jars
@@ -121,8 +121,8 @@ files:
121
121
  - classpath/bval-jsr303-0.5.jar
122
122
  - classpath/commons-beanutils-core-1.8.3.jar
123
123
  - classpath/commons-lang3-3.1.jar
124
- - classpath/embulk-core-0.7.5.jar
125
- - classpath/embulk-standards-0.7.5.jar
124
+ - classpath/embulk-core-0.7.6.jar
125
+ - classpath/embulk-standards-0.7.6.jar
126
126
  - classpath/guava-18.0.jar
127
127
  - classpath/guice-4.0.jar
128
128
  - classpath/guice-multibindings-4.0.jar
@@ -425,6 +425,7 @@ files:
425
425
  - embulk-docs/src/release/release-0.7.3.rst
426
426
  - embulk-docs/src/release/release-0.7.4.rst
427
427
  - embulk-docs/src/release/release-0.7.5.rst
428
+ - embulk-docs/src/release/release-0.7.6.rst
428
429
  - embulk-standards/build.gradle
429
430
  - embulk-standards/src/main/java/org/embulk/standards/CsvFormatterPlugin.java
430
431
  - embulk-standards/src/main/java/org/embulk/standards/CsvParserPlugin.java