embulk 0.8.39-java → 0.10.24-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/Gemfile +1 -1
- data/LICENSE +202 -0
- data/embulk.gemspec +34 -33
- data/lib/embulk.rb +5 -61
- data/lib/embulk/buffer.rb +1 -2
- data/lib/embulk/guess/charset.rb +2 -11
- data/lib/embulk/java/bootstrap.rb +0 -1
- data/lib/embulk/java_plugin.rb +9 -1
- data/lib/embulk/page_builder.rb +2 -2
- data/lib/embulk/plugin.rb +2 -2
- data/lib/embulk/schema.rb +3 -4
- data/lib/embulk/version.rb +3 -22
- metadata +22 -757
- data/.gitignore +0 -15
- data/.ruby-version +0 -1
- data/.travis.yml +0 -28
- data/COPYING +0 -14
- data/Gemfile.lock +0 -30
- data/README.md +0 -229
- data/Rakefile +0 -26
- data/appveyor.yml +0 -28
- data/bin/embulk +0 -139
- data/build.gradle +0 -419
- data/embulk-cli/build.gradle +0 -9
- data/embulk-cli/src/main/bat/selfrun.bat +0 -107
- data/embulk-cli/src/main/java/org/embulk/cli/EmbulkArguments.java +0 -54
- data/embulk-cli/src/main/java/org/embulk/cli/EmbulkCommandLine.java +0 -227
- data/embulk-cli/src/main/java/org/embulk/cli/EmbulkCommandLineException.java +0 -25
- data/embulk-cli/src/main/java/org/embulk/cli/EmbulkExample.java +0 -86
- data/embulk-cli/src/main/java/org/embulk/cli/EmbulkMigrate.java +0 -480
- data/embulk-cli/src/main/java/org/embulk/cli/EmbulkNew.java +0 -419
- data/embulk-cli/src/main/java/org/embulk/cli/EmbulkRun.java +0 -786
- data/embulk-cli/src/main/java/org/embulk/cli/EmbulkSelfUpdate.java +0 -235
- data/embulk-cli/src/main/java/org/embulk/cli/EmbulkSubcommand.java +0 -47
- data/embulk-cli/src/main/java/org/embulk/cli/Main.java +0 -31
- data/embulk-cli/src/main/java/org/embulk/cli/parse/AbstractHelpLineDefinition.java +0 -15
- data/embulk-cli/src/main/java/org/embulk/cli/parse/CliHelpFormatterWithHelpMessages.java +0 -141
- data/embulk-cli/src/main/java/org/embulk/cli/parse/CliOptionsWithHelpMessages.java +0 -45
- data/embulk-cli/src/main/java/org/embulk/cli/parse/EmbulkCommandLineHelpRequired.java +0 -10
- data/embulk-cli/src/main/java/org/embulk/cli/parse/EmbulkCommandLineParseException.java +0 -25
- data/embulk-cli/src/main/java/org/embulk/cli/parse/EmbulkCommandLineParser.java +0 -187
- data/embulk-cli/src/main/java/org/embulk/cli/parse/HelpMessageAsCliOption.java +0 -36
- data/embulk-cli/src/main/java/org/embulk/cli/parse/HelpMessageLineDefinition.java +0 -20
- data/embulk-cli/src/main/java/org/embulk/cli/parse/OptionBehavior.java +0 -39
- data/embulk-cli/src/main/java/org/embulk/cli/parse/OptionDefinition.java +0 -120
- data/embulk-cli/src/main/sh/selfrun.sh +0 -60
- data/embulk-cli/src/test/java/org/embulk/cli/DummyMain.java +0 -23
- data/embulk-cli/src/test/java/org/embulk/cli/SelfrunTest.java +0 -296
- data/embulk-core/build.gradle +0 -83
- data/embulk-core/src/main/java/org/embulk/EmbulkEmbed.java +0 -321
- data/embulk-core/src/main/java/org/embulk/EmbulkRunner.java +0 -531
- data/embulk-core/src/main/java/org/embulk/EmbulkService.java +0 -78
- data/embulk-core/src/main/java/org/embulk/EmbulkSetup.java +0 -49
- data/embulk-core/src/main/java/org/embulk/EmbulkVersion.java +0 -109
- data/embulk-core/src/main/java/org/embulk/command/PreviewPrinter.java +0 -87
- data/embulk-core/src/main/java/org/embulk/command/TablePreviewPrinter.java +0 -107
- data/embulk-core/src/main/java/org/embulk/command/VerticalPreviewPrinter.java +0 -47
- data/embulk-core/src/main/java/org/embulk/config/CommitReport.java +0 -36
- data/embulk-core/src/main/java/org/embulk/config/Config.java +0 -15
- data/embulk-core/src/main/java/org/embulk/config/ConfigDefault.java +0 -15
- data/embulk-core/src/main/java/org/embulk/config/ConfigDiff.java +0 -32
- data/embulk-core/src/main/java/org/embulk/config/ConfigException.java +0 -26
- data/embulk-core/src/main/java/org/embulk/config/ConfigInject.java +0 -14
- data/embulk-core/src/main/java/org/embulk/config/ConfigLoader.java +0 -149
- data/embulk-core/src/main/java/org/embulk/config/ConfigSource.java +0 -34
- data/embulk-core/src/main/java/org/embulk/config/DataSource.java +0 -41
- data/embulk-core/src/main/java/org/embulk/config/DataSourceImpl.java +0 -243
- data/embulk-core/src/main/java/org/embulk/config/DataSourceSerDe.java +0 -84
- data/embulk-core/src/main/java/org/embulk/config/GenericTypeReference.java +0 -20
- data/embulk-core/src/main/java/org/embulk/config/ModelManager.java +0 -123
- data/embulk-core/src/main/java/org/embulk/config/Task.java +0 -10
- data/embulk-core/src/main/java/org/embulk/config/TaskInvocationHandler.java +0 -180
- data/embulk-core/src/main/java/org/embulk/config/TaskReport.java +0 -32
- data/embulk-core/src/main/java/org/embulk/config/TaskSerDe.java +0 -349
- data/embulk-core/src/main/java/org/embulk/config/TaskSource.java +0 -34
- data/embulk-core/src/main/java/org/embulk/config/TaskValidationException.java +0 -38
- data/embulk-core/src/main/java/org/embulk/config/TaskValidator.java +0 -24
- data/embulk-core/src/main/java/org/embulk/config/UserDataException.java +0 -4
- data/embulk-core/src/main/java/org/embulk/config/UserDataExceptions.java +0 -17
- data/embulk-core/src/main/java/org/embulk/config/YamlTagResolver.java +0 -53
- data/embulk-core/src/main/java/org/embulk/exec/BufferFileInputPlugin.java +0 -88
- data/embulk-core/src/main/java/org/embulk/exec/BulkLoader.java +0 -754
- data/embulk-core/src/main/java/org/embulk/exec/ConfigurableGuessInputPlugin.java +0 -9
- data/embulk-core/src/main/java/org/embulk/exec/ExecModule.java +0 -53
- data/embulk-core/src/main/java/org/embulk/exec/ExecutionInterruptedException.java +0 -10
- data/embulk-core/src/main/java/org/embulk/exec/ExecutionResult.java +0 -33
- data/embulk-core/src/main/java/org/embulk/exec/ExtensionServiceLoaderModule.java +0 -43
- data/embulk-core/src/main/java/org/embulk/exec/ForGuess.java +0 -16
- data/embulk-core/src/main/java/org/embulk/exec/ForSystemConfig.java +0 -16
- data/embulk-core/src/main/java/org/embulk/exec/GuessExecutor.java +0 -309
- data/embulk-core/src/main/java/org/embulk/exec/LocalExecutorPlugin.java +0 -563
- data/embulk-core/src/main/java/org/embulk/exec/LoggerProvider.java +0 -68
- data/embulk-core/src/main/java/org/embulk/exec/NoSampleException.java +0 -10
- data/embulk-core/src/main/java/org/embulk/exec/PartialExecutionException.java +0 -26
- data/embulk-core/src/main/java/org/embulk/exec/PooledBufferAllocator.java +0 -77
- data/embulk-core/src/main/java/org/embulk/exec/PreviewExecutor.java +0 -222
- data/embulk-core/src/main/java/org/embulk/exec/PreviewResult.java +0 -27
- data/embulk-core/src/main/java/org/embulk/exec/PreviewedNoticeError.java +0 -17
- data/embulk-core/src/main/java/org/embulk/exec/ResumeState.java +0 -100
- data/embulk-core/src/main/java/org/embulk/exec/SamplingParserPlugin.java +0 -215
- data/embulk-core/src/main/java/org/embulk/exec/SetCurrentThreadName.java +0 -22
- data/embulk-core/src/main/java/org/embulk/exec/SkipTransactionException.java +0 -23
- data/embulk-core/src/main/java/org/embulk/exec/SystemConfigModule.java +0 -24
- data/embulk-core/src/main/java/org/embulk/exec/TempFileAllocator.java +0 -35
- data/embulk-core/src/main/java/org/embulk/exec/TransactionStage.java +0 -27
- data/embulk-core/src/main/java/org/embulk/jruby/JRubyPluginSource.java +0 -76
- data/embulk-core/src/main/java/org/embulk/jruby/JRubyScriptingModule.java +0 -395
- data/embulk-core/src/main/java/org/embulk/plugin/BuiltinPluginSourceModule.java +0 -17
- data/embulk-core/src/main/java/org/embulk/plugin/DefaultPluginType.java +0 -50
- data/embulk-core/src/main/java/org/embulk/plugin/InjectedPluginSource.java +0 -100
- data/embulk-core/src/main/java/org/embulk/plugin/MavenPluginType.java +0 -112
- data/embulk-core/src/main/java/org/embulk/plugin/PluginClassLoader.java +0 -993
- data/embulk-core/src/main/java/org/embulk/plugin/PluginClassLoaderFactory.java +0 -16
- data/embulk-core/src/main/java/org/embulk/plugin/PluginClassLoaderModule.java +0 -102
- data/embulk-core/src/main/java/org/embulk/plugin/PluginManager.java +0 -78
- data/embulk-core/src/main/java/org/embulk/plugin/PluginSource.java +0 -49
- data/embulk-core/src/main/java/org/embulk/plugin/PluginSourceNotMatchException.java +0 -25
- data/embulk-core/src/main/java/org/embulk/plugin/PluginType.java +0 -122
- data/embulk-core/src/main/java/org/embulk/plugin/compat/InputPluginWrapper.java +0 -102
- data/embulk-core/src/main/java/org/embulk/plugin/compat/PluginWrappers.java +0 -30
- data/embulk-core/src/main/java/org/embulk/plugin/compat/TransactionalFileInputWrapper.java +0 -96
- data/embulk-core/src/main/java/org/embulk/plugin/compat/TransactionalFileOutputWrapper.java +0 -102
- data/embulk-core/src/main/java/org/embulk/plugin/compat/TransactionalPageOutputWrapper.java +0 -95
- data/embulk-core/src/main/java/org/embulk/plugin/jar/InvalidJarPluginException.java +0 -14
- data/embulk-core/src/main/java/org/embulk/plugin/jar/JarPluginLoader.java +0 -232
- data/embulk-core/src/main/java/org/embulk/plugin/maven/MavenArtifactFinder.java +0 -134
- data/embulk-core/src/main/java/org/embulk/plugin/maven/MavenArtifactNotFoundException.java +0 -20
- data/embulk-core/src/main/java/org/embulk/plugin/maven/MavenPluginSource.java +0 -187
- data/embulk-core/src/main/java/org/embulk/plugin/maven/MavenPluginSourceModule.java +0 -22
- data/embulk-core/src/main/java/org/embulk/plugin/maven/MavenRepositoryNotFoundException.java +0 -31
- data/embulk-core/src/main/java/org/embulk/spi/AbortTransactionResource.java +0 -36
- data/embulk-core/src/main/java/org/embulk/spi/Buffer.java +0 -148
- data/embulk-core/src/main/java/org/embulk/spi/BufferAllocator.java +0 -8
- data/embulk-core/src/main/java/org/embulk/spi/CloseResource.java +0 -42
- data/embulk-core/src/main/java/org/embulk/spi/Column.java +0 -95
- data/embulk-core/src/main/java/org/embulk/spi/ColumnConfig.java +0 -112
- data/embulk-core/src/main/java/org/embulk/spi/ColumnVisitor.java +0 -16
- data/embulk-core/src/main/java/org/embulk/spi/DataException.java +0 -23
- data/embulk-core/src/main/java/org/embulk/spi/DecoderPlugin.java +0 -16
- data/embulk-core/src/main/java/org/embulk/spi/EncoderPlugin.java +0 -16
- data/embulk-core/src/main/java/org/embulk/spi/Exec.java +0 -113
- data/embulk-core/src/main/java/org/embulk/spi/ExecAction.java +0 -6
- data/embulk-core/src/main/java/org/embulk/spi/ExecSession.java +0 -220
- data/embulk-core/src/main/java/org/embulk/spi/ExecutorPlugin.java +0 -19
- data/embulk-core/src/main/java/org/embulk/spi/Extension.java +0 -44
- data/embulk-core/src/main/java/org/embulk/spi/FileInput.java +0 -11
- data/embulk-core/src/main/java/org/embulk/spi/FileInputPlugin.java +0 -30
- data/embulk-core/src/main/java/org/embulk/spi/FileInputRunner.java +0 -169
- data/embulk-core/src/main/java/org/embulk/spi/FileOutput.java +0 -13
- data/embulk-core/src/main/java/org/embulk/spi/FileOutputPlugin.java +0 -28
- data/embulk-core/src/main/java/org/embulk/spi/FileOutputRunner.java +0 -199
- data/embulk-core/src/main/java/org/embulk/spi/FilterPlugin.java +0 -18
- data/embulk-core/src/main/java/org/embulk/spi/FormatterPlugin.java +0 -18
- data/embulk-core/src/main/java/org/embulk/spi/GuessPlugin.java +0 -9
- data/embulk-core/src/main/java/org/embulk/spi/InputPlugin.java +0 -33
- data/embulk-core/src/main/java/org/embulk/spi/OutputPlugin.java +0 -29
- data/embulk-core/src/main/java/org/embulk/spi/Page.java +0 -86
- data/embulk-core/src/main/java/org/embulk/spi/PageBuilder.java +0 -696
- data/embulk-core/src/main/java/org/embulk/spi/PageFormat.java +0 -47
- data/embulk-core/src/main/java/org/embulk/spi/PageOutput.java +0 -11
- data/embulk-core/src/main/java/org/embulk/spi/PageReader.java +0 -248
- data/embulk-core/src/main/java/org/embulk/spi/ParserPlugin.java +0 -17
- data/embulk-core/src/main/java/org/embulk/spi/ProcessState.java +0 -10
- data/embulk-core/src/main/java/org/embulk/spi/ProcessTask.java +0 -117
- data/embulk-core/src/main/java/org/embulk/spi/Schema.java +0 -139
- data/embulk-core/src/main/java/org/embulk/spi/SchemaConfig.java +0 -93
- data/embulk-core/src/main/java/org/embulk/spi/SchemaConfigException.java +0 -22
- data/embulk-core/src/main/java/org/embulk/spi/TaskState.java +0 -81
- data/embulk-core/src/main/java/org/embulk/spi/TempFileException.java +0 -19
- data/embulk-core/src/main/java/org/embulk/spi/TempFileSpace.java +0 -88
- data/embulk-core/src/main/java/org/embulk/spi/Transactional.java +0 -10
- data/embulk-core/src/main/java/org/embulk/spi/TransactionalFileInput.java +0 -17
- data/embulk-core/src/main/java/org/embulk/spi/TransactionalFileOutput.java +0 -19
- data/embulk-core/src/main/java/org/embulk/spi/TransactionalPageOutput.java +0 -17
- data/embulk-core/src/main/java/org/embulk/spi/json/JsonParseException.java +0 -17
- data/embulk-core/src/main/java/org/embulk/spi/json/JsonParser.java +0 -233
- data/embulk-core/src/main/java/org/embulk/spi/json/RubyValueApi.java +0 -100
- data/embulk-core/src/main/java/org/embulk/spi/time/DateTimeZoneSerDe.java +0 -55
- data/embulk-core/src/main/java/org/embulk/spi/time/Timestamp.java +0 -180
- data/embulk-core/src/main/java/org/embulk/spi/time/TimestampFormat.java +0 -158
- data/embulk-core/src/main/java/org/embulk/spi/time/TimestampFormatter.java +0 -125
- data/embulk-core/src/main/java/org/embulk/spi/time/TimestampParseException.java +0 -12
- data/embulk-core/src/main/java/org/embulk/spi/time/TimestampParser.java +0 -310
- data/embulk-core/src/main/java/org/embulk/spi/time/TimestampSerDe.java +0 -49
- data/embulk-core/src/main/java/org/embulk/spi/type/AbstractType.java +0 -58
- data/embulk-core/src/main/java/org/embulk/spi/type/BooleanType.java +0 -12
- data/embulk-core/src/main/java/org/embulk/spi/type/DoubleType.java +0 -12
- data/embulk-core/src/main/java/org/embulk/spi/type/JsonType.java +0 -14
- data/embulk-core/src/main/java/org/embulk/spi/type/LongType.java +0 -12
- data/embulk-core/src/main/java/org/embulk/spi/type/StringType.java +0 -12
- data/embulk-core/src/main/java/org/embulk/spi/type/TimestampType.java +0 -41
- data/embulk-core/src/main/java/org/embulk/spi/type/Type.java +0 -15
- data/embulk-core/src/main/java/org/embulk/spi/type/TypeDeserializer.java +0 -45
- data/embulk-core/src/main/java/org/embulk/spi/type/Types.java +0 -16
- data/embulk-core/src/main/java/org/embulk/spi/unit/ByteSize.java +0 -156
- data/embulk-core/src/main/java/org/embulk/spi/unit/LocalFile.java +0 -106
- data/embulk-core/src/main/java/org/embulk/spi/unit/LocalFileSerDe.java +0 -113
- data/embulk-core/src/main/java/org/embulk/spi/unit/ToString.java +0 -54
- data/embulk-core/src/main/java/org/embulk/spi/unit/ToStringMap.java +0 -34
- data/embulk-core/src/main/java/org/embulk/spi/util/CharsetSerDe.java +0 -55
- data/embulk-core/src/main/java/org/embulk/spi/util/Decoders.java +0 -81
- data/embulk-core/src/main/java/org/embulk/spi/util/DynamicColumnNotFoundException.java +0 -10
- data/embulk-core/src/main/java/org/embulk/spi/util/DynamicColumnSetter.java +0 -21
- data/embulk-core/src/main/java/org/embulk/spi/util/DynamicColumnSetterFactory.java +0 -134
- data/embulk-core/src/main/java/org/embulk/spi/util/DynamicPageBuilder.java +0 -200
- data/embulk-core/src/main/java/org/embulk/spi/util/Encoders.java +0 -81
- data/embulk-core/src/main/java/org/embulk/spi/util/Executors.java +0 -93
- data/embulk-core/src/main/java/org/embulk/spi/util/FileInputInputStream.java +0 -111
- data/embulk-core/src/main/java/org/embulk/spi/util/FileOutputOutputStream.java +0 -119
- data/embulk-core/src/main/java/org/embulk/spi/util/Filters.java +0 -100
- data/embulk-core/src/main/java/org/embulk/spi/util/InputStreamFileInput.java +0 -189
- data/embulk-core/src/main/java/org/embulk/spi/util/InputStreamTransactionalFileInput.java +0 -25
- data/embulk-core/src/main/java/org/embulk/spi/util/Inputs.java +0 -65
- data/embulk-core/src/main/java/org/embulk/spi/util/LineDecoder.java +0 -157
- data/embulk-core/src/main/java/org/embulk/spi/util/LineEncoder.java +0 -123
- data/embulk-core/src/main/java/org/embulk/spi/util/ListFileInput.java +0 -52
- data/embulk-core/src/main/java/org/embulk/spi/util/Newline.java +0 -38
- data/embulk-core/src/main/java/org/embulk/spi/util/OutputStreamFileOutput.java +0 -88
- data/embulk-core/src/main/java/org/embulk/spi/util/PagePrinter.java +0 -126
- data/embulk-core/src/main/java/org/embulk/spi/util/Pages.java +0 -149
- data/embulk-core/src/main/java/org/embulk/spi/util/ResumableInputStream.java +0 -168
- data/embulk-core/src/main/java/org/embulk/spi/util/RetryExecutor.java +0 -130
- data/embulk-core/src/main/java/org/embulk/spi/util/Timestamps.java +0 -53
- data/embulk-core/src/main/java/org/embulk/spi/util/dynamic/AbstractDynamicColumnSetter.java +0 -94
- data/embulk-core/src/main/java/org/embulk/spi/util/dynamic/BooleanColumnSetter.java +0 -71
- data/embulk-core/src/main/java/org/embulk/spi/util/dynamic/DefaultValueSetter.java +0 -20
- data/embulk-core/src/main/java/org/embulk/spi/util/dynamic/DoubleColumnSetter.java +0 -68
- data/embulk-core/src/main/java/org/embulk/spi/util/dynamic/JsonColumnSetter.java +0 -64
- data/embulk-core/src/main/java/org/embulk/spi/util/dynamic/LongColumnSetter.java +0 -78
- data/embulk-core/src/main/java/org/embulk/spi/util/dynamic/NullDefaultValueSetter.java +0 -39
- data/embulk-core/src/main/java/org/embulk/spi/util/dynamic/SkipColumnSetter.java +0 -68
- data/embulk-core/src/main/java/org/embulk/spi/util/dynamic/StringColumnSetter.java +0 -63
- data/embulk-core/src/main/java/org/embulk/spi/util/dynamic/TimestampColumnSetter.java +0 -72
- data/embulk-core/src/main/resources/embulk/logback-color.xml +0 -72
- data/embulk-core/src/main/resources/embulk/logback-console.xml +0 -14
- data/embulk-core/src/main/resources/embulk/logback-file.xml +0 -23
- data/embulk-core/src/main/resources/embulk/parent_first_packages.properties +0 -73
- data/embulk-core/src/main/resources/embulk/parent_first_resources.properties +0 -29
- data/embulk-core/src/test/java/org/embulk/EmbulkTestRuntime.java +0 -122
- data/embulk-core/src/test/java/org/embulk/GuiceBinder.java +0 -72
- data/embulk-core/src/test/java/org/embulk/RandomManager.java +0 -53
- data/embulk-core/src/test/java/org/embulk/TestPluginSourceModule.java +0 -23
- data/embulk-core/src/test/java/org/embulk/TestUtilityModule.java +0 -17
- data/embulk-core/src/test/java/org/embulk/config/TestConfigLoader.java +0 -66
- data/embulk-core/src/test/java/org/embulk/config/TestConfigSource.java +0 -114
- data/embulk-core/src/test/java/org/embulk/config/TestTaskSource.java +0 -70
- data/embulk-core/src/test/java/org/embulk/plugin/MockPluginSource.java +0 -58
- data/embulk-core/src/test/java/org/embulk/plugin/TestPluginType.java +0 -83
- data/embulk-core/src/test/java/org/embulk/plugin/TestPluginTypeSerDe.java +0 -67
- data/embulk-core/src/test/java/org/embulk/plugin/jar/ExampleJarSpiV0.java +0 -9
- data/embulk-core/src/test/java/org/embulk/plugin/jar/JarBuilder.java +0 -101
- data/embulk-core/src/test/java/org/embulk/plugin/jar/TestJarPluginLoader.java +0 -60
- data/embulk-core/src/test/java/org/embulk/plugin/maven/TestMavenArtifactFinder.java +0 -41
- data/embulk-core/src/test/java/org/embulk/spi/MockFileOutput.java +0 -63
- data/embulk-core/src/test/java/org/embulk/spi/MockFormatterPlugin.java +0 -108
- data/embulk-core/src/test/java/org/embulk/spi/MockParserPlugin.java +0 -80
- data/embulk-core/src/test/java/org/embulk/spi/PageTestUtils.java +0 -59
- data/embulk-core/src/test/java/org/embulk/spi/TestBuffer.java +0 -24
- data/embulk-core/src/test/java/org/embulk/spi/TestFileInputInputStream.java +0 -89
- data/embulk-core/src/test/java/org/embulk/spi/TestFileInputRunner.java +0 -199
- data/embulk-core/src/test/java/org/embulk/spi/TestFileOutputRunner.java +0 -221
- data/embulk-core/src/test/java/org/embulk/spi/TestInputStreamFileInput.java +0 -188
- data/embulk-core/src/test/java/org/embulk/spi/TestPageBuilderReader.java +0 -411
- data/embulk-core/src/test/java/org/embulk/spi/json/TestJsonParser.java +0 -102
- data/embulk-core/src/test/java/org/embulk/spi/time/TestTimestamp.java +0 -116
- data/embulk-core/src/test/java/org/embulk/spi/time/TestTimestampFormatterParser.java +0 -75
- data/embulk-core/src/test/java/org/embulk/spi/time/TestTimestampFormatterParserDeprecated.java +0 -67
- data/embulk-core/src/test/java/org/embulk/spi/time/TestTimestampParser.java +0 -247
- data/embulk-core/src/test/java/org/embulk/spi/type/TestTypeSerDe.java +0 -45
- data/embulk-core/src/test/java/org/embulk/spi/unit/TestByteSize.java +0 -79
- data/embulk-core/src/test/java/org/embulk/spi/util/TestLineDecoder.java +0 -237
- data/embulk-core/src/test/java/org/embulk/spi/util/TestLineEncoder.java +0 -123
- data/embulk-core/src/test/resources/m2.test/.gitignore +0 -1
- data/embulk-core/src/test/resources/m2.test/org/embulk/example/embulk-example-maven-artifact/0.1.2/embulk-example-maven-artifact-0.1.2.jar +0 -0
- data/embulk-core/src/test/resources/m2.test/org/embulk/example/embulk-example-maven-artifact/0.1.2/embulk-example-maven-artifact-0.1.2.jar.sha1 +0 -1
- data/embulk-core/src/test/resources/m2.test/org/embulk/example/embulk-example-maven-artifact/0.1.2/embulk-example-maven-artifact-0.1.2.pom +0 -9
- data/embulk-core/src/test/resources/m2.test/org/embulk/example/embulk-example-maven-artifact/0.1.2/embulk-example-maven-artifact-0.1.2.pom.sha1 +0 -1
- data/embulk-docs/Makefile +0 -178
- data/embulk-docs/build.gradle +0 -41
- data/embulk-docs/make.bat +0 -243
- data/embulk-docs/push-gh-pages.sh +0 -49
- data/embulk-docs/src/_static/embulk-architecture.png +0 -0
- data/embulk-docs/src/_static/embulk-logo-v2/embulk-logo-v2-oneline-tr.png +0 -0
- data/embulk-docs/src/_static/embulk-logo-v2/embulk-logo-v2-oneline-wt.png +0 -0
- data/embulk-docs/src/_static/embulk-logo-v2/embulk-logo-v2-oneline.ai +0 -396
- data/embulk-docs/src/_static/embulk-logo-v2/embulk-logo-v2-sq-tr-small.png +0 -0
- data/embulk-docs/src/_static/embulk-logo-v2/embulk-logo-v2-sq-tr.png +0 -0
- data/embulk-docs/src/_static/embulk-logo-v2/embulk-logo-v2-sq-wt.png +0 -0
- data/embulk-docs/src/_static/embulk-logo-v2/embulk-logo-v2-sq.ai +0 -417
- data/embulk-docs/src/_static/embulk-logo-v2/embulk-logo-v2-sq.svg +0 -1
- data/embulk-docs/src/_static/embulk-logo-v2/embulk-logo-v2-symbol-tr.png +0 -0
- data/embulk-docs/src/_static/embulk-logo-v2/embulk-logo-v2-symbol-wt.png +0 -0
- data/embulk-docs/src/_static/embulk-logo-v2/embulk-logo-v2-symbol.ai +1 -394
- data/embulk-docs/src/_static/embulk-logo.svg +0 -133
- data/embulk-docs/src/built-in.rst +0 -1017
- data/embulk-docs/src/conf.py +0 -260
- data/embulk-docs/src/customization.rst +0 -184
- data/embulk-docs/src/developers/index.rst +0 -45
- data/embulk-docs/src/index.rst +0 -102
- data/embulk-docs/src/logo.rst +0 -27
- data/embulk-docs/src/recipe.rst +0 -8
- data/embulk-docs/src/recipe/scheduled-csv-load-to-elasticsearch-kibana5.rst +0 -163
- data/embulk-docs/src/release.rst +0 -109
- data/embulk-docs/src/release/release-0.1.0.rst +0 -8
- data/embulk-docs/src/release/release-0.2.0.rst +0 -16
- data/embulk-docs/src/release/release-0.2.1.rst +0 -19
- data/embulk-docs/src/release/release-0.3.0.rst +0 -34
- data/embulk-docs/src/release/release-0.3.1.rst +0 -11
- data/embulk-docs/src/release/release-0.3.2.rst +0 -15
- data/embulk-docs/src/release/release-0.4.0.rst +0 -74
- data/embulk-docs/src/release/release-0.4.1.rst +0 -18
- data/embulk-docs/src/release/release-0.4.10.rst +0 -17
- data/embulk-docs/src/release/release-0.4.2.rst +0 -18
- data/embulk-docs/src/release/release-0.4.3.rst +0 -34
- data/embulk-docs/src/release/release-0.4.4.rst +0 -39
- data/embulk-docs/src/release/release-0.4.5.rst +0 -24
- data/embulk-docs/src/release/release-0.4.6.rst +0 -30
- data/embulk-docs/src/release/release-0.4.7.rst +0 -16
- data/embulk-docs/src/release/release-0.4.8.rst +0 -15
- data/embulk-docs/src/release/release-0.4.9.rst +0 -23
- data/embulk-docs/src/release/release-0.5.0.rst +0 -89
- data/embulk-docs/src/release/release-0.5.1.rst +0 -13
- data/embulk-docs/src/release/release-0.5.2.rst +0 -30
- data/embulk-docs/src/release/release-0.5.3.rst +0 -22
- data/embulk-docs/src/release/release-0.5.4.rst +0 -24
- data/embulk-docs/src/release/release-0.5.5.rst +0 -18
- data/embulk-docs/src/release/release-0.6.0.rst +0 -34
- data/embulk-docs/src/release/release-0.6.1.rst +0 -11
- data/embulk-docs/src/release/release-0.6.10.rst +0 -15
- data/embulk-docs/src/release/release-0.6.11.rst +0 -19
- data/embulk-docs/src/release/release-0.6.12.rst +0 -31
- data/embulk-docs/src/release/release-0.6.13.rst +0 -23
- data/embulk-docs/src/release/release-0.6.14.rst +0 -47
- data/embulk-docs/src/release/release-0.6.15.rst +0 -26
- data/embulk-docs/src/release/release-0.6.16.rst +0 -26
- data/embulk-docs/src/release/release-0.6.17.rst +0 -39
- data/embulk-docs/src/release/release-0.6.18.rst +0 -14
- data/embulk-docs/src/release/release-0.6.19.rst +0 -18
- data/embulk-docs/src/release/release-0.6.2.rst +0 -17
- data/embulk-docs/src/release/release-0.6.20.rst +0 -19
- data/embulk-docs/src/release/release-0.6.21.rst +0 -20
- data/embulk-docs/src/release/release-0.6.22.rst +0 -26
- data/embulk-docs/src/release/release-0.6.23.rst +0 -17
- data/embulk-docs/src/release/release-0.6.24.rst +0 -13
- data/embulk-docs/src/release/release-0.6.25.rst +0 -12
- data/embulk-docs/src/release/release-0.6.26.rst +0 -17
- data/embulk-docs/src/release/release-0.6.27.rst +0 -11
- data/embulk-docs/src/release/release-0.6.3.rst +0 -23
- data/embulk-docs/src/release/release-0.6.4.rst +0 -13
- data/embulk-docs/src/release/release-0.6.5.rst +0 -17
- data/embulk-docs/src/release/release-0.6.6.rst +0 -17
- data/embulk-docs/src/release/release-0.6.7.rst +0 -17
- data/embulk-docs/src/release/release-0.6.8.rst +0 -24
- data/embulk-docs/src/release/release-0.6.9.rst +0 -24
- data/embulk-docs/src/release/release-0.7.0.rst +0 -96
- data/embulk-docs/src/release/release-0.7.1.rst +0 -22
- data/embulk-docs/src/release/release-0.7.10.rst +0 -13
- data/embulk-docs/src/release/release-0.7.11.rst +0 -12
- data/embulk-docs/src/release/release-0.7.2.rst +0 -25
- data/embulk-docs/src/release/release-0.7.3.rst +0 -21
- data/embulk-docs/src/release/release-0.7.4.rst +0 -14
- data/embulk-docs/src/release/release-0.7.5.rst +0 -22
- data/embulk-docs/src/release/release-0.7.6.rst +0 -18
- data/embulk-docs/src/release/release-0.7.7.rst +0 -13
- data/embulk-docs/src/release/release-0.7.8.rst +0 -14
- data/embulk-docs/src/release/release-0.7.9.rst +0 -14
- data/embulk-docs/src/release/release-0.8.0.rst +0 -74
- data/embulk-docs/src/release/release-0.8.1.rst +0 -18
- data/embulk-docs/src/release/release-0.8.10.rst +0 -35
- data/embulk-docs/src/release/release-0.8.11.rst +0 -12
- data/embulk-docs/src/release/release-0.8.12.rst +0 -12
- data/embulk-docs/src/release/release-0.8.13.rst +0 -12
- data/embulk-docs/src/release/release-0.8.14.rst +0 -31
- data/embulk-docs/src/release/release-0.8.15.rst +0 -17
- data/embulk-docs/src/release/release-0.8.16.rst +0 -43
- data/embulk-docs/src/release/release-0.8.17.rst +0 -11
- data/embulk-docs/src/release/release-0.8.18.rst +0 -27
- data/embulk-docs/src/release/release-0.8.19.rst +0 -43
- data/embulk-docs/src/release/release-0.8.2.rst +0 -19
- data/embulk-docs/src/release/release-0.8.20.rst +0 -11
- data/embulk-docs/src/release/release-0.8.21.rst +0 -17
- data/embulk-docs/src/release/release-0.8.22.rst +0 -15
- data/embulk-docs/src/release/release-0.8.23.rst +0 -14
- data/embulk-docs/src/release/release-0.8.24.rst +0 -15
- data/embulk-docs/src/release/release-0.8.25.rst +0 -14
- data/embulk-docs/src/release/release-0.8.26.rst +0 -16
- data/embulk-docs/src/release/release-0.8.27.rst +0 -15
- data/embulk-docs/src/release/release-0.8.28.rst +0 -14
- data/embulk-docs/src/release/release-0.8.29.rst +0 -14
- data/embulk-docs/src/release/release-0.8.3.rst +0 -15
- data/embulk-docs/src/release/release-0.8.30.rst +0 -14
- data/embulk-docs/src/release/release-0.8.31.rst +0 -12
- data/embulk-docs/src/release/release-0.8.32.rst +0 -14
- data/embulk-docs/src/release/release-0.8.33.rst +0 -13
- data/embulk-docs/src/release/release-0.8.34.rst +0 -12
- data/embulk-docs/src/release/release-0.8.35.rst +0 -12
- data/embulk-docs/src/release/release-0.8.36.rst +0 -32
- data/embulk-docs/src/release/release-0.8.37.rst +0 -20
- data/embulk-docs/src/release/release-0.8.38.rst +0 -12
- data/embulk-docs/src/release/release-0.8.39.rst +0 -12
- data/embulk-docs/src/release/release-0.8.4.rst +0 -18
- data/embulk-docs/src/release/release-0.8.5.rst +0 -11
- data/embulk-docs/src/release/release-0.8.6.rst +0 -14
- data/embulk-docs/src/release/release-0.8.7.rst +0 -18
- data/embulk-docs/src/release/release-0.8.8.rst +0 -18
- data/embulk-docs/src/release/release-0.8.9.rst +0 -14
- data/embulk-jruby-strptime/build.gradle +0 -3
- data/embulk-jruby-strptime/src/main/java/org/embulk/spi/time/RubyDateParser.java +0 -121
- data/embulk-jruby-strptime/src/main/java/org/embulk/spi/time/StrptimeFormat.java +0 -53
- data/embulk-jruby-strptime/src/main/java/org/embulk/spi/time/StrptimeParser.java +0 -884
- data/embulk-jruby-strptime/src/main/java/org/embulk/spi/time/StrptimeToken.java +0 -111
- data/embulk-jruby-strptime/src/main/java/org/embulk/spi/time/TimeZoneConverter.java +0 -466
- data/embulk-jruby-strptime/src/main/java/org/embulk/spi/time/lexer/StrptimeLexer.flex +0 -62
- data/embulk-jruby-strptime/src/main/java/org/embulk/spi/time/lexer/StrptimeLexer.java +0 -577
- data/embulk-standards/build.gradle +0 -7
- data/embulk-standards/src/main/java/org/embulk/standards/Bzip2FileDecoderPlugin.java +0 -55
- data/embulk-standards/src/main/java/org/embulk/standards/Bzip2FileEncoderPlugin.java +0 -67
- data/embulk-standards/src/main/java/org/embulk/standards/ConfigInputPlugin.java +0 -170
- data/embulk-standards/src/main/java/org/embulk/standards/CsvFormatterPlugin.java +0 -295
- data/embulk-standards/src/main/java/org/embulk/standards/CsvParserPlugin.java +0 -416
- data/embulk-standards/src/main/java/org/embulk/standards/CsvTokenizer.java +0 -545
- data/embulk-standards/src/main/java/org/embulk/standards/GzipFileDecoderPlugin.java +0 -55
- data/embulk-standards/src/main/java/org/embulk/standards/GzipFileEncoderPlugin.java +0 -71
- data/embulk-standards/src/main/java/org/embulk/standards/JsonParserPlugin.java +0 -235
- data/embulk-standards/src/main/java/org/embulk/standards/LocalFileInputPlugin.java +0 -232
- data/embulk-standards/src/main/java/org/embulk/standards/LocalFileOutputPlugin.java +0 -148
- data/embulk-standards/src/main/java/org/embulk/standards/NullOutputPlugin.java +0 -59
- data/embulk-standards/src/main/java/org/embulk/standards/RemoveColumnsFilterPlugin.java +0 -268
- data/embulk-standards/src/main/java/org/embulk/standards/RenameFilterPlugin.java +0 -479
- data/embulk-standards/src/main/java/org/embulk/standards/StandardPluginExtension.java +0 -16
- data/embulk-standards/src/main/java/org/embulk/standards/StandardPluginModule.java +0 -60
- data/embulk-standards/src/main/java/org/embulk/standards/StdoutOutputPlugin.java +0 -91
- data/embulk-standards/src/main/resources/META-INF/services/org.embulk.spi.Extension +0 -1
- data/embulk-standards/src/test/java/org/embulk/standards/TestCsvFormatterPlugin.java +0 -312
- data/embulk-standards/src/test/java/org/embulk/standards/TestCsvParserPlugin.java +0 -75
- data/embulk-standards/src/test/java/org/embulk/standards/TestCsvTokenizer.java +0 -457
- data/embulk-standards/src/test/java/org/embulk/standards/TestJsonParserPlugin.java +0 -351
- data/embulk-standards/src/test/java/org/embulk/standards/TestRemoveColumnsFilterPlugin.java +0 -121
- data/embulk-standards/src/test/java/org/embulk/standards/TestRenameFilterPlugin.java +0 -1020
- data/embulk-standards/src/test/java/org/embulk/standards/guess/TestCsvAllStringsGuessPlugin.java +0 -38
- data/embulk-standards/src/test/java/org/embulk/standards/guess/TestCsvGuessPlugin.java +0 -248
- data/embulk-standards/src/test/java/org/embulk/standards/preview/TestFilePreview.java +0 -73
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_int_single_column_row.csv +0 -1
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_int_single_column_row_and_header.csv +0 -2
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_int_single_column_row_and_header_guessed.yml +0 -12
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_int_single_column_row_and_header_seed.yml +0 -1
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_int_single_column_row_guessed.yml +0 -12
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_int_single_column_row_seed.yml +0 -1
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_rows.csv +0 -1
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_rows_and_header.csv +0 -2
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_rows_and_header_guessed.yml +0 -16
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_rows_and_header_seed.yml +0 -1
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_rows_and_header_with_trim_needed.csv +0 -2
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_rows_and_header_with_trim_needed_guessed.yml +0 -16
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_rows_and_header_with_trim_needed_seed.yml +0 -1
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_rows_guessed.yml +0 -16
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_rows_seed.yml +0 -1
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_rows_with_trim_needed.csv +0 -1
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_rows_with_trim_needed_guessed.yml +0 -16
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_rows_with_trim_needed_seed.yml +0 -1
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_string_single_column_row.csv +0 -1
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_string_single_column_row_and_header.csv +0 -2
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_string_single_column_row_and_header_guessed.yml +0 -12
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_string_single_column_row_and_header_seed.yml +0 -1
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_string_single_column_row_guessed.yml +0 -12
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_string_single_column_row_seed.yml +0 -1
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_2_int_single_column_rows.csv +0 -2
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_2_int_single_column_rows_guessed.yml +0 -12
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_2_int_single_column_rows_seed.yml +0 -1
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_2_rows.csv +0 -2
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_2_rows_and_header.csv +0 -3
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_2_rows_and_header_guessed.yml +0 -16
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_2_rows_and_header_seed.yml +0 -1
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_2_rows_guessed.yml +0 -16
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_2_rows_seed.yml +0 -1
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_2_string_single_column_rows.csv +0 -2
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_2_string_single_column_rows_guessed.yml +0 -12
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_2_string_single_column_rows_seed.yml +0 -1
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_backslash_escape.csv +0 -5
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_backslash_escape_guessed.yml +0 -17
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_backslash_escape_seed.yml +0 -1
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_double_single_column.csv +0 -12
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_double_single_column_guessed.yml +0 -12
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_double_single_column_seed.yml +0 -1
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_int_single_column.csv +0 -4
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_int_single_column_guessed.yml +0 -12
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_int_single_column_seed.yml +0 -1
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_int_single_column_with_header.csv +0 -5
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_int_single_column_with_header_guessed.yml +0 -12
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_int_single_column_with_header_seed.yml +0 -1
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_semicolon_delimiter.csv +0 -5
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_semicolon_delimiter_guessed.yml +0 -17
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_semicolon_delimiter_seed.yml +0 -1
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_simple.csv +0 -5
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_simple_guessed.yml +0 -17
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_simple_seed.yml +0 -1
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_single_quote.csv +0 -5
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_single_quote_guessed.yml +0 -17
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_single_quote_seed.yml +0 -1
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_skip_suggest_if_empty_sample_records.csv +0 -5
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_skip_suggest_if_empty_sample_records_guessed.yml +0 -2
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_skip_suggest_if_empty_sample_records_seed.yml +0 -1
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_string_single_column.csv +0 -4
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_string_single_column_guessed.yml +0 -12
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_string_single_column_seed.yml +0 -1
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_string_single_column_with_header.csv +0 -5
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_string_single_column_with_header_guessed.yml +0 -12
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_string_single_column_with_header_seed.yml +0 -1
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_tab_delimiter.csv +0 -4
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_tab_delimiter_guessed.yml +0 -16
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_tab_delimiter_seed.yml +0 -1
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv_all_strings/test/test_simple.csv +0 -5
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv_all_strings/test/test_simple_guessed.yml +0 -17
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv_all_strings/test/test_simple_seed.yml +0 -1
- data/embulk-standards/src/test/resources/org/embulk/standards/preview/file/test/test_sample_buffer_bytes.csv +0 -5
- data/embulk-standards/src/test/resources/org/embulk/standards/preview/file/test/test_sample_buffer_bytes_exec.yml +0 -1
- data/embulk-standards/src/test/resources/org/embulk/standards/preview/file/test/test_sample_buffer_bytes_load.yml +0 -19
- data/embulk-standards/src/test/resources/org/embulk/standards/preview/file/test/test_sample_buffer_bytes_previewed.csv +0 -1
- data/embulk-standards/src/test/resources/org/embulk/standards/preview/file/test/test_simple.csv +0 -5
- data/embulk-standards/src/test/resources/org/embulk/standards/preview/file/test/test_simple_load.yml +0 -19
- data/embulk-standards/src/test/resources/org/embulk/standards/preview/file/test/test_simple_previewed.csv +0 -4
- data/embulk-standards/src/test/resources/org/embulk/standards/remove_columns/test/test_keep.csv +0 -5
- data/embulk-standards/src/test/resources/org/embulk/standards/remove_columns/test/test_keep_expected.csv +0 -4
- data/embulk-standards/src/test/resources/org/embulk/standards/remove_columns/test/test_keep_filter.yml +0 -2
- data/embulk-standards/src/test/resources/org/embulk/standards/remove_columns/test/test_keep_in.yml +0 -18
- data/embulk-standards/src/test/resources/org/embulk/standards/remove_columns/test/test_keep_with_duplicated_column_names.csv +0 -5
- data/embulk-standards/src/test/resources/org/embulk/standards/remove_columns/test/test_keep_with_duplicated_column_names.yml +0 -2
- data/embulk-standards/src/test/resources/org/embulk/standards/remove_columns/test/test_keep_with_duplicated_column_names_expected.csv +0 -4
- data/embulk-standards/src/test/resources/org/embulk/standards/remove_columns/test/test_keep_with_duplicated_column_names_in.yml +0 -17
- data/embulk-standards/src/test/resources/org/embulk/standards/remove_columns/test/test_keep_with_unmatched_filter.yml +0 -3
- data/embulk-standards/src/test/resources/org/embulk/standards/remove_columns/test/test_keep_without_unmatched_filter.yml +0 -2
- data/embulk-standards/src/test/resources/org/embulk/standards/remove_columns/test/test_remove.csv +0 -5
- data/embulk-standards/src/test/resources/org/embulk/standards/remove_columns/test/test_remove_expected.csv +0 -4
- data/embulk-standards/src/test/resources/org/embulk/standards/remove_columns/test/test_remove_filter.yml +0 -2
- data/embulk-standards/src/test/resources/org/embulk/standards/remove_columns/test/test_remove_in.yml +0 -18
- data/embulk-standards/src/test/resources/org/embulk/standards/remove_columns/test/test_remove_with_unmatched_filter.yml +0 -3
- data/embulk-standards/src/test/resources/org/embulk/standards/remove_columns/test/test_remove_without_unmatched_filter.yml +0 -2
- data/embulk-test/build.gradle +0 -6
- data/embulk-test/src/main/java/org/embulk/test/EmbulkTests.java +0 -75
- data/embulk-test/src/main/java/org/embulk/test/PreviewResultInputPlugin.java +0 -65
- data/embulk-test/src/main/java/org/embulk/test/TestingBulkLoader.java +0 -129
- data/embulk-test/src/main/java/org/embulk/test/TestingEmbulk.java +0 -710
- data/gradle/wrapper/gradle-wrapper.jar +0 -0
- data/gradle/wrapper/gradle-wrapper.properties +0 -5
- data/gradlew +0 -172
- data/gradlew.bat +0 -84
- data/lib/embulk/data/bundle/.bundle/config +0 -3
- data/lib/embulk/data/bundle/.ruby-version +0 -1
- data/lib/embulk/data/bundle/Gemfile +0 -31
- data/lib/embulk/data/bundle/embulk/filter/example.rb +0 -42
- data/lib/embulk/data/bundle/embulk/input/example.rb +0 -54
- data/lib/embulk/data/bundle/embulk/output/example.rb +0 -58
- data/lib/embulk/data/new/LICENSE.txt +0 -21
- data/lib/embulk/data/new/README.md.vm +0 -106
- data/lib/embulk/data/new/gitignore.vm +0 -17
- data/lib/embulk/data/new/java/build.gradle.vm +0 -96
- data/lib/embulk/data/new/java/config/checkstyle/checkstyle.xml +0 -128
- data/lib/embulk/data/new/java/config/checkstyle/default.xml +0 -108
- data/lib/embulk/data/new/java/decoder.java.vm +0 -86
- data/lib/embulk/data/new/java/encoder.java.vm +0 -88
- data/lib/embulk/data/new/java/file_input.java.vm +0 -145
- data/lib/embulk/data/new/java/file_output.java.vm +0 -95
- data/lib/embulk/data/new/java/filter.java.vm +0 -57
- data/lib/embulk/data/new/java/formatter.java.vm +0 -55
- data/lib/embulk/data/new/java/gradle/wrapper/gradle-wrapper.jar +0 -0
- data/lib/embulk/data/new/java/gradle/wrapper/gradle-wrapper.properties +0 -5
- data/lib/embulk/data/new/java/gradlew +0 -172
- data/lib/embulk/data/new/java/gradlew.bat +0 -84
- data/lib/embulk/data/new/java/input.java.vm +0 -89
- data/lib/embulk/data/new/java/output.java.vm +0 -79
- data/lib/embulk/data/new/java/parser.java.vm +0 -61
- data/lib/embulk/data/new/java/plugin_loader.rb.vm +0 -3
- data/lib/embulk/data/new/java/test.java.vm +0 -5
- data/lib/embulk/data/new/ruby/.ruby-version +0 -1
- data/lib/embulk/data/new/ruby/Gemfile +0 -2
- data/lib/embulk/data/new/ruby/Rakefile +0 -3
- data/lib/embulk/data/new/ruby/decoder_guess.rb.vm +0 -25
- data/lib/embulk/data/new/ruby/filter.rb.vm +0 -50
- data/lib/embulk/data/new/ruby/formatter.rb.vm +0 -49
- data/lib/embulk/data/new/ruby/gemspec.vm +0 -20
- data/lib/embulk/data/new/ruby/input.rb.vm +0 -59
- data/lib/embulk/data/new/ruby/output.rb.vm +0 -61
- data/lib/embulk/data/new/ruby/parser.rb.vm +0 -44
- data/lib/embulk/data/new/ruby/parser_guess.rb.vm +0 -65
- data/lib/embulk/data/package_data.rb +0 -59
- data/lib/embulk/runner.rb +0 -53
- data/settings.gradle +0 -8
- data/test/helper.rb +0 -23
- data/test/monkey_strptime/mri/date/test_date_strptime.rb +0 -515
- data/test/monkey_strptime/run-test.rb +0 -29
- data/test/vanilla/guess/test_csv_all_strings.rb +0 -43
- data/test/vanilla/guess/test_csv_guess.rb +0 -170
- data/test/vanilla/guess/test_schema_guess.rb +0 -47
- data/test/vanilla/guess/test_time_format_guess.rb +0 -135
- data/test/vanilla/run-test.rb +0 -14
- data/test/vanilla/time/test_timestamp_parser.rb +0 -117
@@ -1,76 +0,0 @@
|
|
1
|
-
package org.embulk.jruby;
|
2
|
-
|
3
|
-
import com.google.inject.Inject;
|
4
|
-
import org.jruby.embed.ScriptingContainer;
|
5
|
-
import org.jruby.embed.InvokeFailedException;
|
6
|
-
import org.embulk.plugin.PluginType;
|
7
|
-
import org.embulk.plugin.PluginSource;
|
8
|
-
import org.embulk.plugin.PluginSourceNotMatchException;
|
9
|
-
import org.embulk.spi.InputPlugin;
|
10
|
-
import org.embulk.spi.OutputPlugin;
|
11
|
-
import org.embulk.spi.ParserPlugin;
|
12
|
-
import org.embulk.spi.FormatterPlugin;
|
13
|
-
import org.embulk.spi.DecoderPlugin;
|
14
|
-
import org.embulk.spi.EncoderPlugin;
|
15
|
-
import org.embulk.spi.FilterPlugin;
|
16
|
-
import org.embulk.spi.GuessPlugin;
|
17
|
-
import org.embulk.spi.ExecutorPlugin;
|
18
|
-
|
19
|
-
public class JRubyPluginSource
|
20
|
-
implements PluginSource
|
21
|
-
{
|
22
|
-
private final ScriptingContainer jruby;
|
23
|
-
private final Object rubyPluginManager;
|
24
|
-
|
25
|
-
@Inject
|
26
|
-
public JRubyPluginSource(ScriptingContainer jruby)
|
27
|
-
{
|
28
|
-
this.jruby = jruby;
|
29
|
-
|
30
|
-
// get Embulk::Plugin
|
31
|
-
//this.rubyPluginManager = ((RubyModule) jruby.get("Embulk")).const_get(
|
32
|
-
// RubySymbol.newSymbol(
|
33
|
-
// jruby.getProvider().getRuntime(), "Plugin"));
|
34
|
-
this.rubyPluginManager = jruby.runScriptlet("Embulk::Plugin");
|
35
|
-
}
|
36
|
-
|
37
|
-
public <T> T newPlugin(Class<T> iface, PluginType type) throws PluginSourceNotMatchException
|
38
|
-
{
|
39
|
-
if (type.getSourceType() != PluginSource.Type.DEFAULT) {
|
40
|
-
throw new PluginSourceNotMatchException();
|
41
|
-
}
|
42
|
-
|
43
|
-
final String name = type.getName();
|
44
|
-
|
45
|
-
final String category;
|
46
|
-
if (InputPlugin.class.isAssignableFrom(iface)) {
|
47
|
-
category = "input";
|
48
|
-
} else if (OutputPlugin.class.isAssignableFrom(iface)) {
|
49
|
-
category = "output";
|
50
|
-
} else if (ParserPlugin.class.isAssignableFrom(iface)) {
|
51
|
-
category = "parser";
|
52
|
-
} else if (FormatterPlugin.class.isAssignableFrom(iface)) {
|
53
|
-
category = "formatter";
|
54
|
-
} else if (DecoderPlugin.class.isAssignableFrom(iface)) {
|
55
|
-
category = "decoder";
|
56
|
-
} else if (EncoderPlugin.class.isAssignableFrom(iface)) {
|
57
|
-
category = "encoder";
|
58
|
-
} else if (FilterPlugin.class.isAssignableFrom(iface)) {
|
59
|
-
category = "filter";
|
60
|
-
} else if (GuessPlugin.class.isAssignableFrom(iface)) {
|
61
|
-
category = "guess";
|
62
|
-
} else if (ExecutorPlugin.class.isAssignableFrom(iface)) {
|
63
|
-
category = "executor";
|
64
|
-
} else {
|
65
|
-
// unsupported plugin category
|
66
|
-
throw new PluginSourceNotMatchException("Plugin interface "+iface+" is not supported in JRuby");
|
67
|
-
}
|
68
|
-
|
69
|
-
String methodName = "new_java_" + category;
|
70
|
-
try {
|
71
|
-
return jruby.callMethod(rubyPluginManager, methodName, name, iface);
|
72
|
-
} catch (InvokeFailedException ex) {
|
73
|
-
throw new PluginSourceNotMatchException(ex.getCause());
|
74
|
-
}
|
75
|
-
}
|
76
|
-
}
|
@@ -1,395 +0,0 @@
|
|
1
|
-
package org.embulk.jruby;
|
2
|
-
|
3
|
-
import java.net.URISyntaxException;
|
4
|
-
import java.net.URL;
|
5
|
-
import java.nio.file.Files;
|
6
|
-
import java.nio.file.Path;
|
7
|
-
import java.nio.file.Paths;
|
8
|
-
import java.security.CodeSource;
|
9
|
-
import java.security.ProtectionDomain;
|
10
|
-
import java.util.List;
|
11
|
-
import java.util.ArrayList;
|
12
|
-
import java.util.Collections;
|
13
|
-
import java.util.Set;
|
14
|
-
import org.slf4j.Logger;
|
15
|
-
import org.slf4j.ILoggerFactory;
|
16
|
-
import com.google.common.collect.ImmutableSet;
|
17
|
-
import com.google.inject.Module;
|
18
|
-
import com.google.inject.Binder;
|
19
|
-
import com.google.inject.Scopes;
|
20
|
-
import com.google.inject.multibindings.Multibinder;
|
21
|
-
import com.google.inject.Inject;
|
22
|
-
import com.google.inject.Injector;
|
23
|
-
import com.google.inject.Key;
|
24
|
-
import com.google.inject.spi.Dependency;
|
25
|
-
import com.google.inject.spi.ProviderWithDependencies;
|
26
|
-
import org.jruby.RubyInstanceConfig;
|
27
|
-
import org.jruby.embed.LocalContextScope;
|
28
|
-
import org.jruby.embed.LocalVariableBehavior;
|
29
|
-
import org.jruby.embed.ScriptingContainer;
|
30
|
-
import org.jruby.util.cli.Options;
|
31
|
-
import org.embulk.plugin.PluginSource;
|
32
|
-
import org.embulk.config.ConfigSource;
|
33
|
-
import org.embulk.config.ModelManager;
|
34
|
-
import org.embulk.exec.ForSystemConfig;
|
35
|
-
import org.embulk.spi.BufferAllocator;
|
36
|
-
|
37
|
-
public class JRubyScriptingModule
|
38
|
-
implements Module
|
39
|
-
{
|
40
|
-
public JRubyScriptingModule(ConfigSource systemConfig)
|
41
|
-
{
|
42
|
-
}
|
43
|
-
|
44
|
-
@Override
|
45
|
-
public void configure(Binder binder)
|
46
|
-
{
|
47
|
-
binder.bind(ScriptingContainer.class).toProvider(ScriptingContainerProvider.class).in(Scopes.SINGLETON);
|
48
|
-
|
49
|
-
Multibinder<PluginSource> multibinder = Multibinder.newSetBinder(binder, PluginSource.class);
|
50
|
-
multibinder.addBinding().to(JRubyPluginSource.class);
|
51
|
-
}
|
52
|
-
|
53
|
-
private static class ScriptingContainerProvider
|
54
|
-
implements ProviderWithDependencies<ScriptingContainer>
|
55
|
-
{
|
56
|
-
private final Injector injector;
|
57
|
-
private final boolean useGlobalRubyRuntime;
|
58
|
-
private final String gemHome;
|
59
|
-
private final boolean useDefaultEmbulkGemHome;
|
60
|
-
private final List<String> jrubyClasspath;
|
61
|
-
private final List<String> jrubyLoadPath;
|
62
|
-
private final List<String> jrubyOptions;
|
63
|
-
private final String jrubyBundlerPluginSourceDirectory;
|
64
|
-
|
65
|
-
@Inject
|
66
|
-
public ScriptingContainerProvider(Injector injector, @ForSystemConfig ConfigSource systemConfig)
|
67
|
-
{
|
68
|
-
this.injector = injector;
|
69
|
-
|
70
|
-
// use_global_ruby_runtime is valid only when it's guaranteed that just one Injector is
|
71
|
-
// instantiated in this JVM.
|
72
|
-
this.useGlobalRubyRuntime = systemConfig.get(boolean.class, "use_global_ruby_runtime", false);
|
73
|
-
|
74
|
-
this.gemHome = systemConfig.get(String.class, "gem_home", null);
|
75
|
-
this.useDefaultEmbulkGemHome =
|
76
|
-
systemConfig.get(String.class, "jruby_use_default_embulk_gem_home", "false").equals("true");
|
77
|
-
|
78
|
-
// TODO get jruby-home from systemConfig to call jruby.container.setHomeDirectory
|
79
|
-
|
80
|
-
final List jrubyLoadPathNonGeneric = systemConfig.get(List.class, "jruby_load_path", null);
|
81
|
-
final ArrayList<String> jrubyLoadPathBuilt = new ArrayList<String>();
|
82
|
-
if (jrubyLoadPathNonGeneric != null) {
|
83
|
-
for (final Object oneJRubyLoadPath : jrubyLoadPathNonGeneric) {
|
84
|
-
if (oneJRubyLoadPath instanceof String) {
|
85
|
-
jrubyLoadPathBuilt.add((String) oneJRubyLoadPath);
|
86
|
-
}
|
87
|
-
else {
|
88
|
-
// It should happen only in very irregular cases. Okay to create |Logger| every time.
|
89
|
-
Logger logger = injector.getInstance(ILoggerFactory.class).getLogger("init");
|
90
|
-
logger.warn("System config \"jruby_load_path\" contains non-String.");
|
91
|
-
jrubyLoadPathBuilt.add(oneJRubyLoadPath.toString());
|
92
|
-
}
|
93
|
-
}
|
94
|
-
}
|
95
|
-
this.jrubyLoadPath = Collections.unmodifiableList(jrubyLoadPathBuilt);
|
96
|
-
|
97
|
-
final List jrubyClasspathNonGeneric = systemConfig.get(List.class, "jruby_classpath", new ArrayList());
|
98
|
-
final ArrayList<String> jrubyClasspathBuilt = new ArrayList<String>();
|
99
|
-
if (jrubyClasspathNonGeneric != null) {
|
100
|
-
for (final Object oneJRubyClasspath : jrubyClasspathNonGeneric) {
|
101
|
-
if (oneJRubyClasspath instanceof String) {
|
102
|
-
jrubyClasspathBuilt.add((String) oneJRubyClasspath);
|
103
|
-
}
|
104
|
-
else {
|
105
|
-
// It should happen only in very irregular cases. Okay to create |Logger| every time.
|
106
|
-
Logger logger = injector.getInstance(ILoggerFactory.class).getLogger("init");
|
107
|
-
logger.warn("System config \"jruby_classpath\" contains non-String.");
|
108
|
-
jrubyClasspathBuilt.add(oneJRubyClasspath.toString());
|
109
|
-
}
|
110
|
-
}
|
111
|
-
}
|
112
|
-
this.jrubyClasspath = Collections.unmodifiableList(jrubyClasspathBuilt);
|
113
|
-
|
114
|
-
final List jrubyOptionsNonGeneric = systemConfig.get(List.class, "jruby_command_line_options", null);
|
115
|
-
final ArrayList<String> jrubyOptionsBuilt = new ArrayList<String>();
|
116
|
-
if (jrubyOptionsNonGeneric != null) {
|
117
|
-
for (final Object oneJRubyOption : jrubyOptionsNonGeneric) {
|
118
|
-
if (oneJRubyOption instanceof String) {
|
119
|
-
jrubyOptionsBuilt.add((String) oneJRubyOption);
|
120
|
-
}
|
121
|
-
else {
|
122
|
-
// It should happen only in very irregular cases. Okay to create |Logger| every time.
|
123
|
-
Logger logger = injector.getInstance(ILoggerFactory.class).getLogger("init");
|
124
|
-
logger.warn("System config \"jruby_command_line_options\" contains non-String.");
|
125
|
-
jrubyOptionsBuilt.add(oneJRubyOption.toString());
|
126
|
-
}
|
127
|
-
}
|
128
|
-
}
|
129
|
-
this.jrubyOptions = Collections.unmodifiableList(jrubyOptionsBuilt);
|
130
|
-
|
131
|
-
this.jrubyBundlerPluginSourceDirectory =
|
132
|
-
systemConfig.get(String.class, "jruby_global_bundler_plugin_source_directory", null);
|
133
|
-
}
|
134
|
-
|
135
|
-
public ScriptingContainer get()
|
136
|
-
{
|
137
|
-
LocalContextScope scope = (useGlobalRubyRuntime ? LocalContextScope.SINGLETON : LocalContextScope.SINGLETHREAD);
|
138
|
-
ScriptingContainer jruby = new ScriptingContainer(scope, LocalVariableBehavior.PERSISTENT);
|
139
|
-
if (this.useDefaultEmbulkGemHome) {
|
140
|
-
// NOTE: Same done in "gem", "exec", and "irb" subcommands.
|
141
|
-
// Remember to update |org.embulk.cli.EmbulkRun| as well when these environment variables are changed.
|
142
|
-
jruby.runScriptlet("ENV.delete('BUNDLE_GEMFILE')");
|
143
|
-
jruby.runScriptlet("ENV['GEM_HOME'] = File.expand_path File.join(Java::java.lang.System.properties['user.home'], '.embulk', Gem.ruby_engine, RbConfig::CONFIG['ruby_version'])");
|
144
|
-
jruby.runScriptlet("ENV['GEM_PATH'] = ''");
|
145
|
-
}
|
146
|
-
final RubyInstanceConfig jrubyInstanceConfig = jruby.getProvider().getRubyInstanceConfig();
|
147
|
-
for (final String jrubyOption : this.jrubyOptions) {
|
148
|
-
try {
|
149
|
-
processJRubyOption(jrubyOption, jrubyInstanceConfig);
|
150
|
-
}
|
151
|
-
catch (UnrecognizedJRubyOptionException ex) {
|
152
|
-
final Logger logger = this.injector.getInstance(ILoggerFactory.class).getLogger("init");
|
153
|
-
logger.error("The \"-R\" option(s) are not recognized in Embulk: -R" + jrubyOption +
|
154
|
-
". Please add your requests at: https://github.com/embulk/embulk/issues/707", ex);
|
155
|
-
throw new RuntimeException(ex);
|
156
|
-
|
157
|
-
}
|
158
|
-
catch (NotWorkingJRubyOptionException ex) {
|
159
|
-
final Logger logger = this.injector.getInstance(ILoggerFactory.class).getLogger("init");
|
160
|
-
logger.warn("The \"-R\" option(s) do not work in Embulk: -R" + jrubyOption + ".", ex);
|
161
|
-
}
|
162
|
-
}
|
163
|
-
|
164
|
-
setBundlerPluginSourceDirectory(jruby, this.jrubyBundlerPluginSourceDirectory);
|
165
|
-
|
166
|
-
for (final String oneJRubyLoadPath : this.jrubyLoadPath) {
|
167
|
-
// ruby script directory (use unshift to make it highest priority)
|
168
|
-
jruby.put("__internal_load_path__", oneJRubyLoadPath);
|
169
|
-
// TODO: Check if $LOAD_PATH already contains it.
|
170
|
-
jruby.runScriptlet("$LOAD_PATH.unshift File.expand_path(__internal_load_path__)");
|
171
|
-
jruby.remove("__internal_load_path__");
|
172
|
-
}
|
173
|
-
|
174
|
-
for (final String oneJRubyClasspath : this.jrubyClasspath) {
|
175
|
-
jruby.put("__internal_classpath__", oneJRubyClasspath);
|
176
|
-
// $CLASSPATH object doesn't have concat method
|
177
|
-
// TODO: Check if $CLASSPATH already contains it.
|
178
|
-
jruby.runScriptlet("$CLASSPATH << __internal_classpath__");
|
179
|
-
jruby.remove("__internal_classpath__");
|
180
|
-
}
|
181
|
-
|
182
|
-
// Search embulk/java/bootstrap.rb from a $LOAD_PATH.
|
183
|
-
// $LOAD_PATH is set by lib/embulk/command/embulk_run.rb if Embulk starts
|
184
|
-
// using embulk-cli but it's not set if Embulk is embedded in an application.
|
185
|
-
// Here adds this jar's internal resources to $LOAD_PATH for those applciations.
|
186
|
-
|
187
|
-
// List<String> loadPaths = new ArrayList<String>(jruby.getLoadPaths());
|
188
|
-
// String coreJarPath = JRubyScriptingModule.class.getProtectionDomain().getCodeSource().getLocation().getPath();
|
189
|
-
// if (!loadPaths.contains(coreJarPath)) {
|
190
|
-
// loadPaths.add(coreJarPath);
|
191
|
-
// }
|
192
|
-
// jruby.setLoadPaths(loadPaths);
|
193
|
-
|
194
|
-
if (gemHome != null) {
|
195
|
-
// Overwrites GEM_HOME and GEM_PATH. GEM_PATH becomes same with GEM_HOME. Therefore
|
196
|
-
// with this code, there're no ways to set extra GEM_PATHs in addition to GEM_HOME.
|
197
|
-
// Here doesn't modify ENV['GEM_HOME'] so that a JVM process can create multiple
|
198
|
-
// JRubyScriptingModule instances. However, because Gem loads ENV['GEM_HOME'] when
|
199
|
-
// Gem.clear_paths is called, applications may use unexpected GEM_HOME if clear_path
|
200
|
-
// is used.
|
201
|
-
jruby.callMethod(
|
202
|
-
jruby.runScriptlet("Gem"),
|
203
|
-
"use_paths", gemHome, gemHome);
|
204
|
-
}
|
205
|
-
|
206
|
-
// load embulk.rb
|
207
|
-
jruby.runScriptlet("require 'embulk'");
|
208
|
-
|
209
|
-
// jruby searches embulk/java/bootstrap.rb from the beginning of $LOAD_PATH.
|
210
|
-
jruby.runScriptlet("require 'embulk/java/bootstrap'");
|
211
|
-
|
212
|
-
// TODO validate Embulk::Java::Injected::Injector doesn't exist? If it already exists,
|
213
|
-
// Injector is created more than once in this JVM although use_global_ruby_runtime
|
214
|
-
// is set to true.
|
215
|
-
|
216
|
-
// set some constants
|
217
|
-
jruby.callMethod(
|
218
|
-
jruby.runScriptlet("Embulk::Java::Injected"),
|
219
|
-
"const_set", "Injector", injector);
|
220
|
-
jruby.callMethod(
|
221
|
-
jruby.runScriptlet("Embulk::Java::Injected"),
|
222
|
-
"const_set", "ModelManager", injector.getInstance(ModelManager.class));
|
223
|
-
jruby.callMethod(
|
224
|
-
jruby.runScriptlet("Embulk::Java::Injected"),
|
225
|
-
"const_set", "BufferAllocator", injector.getInstance(BufferAllocator.class));
|
226
|
-
|
227
|
-
// initialize logger
|
228
|
-
jruby.callMethod(
|
229
|
-
jruby.runScriptlet("Embulk"),
|
230
|
-
"logger=",
|
231
|
-
jruby.callMethod(
|
232
|
-
jruby.runScriptlet("Embulk::Logger"),
|
233
|
-
"new", injector.getInstance(ILoggerFactory.class).getLogger("ruby")));
|
234
|
-
|
235
|
-
return jruby;
|
236
|
-
}
|
237
|
-
|
238
|
-
public Set<Dependency<?>> getDependencies()
|
239
|
-
{
|
240
|
-
// get() depends on other modules
|
241
|
-
return ImmutableSet.of(
|
242
|
-
Dependency.get(Key.get(ModelManager.class)),
|
243
|
-
Dependency.get(Key.get(BufferAllocator.class)));
|
244
|
-
}
|
245
|
-
|
246
|
-
private static final class UnrecognizedJRubyOptionException extends Exception {}
|
247
|
-
private static final class NotWorkingJRubyOptionException extends Exception {}
|
248
|
-
private static final class UnrecognizedJRubyLoadPathException extends Exception {
|
249
|
-
public UnrecognizedJRubyLoadPathException(final String message)
|
250
|
-
{
|
251
|
-
super(message);
|
252
|
-
}
|
253
|
-
|
254
|
-
public UnrecognizedJRubyLoadPathException(final String message, final Throwable cause)
|
255
|
-
{
|
256
|
-
super(message, cause);
|
257
|
-
}
|
258
|
-
}
|
259
|
-
|
260
|
-
private void setBundlerPluginSourceDirectory(final ScriptingContainer jruby, final String directory)
|
261
|
-
{
|
262
|
-
if (directory != null) {
|
263
|
-
jruby.put("__internal_bundler_plugin_source_directory__", directory);
|
264
|
-
jruby.runScriptlet("ENV['BUNDLE_GEMFILE'] = File.expand_path File.join(__internal_bundler_plugin_source_directory__, 'Gemfile')");
|
265
|
-
|
266
|
-
// bundler is included in embulk-core.jar
|
267
|
-
jruby.runScriptlet("ENV.delete('GEM_HOME')");
|
268
|
-
jruby.runScriptlet("ENV.delete('GEM_PATH')");
|
269
|
-
jruby.runScriptlet("Gem.clear_paths");
|
270
|
-
jruby.runScriptlet("require 'bundler'");
|
271
|
-
|
272
|
-
jruby.runScriptlet("Bundler.load.setup_environment");
|
273
|
-
jruby.runScriptlet("require 'bundler/setup'");
|
274
|
-
// since here, `require` may load files of different (newer) embulk versions
|
275
|
-
// especially following 'embulk/command/embulk_main'.
|
276
|
-
|
277
|
-
// NOTE: It is intentionally not done by building a Ruby statement string from |directory|.
|
278
|
-
// It can cause insecure injections.
|
279
|
-
//
|
280
|
-
// add bundle directory path to load local plugins at ./embulk
|
281
|
-
jruby.runScriptlet("$LOAD_PATH << File.expand_path(__internal_bundler_plugin_source_directory__)");
|
282
|
-
jruby.remove("__internal_bundler_plugin_source_directory__");
|
283
|
-
}
|
284
|
-
else {
|
285
|
-
/* Environment variables are set in ScriptingContainerProvider#get():
|
286
|
-
* ENV['BUNDLE_GEMFILE']: unset
|
287
|
-
* ENV['GEM_HOME']: set for "~/.embulk/jruby/${ruby-version}"
|
288
|
-
* ENV['GEM_PATH']: set for ""
|
289
|
-
*/
|
290
|
-
|
291
|
-
jruby.runScriptlet("Gem.clear_paths"); // force rubygems to reload GEM_HOME
|
292
|
-
|
293
|
-
// NOTE: The path from |buildJRubyLoadPath()| is added in $LOAD_PATH just in case.
|
294
|
-
// Though it is not mandatory just to run "embulk_main.rb", it may be required in later steps.
|
295
|
-
//
|
296
|
-
// NOTE: It is intentionally not done by building a Ruby statement string from |buildJRubyLoadPath()|.
|
297
|
-
// It can cause insecure injections.
|
298
|
-
//
|
299
|
-
// NOTE: It was written in Ruby as follows:
|
300
|
-
// $LOAD_PATH << File.expand_path('../../', File.dirname(__FILE__))
|
301
|
-
final String jrubyLoadPath;
|
302
|
-
try {
|
303
|
-
jrubyLoadPath = buildJRubyLoadPath();
|
304
|
-
}
|
305
|
-
catch (UnrecognizedJRubyLoadPathException ex) {
|
306
|
-
final Logger logger = this.injector.getInstance(ILoggerFactory.class).getLogger("init");
|
307
|
-
logger.error("Failed to retrieve Embulk's location.", ex);
|
308
|
-
throw new RuntimeException(ex);
|
309
|
-
}
|
310
|
-
jruby.put("__internal_load_path__", jrubyLoadPath);
|
311
|
-
jruby.runScriptlet("$LOAD_PATH << File.expand_path(__internal_load_path__)");
|
312
|
-
jruby.remove("__internal_load_path__");
|
313
|
-
}
|
314
|
-
}
|
315
|
-
|
316
|
-
private static void processJRubyOption(final String jrubyOption, final RubyInstanceConfig jrubyInstanceConfig)
|
317
|
-
throws UnrecognizedJRubyOptionException, NotWorkingJRubyOptionException
|
318
|
-
{
|
319
|
-
if (jrubyOption.charAt(0) != '-') {
|
320
|
-
throw new UnrecognizedJRubyOptionException();
|
321
|
-
}
|
322
|
-
|
323
|
-
for (int index = 1; index < jrubyOption.length(); ++index) {
|
324
|
-
switch (jrubyOption.charAt(index)) {
|
325
|
-
case '-':
|
326
|
-
if (jrubyOption.equals("--dev")) {
|
327
|
-
// They are not all of "--dev", but they are most possible configurations after JVM boot.
|
328
|
-
Options.COMPILE_INVOKEDYNAMIC.force("false"); // NOTE: Options is global.
|
329
|
-
jrubyInstanceConfig.setCompileMode(RubyInstanceConfig.CompileMode.OFF);
|
330
|
-
return;
|
331
|
-
}
|
332
|
-
else if (jrubyOption.equals("--client")) {
|
333
|
-
throw new NotWorkingJRubyOptionException();
|
334
|
-
}
|
335
|
-
else if (jrubyOption.equals("--server")) {
|
336
|
-
throw new NotWorkingJRubyOptionException();
|
337
|
-
}
|
338
|
-
throw new UnrecognizedJRubyOptionException();
|
339
|
-
default:
|
340
|
-
throw new UnrecognizedJRubyOptionException();
|
341
|
-
}
|
342
|
-
}
|
343
|
-
}
|
344
|
-
|
345
|
-
/**
|
346
|
-
* Returns a path to be added in JRuby's $LOAD_PATH.
|
347
|
-
*
|
348
|
-
* In case Embulk runs from the Embulk JAR file (normal case):
|
349
|
-
* "file:/some/directory/embulk.jar!"
|
350
|
-
*
|
351
|
-
* In case Embulk runs out of a JAR file (irregular case):
|
352
|
-
* "/some/directory"
|
353
|
-
*/
|
354
|
-
private static String buildJRubyLoadPath()
|
355
|
-
throws UnrecognizedJRubyLoadPathException
|
356
|
-
{
|
357
|
-
final ProtectionDomain protectionDomain;
|
358
|
-
try {
|
359
|
-
protectionDomain = JRubyScriptingModule.class.getProtectionDomain();
|
360
|
-
}
|
361
|
-
catch (SecurityException ex) {
|
362
|
-
throw new UnrecognizedJRubyLoadPathException("Failed to achieve ProtectionDomain", ex);
|
363
|
-
}
|
364
|
-
|
365
|
-
final CodeSource codeSource = protectionDomain.getCodeSource();
|
366
|
-
if (codeSource == null) {
|
367
|
-
throw new UnrecognizedJRubyLoadPathException("Failed to achieve CodeSource");
|
368
|
-
}
|
369
|
-
|
370
|
-
final URL locationUrl = codeSource.getLocation();
|
371
|
-
if (locationUrl == null) {
|
372
|
-
throw new UnrecognizedJRubyLoadPathException("Failed to achieve location");
|
373
|
-
}
|
374
|
-
else if (!locationUrl.getProtocol().equals("file")) {
|
375
|
-
throw new UnrecognizedJRubyLoadPathException("Invalid location: " + locationUrl.toString());
|
376
|
-
}
|
377
|
-
|
378
|
-
final Path locationPath;
|
379
|
-
try {
|
380
|
-
locationPath = Paths.get(locationUrl.toURI());
|
381
|
-
}
|
382
|
-
catch (URISyntaxException ex) {
|
383
|
-
throw new UnrecognizedJRubyLoadPathException("Invalid location: " + locationUrl.toString(), ex);
|
384
|
-
}
|
385
|
-
|
386
|
-
if (Files.isDirectory(locationPath)) { // Out of a JAR file
|
387
|
-
System.err.println("[WARN] Embulk looks running out of the Embulk jar file. It is unsupported.");
|
388
|
-
return locationPath.toString();
|
389
|
-
}
|
390
|
-
|
391
|
-
// TODO: Consider checking the file is really a JAR file.
|
392
|
-
return locationUrl.toString() + "!"; // Inside the Embulk JAR file
|
393
|
-
}
|
394
|
-
}
|
395
|
-
}
|