embulk 0.8.27-java → 0.8.28-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 +4 -4
- data/.travis.yml +11 -1
- data/appveyor.yml +4 -4
- data/bin/embulk +33 -9
- data/build.gradle +17 -4
- data/embulk-cli/build.gradle +1 -0
- data/embulk-cli/src/main/bat/{selfrun.bat → selfrun.bat.template} +1 -2
- data/embulk-cli/src/main/java/org/embulk/cli/EmbulkArguments.java +54 -0
- data/embulk-cli/src/main/java/org/embulk/cli/EmbulkBundle.java +44 -0
- data/embulk-cli/src/main/java/org/embulk/cli/EmbulkCommandLine.java +256 -0
- data/embulk-cli/src/main/java/org/embulk/cli/EmbulkCommandLineException.java +25 -0
- data/embulk-cli/src/main/java/org/embulk/cli/EmbulkGlobalJRubyScriptingContainer.java +195 -0
- data/embulk-cli/src/main/java/org/embulk/cli/EmbulkMigrate.java +9 -5
- data/embulk-cli/src/main/java/org/embulk/cli/EmbulkRun.java +769 -0
- data/embulk-cli/src/main/java/org/embulk/cli/EmbulkSelfUpdate.java +1 -14
- data/embulk-cli/src/main/java/org/embulk/cli/EmbulkSubcommand.java +47 -0
- data/embulk-cli/src/main/java/org/embulk/cli/Main.java +12 -21
- data/embulk-cli/src/main/java/org/embulk/cli/parse/AbstractHelpLineDefinition.java +15 -0
- data/embulk-cli/src/main/java/org/embulk/cli/parse/CliHelpFormatterWithHelpMessages.java +141 -0
- data/embulk-cli/src/main/java/org/embulk/cli/parse/CliOptionsWithHelpMessages.java +45 -0
- data/embulk-cli/src/main/java/org/embulk/cli/parse/EmbulkCommandLineHelpRequired.java +10 -0
- data/embulk-cli/src/main/java/org/embulk/cli/parse/EmbulkCommandLineParseException.java +25 -0
- data/embulk-cli/src/main/java/org/embulk/cli/parse/EmbulkCommandLineParser.java +183 -0
- data/embulk-cli/src/main/java/org/embulk/cli/parse/HelpMessageAsCliOption.java +36 -0
- data/embulk-cli/src/main/java/org/embulk/cli/parse/HelpMessageLineDefinition.java +20 -0
- data/embulk-cli/src/main/java/org/embulk/cli/parse/OptionBehavior.java +39 -0
- data/embulk-cli/src/main/java/org/embulk/cli/parse/OptionDefinition.java +120 -0
- data/embulk-cli/src/main/sh/{selfrun.sh → selfrun.sh.template} +1 -1
- data/embulk-cli/src/test/java/org/embulk/cli/SelfrunTest.java +7 -3
- data/embulk-core/src/main/java/org/embulk/EmbulkRunner.java +526 -0
- data/embulk-core/src/main/java/org/embulk/EmbulkSetup.java +70 -0
- data/embulk-core/src/main/java/org/embulk/plugin/PluginClassLoader.java +3 -3
- data/embulk-docs/src/release.rst +1 -0
- data/embulk-docs/src/release/release-0.8.28.rst +14 -0
- data/lib/embulk.rb +21 -17
- data/lib/embulk/runner.rb +35 -166
- data/lib/embulk/version.rb +1 -1
- metadata +29 -11
- data/lib/embulk/command/embulk_bundle.rb +0 -47
- data/lib/embulk/command/embulk_main.rb +0 -2
- data/lib/embulk/command/embulk_run.rb +0 -418
@@ -0,0 +1,70 @@
|
|
1
|
+
package org.embulk;
|
2
|
+
|
3
|
+
import com.fasterxml.jackson.core.JsonProcessingException;
|
4
|
+
import com.fasterxml.jackson.databind.ObjectMapper;
|
5
|
+
import java.util.HashMap;
|
6
|
+
import java.util.Map;
|
7
|
+
import org.embulk.config.ConfigSource;
|
8
|
+
import org.jruby.embed.LocalContextScope;
|
9
|
+
import org.jruby.embed.LocalVariableBehavior;
|
10
|
+
import org.jruby.embed.ScriptingContainer;
|
11
|
+
|
12
|
+
/**
|
13
|
+
* EmbulkSetup initiates an EmbulkRunner instance. It was originally implemented with Ruby in lib/embulk.rb.
|
14
|
+
*
|
15
|
+
* NOTE: Developers should not depend on this EmbulkSetup class. This class is created tentatively, and may be
|
16
|
+
* re-implemented again in a different style.
|
17
|
+
*/
|
18
|
+
public class EmbulkSetup
|
19
|
+
{
|
20
|
+
@Deprecated
|
21
|
+
public static EmbulkRunner setupWithNewScriptingContainer(final Map<String, Object> systemConfigGiven)
|
22
|
+
{
|
23
|
+
// The JRuby instance is a global singleton so that the settings here affects later execution.
|
24
|
+
// The local variable should be persistent so that local variables are set through ScriptingContainer.put.
|
25
|
+
final ScriptingContainer globalJRubyContainer =
|
26
|
+
new ScriptingContainer(LocalContextScope.SINGLETON, LocalVariableBehavior.PERSISTENT);
|
27
|
+
return setup(systemConfigGiven, globalJRubyContainer);
|
28
|
+
}
|
29
|
+
|
30
|
+
public static EmbulkRunner setup(
|
31
|
+
final Map<String, Object> systemConfigGiven,
|
32
|
+
final ScriptingContainer globalJRubyContainer)
|
33
|
+
{
|
34
|
+
// NOTE: When it was in Ruby "require 'json'" was required to format the system config into a JSON string.
|
35
|
+
|
36
|
+
// NOTE: require_classpath is called only when Embulk is loaded as a Ruby gem. (lib/embulk.rb)
|
37
|
+
|
38
|
+
final HashMap<String, Object> systemConfigModified = new HashMap<String, Object>(systemConfigGiven);
|
39
|
+
|
40
|
+
// use the global ruby runtime for all ScriptingContainer
|
41
|
+
// injected by org.embulk.jruby.JRubyScriptingModule
|
42
|
+
systemConfigModified.put("use_global_ruby_runtime", true);
|
43
|
+
|
44
|
+
// Calling ObjectMapper simply just as a formatter here so that it does not depend much on Jackson.
|
45
|
+
// Do not leak the Jackson object outside.
|
46
|
+
final ObjectMapper jacksonObjectMapper = new ObjectMapper();
|
47
|
+
final String systemConfigJson;
|
48
|
+
try {
|
49
|
+
systemConfigJson = jacksonObjectMapper.writeValueAsString(systemConfigModified);
|
50
|
+
}
|
51
|
+
catch (JsonProcessingException ex) {
|
52
|
+
throw new RuntimeException(ex);
|
53
|
+
}
|
54
|
+
|
55
|
+
final EmbulkEmbed.Bootstrap bootstrap = new org.embulk.EmbulkEmbed.Bootstrap();
|
56
|
+
final ConfigSource systemConfig = bootstrap.getSystemConfigLoader().fromJsonString(systemConfigJson);
|
57
|
+
bootstrap.setSystemConfig(systemConfig);
|
58
|
+
final EmbulkEmbed embed = bootstrap.initialize(); // see embulk-core/src/main/java/org/embulk/jruby/JRubyScriptingModule.
|
59
|
+
|
60
|
+
// see also embulk/java/bootstrap.rb loaded by JRubyScriptingModule
|
61
|
+
globalJRubyContainer.runScriptlet("module Embulk; end");
|
62
|
+
globalJRubyContainer.put("__internal_embulk_setup_embed__", embed);
|
63
|
+
globalJRubyContainer.put("__internal_embulk_setup_global_jruby_container__", globalJRubyContainer);
|
64
|
+
globalJRubyContainer.runScriptlet("Embulk.const_set :Runner, Embulk::EmbulkRunner.new(__internal_embulk_setup_embed__)");
|
65
|
+
globalJRubyContainer.remove("__internal_embulk_setup_global_jruby_container__");
|
66
|
+
globalJRubyContainer.remove("__internal_embulk_setup_embed__");
|
67
|
+
|
68
|
+
return new EmbulkRunner(embed, globalJRubyContainer);
|
69
|
+
}
|
70
|
+
}
|
@@ -49,7 +49,7 @@ public class PluginClassLoader
|
|
49
49
|
*
|
50
50
|
* Some plugins (embulk-input-jdbc, for example) are calling this method to load external JAR files.
|
51
51
|
*
|
52
|
-
* @see https://github.com/embulk/embulk-input-jdbc/blob/ebfff0b249d507fc730c87e08b56e6aa492060ca/embulk-input-jdbc/src/main/java/org/embulk/input/jdbc/AbstractJdbcInputPlugin.java#L586-L595
|
52
|
+
* @see <a href="https://github.com/embulk/embulk-input-jdbc/blob/ebfff0b249d507fc730c87e08b56e6aa492060ca/embulk-input-jdbc/src/main/java/org/embulk/input/jdbc/AbstractJdbcInputPlugin.java#L586-L595">embulk-input-jdbc</a>
|
53
53
|
*/
|
54
54
|
public void addPath(Path path)
|
55
55
|
{
|
@@ -84,8 +84,8 @@ public class PluginClassLoader
|
|
84
84
|
*
|
85
85
|
* If the specified class is "NOT parent-first", the 2nd and 3rd actions are swapped.
|
86
86
|
*
|
87
|
-
* @see https://docs.oracle.com/javase/7/docs/api/java/lang/ClassLoader.html#loadClass(java.lang.String,%20boolean)
|
88
|
-
* @see http://hg.openjdk.java.net/jdk7u/jdk7u/jdk/file/jdk7u141-b02/src/share/classes/java/lang/ClassLoader.java
|
87
|
+
* @see <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/ClassLoader.html#loadClass(java.lang.String,%20boolean)">Oracle Java7's ClassLoader#loadClass</a>
|
88
|
+
* @see <a href="http://hg.openjdk.java.net/jdk7u/jdk7u/jdk/file/jdk7u141-b02/src/share/classes/java/lang/ClassLoader.java">OpenJDK7's ClassLoader</a>
|
89
89
|
*/
|
90
90
|
@Override
|
91
91
|
protected Class<?> loadClass(String name, boolean resolve)
|
data/embulk-docs/src/release.rst
CHANGED
@@ -0,0 +1,14 @@
|
|
1
|
+
Release 0.8.28
|
2
|
+
==================================
|
3
|
+
|
4
|
+
General Changes
|
5
|
+
------------------
|
6
|
+
|
7
|
+
* Make selfrun scripts not to run JRuby to get ruby_version. [#721]
|
8
|
+
* Un-JRuby the bootstrap. [#706] [#708] [#543] [#725] [#726] [#727] [#729] [#731] [#741] [#742]
|
9
|
+
* Fix the "migrate" subcommand. [#732]
|
10
|
+
* Improve building. [#716] [#724] [#728]
|
11
|
+
|
12
|
+
Release Date
|
13
|
+
------------------
|
14
|
+
2017-07-27
|
data/lib/embulk.rb
CHANGED
@@ -17,7 +17,7 @@ module Embulk
|
|
17
17
|
end
|
18
18
|
end
|
19
19
|
|
20
|
-
def self.require_classpath
|
20
|
+
def self.require_classpath(already_warned=false)
|
21
21
|
if __FILE__.include?("!")
|
22
22
|
# single jar. __FILE__ should point path/to/embulk.jar!/embulk.rb
|
23
23
|
# which means that embulk.jar is already loaded in this JVM.
|
@@ -28,6 +28,16 @@ module Embulk
|
|
28
28
|
else
|
29
29
|
# gem package. __FILE__ should point path/to/embulk/lib/embulk.rb
|
30
30
|
# that requires here to load ../classpath/*.jar to start EmbulkEmbed.
|
31
|
+
|
32
|
+
unless already_warned
|
33
|
+
STDERR.puts "################################################################################"
|
34
|
+
STDERR.puts "[WARN] Embulk's gem package is deprecated, and will be removed from v0.9."
|
35
|
+
STDERR.puts "[WARN] Use the jar version installed from http://dl.embulk.org/ instead."
|
36
|
+
STDERR.puts "[WARN] See the issue and comment at: https://github.com/embulk/embulk/issues/628"
|
37
|
+
STDERR.puts "################################################################################"
|
38
|
+
STDERR.puts ""
|
39
|
+
end
|
40
|
+
|
31
41
|
gem_root = File.expand_path('..', File.dirname(__FILE__))
|
32
42
|
classpath_dir = File.join(gem_root, "classpath")
|
33
43
|
jars = Dir.entries(classpath_dir).select{|f| f =~ /\.jar$/ }.sort
|
@@ -38,27 +48,21 @@ module Embulk
|
|
38
48
|
end
|
39
49
|
|
40
50
|
def self.setup(system_config={})
|
51
|
+
STDERR.puts "################################################################################"
|
52
|
+
STDERR.puts "[WARN] Embulk's gem package is deprecated, and will be removed from v0.9."
|
53
|
+
STDERR.puts "[WARN] Use the jar version installed from http://dl.embulk.org/ instead."
|
54
|
+
STDERR.puts "[WARN] See the issue and comment at: https://github.com/embulk/embulk/issues/628"
|
55
|
+
STDERR.puts "################################################################################"
|
56
|
+
STDERR.puts ""
|
57
|
+
|
41
58
|
unless RUBY_PLATFORM =~ /java/i
|
42
59
|
raise "Embulk.setup works only with JRuby."
|
43
60
|
end
|
44
61
|
|
45
|
-
require 'json'
|
46
|
-
|
47
|
-
require_classpath
|
48
|
-
|
49
|
-
systemConfigJson = system_config.merge({
|
50
|
-
# use the global ruby runtime for all ScriptingContainer
|
51
|
-
# injected by org.embulk.jruby.JRubyScriptingModule
|
52
|
-
use_global_ruby_runtime: true
|
53
|
-
}).to_json
|
54
|
-
|
55
|
-
bootstrap = org.embulk.EmbulkEmbed::Bootstrap.new
|
56
|
-
systemConfig = bootstrap.getSystemConfigLoader.fromJsonString(systemConfigJson)
|
57
|
-
bootstrap.setSystemConfig(systemConfig)
|
58
|
-
embed = bootstrap.java_method(:initialize).call # see embulk-core/src/main/java/org/embulk/jruby/JRubyScriptingModule.
|
62
|
+
# require 'json' -- was required to format the system config into a JSON string.
|
59
63
|
|
60
|
-
|
64
|
+
require_classpath(true)
|
61
65
|
|
62
|
-
|
66
|
+
Java::org.embulk.EmbulkSetup::setupWithNewScriptingContainer(Java::java.util.HashMap.new(system_config))
|
63
67
|
end
|
64
68
|
end
|
data/lib/embulk/runner.rb
CHANGED
@@ -4,195 +4,64 @@ module Embulk
|
|
4
4
|
# Runner = EmbulkRunner.new
|
5
5
|
|
6
6
|
class EmbulkRunner
|
7
|
-
def initialize(embed)
|
7
|
+
def initialize(embed, jruby_container=nil)
|
8
8
|
@embed = embed # org.embulk.EmbulkEmbed
|
9
|
+
if jruby_container
|
10
|
+
@jruby_container = jruby_container
|
11
|
+
else
|
12
|
+
# The ScriptingContainer instance below is the same JRuby instance with the one running this runner.rb itself
|
13
|
+
# as it's LocalContextScope.SINGLETON.
|
14
|
+
@jruby_container = Java::org.jruby.embed.ScriptingContainer.new(
|
15
|
+
Java::org.jruby.embed.LocalContextScope::SINGLETON, Java::org.jruby.embed.LocalVariableBehavior::PERSISTENT)
|
16
|
+
end
|
9
17
|
end
|
10
18
|
|
11
19
|
def guess(config, options={})
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
check_file_writable(output_path)
|
20
|
+
output_path =
|
21
|
+
(options[:next_config_output_path] ? Java::java.lang.String.new(options[:next_config_output_path]) : nil)
|
22
|
+
embulk_runner_java = Java::org.embulk.EmbulkRunner.new(@embed, @jruby_container)
|
16
23
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
if output_path
|
23
|
-
puts "Created '#{output_path}' file."
|
24
|
-
else
|
25
|
-
puts "Use -o PATH option to write the guessed config file to a file."
|
24
|
+
case config
|
25
|
+
when String
|
26
|
+
embulk_runner_java.guess(Java::java.lang.String.new(config), output_path)
|
27
|
+
when Hash, DataSource
|
28
|
+
embulk_runner_java.guess(DataSource.new(config).to_java, output_path)
|
26
29
|
end
|
27
30
|
|
28
31
|
nil
|
29
32
|
end
|
30
33
|
|
31
34
|
def preview(config, options={})
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
previewResult = @embed.preview(configSource)
|
35
|
+
format = (options[:format] ? Java::java.lang.String.new(options[:format]) : nil)
|
36
|
+
embulk_runner_java = Java::org.embulk.EmbulkRunner.new(@embed, @jruby_container)
|
36
37
|
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
org.embulk.command.VerticalPreviewPrinter.new(java.lang.System.out, modelManager, previewResult.getSchema)
|
44
|
-
else
|
45
|
-
raise ArgumentError, "Unknown preview output format '#{format}'. Supported formats: table, vertical"
|
46
|
-
end
|
47
|
-
|
48
|
-
printer.printAllPages(previewResult.getPages)
|
49
|
-
printer.finish
|
38
|
+
case config
|
39
|
+
when String
|
40
|
+
embulk_runner_java.preview(Java::java.lang.String.new(config), format)
|
41
|
+
when Hash, DataSource
|
42
|
+
embulk_runner_java.preview(DataSource.new(config).to_java, format)
|
43
|
+
end
|
50
44
|
|
51
45
|
nil
|
52
46
|
end
|
53
47
|
|
54
48
|
def run(config, options={})
|
55
|
-
|
56
|
-
|
57
|
-
output_path =
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
check_file_writable(resume_state_path)
|
63
|
-
|
64
|
-
if config_diff_path && File.size(config_diff_path) > 0
|
65
|
-
lastConfigDiff = read_config(config_diff_path, options)
|
66
|
-
configSource = configSource.merge(lastConfigDiff)
|
67
|
-
end
|
68
|
-
|
69
|
-
if resume_state_path
|
70
|
-
begin
|
71
|
-
resumeConfig = read_yaml_config_file(resume_state_path)
|
72
|
-
resumeConfig = nil if resumeConfig.isEmpty
|
73
|
-
rescue
|
74
|
-
# TODO log?
|
75
|
-
resumeConfig = nil
|
76
|
-
end
|
77
|
-
end
|
78
|
-
|
79
|
-
if resumeConfig
|
80
|
-
resumableResult = @embed.resumeState(configSource, resumeConfig).resume
|
81
|
-
elsif resume_state_path
|
82
|
-
resumableResult = @embed.runResumable(configSource)
|
83
|
-
else
|
84
|
-
executionResult = @embed.run(configSource)
|
85
|
-
end
|
86
|
-
|
87
|
-
unless executionResult
|
88
|
-
unless resumableResult.isSuccessful
|
89
|
-
if resumableResult.getTransactionStage.isBefore(org.embulk.exec.TransactionStage::RUN)
|
90
|
-
# retry without resume state file if no tasks started yet
|
91
|
-
# delete resume file
|
92
|
-
File.delete(resume_state_path) rescue nil if resume_state_path
|
93
|
-
else
|
94
|
-
Embulk.logger.info "Writing resume state to '#{resume_state_path}'"
|
95
|
-
write_config(resume_state_path, resumableResult.getResumeState)
|
96
|
-
Embulk.logger.info "Resume state is written. Run the transaction again with -r option to resume or use \"cleanup\" subcommand to delete intermediate data."
|
97
|
-
end
|
98
|
-
raise resumableResult.getCause
|
99
|
-
end
|
100
|
-
executionResult = resumableResult.getSuccessfulResult
|
101
|
-
end
|
49
|
+
config_diff_path =
|
50
|
+
(options[:next_config_diff_path] ? Java::java.lang.String.new(options[:next_config_diff_path]) : nil)
|
51
|
+
output_path = # deprecated
|
52
|
+
(options[:next_config_output_path] ? Java::java.lang.String.new(options[:next_config_output_path]) : nil)
|
53
|
+
resume_state_path =
|
54
|
+
(options[:resume_state_path] ? Java::java.lang.String.new(options[:resume_state_path]) : nil)
|
55
|
+
embulk_runner_java = Java::org.embulk.EmbulkRunner.new(@embed, @jruby_container)
|
102
56
|
|
103
|
-
# delete resume file
|
104
|
-
File.delete(resume_state_path) rescue nil if resume_state_path
|
105
|
-
|
106
|
-
configDiff = executionResult.getConfigDiff
|
107
|
-
Embulk.logger.info("Committed.")
|
108
|
-
Embulk.logger.info("Next config diff: #{configDiff.toString}")
|
109
|
-
|
110
|
-
write_config(config_diff_path, configDiff)
|
111
|
-
write_config(output_path, configSource.merge(configDiff)) # deprecated
|
112
|
-
end
|
113
|
-
|
114
|
-
#def resume_state(config, options={})
|
115
|
-
# configSource = read_config(config, options)
|
116
|
-
# Resumed.new(self, DataSource.from_java(configSource), options)
|
117
|
-
#end
|
118
|
-
|
119
|
-
private
|
120
|
-
|
121
|
-
def read_config(config, options={})
|
122
57
|
case config
|
123
58
|
when String
|
124
|
-
|
125
|
-
when /\.ya?ml\.liquid$/
|
126
|
-
require 'liquid'
|
127
|
-
template_params = options[:template_params] || {}
|
128
|
-
template_include_path = File.expand_path(options[:template_include_path] || File.dirname(config)) unless options[:template_include_path] == false
|
129
|
-
@embed.newConfigLoader.fromYamlString run_liquid(File.read(config), template_params, template_include_path)
|
130
|
-
when /\.ya?ml$/
|
131
|
-
@embed.newConfigLoader.fromYamlString File.read(config)
|
132
|
-
else
|
133
|
-
raise ConfigError.new("Unsupported file extension. Supported file extensions are .yml and .yml.liquid: #{config}")
|
134
|
-
end
|
135
|
-
|
59
|
+
embulk_runner_java.run(Java::java.lang.String.new(config), config_diff_path, output_path, resume_state_path)
|
136
60
|
when Hash, DataSource
|
137
|
-
DataSource.new(config).to_java
|
61
|
+
embulk_runner_java.run(DataSource.new(config).to_java, config_diff_path, output_path, resume_state_path)
|
138
62
|
end
|
139
|
-
end
|
140
|
-
|
141
|
-
def read_yaml_config_file(path)
|
142
|
-
@embed.newConfigLoader.fromYamlString File.read(config)
|
143
|
-
end
|
144
|
-
|
145
|
-
def run_liquid(source, params, template_include_path)
|
146
|
-
require 'liquid'
|
147
|
-
template = Liquid::Template.parse(source, :error_mode => :strict)
|
148
|
-
template.registers[:file_system] = Liquid::LocalFileSystem.new(template_include_path, "_%s.yml.liquid") if template_include_path
|
149
|
-
|
150
|
-
data = {
|
151
|
-
"env" => ENV.to_h,
|
152
|
-
}.merge(params)
|
153
63
|
|
154
|
-
|
155
|
-
end
|
156
|
-
|
157
|
-
def check_file_writable(path)
|
158
|
-
if path
|
159
|
-
# Open file with append mode and do nothing.
|
160
|
-
# If file is not writable, it throws an exception.
|
161
|
-
File.open(path, "ab")
|
162
|
-
end
|
163
|
-
end
|
164
|
-
|
165
|
-
def write_config(path, modelObject)
|
166
|
-
yaml = dump_yaml(modelObject)
|
167
|
-
if path
|
168
|
-
File.write(path, yaml)
|
169
|
-
end
|
170
|
-
yaml
|
171
|
-
end
|
172
|
-
|
173
|
-
def dump_yaml(modelObject)
|
174
|
-
modelManager = @embed.getModelManager
|
175
|
-
obj = modelManager.readObject(java.lang.Object.java_class, modelManager.writeObject(modelObject))
|
176
|
-
return org.yaml.snakeyaml.Yaml.new.dump(obj)
|
64
|
+
nil
|
177
65
|
end
|
178
|
-
|
179
|
-
#class Runnable
|
180
|
-
# def initialize(runner, config, options)
|
181
|
-
# @runner = runner
|
182
|
-
# @config = config
|
183
|
-
# @options = options
|
184
|
-
# end
|
185
|
-
#
|
186
|
-
# attr_reader :config
|
187
|
-
#
|
188
|
-
# def preview(options={})
|
189
|
-
# @runner.preview(@config, @options.merge(options))
|
190
|
-
# end
|
191
|
-
#
|
192
|
-
# def run(options={})
|
193
|
-
# @runner.run(@config, @options.merge(options))
|
194
|
-
# end
|
195
|
-
#end
|
196
66
|
end
|
197
|
-
|
198
67
|
end
|
data/lib/embulk/version.rb
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
module Embulk
|
4
4
|
@@warned = false
|
5
5
|
|
6
|
-
VERSION_INTERNAL = '0.8.
|
6
|
+
VERSION_INTERNAL = '0.8.28'
|
7
7
|
|
8
8
|
DEPRECATED_MESSAGE = 'Embulk::VERSION in (J)Ruby is deprecated. Use org.embulk.EmbulkVersion::VERSION instead. If this message is from a plugin, please tell this to the author of the plugin!'
|
9
9
|
def self.const_missing(name)
|
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.8.
|
4
|
+
version: 0.8.28
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Sadayuki Furuhashi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-07-
|
11
|
+
date: 2017-07-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -150,14 +150,15 @@ files:
|
|
150
150
|
- classpath/bval-core-0.5.jar
|
151
151
|
- classpath/bval-jsr303-0.5.jar
|
152
152
|
- classpath/commons-beanutils-core-1.8.3.jar
|
153
|
+
- classpath/commons-cli-1.3.1.jar
|
153
154
|
- classpath/commons-collections-3.2.1.jar
|
154
155
|
- classpath/commons-compress-1.10.jar
|
155
156
|
- classpath/commons-lang-2.4.jar
|
156
157
|
- classpath/commons-lang3-3.4.jar
|
157
|
-
- classpath/embulk-cli-0.8.
|
158
|
-
- classpath/embulk-core-0.8.
|
159
|
-
- classpath/embulk-jruby-strptime-0.8.
|
160
|
-
- classpath/embulk-standards-0.8.
|
158
|
+
- classpath/embulk-cli-0.8.28.jar
|
159
|
+
- classpath/embulk-core-0.8.28.jar
|
160
|
+
- classpath/embulk-jruby-strptime-0.8.28.jar
|
161
|
+
- classpath/embulk-standards-0.8.28.jar
|
161
162
|
- classpath/guava-18.0.jar
|
162
163
|
- classpath/guice-4.0.jar
|
163
164
|
- classpath/guice-bootstrap-0.1.1.jar
|
@@ -191,18 +192,37 @@ files:
|
|
191
192
|
- classpath/validation-api-1.1.0.Final.jar
|
192
193
|
- classpath/velocity-1.7.jar
|
193
194
|
- embulk-cli/build.gradle
|
194
|
-
- embulk-cli/src/main/bat/selfrun.bat
|
195
|
+
- embulk-cli/src/main/bat/selfrun.bat.template
|
196
|
+
- embulk-cli/src/main/java/org/embulk/cli/EmbulkArguments.java
|
197
|
+
- embulk-cli/src/main/java/org/embulk/cli/EmbulkBundle.java
|
198
|
+
- embulk-cli/src/main/java/org/embulk/cli/EmbulkCommandLine.java
|
199
|
+
- embulk-cli/src/main/java/org/embulk/cli/EmbulkCommandLineException.java
|
195
200
|
- embulk-cli/src/main/java/org/embulk/cli/EmbulkExample.java
|
201
|
+
- embulk-cli/src/main/java/org/embulk/cli/EmbulkGlobalJRubyScriptingContainer.java
|
196
202
|
- embulk-cli/src/main/java/org/embulk/cli/EmbulkMigrate.java
|
197
203
|
- embulk-cli/src/main/java/org/embulk/cli/EmbulkNew.java
|
204
|
+
- embulk-cli/src/main/java/org/embulk/cli/EmbulkRun.java
|
198
205
|
- embulk-cli/src/main/java/org/embulk/cli/EmbulkSelfUpdate.java
|
206
|
+
- embulk-cli/src/main/java/org/embulk/cli/EmbulkSubcommand.java
|
199
207
|
- embulk-cli/src/main/java/org/embulk/cli/Main.java
|
200
|
-
- embulk-cli/src/main/
|
208
|
+
- embulk-cli/src/main/java/org/embulk/cli/parse/AbstractHelpLineDefinition.java
|
209
|
+
- embulk-cli/src/main/java/org/embulk/cli/parse/CliHelpFormatterWithHelpMessages.java
|
210
|
+
- embulk-cli/src/main/java/org/embulk/cli/parse/CliOptionsWithHelpMessages.java
|
211
|
+
- embulk-cli/src/main/java/org/embulk/cli/parse/EmbulkCommandLineHelpRequired.java
|
212
|
+
- embulk-cli/src/main/java/org/embulk/cli/parse/EmbulkCommandLineParseException.java
|
213
|
+
- embulk-cli/src/main/java/org/embulk/cli/parse/EmbulkCommandLineParser.java
|
214
|
+
- embulk-cli/src/main/java/org/embulk/cli/parse/HelpMessageAsCliOption.java
|
215
|
+
- embulk-cli/src/main/java/org/embulk/cli/parse/HelpMessageLineDefinition.java
|
216
|
+
- embulk-cli/src/main/java/org/embulk/cli/parse/OptionBehavior.java
|
217
|
+
- embulk-cli/src/main/java/org/embulk/cli/parse/OptionDefinition.java
|
218
|
+
- embulk-cli/src/main/sh/selfrun.sh.template
|
201
219
|
- embulk-cli/src/test/java/org/embulk/cli/DummyMain.java
|
202
220
|
- embulk-cli/src/test/java/org/embulk/cli/SelfrunTest.java
|
203
221
|
- embulk-core/build.gradle
|
204
222
|
- embulk-core/src/main/java/org/embulk/EmbulkEmbed.java
|
223
|
+
- embulk-core/src/main/java/org/embulk/EmbulkRunner.java
|
205
224
|
- embulk-core/src/main/java/org/embulk/EmbulkService.java
|
225
|
+
- embulk-core/src/main/java/org/embulk/EmbulkSetup.java
|
206
226
|
- embulk-core/src/main/java/org/embulk/EmbulkVersion.java
|
207
227
|
- embulk-core/src/main/java/org/embulk/command/PreviewPrinter.java
|
208
228
|
- embulk-core/src/main/java/org/embulk/command/TablePreviewPrinter.java
|
@@ -537,6 +557,7 @@ files:
|
|
537
557
|
- embulk-docs/src/release/release-0.8.25.rst
|
538
558
|
- embulk-docs/src/release/release-0.8.26.rst
|
539
559
|
- embulk-docs/src/release/release-0.8.27.rst
|
560
|
+
- embulk-docs/src/release/release-0.8.28.rst
|
540
561
|
- embulk-docs/src/release/release-0.8.3.rst
|
541
562
|
- embulk-docs/src/release/release-0.8.4.rst
|
542
563
|
- embulk-docs/src/release/release-0.8.5.rst
|
@@ -688,9 +709,6 @@ files:
|
|
688
709
|
- lib/embulk.rb
|
689
710
|
- lib/embulk/buffer.rb
|
690
711
|
- lib/embulk/column.rb
|
691
|
-
- lib/embulk/command/embulk_bundle.rb
|
692
|
-
- lib/embulk/command/embulk_main.rb
|
693
|
-
- lib/embulk/command/embulk_run.rb
|
694
712
|
- lib/embulk/data/bundle/.bundle/config
|
695
713
|
- lib/embulk/data/bundle/.ruby-version
|
696
714
|
- lib/embulk/data/bundle/Gemfile
|