embulk 0.4.8 → 0.4.9

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: ae306d06b0e181d289d3ff6d1117f0275d53d021
4
- data.tar.gz: 5aefdda58d812bf753d41a4133e9b5500a88d9d0
3
+ metadata.gz: 1d98c0a02ab92bbf1946711baf3d7ed6e595a370
4
+ data.tar.gz: 42feb91bb67cf47d56bcbcecbb0ab3503c60f8b4
5
5
  SHA512:
6
- metadata.gz: 7ef6c84e52dadc846e6f69e0836aaaf8b18c763be94a178ed597e18d07e6583b4533b16366933a798a7391b40f88b459258b0be0255c43ae2e39e2b3666fdcee
7
- data.tar.gz: 1808ce0b33520fc998f5bb023ab1a1d109d87152dcdc1994c32becb770178d749a7fe27dfdc27b956f61a6e9c664baeec188f1ebb9fe6e36e6a82d8f5840177a
6
+ metadata.gz: 6c51c434afe98f3a6f1ee85e03fed5224238892830308c406eb67be38c1ec4f5a22fe103bde6cc89cfee44875281d2887c3624bcc5fda0c1ddb5aa388cf972e0
7
+ data.tar.gz: 88d1f71adf38f007dc876d5bc55672e1ae69b3c8895aec589dcc77a98801bab4b55fb849979635955c628c4300da343de2f2e60a11aa1d9054dac8011cdac705
data/README.md CHANGED
@@ -28,7 +28,7 @@ The single-file package is the simplest way to try Embulk. You can download the
28
28
  Following 4 commands install embulk to your home directory:
29
29
 
30
30
  ```
31
- curl --create-dirs -o ~/.embulk/bin/embulk -L https://bintray.com/artifact/download/embulk/maven/embulk-0.4.8.jar
31
+ curl --create-dirs -o ~/.embulk/bin/embulk -L https://bintray.com/artifact/download/embulk/maven/embulk-0.4.9.jar
32
32
  chmod +x ~/.embulk/bin/embulk
33
33
  echo 'export PATH="$HOME/.embulk/bin:$PATH"' >> ~/.bashrc
34
34
  source ~/.bashrc
@@ -39,7 +39,7 @@ source ~/.bashrc
39
39
  You can assume the jar file is a .bat file.
40
40
 
41
41
  ```
