embulk 0.4.9 → 0.4.10

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: 1d98c0a02ab92bbf1946711baf3d7ed6e595a370
4
- data.tar.gz: 42feb91bb67cf47d56bcbcecbb0ab3503c60f8b4
3
+ metadata.gz: 1aea38d2d64e785a477bb3b7aa81a0801b78bbf9
4
+ data.tar.gz: b1c68158658a6c8274cb4375be5c03e6c58410e1
5
5
  SHA512:
6
- metadata.gz: 6c51c434afe98f3a6f1ee85e03fed5224238892830308c406eb67be38c1ec4f5a22fe103bde6cc89cfee44875281d2887c3624bcc5fda0c1ddb5aa388cf972e0
7
- data.tar.gz: 88d1f71adf38f007dc876d5bc55672e1ae69b3c8895aec589dcc77a98801bab4b55fb849979635955c628c4300da343de2f2e60a11aa1d9054dac8011cdac705
6
+ metadata.gz: 38bed0a199023c3989997a48a466c70e8e6a778714951c0cbef215dbb351c4a6eced66722f41ed7dfb8984976f2d2c44352a955c7146d871de0c1c8e9e8d47d3
7
+ data.tar.gz: 68fa1091e21c306cc7ed12e87f68e387e3a98e4319b5806b2eaf09eb4991fe1a0bc09fd86490155a8be0fab2000c37c6781fdfcfd0c6072eac61913f79e09f82
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.9.jar
31
+ curl --create-dirs -o ~/.embulk/bin/embulk -L https://bintray.com/artifact/download/embulk/maven/embulk-0.4.10.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.9.jar
42
+ curl -o embulk.bat -L https://bintray.com/artifact/download/embulk/maven/embulk-0.4.10.jar
43
43
  ```
44
44
 
45
45
  ### Trying examples
@@ -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.9'
15
+ version = '0.4.10'
16
16
 
17
17
  apply plugin: 'java'
18
18
  apply plugin: 'maven-publish'
@@ -156,7 +156,7 @@ class TaskSerDe
156
156
  } else {
157
157
  Object value = nestedObjectMapper.readValue(jp, new GenericTypeReference(field.getType()));
158
158
  if (value == null) {
159
- throw new JsonMappingException("Setting null to a @Config field is not allowed. Configuration object must be Optional<T> (com.google.common.base.Optional)");
159
+ throw new JsonMappingException("Setting null to a task field is not allowed. Use Optional<T> (com.google.common.base.Optional) to represent null.");
160
160
  }
161
161
  objects.put(field.getName(), value);
162
162
  unusedMappings.remove(key);
@@ -169,7 +169,7 @@ class TaskSerDe
169
169
  if (field.getDefaultJsonString().isPresent()) {
170
170
  Object value = nestedObjectMapper.readValue(field.getDefaultJsonString().get(), new GenericTypeReference(field.getType()));
171
171
  if (value == null) {
172
- throw new JsonMappingException("Setting null to a @Config field is not allowed. Configuration object must be Optional<T> (com.google.common.base.Optional)");
172
+ throw new JsonMappingException("Setting null to a task field is not allowed. Use Optional<T> (com.google.common.base.Optional) to represent null.");
173
173
  }
174
174
  objects.put(field.getName(), value);
175
175
  } else {
@@ -1,7 +1,9 @@
1
1
  package org.embulk.spi;
2
2
 
3
+ import java.nio.file.Path;
3
4
  import java.net.URL;
4
5
  import java.net.URLClassLoader;
6
+ import java.net.MalformedURLException;
5
7
  import java.util.List;
6
8
  import com.google.common.collect.ImmutableList;
7
9
  import org.jruby.Ruby;
@@ -9,14 +11,10 @@ import org.jruby.Ruby;
9
11
  public class PluginClassLoader
10
12
  extends URLClassLoader
11
13
  {
12
- private static final String[] PARENT_FIRST_PACKAGES = new String[] {
13
- "org.embulk.",
14
- "io.airlift.slice.",
15
- "com.fasterxml.jackson.",
16
- "com.google.inject.",
17
- "org.jruby.",
18
- "javax.inject.",
19
- "java.",
14
+ private static final String[] CHILD_FIRST_PACKAGES = new String[] {
15
+ "io.netty.",
16
+ "org.yaml.",
17
+ "com.ibm.icu.",
20
18
  };
21
19
 
22
20
  public PluginClassLoader(Ruby pluginJRubyRuntime, List<URL> urls)
@@ -29,6 +27,20 @@ public class PluginClassLoader
29
27
  super(urls.toArray(new URL[urls.size()]), parent);
30
28
  }
31
29
 
30
+ public void addPath(Path path)
31
+ {
32
+ try {
33
+ addUrl(path.toUri().toURL());
34
+ } catch (MalformedURLException ex) {
35
+ throw new IllegalArgumentException(ex);
36
+ }
37
+ }
38
+
39
+ public void addUrl(URL url)
40
+ {
41
+ super.addURL(url);
42
+ }
43
+
32
44
  @Override
33
45
  protected Class<?> loadClass(String name, boolean resolve)
34
46
  throws ClassNotFoundException
@@ -39,8 +51,8 @@ public class PluginClassLoader
39
51
  return resolveClass(loadedClass, resolve);
40
52
  }
41
53
 
42
- boolean parentFirst = isInParentFirstPackage(name);
43
- if (!parentFirst) {
54
+ boolean childFirst = isInChildFirstPackage(name);
55
+ if (childFirst) {
44
56
  try {
45
57
  return resolveClass(findClass(name), resolve);
46
58
  } catch (ClassNotFoundException ignored) {
@@ -52,7 +64,7 @@ public class PluginClassLoader
52
64
  } catch (ClassNotFoundException ignored) {
53
65
  }
54
66
 
55
- if (parentFirst) {
67
+ if (!childFirst) {
56
68
  return resolveClass(findClass(name), resolve);
57
69
  }
58
70
 
@@ -68,9 +80,9 @@ public class PluginClassLoader
68
80
  return clazz;
69
81
  }
70
82
 
71
- private boolean isInParentFirstPackage(String name)
83
+ private boolean isInChildFirstPackage(String name)
72
84
  {
73
- for (String pkg : PARENT_FIRST_PACKAGES) {
85
+ for (String pkg : CHILD_FIRST_PACKAGES) {
74
86
  if (name.startsWith(pkg)) {
75
87
  return true;
76
88
  }
@@ -12,7 +12,7 @@
12
12
  <body>
13
13
  <div class="header"><h1 class="heading"><a href="../docs/index.html">
14
14
  <span>Embulk plugins</span></a></h1>
15
- <h2 class="heading"><span>Embulk by category</span></h2>
15
+ <h2 class="heading"><span>Embulk plugins by category</span></h2>
16
16
  </div>
17
17
 
18
18
  <div class="content">
@@ -45,10 +45,11 @@
45
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
46
  </span>
47
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] %>
48
+ </td>
49
+ <td style="min-width:9em"><a href="<%=h gem[:url] %>"><%=h gem[:name] %></a><pre class="install">$ embulk gem install <%=h gem[:gem_name] %></pre></td>
50
+ <td style="min-width:13em"><%=h gem[:author] %>
50
51
  <% if gem[:avatar_url] %>
51
- <img src="<%=h gem[:avatar_url] %>" height=32 width=32></img></td>
52
+ <img src="<%=h gem[:avatar_url] %>" height=32 width=32></img>
52
53
  <% else %>
53
54
  </td>
54
55
  <% end %>
@@ -1,15 +1,22 @@
1
1
  body {
2
2
  max-width: 90em;
3
+ font-size: 105%;
3
4
  }
4
5
  .plugins {
5
6
  border-collapse: collapse
6
7
  }
7
8
  .plugins th, td {
8
- padding: 5px 20px;
9
+ padding: 8px 20px;
9
10
  border: 1px solid #eee;
10
11
  vertical-align: middle;
11
12
  }
12
- .author-avator {
13
+ .plugins pre.install {
14
+ font-size: 50%;
15
+ padding: 7px 0 2px 0;
16
+ margin: 0;
17
+ background: none;
18
+ border: none;
19
+ color: #999;
13
20
  }
14
21
 
15
22
  .github-btn-container {
@@ -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.9.jar -O /usr/local/bin/embulk
59
+ $ sudo wget https://bintray.com/artifact/download/embulk/maven/embulk-0.4.10.jar -O /usr/local/bin/embulk
60
60
  $ sudo chmod +x /usr/local/bin/embulk
61
61
 
62
62
  Step 2. Install Elasticsearch plugin
@@ -20,4 +20,5 @@ Release Notes
20
20
  release/release-0.4.7
21
21
  release/release-0.4.8
22
22
  release/release-0.4.9
23
+ release/release-0.4.10
23
24
 
@@ -0,0 +1,17 @@
1
+ Release 0.4.10
2
+ ==================================
3
+
4
+ Plugin API Changes
5
+ ------------------
6
+
7
+ * Classloader of Java-based plugins search classes from the embulk's classloader by default. This solves mismatches of the same class loaded by 2 classloaders.
8
+ * Added ``spi.PluginClassLoader.addPath(Path)`` method so that Java-based plugins can load jar files dynamically.
9
+
10
+ General Changes
11
+ ------------------
12
+
13
+ * Rakefile generated by plugin template generator has default task aliased to ``build`` task (@takei-yuya++)
14
+
15
+ Release Date
16
+ ------------------
17
+ 2015-02-26
@@ -45,7 +45,7 @@ module Embulk
45
45
  %[Dumps records to #{display_name}.]
46
46
  when :file_output
47
47
  %[Stores files on #{display_name}.]
48
- when :formtter
48
+ when :formatter
49
49
  %[Formats #{display_name} files for other file output plugins.]
50
50
  when :encoder
51
51
  %[Encodes files using #{display_name} for other file output plugins.]
@@ -43,7 +43,7 @@ Gem::Specification.new do |spec|
43
43
  spec.description = %[<%= "#{description}".dump %>]
44
44
  spec.email = [<%= email.dump %>]
45
45
  spec.licenses = ["MIT"]
46
- # TODO: spec.homepage = <%= "https://github.com/#{email[/([^@]*)/]}/#{project_name}".dump %>
46
+ # TODO set this: spec.homepage = <%= "https://github.com/#{email[/([^@]*)/]}/#{project_name}".dump %>
47
47
 
48
48
  spec.files = `git ls-files`.split("\n") + Dir["classpath/*.jar"]
49
49
  spec.test_files = spec.files.grep(%r"^(test|spec)/")
@@ -1 +1,3 @@
1
1
  require "bundler/gem_tasks"
2
+
3
+ task default: :build
@@ -7,7 +7,7 @@ Gem::Specification.new do |spec|
7
7
  spec.description = <%= "#{description}".dump %>
8
8
  spec.email = [<%= email.dump %>]
9
9
  spec.licenses = ["MIT"]
10
- # TODO: spec.homepage = "https://github.com/<%= email[/([^@]*)/] %>/<%= project_name %>"
10
+ # TODO set this: spec.homepage = "https://github.com/<%= email[/([^@]*)/] %>/<%= project_name %>"
11
11
 
12
12
  spec.files = `git ls-files`.split("\n") + Dir["classpath/*.jar"]
13
13
  spec.test_files = spec.files.grep(%r{^(test|spec)/})
@@ -1,3 +1,3 @@
1
1
  module Embulk
2
- VERSION = '0.4.9'
2
+ VERSION = '0.4.10'
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.4.9
4
+ version: 0.4.10
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-02-25 00:00:00.000000000 Z
11
+ date: 2015-02-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -261,6 +261,7 @@ files:
261
261
  - embulk-docs/src/release/release-0.3.2.rst
262
262
  - embulk-docs/src/release/release-0.4.0.rst
263
263
  - embulk-docs/src/release/release-0.4.1.rst
264
+ - embulk-docs/src/release/release-0.4.10.rst
264
265
  - embulk-docs/src/release/release-0.4.2.rst
265
266
  - embulk-docs/src/release/release-0.4.3.rst
266
267
  - embulk-docs/src/release/release-0.4.4.rst
@@ -369,8 +370,8 @@ files:
369
370
  - classpath/bval-jsr303-0.5.jar
370
371
  - classpath/commons-beanutils-core-1.8.3.jar
371
372
  - classpath/commons-lang3-3.1.jar
372
- - classpath/embulk-core-0.4.9.jar
373
- - classpath/embulk-standards-0.4.9.jar
373
+ - classpath/embulk-core-0.4.10.jar
374
+ - classpath/embulk-standards-0.4.10.jar
374
375
  - classpath/guava-18.0.jar
375
376
  - classpath/guice-3.0.jar
376
377
  - classpath/guice-multibindings-3.0.jar