embulk 0.6.3 → 0.6.4

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: b37c9dd1d3a700e0057040d27f0a29e917e21b13
4
- data.tar.gz: 3372de3c3f382dc6f83bea6936d84af3b815194c
3
+ metadata.gz: de4102fca39496965dc800236bce8dae92e68a9c
4
+ data.tar.gz: 637887dd9dc0ab4e7f1d886736fba913aee8ee4b
5
5
  SHA512:
6
- metadata.gz: 7d0c416b6c063508b95d23941c5cf97149bcf6fd11134392f79d0d7540f106df019e502fc7296ba47a94a945a64c8b34a4d4aaf682227d390300592d598c0f1a
7
- data.tar.gz: b370deb8322442973cc3109ca2a0b8eb3931d11840f55e7d230f56c10de45c93a71d39cb892dad491ef67870c9e77932fabee4d82cf99ea601ba3417ea3e7cc8
6
+ metadata.gz: 4708b0f2cb6a7440d146605a1a50f67b1d52d1218f8f07b212eeb315f71befa2f1e08327e585277bbe55ca799aea7db65dc896f0c22eb6cb54aaaec03d9c4e77
7
+ data.tar.gz: c16df22dc21a912e86bc44289ec3741e803a20ef0cf19e5227467dc5f908d3043f6b6b8394d0696ba87e3ee4f8eb3b8465e9a8742164d5d47d8d154723975e26
data/build.gradle CHANGED
@@ -11,7 +11,7 @@ def release_projects = [project(":embulk-core"), project(":embulk-standards")]
11
11
 
12
12
  allprojects {
13
13
  group = 'org.embulk'
14
- version = '0.6.3'
14
+ version = '0.6.4'
15
15
 
16
16
  ext {
17
17
  jrubyVersion = '1.7.19'
@@ -4,6 +4,7 @@ Release Notes
4
4
  .. toctree::
5
5
  :maxdepth: 1
6
6
 
7
+ release/release-0.6.4
7
8
  release/release-0.6.3
8
9
  release/release-0.6.2
9
10
  release/release-0.6.1
@@ -0,0 +1,13 @@
1
+ Release 0.6.4
2
+ ==================================
3
+
4
+ Built-in plugins
5
+ ------------------
6
+
7
+ * ``guess-csv`` keeps existent configurations such as ``null_string`` if they are already set.
8
+ * ``guess-csv`` skips line if a CSV file is broken rather than falling back to ad-hoc implementation which can't deal with quoted values.
9
+ * Fixed a problem where ``guess-csv`` can't handle quoted values (@y-ken++)
10
+
11
+ Release Date
12
+ ------------------
13
+ 2015-04-21
@@ -37,17 +37,23 @@ module Embulk
37
37
  end
38
38
 
39
39
  parser_config = config["parser"] || {}
40
- parser_guessed = DataSource.new.merge({"type" => "csv", "delimiter" => delim})
40
+ parser_guessed = DataSource.new.merge(parser_config).merge({"type" => "csv", "delimiter" => delim})
41
41
 
42
- quote = guess_quote(sample_lines, delim)
43
- parser_guessed["quote"] = quote ? quote : ''
42
+ unless parser_guessed.has_key?("quote")
43
+ quote = guess_quote(sample_lines, delim)
44
+ parser_guessed["quote"] = quote ? quote : ''
45
+ end
44
46
 
45
- escape = guess_escape(sample_lines, delim, quote)
46
- parser_guessed["escape"] = escape ? escape : ''
47
+ unless parser_guessed.has_key?("escape")
48
+ escape = guess_escape(sample_lines, delim, quote)
49
+ parser_guessed["escape"] = escape ? escape : ''
50
+ end
47
51
 
48
- null_string = guess_null_string(sample_lines, delim)
49
- parser_guessed["null_string"] = null_string if null_string
50
- # don't even set null_string to avoid confusion of null and 'null' in YAML format
52
+ unless parser_guessed.has_key?("null_string")
53
+ null_string = guess_null_string(sample_lines, delim)
54
+ parser_guessed["null_string"] = null_string if null_string
55
+ # don't even set null_string to avoid confusion of null and 'null' in YAML format
56
+ end
51
57
 
52
58
  sample_records = split_lines(parser_guessed, sample_lines, delim)
53
59
  skip_header_lines = guess_skip_header_lines(sample_records)
@@ -102,14 +108,19 @@ module Embulk
102
108
  rows = []
103
109
  while tokenizer.nextFile
104
110
  while tokenizer.nextRecord
105
- columns = []
106
- while true
107
- begin
108
- columns << tokenizer.nextColumn
109
- rescue java.lang.IllegalStateException # TODO exception class
110
- rows << columns
111
- break
111
+ begin
112
+ columns = []
113
+ while true
114
+ begin
115
+ columns << tokenizer.nextColumn
116
+ rescue org.embulk.standards.CsvTokenizer::TooFewColumnsException
117
+ rows << columns
118
+ break
119
+ end
112
120
  end
121
+ rescue org.embulk.standards.CsvTokenizer::InvalidValueException
122
+ # TODO warning
123
+ tokenizer.skipCurrentLine
113
124
  end
114
125
  end
115
126
  end
@@ -1,3 +1,3 @@
1
1
  module Embulk
2
- VERSION = '0.6.3'
2
+ VERSION = '0.6.4'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: embulk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.3
4
+ version: 0.6.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sadayuki Furuhashi
@@ -293,6 +293,7 @@ files:
293
293
  - embulk-docs/src/release/release-0.6.1.rst
294
294
  - embulk-docs/src/release/release-0.6.2.rst
295
295
  - embulk-docs/src/release/release-0.6.3.rst
296
+ - embulk-docs/src/release/release-0.6.4.rst
296
297
  - embulk-standards/build.gradle
297
298
  - embulk-standards/src/main/java/org/embulk/standards/CsvFormatterPlugin.java
298
299
  - embulk-standards/src/main/java/org/embulk/standards/CsvParserPlugin.java
@@ -398,8 +399,8 @@ files:
398
399
  - classpath/bval-jsr303-0.5.jar
399
400
  - classpath/commons-beanutils-core-1.8.3.jar
400
401
  - classpath/commons-lang3-3.1.jar
401
- - classpath/embulk-core-0.6.3.jar
402
- - classpath/embulk-standards-0.6.3.jar
402
+ - classpath/embulk-core-0.6.4.jar
403
+ - classpath/embulk-standards-0.6.4.jar
403
404
  - classpath/guava-18.0.jar
404
405
  - classpath/guice-3.0.jar
405
406
  - classpath/guice-multibindings-3.0.jar