42
- curl -o embulk.bat -L https://bintray.com/artifact/download/embulk/maven/embulk-0.4.8.jar
42
+ curl -o embulk.bat -L https://bintray.com/artifact/download/embulk/maven/embulk-0.4.9.jar
43
43
  ```
44
44
 
45
45
  ### Trying examples
data/bin/embulk CHANGED
@@ -33,7 +33,6 @@ until ARGV.empty?
33
33
  ARGV.shift
34
34
  when "run"
35
35
  default_optimize = true
36
- ARGV.shift
37
36
  break
38
37
  else
39
38
  break
@@ -12,7 +12,7 @@ def release_projects = [project(":embulk-core"), project(":embulk-standards")]
12
12
 
13
13
  allprojects {
14
14
  group = 'org.embulk'
15
- version = '0.4.8'
15
+ version = '0.4.9'
16
16
 
17
17
  apply plugin: 'java'
18
18
  apply plugin: 'maven-publish'
@@ -2,7 +2,7 @@
2
2
  : <<BAT
3
3
  @echo off
4
4
 
5
- java -jar %0 %*
5
+ java -jar %~f0 %*
6
6
 
7
7
  exit /B
8
8
  BAT
@@ -34,8 +34,9 @@ public class LineEncoder
34
34
  }
35
35
 
36
36
  private final String newline;
37
+ private final FileOutput underlyingFileOutput;
37
38
  private final FileOutputOutputStream outputStream;
38
- private final Writer writer;
39
+ private Writer writer;
39
40
 
40
41
  public LineEncoder(FileOutput out, EncoderTask task)
41
42
  {
@@ -44,7 +45,8 @@ public class LineEncoder
44
45
  .onMalformedInput(CodingErrorAction.REPLACE) // TODO configurable?
45
46
  .onUnmappableCharacter(CodingErrorAction.REPLACE); // TODO configurable?
46
47
  this.newline = task.getNewline().getString();
47
- this.outputStream = new FileOutputOutputStream(out, task.getBufferAllocator(), FileOutputOutputStream.CloseMode.CLOSE);
48
+ this.underlyingFileOutput = out;
49
+ this.outputStream = new FileOutputOutputStream(underlyingFileOutput, task.getBufferAllocator(), FileOutputOutputStream.CloseMode.FLUSH_FINISH);
48
50
  this.writer = new OutputStreamWriter(outputStream, encoder);
49
51
  }
50
52
 
@@ -93,18 +95,25 @@ public class LineEncoder
93
95
  public void finish()
94
96
  {
95
97
  try {
96
- writer.flush();
98
+ if (writer != null) {
99
+ writer.close(); // FLUSH_FINISH
100
+ writer = null;
101
+ // underlyingFileOutput.finish() is already called by close() because CloseMode is FLUSH_FINISH
102
+ }
97
103
  } catch (IOException ex) {
98
104
  throw new RuntimeException(ex);
99
105
  }
100
- outputStream.finish();
101
106
  }
102
107
 
103
108
  @Override
104
109
  public void close()
105
110
  {
106
111
  try {
107
- writer.close();
112
+ if (writer != null) {
113
+ writer.close(); // FLUSH_FINISH
114
+ writer = null;
115
+ }
116
+ underlyingFileOutput.close(); // this is necessary because CloseMode is not FLUSH_FINISH_CLOSE
108
117
  } catch (IOException ex) {
109
118
  // unexpected
110
119
  throw new RuntimeException(ex);
@@ -0,0 +1,72 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml">
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
+ <title>List of Embulk Plugins by Category | Embulk</title>
7
+ <link rel="stylesheet" href="../docs/_static/haiku.css" type="text/css" />
8
+ <link rel="stylesheet" href="../docs/_static/pygments.css" type="text/css" />
9
+ <link rel="stylesheet" href="plugins.css" type="text/css" />
10
+ <link rel="top" title="Embulk 0.4 documentation" href="../docs/index.html" />
11
+ </head>
12
+ <body>
13
+ <div class="header"><h1 class="heading"><a href="../docs/index.html">
14
+ <span>Embulk plugins</span></a></h1>
15
+ <h2 class="heading"><span>Embulk by category</span></h2>
16
+ </div>
17
+
18
+ <div class="content">
19
+ <div class="section">
20
+ <h1>List of Plugins by Category</h1>
21
+
22
+ <% categories.each do |category,gems| %>
23
+ <div class="section">
24
+ <h2><%= category.upcase %></h2>
25
+ <table class="plugins">
26
+ <thead>
27
+ <tr>
28
+ <th>Star</th>
29
+ <th>Name</th>
30
+ <th>Author</th>
31
+ <th>About</th>
32
+ <th>Version</th>
33
+ </tr>
34
+ </thead>
35
+ <tbody>
36
+ <% gems.each do |gem| %>
37
+ <tr>
38
+ <td style="width:80px">
39
+ <div class="github-btn-container">
40
+ <span class="github-btn" class="github-stargazers">
41
+ <a class="gh-btn" href="https://github.com/<%=e gem[:owner] %>/<%=e gem[:repo] %>" target="_blank">
42
+ <span class="gh-ico"></span>
43
+ <span class="gh-text">Star</span>
44
+ </a>
45
+ <a class="gh-count" href="https://github.com/<%=e gem[:owner] %>/<%=e gem[:repo] %>/stargazers" target="_blank" style="display: block"><%=h gem[:stargazers_count] %></a>
46
+ </span>
47
+ </div>
48
+ <td style="width:9em"><a href="<%=h gem[:url] %>"><%=h gem[:name] %></a></td>
49
+ <td style="width:15em"><%=h gem[:author] %>
50
+ <% if gem[:avatar_url] %>
51
+ <img src="<%=h gem[:avatar_url] %>" height=32 width=32></img></td>
52
+ <% else %>
53
+ </td>
54
+ <% end %>
55
+ <td><%=h gem[:info] %></td>
56
+ <td style="width:3em"><%=h gem[:version] %></td>
57
+ </tr>
58
+ <% end %>
59
+ </tbody>
60
+ </table>
61
+ </div>
62
+ <% end %>
63
+
64
+ </div>
65
+ </div>
66
+
67
+ <div class="footer">
68
+ &copy; Copyright 2015, Embulk Project.
69
+ Created using <a href="https://github.com/embulk/plugin-crawler">Embulk plugin crawler</a>.
70
+ </div>
71
+ </body>
72
+ </html>
@@ -0,0 +1,141 @@
1
+ body {
2
+ max-width: 90em;
3
+ }
4
+ .plugins {
5
+ border-collapse: collapse
6
+ }
7
+ .plugins th, td {
8
+ padding: 5px 20px;
9
+ border: 1px solid #eee;
10
+ vertical-align: middle;
11
+ }
12
+ .author-avator {
13
+ }
14
+
15
+ .github-btn-container {
16
+ padding: 0;
17
+ margin: 0;
18
+ font: bold 11px/14px "Helvetica Neue", Helvetica, Arial, sans-serif;
19
+ overflow: hidden;
20
+ color: black
21
+ }
22
+ .github-btn-container a {
23
+ color: black;
24
+ }
25
+ .github-btn-container a:hover {
26
+ text-decoration: none;
27
+ }
28
+
29
+ .github-btn {
30
+ height: 20px;
31
+ overflow: hidden;
32
+ }
33
+ .gh-btn,
34
+ .gh-count,
35
+ .gh-ico {
36
+ float: left;
37
+ }
38
+ .gh-btn,
39
+ .gh-count {
40
+ padding: 2px 5px 2px 4px;
41
+ color: #333;
42
+ text-decoration: none;
43
+ text-shadow: 0 1px 0 #fff;
44
+ white-space: nowrap;
45
+ cursor: pointer;
46
+ border-radius: 3px;
47
+ }
48
+ .gh-btn {
49
+ background-color: #eee;
50
+ background-image: -moz-linear-gradient(#fcfcfc, #eee);
51
+ background-image: -webkit-linear-gradient(#fcfcfc, #eee);
52
+ background-image: linear-gradient(#fcfcfc, #eee);
53
+ background-repeat: no-repeat;
54
+ border: 1px solid #d5d5d5;
55
+ }
56
+ .gh-btn:hover,
57
+ .gh-btn:focus {
58
+ text-decoration: none;
59
+ background-color: #ddd;
60
+ background-image: -moz-linear-gradient(#eee, #ddd);
61
+ background-image: -webkit-linear-gradient(#eee, #ddd);
62
+ background-image: linear-gradient(#eee, #ddd);
63
+ border-color: #ccc;
64
+ }
65
+ .gh-btn:active {
66
+ background-image: none;
67
+ background-color: #dcdcdc;
68
+ border-color: #b5b5b5;
69
+ box-shadow: inset 0 2px 4px rgba(0,0,0,0.15);
70
+ }
71
+ .gh-ico {
72
+ width: 14px;
73
+ height: 14px;
74
+ margin-right: 4px;
75
+ background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxNy4xLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+DQo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB3aWR0aD0iNDBweCIgaGVpZ2h0PSI0MHB4IiB2aWV3Qm94PSIxMiAxMiA0MCA0MCIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAxMiAxMiA0MCA0MCIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8cGF0aCBmaWxsPSIjMzMzMzMzIiBkPSJNMzIsMTMuNGMtMTAuNSwwLTE5LDguNS0xOSwxOWMwLDguNCw1LjUsMTUuNSwxMywxOGMxLDAuMiwxLjMtMC40LDEuMy0wLjljMC0wLjUsMC0xLjcsMC0zLjINCgljLTUuMywxLjEtNi40LTIuNi02LjQtMi42QzIwLDQxLjYsMTguOCw0MSwxOC44LDQxYy0xLjctMS4yLDAuMS0xLjEsMC4xLTEuMWMxLjksMC4xLDIuOSwyLDIuOSwyYzEuNywyLjksNC41LDIuMSw1LjUsMS42DQoJYzAuMi0xLjIsMC43LTIuMSwxLjItMi42Yy00LjItMC41LTguNy0yLjEtOC43LTkuNGMwLTIuMSwwLjctMy43LDItNS4xYy0wLjItMC41LTAuOC0yLjQsMC4yLTVjMCwwLDEuNi0wLjUsNS4yLDINCgljMS41LTAuNCwzLjEtMC43LDQuOC0wLjdjMS42LDAsMy4zLDAuMiw0LjcsMC43YzMuNi0yLjQsNS4yLTIsNS4yLTJjMSwyLjYsMC40LDQuNiwwLjIsNWMxLjIsMS4zLDIsMywyLDUuMWMwLDcuMy00LjUsOC45LTguNyw5LjQNCgljMC43LDAuNiwxLjMsMS43LDEuMywzLjVjMCwyLjYsMCw0LjYsMCw1LjJjMCwwLjUsMC40LDEuMSwxLjMsMC45YzcuNS0yLjYsMTMtOS43LDEzLTE4LjFDNTEsMjEuOSw0Mi41LDEzLjQsMzIsMTMuNHoiLz4NCjwvc3ZnPg0K);
76
+ background-size: 100% 100%;
77
+ background-repeat: no-repeat;
78
+ }
79
+ .gh-count {
80
+ position: relative;
81
+ display: none; /* hidden to start */
82
+ margin-left: 4px;
83
+ background-color: #fafafa;
84
+ border: 1px solid #d4d4d4;
85
+ }
86
+ .gh-count:hover,
87
+ .gh-count:focus {
88
+ color: #4183C4;
89
+ }
90
+ .gh-count:before,
91
+ .gh-count:after {
92
+ content: '';
93
+ position: absolute;
94
+ display: inline-block;
95
+ width: 0;
96
+ height: 0;
97
+ border-color: transparent;
98
+ border-style: solid;
99
+ }
100
+ .gh-count:before {
101
+ top: 50%;
102
+ left: -3px;
103
+ margin-top: -4px;
104
+ border-width: 4px 4px 4px 0;
105
+ border-right-color: #fafafa;
106
+ }
107
+ .gh-count:after {
108
+ top: 50%;
109
+ left: -4px;
110
+ z-index: -1;
111
+ margin-top: -5px;
112
+ border-width: 5px 5px 5px 0;
113
+ border-right-color: #d4d4d4;
114
+ }
115
+ .github-btn-large {
116
+ height: 30px;
117
+ }
118
+ .github-btn-large .gh-btn,
119
+ .github-btn-large .gh-count {
120
+ padding: 3px 10px 3px 8px;
121
+ font-size: 16px;
122
+ line-height: 22px;
123
+ border-radius: 4px;
124
+ }
125
+ .github-btn-large .gh-ico {
126
+ width: 20px;
127
+ height: 20px;
128
+ }
129
+ .github-btn-large .gh-count {
130
+ margin-left: 6px;
131
+ }
132
+ .github-btn-large .gh-count:before {
133
+ left: -5px;
134
+ margin-top: -6px;
135
+ border-width: 6px 6px 6px 0;
136
+ }
137
+ .github-btn-large .gh-count:after {
138
+ left: -6px;
139
+ margin-top: -7px;
140
+ border-width: 7px 7px 7px 0;
141
+ }
@@ -8,6 +8,8 @@ Embulk documentation
8
8
 
9
9
  https://github.com/embulk/embulk
10
10
 
11
+ * `List of Plugins by Category <http://www.embulk.org/plugins/>`_
12
+
11
13
  .. toctree::
12
14
  :maxdepth: 2
13
15
 
@@ -56,7 +56,7 @@ You can find the latest embulk binary from the `releases <https://bintray.com/em
56
56
 
57
57
  .. code-block:: console
58
58
 
59
- $ sudo wget https://bintray.com/artifact/download/embulk/maven/embulk-0.4.8.jar -O /usr/local/bin/embulk
59
+ $ sudo wget https://bintray.com/artifact/download/embulk/maven/embulk-0.4.9.jar -O /usr/local/bin/embulk
60
60
  $ sudo chmod +x /usr/local/bin/embulk
61
61
 
62
62
  Step 2. Install Elasticsearch plugin
@@ -19,4 +19,5 @@ Release Notes
19
19
  release/release-0.4.6
20
20
  release/release-0.4.7
21
21
  release/release-0.4.8
22
+ release/release-0.4.9
22
23
 
@@ -0,0 +1,23 @@
1
+ Release 0.4.9
2
+ ==================================
3
+
4
+ CLI
5
+ ------------------
6
+
7
+ * Fixed execution script for Windows
8
+
9
+ Built-in plugins
10
+ ------------------
11
+
12
+ * Fixed a problem that ``encoder/gzip`` plugin didn't flush last buffer in memory.
13
+ * ``encoder/gzip`` plugin supports ``level`` option (@yaggytter++).
14
+
15
+ General Changes
16
+ ------------------
17
+
18
+ * Fixed a problem of timestamp parser that ignores milliseconds if format is ``%s.%N``.
19
+ * Plugin template generator generates shorter description to fit in a table at the new plugin list page.
20
+
21
+ Release Date
22
+ ------------------
23
+ 2015-02-25
@@ -3,6 +3,8 @@ package org.embulk.standards;
3
3
  import java.io.OutputStream;
4
4
  import java.io.IOException;
5
5
  import java.util.zip.GZIPOutputStream;
6
+ import javax.validation.constraints.Min;
7
+ import javax.validation.constraints.Max;
6
8
  import org.embulk.config.Task;
7
9
  import org.embulk.config.Config;
8
10
  import org.embulk.config.ConfigInject;
@@ -21,10 +23,11 @@ public class GzipFileEncoderPlugin
21
23
  public interface PluginTask
22
24
  extends Task
23
25
  {
24
- // TODO java.util.zip.GZIPOutputStream doesn't support compression level
25
- //@Config("level")
26
- //@ConfigDefault("6")
27
- //public int getLevel();
26
+ @Config("level")
27
+ @ConfigDefault("6")
28
+ @Min(0)
29
+ @Max(9)
30
+ public int getLevel();
28
31
 
29
32
  @ConfigInject
30
33
  public BufferAllocator getBufferAllocator();
@@ -39,15 +42,20 @@ public class GzipFileEncoderPlugin
39
42
  @Override
40
43
  public FileOutput open(TaskSource taskSource, final FileOutput fileOutput)
41
44
  {
42
- PluginTask task = taskSource.loadTask(PluginTask.class);
45
+ final PluginTask task = taskSource.loadTask(PluginTask.class);
43
46
 
44
- final FileOutputOutputStream output = new FileOutputOutputStream(fileOutput, task.getBufferAllocator(), FileOutputOutputStream.CloseMode.CLOSE);
47
+ final FileOutputOutputStream output = new FileOutputOutputStream(fileOutput, task.getBufferAllocator(), FileOutputOutputStream.CloseMode.FLUSH);
45
48
 
46
49
  return new OutputStreamFileOutput(new OutputStreamFileOutput.Provider() {
47
50
  public OutputStream openNext() throws IOException
48
51
  {
49
52
  output.nextFile();
50
- return new GZIPOutputStream(output);
53
+ return new GZIPOutputStream(output) {
54
+ {
55
+ this.def.setLevel(task.getLevel());
56
+ }
57
+ };
58
+
51
59
  }
52
60
 
53
61
  public void finish() throws IOException
@@ -34,23 +34,23 @@ module Embulk
34
34
  description =
35
35
  case category
36
36
  when :input
37
- %[that loads records from #{display_name} so that any output plugins can receive the records. Search the output plugins by 'embulk-output' keyword.]
37
+ %[Loads records from #{display_name}.]
38
38
  when :file_input
39
- %[that reads files from #{display_name} and parses the file using any parser plugins. Search the parser plugins by 'embulk-parser' keyword.]
39
+ %[Reads files stored on #{display_name}.]
40
40
  when :parser
41
- %[that parses #{display_name} file format read by any file input plugins. Search the file input plugins by 'embulk-input file' keywords.]
41
+ %[Parses #{display_name} files read by other file input plugins.]
42
42
  when :decoder
43
- %[that decodes files encoded by #{display_name} read by any file input plugins. Search the file input plugins by 'embulk-input file' keywords.]
43
+ %[Decodes #{display_name}-encoded files read by other file input plugins.]
44
44
  when :output
45
- %[that loads records to #{display_name} read by any input plugins. Search the input plugins by 'embulk-input' keyword.]
45
+ %[Dumps records to #{display_name}.]
46
46
  when :file_output
47
- %[that stores files to #{display_name} formatted by any formatter plugins. Search the formatter plugins by 'embulk-formatter' keyword.]
47
+ %[Stores files on #{display_name}.]
48
48
  when :formtter
49
- %[that formats records using #{display_name} file format and so that any file output plugins can store the files. Search the file output plugins by 'embulk-output file' keywords.]
49
+ %[Formats #{display_name} files for other file output plugins.]
50
50
  when :encoder
51
- %[that encodes files using #{display_name} so that any file output plugins can store the files. Search the file output plugins by 'embulk-output file' keywords.]
51
+ %[Encodes files using #{display_name} for other file output plugins.]
52
52
  when :filter
53
- %[that converts records read by an input plugin before passing it to an output plugins. Search the input and plugins by 'embulk-input' and 'embulk-output' plugins.]
53
+ %[#{display_name}]
54
54
  end
55
55
 
56
56
  pkg = Embulk::PackageData.new("new", project_name, binding())
@@ -40,7 +40,7 @@ Gem::Specification.new do |spec|
40
40
  spec.version = "${project.version}"
41
41
  spec.authors = [<%= author.dump %>]
42
42
  spec.summary = %[<%= display_name %> <%= display_category %> plugin for Embulk]
43
- spec.description = %[<%= display_name %> <%= display_category %> plugin is an Embulk plugin <%= description %>]
43
+ spec.description = %[<%= "#{description}".dump %>]
44
44
  spec.email = [<%= email.dump %>]
45
45
  spec.licenses = ["MIT"]
46
46
  # TODO: spec.homepage = <%= "https://github.com/#{email[/([^@]*)/]}/#{project_name}".dump %>
@@ -4,7 +4,7 @@ Gem::Specification.new do |spec|
4
4
  spec.version = "0.1.0"
5
5
  spec.authors = [<%= author.dump %>]
6
6
  spec.summary = <%= "#{display_name} #{display_category} plugin for Embulk".dump %>
7
- spec.description = <%= "#{display_name} #{display_category} plugin is an Embulk plugin #{description}".dump %>
7
+ spec.description = <%= "#{description}".dump %>
8
8
  spec.email = [<%= email.dump %>]
9
9
  spec.licenses = ["MIT"]
10
10
  # TODO: spec.homepage = "https://github.com/<%= email[/([^@]*)/] %>/<%= project_name %>"
@@ -9,6 +9,7 @@ module Embulk::Java
9
9
 
10
10
  java_import 'org.embulk.config.DataSourceImpl'
11
11
  java_import 'org.embulk.spi.time.Timestamp'
12
+ java_import 'org.embulk.spi.time.TimestampParseException'
12
13
  java_import 'org.embulk.spi.GuessPlugin'
13
14
  java_import 'org.embulk.spi.OutputPlugin'
14
15
  java_import 'org.embulk.spi.FilterPlugin'
@@ -30,7 +30,9 @@ module Embulk
30
30
  end
31
31
 
32
32
  if seconds = hash[:seconds]
33
- return seconds * 1_000_000
33
+ sec_fraction = hash[:sec_fraction] # Rational
34
+ usec = sec_fraction * 1_000_000 if sec_fraction
35
+ return seconds * 1_000_000 + usec.to_i
34
36
 
35
37
  else
36
38
  year = hash[:year]
@@ -40,8 +42,8 @@ module Embulk
40
42
  min = hash[:min]
41
43
  sec = hash[:sec]
42
44
  sec_fraction = hash[:sec_fraction]
45
+ usec = sec_fraction * 1_000_000 if sec_fraction
43
46
  zone = hash[:zone]
44
- usec = hash[:sec_fraction] ? hash[:sec_fraction] * 1000000 : nil
45
47
 
46
48
  now = @default_time
47
49
  begin
@@ -1,3 +1,3 @@
1
1
  module Embulk
2
- VERSION = '0.4.8'
2
+ VERSION = '0.4.9'
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.4.8
4
+ version: 0.4.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sadayuki Furuhashi
@@ -245,6 +245,8 @@ files:
245
245
  - embulk-docs/Makefile
246
246
  - embulk-docs/build.gradle
247
247
  - embulk-docs/make.bat
248
+ - embulk-docs/plugins/index.html.erb
249
+ - embulk-docs/plugins/plugins.css
248
250
  - embulk-docs/push-gh-pages.sh
249
251
  - embulk-docs/src/conf.py
250
252
  - embulk-docs/src/index.rst
@@ -266,6 +268,7 @@ files:
266
268
  - embulk-docs/src/release/release-0.4.6.rst
267
269
  - embulk-docs/src/release/release-0.4.7.rst
268
270
  - embulk-docs/src/release/release-0.4.8.rst
271
+ - embulk-docs/src/release/release-0.4.9.rst
269
272
  - embulk-standards/build.gradle
270
273
  - embulk-standards/src/main/java/org/embulk/standards/CsvFormatterPlugin.java
271
274
  - embulk-standards/src/main/java/org/embulk/standards/CsvParserPlugin.java
@@ -366,8 +369,8 @@ files:
366
369
  - classpath/bval-jsr303-0.5.jar
367
370
  - classpath/commons-beanutils-core-1.8.3.jar
368
371
  - classpath/commons-lang3-3.1.jar
369
- - classpath/embulk-core-0.4.8.jar
370
- - classpath/embulk-standards-0.4.8.jar
372
+ - classpath/embulk-core-0.4.9.jar
373
+ - classpath/embulk-standards-0.4.9.jar
371
374
  - classpath/guava-18.0.jar
372
375
  - classpath/guice-3.0.jar
373
376
  - classpath/guice-multibindings-3.0.jar