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.
Files changed (597) hide show
  1. checksums.yaml +5 -5
  2. data/Gemfile +1 -1
  3. data/LICENSE +202 -0
  4. data/embulk.gemspec +34 -33
  5. data/lib/embulk.rb +5 -61
  6. data/lib/embulk/buffer.rb +1 -2
  7. data/lib/embulk/guess/charset.rb +2 -11
  8. data/lib/embulk/java/bootstrap.rb +0 -1
  9. data/lib/embulk/java_plugin.rb +9 -1
  10. data/lib/embulk/page_builder.rb +2 -2
  11. data/lib/embulk/plugin.rb +2 -2
  12. data/lib/embulk/schema.rb +3 -4
  13. data/lib/embulk/version.rb +3 -22
  14. metadata +22 -757
  15. data/.gitignore +0 -15
  16. data/.ruby-version +0 -1
  17. data/.travis.yml +0 -28
  18. data/COPYING +0 -14
  19. data/Gemfile.lock +0 -30
  20. data/README.md +0 -229
  21. data/Rakefile +0 -26
  22. data/appveyor.yml +0 -28
  23. data/bin/embulk +0 -139
  24. data/build.gradle +0 -419
  25. data/embulk-cli/build.gradle +0 -9
  26. data/embulk-cli/src/main/bat/selfrun.bat +0 -107
  27. data/embulk-cli/src/main/java/org/embulk/cli/EmbulkArguments.java +0 -54
  28. data/embulk-cli/src/main/java/org/embulk/cli/EmbulkCommandLine.java +0 -227
  29. data/embulk-cli/src/main/java/org/embulk/cli/EmbulkCommandLineException.java +0 -25
  30. data/embulk-cli/src/main/java/org/embulk/cli/EmbulkExample.java +0 -86
  31. data/embulk-cli/src/main/java/org/embulk/cli/EmbulkMigrate.java +0 -480
  32. data/embulk-cli/src/main/java/org/embulk/cli/EmbulkNew.java +0 -419
  33. data/embulk-cli/src/main/java/org/embulk/cli/EmbulkRun.java +0 -786
  34. data/embulk-cli/src/main/java/org/embulk/cli/EmbulkSelfUpdate.java +0 -235
  35. data/embulk-cli/src/main/java/org/embulk/cli/EmbulkSubcommand.java +0 -47
  36. data/embulk-cli/src/main/java/org/embulk/cli/Main.java +0 -31
  37. data/embulk-cli/src/main/java/org/embulk/cli/parse/AbstractHelpLineDefinition.java +0 -15
  38. data/embulk-cli/src/main/java/org/embulk/cli/parse/CliHelpFormatterWithHelpMessages.java +0 -141
  39. data/embulk-cli/src/main/java/org/embulk/cli/parse/CliOptionsWithHelpMessages.java +0 -45
  40. data/embulk-cli/src/main/java/org/embulk/cli/parse/EmbulkCommandLineHelpRequired.java +0 -10
  41. data/embulk-cli/src/main/java/org/embulk/cli/parse/EmbulkCommandLineParseException.java +0 -25
  42. data/embulk-cli/src/main/java/org/embulk/cli/parse/EmbulkCommandLineParser.java +0 -187
  43. data/embulk-cli/src/main/java/org/embulk/cli/parse/HelpMessageAsCliOption.java +0 -36
  44. data/embulk-cli/src/main/java/org/embulk/cli/parse/HelpMessageLineDefinition.java +0 -20
  45. data/embulk-cli/src/main/java/org/embulk/cli/parse/OptionBehavior.java +0 -39
  46. data/embulk-cli/src/main/java/org/embulk/cli/parse/OptionDefinition.java +0 -120
  47. data/embulk-cli/src/main/sh/selfrun.sh +0 -60
  48. data/embulk-cli/src/test/java/org/embulk/cli/DummyMain.java +0 -23
  49. data/embulk-cli/src/test/java/org/embulk/cli/SelfrunTest.java +0 -296
  50. data/embulk-core/build.gradle +0 -83
  51. data/embulk-core/src/main/java/org/embulk/EmbulkEmbed.java +0 -321
  52. data/embulk-core/src/main/java/org/embulk/EmbulkRunner.java +0 -531
  53. data/embulk-core/src/main/java/org/embulk/EmbulkService.java +0 -78
  54. data/embulk-core/src/main/java/org/embulk/EmbulkSetup.java +0 -49
  55. data/embulk-core/src/main/java/org/embulk/EmbulkVersion.java +0 -109
  56. data/embulk-core/src/main/java/org/embulk/command/PreviewPrinter.java +0 -87
  57. data/embulk-core/src/main/java/org/embulk/command/TablePreviewPrinter.java +0 -107
  58. data/embulk-core/src/main/java/org/embulk/command/VerticalPreviewPrinter.java +0 -47
  59. data/embulk-core/src/main/java/org/embulk/config/CommitReport.java +0 -36
  60. data/embulk-core/src/main/java/org/embulk/config/Config.java +0 -15
  61. data/embulk-core/src/main/java/org/embulk/config/ConfigDefault.java +0 -15
  62. data/embulk-core/src/main/java/org/embulk/config/ConfigDiff.java +0 -32
  63. data/embulk-core/src/main/java/org/embulk/config/ConfigException.java +0 -26
  64. data/embulk-core/src/main/java/org/embulk/config/ConfigInject.java +0 -14
  65. data/embulk-core/src/main/java/org/embulk/config/ConfigLoader.java +0 -149
  66. data/embulk-core/src/main/java/org/embulk/config/ConfigSource.java +0 -34
  67. data/embulk-core/src/main/java/org/embulk/config/DataSource.java +0 -41
  68. data/embulk-core/src/main/java/org/embulk/config/DataSourceImpl.java +0 -243
  69. data/embulk-core/src/main/java/org/embulk/config/DataSourceSerDe.java +0 -84
  70. data/embulk-core/src/main/java/org/embulk/config/GenericTypeReference.java +0 -20
  71. data/embulk-core/src/main/java/org/embulk/config/ModelManager.java +0 -123
  72. data/embulk-core/src/main/java/org/embulk/config/Task.java +0 -10
  73. data/embulk-core/src/main/java/org/embulk/config/TaskInvocationHandler.java +0 -180
  74. data/embulk-core/src/main/java/org/embulk/config/TaskReport.java +0 -32
  75. data/embulk-core/src/main/java/org/embulk/config/TaskSerDe.java +0 -349
  76. data/embulk-core/src/main/java/org/embulk/config/TaskSource.java +0 -34
  77. data/embulk-core/src/main/java/org/embulk/config/TaskValidationException.java +0 -38
  78. data/embulk-core/src/main/java/org/embulk/config/TaskValidator.java +0 -24
  79. data/embulk-core/src/main/java/org/embulk/config/UserDataException.java +0 -4
  80. data/embulk-core/src/main/java/org/embulk/config/UserDataExceptions.java +0 -17
  81. data/embulk-core/src/main/java/org/embulk/config/YamlTagResolver.java +0 -53
  82. data/embulk-core/src/main/java/org/embulk/exec/BufferFileInputPlugin.java +0 -88
  83. data/embulk-core/src/main/java/org/embulk/exec/BulkLoader.java +0 -754
  84. data/embulk-core/src/main/java/org/embulk/exec/ConfigurableGuessInputPlugin.java +0 -9
  85. data/embulk-core/src/main/java/org/embulk/exec/ExecModule.java +0 -53
  86. data/embulk-core/src/main/java/org/embulk/exec/ExecutionInterruptedException.java +0 -10
  87. data/embulk-core/src/main/java/org/embulk/exec/ExecutionResult.java +0 -33
  88. data/embulk-core/src/main/java/org/embulk/exec/ExtensionServiceLoaderModule.java +0 -43
  89. data/embulk-core/src/main/java/org/embulk/exec/ForGuess.java +0 -16
  90. data/embulk-core/src/main/java/org/embulk/exec/ForSystemConfig.java +0 -16
  91. data/embulk-core/src/main/java/org/embulk/exec/GuessExecutor.java +0 -309
  92. data/embulk-core/src/main/java/org/embulk/exec/LocalExecutorPlugin.java +0 -563
  93. data/embulk-core/src/main/java/org/embulk/exec/LoggerProvider.java +0 -68
  94. data/embulk-core/src/main/java/org/embulk/exec/NoSampleException.java +0 -10
  95. data/embulk-core/src/main/java/org/embulk/exec/PartialExecutionException.java +0 -26
  96. data/embulk-core/src/main/java/org/embulk/exec/PooledBufferAllocator.java +0 -77
  97. data/embulk-core/src/main/java/org/embulk/exec/PreviewExecutor.java +0 -222
  98. data/embulk-core/src/main/java/org/embulk/exec/PreviewResult.java +0 -27
  99. data/embulk-core/src/main/java/org/embulk/exec/PreviewedNoticeError.java +0 -17
  100. data/embulk-core/src/main/java/org/embulk/exec/ResumeState.java +0 -100
  101. data/embulk-core/src/main/java/org/embulk/exec/SamplingParserPlugin.java +0 -215
  102. data/embulk-core/src/main/java/org/embulk/exec/SetCurrentThreadName.java +0 -22
  103. data/embulk-core/src/main/java/org/embulk/exec/SkipTransactionException.java +0 -23
  104. data/embulk-core/src/main/java/org/embulk/exec/SystemConfigModule.java +0 -24
  105. data/embulk-core/src/main/java/org/embulk/exec/TempFileAllocator.java +0 -35
  106. data/embulk-core/src/main/java/org/embulk/exec/TransactionStage.java +0 -27
  107. data/embulk-core/src/main/java/org/embulk/jruby/JRubyPluginSource.java +0 -76
  108. data/embulk-core/src/main/java/org/embulk/jruby/JRubyScriptingModule.java +0 -395
  109. data/embulk-core/src/main/java/org/embulk/plugin/BuiltinPluginSourceModule.java +0 -17
  110. data/embulk-core/src/main/java/org/embulk/plugin/DefaultPluginType.java +0 -50
  111. data/embulk-core/src/main/java/org/embulk/plugin/InjectedPluginSource.java +0 -100
  112. data/embulk-core/src/main/java/org/embulk/plugin/MavenPluginType.java +0 -112
  113. data/embulk-core/src/main/java/org/embulk/plugin/PluginClassLoader.java +0 -993
  114. data/embulk-core/src/main/java/org/embulk/plugin/PluginClassLoaderFactory.java +0 -16
  115. data/embulk-core/src/main/java/org/embulk/plugin/PluginClassLoaderModule.java +0 -102
  116. data/embulk-core/src/main/java/org/embulk/plugin/PluginManager.java +0 -78
  117. data/embulk-core/src/main/java/org/embulk/plugin/PluginSource.java +0 -49
  118. data/embulk-core/src/main/java/org/embulk/plugin/PluginSourceNotMatchException.java +0 -25
  119. data/embulk-core/src/main/java/org/embulk/plugin/PluginType.java +0 -122
  120. data/embulk-core/src/main/java/org/embulk/plugin/compat/InputPluginWrapper.java +0 -102
  121. data/embulk-core/src/main/java/org/embulk/plugin/compat/PluginWrappers.java +0 -30
  122. data/embulk-core/src/main/java/org/embulk/plugin/compat/TransactionalFileInputWrapper.java +0 -96
  123. data/embulk-core/src/main/java/org/embulk/plugin/compat/TransactionalFileOutputWrapper.java +0 -102
  124. data/embulk-core/src/main/java/org/embulk/plugin/compat/TransactionalPageOutputWrapper.java +0 -95
  125. data/embulk-core/src/main/java/org/embulk/plugin/jar/InvalidJarPluginException.java +0 -14
  126. data/embulk-core/src/main/java/org/embulk/plugin/jar/JarPluginLoader.java +0 -232
  127. data/embulk-core/src/main/java/org/embulk/plugin/maven/MavenArtifactFinder.java +0 -134
  128. data/embulk-core/src/main/java/org/embulk/plugin/maven/MavenArtifactNotFoundException.java +0 -20
  129. data/embulk-core/src/main/java/org/embulk/plugin/maven/MavenPluginSource.java +0 -187
  130. data/embulk-core/src/main/java/org/embulk/plugin/maven/MavenPluginSourceModule.java +0 -22
  131. data/embulk-core/src/main/java/org/embulk/plugin/maven/MavenRepositoryNotFoundException.java +0 -31
  132. data/embulk-core/src/main/java/org/embulk/spi/AbortTransactionResource.java +0 -36
  133. data/embulk-core/src/main/java/org/embulk/spi/Buffer.java +0 -148
  134. data/embulk-core/src/main/java/org/embulk/spi/BufferAllocator.java +0 -8
  135. data/embulk-core/src/main/java/org/embulk/spi/CloseResource.java +0 -42
  136. data/embulk-core/src/main/java/org/embulk/spi/Column.java +0 -95
  137. data/embulk-core/src/main/java/org/embulk/spi/ColumnConfig.java +0 -112
  138. data/embulk-core/src/main/java/org/embulk/spi/ColumnVisitor.java +0 -16
  139. data/embulk-core/src/main/java/org/embulk/spi/DataException.java +0 -23
  140. data/embulk-core/src/main/java/org/embulk/spi/DecoderPlugin.java +0 -16
  141. data/embulk-core/src/main/java/org/embulk/spi/EncoderPlugin.java +0 -16
  142. data/embulk-core/src/main/java/org/embulk/spi/Exec.java +0 -113
  143. data/embulk-core/src/main/java/org/embulk/spi/ExecAction.java +0 -6
  144. data/embulk-core/src/main/java/org/embulk/spi/ExecSession.java +0 -220
  145. data/embulk-core/src/main/java/org/embulk/spi/ExecutorPlugin.java +0 -19
  146. data/embulk-core/src/main/java/org/embulk/spi/Extension.java +0 -44
  147. data/embulk-core/src/main/java/org/embulk/spi/FileInput.java +0 -11
  148. data/embulk-core/src/main/java/org/embulk/spi/FileInputPlugin.java +0 -30
  149. data/embulk-core/src/main/java/org/embulk/spi/FileInputRunner.java +0 -169
  150. data/embulk-core/src/main/java/org/embulk/spi/FileOutput.java +0 -13
  151. data/embulk-core/src/main/java/org/embulk/spi/FileOutputPlugin.java +0 -28
  152. data/embulk-core/src/main/java/org/embulk/spi/FileOutputRunner.java +0 -199
  153. data/embulk-core/src/main/java/org/embulk/spi/FilterPlugin.java +0 -18
  154. data/embulk-core/src/main/java/org/embulk/spi/FormatterPlugin.java +0 -18
  155. data/embulk-core/src/main/java/org/embulk/spi/GuessPlugin.java +0 -9
  156. data/embulk-core/src/main/java/org/embulk/spi/InputPlugin.java +0 -33
  157. data/embulk-core/src/main/java/org/embulk/spi/OutputPlugin.java +0 -29
  158. data/embulk-core/src/main/java/org/embulk/spi/Page.java +0 -86
  159. data/embulk-core/src/main/java/org/embulk/spi/PageBuilder.java +0 -696
  160. data/embulk-core/src/main/java/org/embulk/spi/PageFormat.java +0 -47
  161. data/embulk-core/src/main/java/org/embulk/spi/PageOutput.java +0 -11
  162. data/embulk-core/src/main/java/org/embulk/spi/PageReader.java +0 -248
  163. data/embulk-core/src/main/java/org/embulk/spi/ParserPlugin.java +0 -17
  164. data/embulk-core/src/main/java/org/embulk/spi/ProcessState.java +0 -10
  165. data/embulk-core/src/main/java/org/embulk/spi/ProcessTask.java +0 -117
  166. data/embulk-core/src/main/java/org/embulk/spi/Schema.java +0 -139
  167. data/embulk-core/src/main/java/org/embulk/spi/SchemaConfig.java +0 -93
  168. data/embulk-core/src/main/java/org/embulk/spi/SchemaConfigException.java +0 -22
  169. data/embulk-core/src/main/java/org/embulk/spi/TaskState.java +0 -81
  170. data/embulk-core/src/main/java/org/embulk/spi/TempFileException.java +0 -19
  171. data/embulk-core/src/main/java/org/embulk/spi/TempFileSpace.java +0 -88
  172. data/embulk-core/src/main/java/org/embulk/spi/Transactional.java +0 -10
  173. data/embulk-core/src/main/java/org/embulk/spi/TransactionalFileInput.java +0 -17
  174. data/embulk-core/src/main/java/org/embulk/spi/TransactionalFileOutput.java +0 -19
  175. data/embulk-core/src/main/java/org/embulk/spi/TransactionalPageOutput.java +0 -17
  176. data/embulk-core/src/main/java/org/embulk/spi/json/JsonParseException.java +0 -17
  177. data/embulk-core/src/main/java/org/embulk/spi/json/JsonParser.java +0 -233
  178. data/embulk-core/src/main/java/org/embulk/spi/json/RubyValueApi.java +0 -100
  179. data/embulk-core/src/main/java/org/embulk/spi/time/DateTimeZoneSerDe.java +0 -55
  180. data/embulk-core/src/main/java/org/embulk/spi/time/Timestamp.java +0 -180
  181. data/embulk-core/src/main/java/org/embulk/spi/time/TimestampFormat.java +0 -158
  182. data/embulk-core/src/main/java/org/embulk/spi/time/TimestampFormatter.java +0 -125
  183. data/embulk-core/src/main/java/org/embulk/spi/time/TimestampParseException.java +0 -12
  184. data/embulk-core/src/main/java/org/embulk/spi/time/TimestampParser.java +0 -310
  185. data/embulk-core/src/main/java/org/embulk/spi/time/TimestampSerDe.java +0 -49
  186. data/embulk-core/src/main/java/org/embulk/spi/type/AbstractType.java +0 -58
  187. data/embulk-core/src/main/java/org/embulk/spi/type/BooleanType.java +0 -12
  188. data/embulk-core/src/main/java/org/embulk/spi/type/DoubleType.java +0 -12
  189. data/embulk-core/src/main/java/org/embulk/spi/type/JsonType.java +0 -14
  190. data/embulk-core/src/main/java/org/embulk/spi/type/LongType.java +0 -12
  191. data/embulk-core/src/main/java/org/embulk/spi/type/StringType.java +0 -12
  192. data/embulk-core/src/main/java/org/embulk/spi/type/TimestampType.java +0 -41
  193. data/embulk-core/src/main/java/org/embulk/spi/type/Type.java +0 -15
  194. data/embulk-core/src/main/java/org/embulk/spi/type/TypeDeserializer.java +0 -45
  195. data/embulk-core/src/main/java/org/embulk/spi/type/Types.java +0 -16
  196. data/embulk-core/src/main/java/org/embulk/spi/unit/ByteSize.java +0 -156
  197. data/embulk-core/src/main/java/org/embulk/spi/unit/LocalFile.java +0 -106
  198. data/embulk-core/src/main/java/org/embulk/spi/unit/LocalFileSerDe.java +0 -113
  199. data/embulk-core/src/main/java/org/embulk/spi/unit/ToString.java +0 -54
  200. data/embulk-core/src/main/java/org/embulk/spi/unit/ToStringMap.java +0 -34
  201. data/embulk-core/src/main/java/org/embulk/spi/util/CharsetSerDe.java +0 -55
  202. data/embulk-core/src/main/java/org/embulk/spi/util/Decoders.java +0 -81
  203. data/embulk-core/src/main/java/org/embulk/spi/util/DynamicColumnNotFoundException.java +0 -10
  204. data/embulk-core/src/main/java/org/embulk/spi/util/DynamicColumnSetter.java +0 -21
  205. data/embulk-core/src/main/java/org/embulk/spi/util/DynamicColumnSetterFactory.java +0 -134
  206. data/embulk-core/src/main/java/org/embulk/spi/util/DynamicPageBuilder.java +0 -200
  207. data/embulk-core/src/main/java/org/embulk/spi/util/Encoders.java +0 -81
  208. data/embulk-core/src/main/java/org/embulk/spi/util/Executors.java +0 -93
  209. data/embulk-core/src/main/java/org/embulk/spi/util/FileInputInputStream.java +0 -111
  210. data/embulk-core/src/main/java/org/embulk/spi/util/FileOutputOutputStream.java +0 -119
  211. data/embulk-core/src/main/java/org/embulk/spi/util/Filters.java +0 -100
  212. data/embulk-core/src/main/java/org/embulk/spi/util/InputStreamFileInput.java +0 -189
  213. data/embulk-core/src/main/java/org/embulk/spi/util/InputStreamTransactionalFileInput.java +0 -25
  214. data/embulk-core/src/main/java/org/embulk/spi/util/Inputs.java +0 -65
  215. data/embulk-core/src/main/java/org/embulk/spi/util/LineDecoder.java +0 -157
  216. data/embulk-core/src/main/java/org/embulk/spi/util/LineEncoder.java +0 -123
  217. data/embulk-core/src/main/java/org/embulk/spi/util/ListFileInput.java +0 -52
  218. data/embulk-core/src/main/java/org/embulk/spi/util/Newline.java +0 -38
  219. data/embulk-core/src/main/java/org/embulk/spi/util/OutputStreamFileOutput.java +0 -88
  220. data/embulk-core/src/main/java/org/embulk/spi/util/PagePrinter.java +0 -126
  221. data/embulk-core/src/main/java/org/embulk/spi/util/Pages.java +0 -149
  222. data/embulk-core/src/main/java/org/embulk/spi/util/ResumableInputStream.java +0 -168
  223. data/embulk-core/src/main/java/org/embulk/spi/util/RetryExecutor.java +0 -130
  224. data/embulk-core/src/main/java/org/embulk/spi/util/Timestamps.java +0 -53
  225. data/embulk-core/src/main/java/org/embulk/spi/util/dynamic/AbstractDynamicColumnSetter.java +0 -94
  226. data/embulk-core/src/main/java/org/embulk/spi/util/dynamic/BooleanColumnSetter.java +0 -71
  227. data/embulk-core/src/main/java/org/embulk/spi/util/dynamic/DefaultValueSetter.java +0 -20
  228. data/embulk-core/src/main/java/org/embulk/spi/util/dynamic/DoubleColumnSetter.java +0 -68
  229. data/embulk-core/src/main/java/org/embulk/spi/util/dynamic/JsonColumnSetter.java +0 -64
  230. data/embulk-core/src/main/java/org/embulk/spi/util/dynamic/LongColumnSetter.java +0 -78
  231. data/embulk-core/src/main/java/org/embulk/spi/util/dynamic/NullDefaultValueSetter.java +0 -39
  232. data/embulk-core/src/main/java/org/embulk/spi/util/dynamic/SkipColumnSetter.java +0 -68
  233. data/embulk-core/src/main/java/org/embulk/spi/util/dynamic/StringColumnSetter.java +0 -63
  234. data/embulk-core/src/main/java/org/embulk/spi/util/dynamic/TimestampColumnSetter.java +0 -72
  235. data/embulk-core/src/main/resources/embulk/logback-color.xml +0 -72
  236. data/embulk-core/src/main/resources/embulk/logback-console.xml +0 -14
  237. data/embulk-core/src/main/resources/embulk/logback-file.xml +0 -23
  238. data/embulk-core/src/main/resources/embulk/parent_first_packages.properties +0 -73
  239. data/embulk-core/src/main/resources/embulk/parent_first_resources.properties +0 -29
  240. data/embulk-core/src/test/java/org/embulk/EmbulkTestRuntime.java +0 -122
  241. data/embulk-core/src/test/java/org/embulk/GuiceBinder.java +0 -72
  242. data/embulk-core/src/test/java/org/embulk/RandomManager.java +0 -53
  243. data/embulk-core/src/test/java/org/embulk/TestPluginSourceModule.java +0 -23
  244. data/embulk-core/src/test/java/org/embulk/TestUtilityModule.java +0 -17
  245. data/embulk-core/src/test/java/org/embulk/config/TestConfigLoader.java +0 -66
  246. data/embulk-core/src/test/java/org/embulk/config/TestConfigSource.java +0 -114
  247. data/embulk-core/src/test/java/org/embulk/config/TestTaskSource.java +0 -70
  248. data/embulk-core/src/test/java/org/embulk/plugin/MockPluginSource.java +0 -58
  249. data/embulk-core/src/test/java/org/embulk/plugin/TestPluginType.java +0 -83
  250. data/embulk-core/src/test/java/org/embulk/plugin/TestPluginTypeSerDe.java +0 -67
  251. data/embulk-core/src/test/java/org/embulk/plugin/jar/ExampleJarSpiV0.java +0 -9
  252. data/embulk-core/src/test/java/org/embulk/plugin/jar/JarBuilder.java +0 -101
  253. data/embulk-core/src/test/java/org/embulk/plugin/jar/TestJarPluginLoader.java +0 -60
  254. data/embulk-core/src/test/java/org/embulk/plugin/maven/TestMavenArtifactFinder.java +0 -41
  255. data/embulk-core/src/test/java/org/embulk/spi/MockFileOutput.java +0 -63
  256. data/embulk-core/src/test/java/org/embulk/spi/MockFormatterPlugin.java +0 -108
  257. data/embulk-core/src/test/java/org/embulk/spi/MockParserPlugin.java +0 -80
  258. data/embulk-core/src/test/java/org/embulk/spi/PageTestUtils.java +0 -59
  259. data/embulk-core/src/test/java/org/embulk/spi/TestBuffer.java +0 -24
  260. data/embulk-core/src/test/java/org/embulk/spi/TestFileInputInputStream.java +0 -89
  261. data/embulk-core/src/test/java/org/embulk/spi/TestFileInputRunner.java +0 -199
  262. data/embulk-core/src/test/java/org/embulk/spi/TestFileOutputRunner.java +0 -221
  263. data/embulk-core/src/test/java/org/embulk/spi/TestInputStreamFileInput.java +0 -188
  264. data/embulk-core/src/test/java/org/embulk/spi/TestPageBuilderReader.java +0 -411
  265. data/embulk-core/src/test/java/org/embulk/spi/json/TestJsonParser.java +0 -102
  266. data/embulk-core/src/test/java/org/embulk/spi/time/TestTimestamp.java +0 -116
  267. data/embulk-core/src/test/java/org/embulk/spi/time/TestTimestampFormatterParser.java +0 -75
  268. data/embulk-core/src/test/java/org/embulk/spi/time/TestTimestampFormatterParserDeprecated.java +0 -67
  269. data/embulk-core/src/test/java/org/embulk/spi/time/TestTimestampParser.java +0 -247
  270. data/embulk-core/src/test/java/org/embulk/spi/type/TestTypeSerDe.java +0 -45
  271. data/embulk-core/src/test/java/org/embulk/spi/unit/TestByteSize.java +0 -79
  272. data/embulk-core/src/test/java/org/embulk/spi/util/TestLineDecoder.java +0 -237
  273. data/embulk-core/src/test/java/org/embulk/spi/util/TestLineEncoder.java +0 -123
  274. data/embulk-core/src/test/resources/m2.test/.gitignore +0 -1
  275. 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
  276. 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
  277. 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
  278. 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
  279. data/embulk-docs/Makefile +0 -178
  280. data/embulk-docs/build.gradle +0 -41
  281. data/embulk-docs/make.bat +0 -243
  282. data/embulk-docs/push-gh-pages.sh +0 -49
  283. data/embulk-docs/src/_static/embulk-architecture.png +0 -0
  284. data/embulk-docs/src/_static/embulk-logo-v2/embulk-logo-v2-oneline-tr.png +0 -0
  285. data/embulk-docs/src/_static/embulk-logo-v2/embulk-logo-v2-oneline-wt.png +0 -0
  286. data/embulk-docs/src/_static/embulk-logo-v2/embulk-logo-v2-oneline.ai +0 -396
  287. data/embulk-docs/src/_static/embulk-logo-v2/embulk-logo-v2-sq-tr-small.png +0 -0
  288. data/embulk-docs/src/_static/embulk-logo-v2/embulk-logo-v2-sq-tr.png +0 -0
  289. data/embulk-docs/src/_static/embulk-logo-v2/embulk-logo-v2-sq-wt.png +0 -0
  290. data/embulk-docs/src/_static/embulk-logo-v2/embulk-logo-v2-sq.ai +0 -417
  291. data/embulk-docs/src/_static/embulk-logo-v2/embulk-logo-v2-sq.svg +0 -1
  292. data/embulk-docs/src/_static/embulk-logo-v2/embulk-logo-v2-symbol-tr.png +0 -0
  293. data/embulk-docs/src/_static/embulk-logo-v2/embulk-logo-v2-symbol-wt.png +0 -0
  294. data/embulk-docs/src/_static/embulk-logo-v2/embulk-logo-v2-symbol.ai +1 -394
  295. data/embulk-docs/src/_static/embulk-logo.svg +0 -133
  296. data/embulk-docs/src/built-in.rst +0 -1017
  297. data/embulk-docs/src/conf.py +0 -260
  298. data/embulk-docs/src/customization.rst +0 -184
  299. data/embulk-docs/src/developers/index.rst +0 -45
  300. data/embulk-docs/src/index.rst +0 -102
  301. data/embulk-docs/src/logo.rst +0 -27
  302. data/embulk-docs/src/recipe.rst +0 -8
  303. data/embulk-docs/src/recipe/scheduled-csv-load-to-elasticsearch-kibana5.rst +0 -163
  304. data/embulk-docs/src/release.rst +0 -109
  305. data/embulk-docs/src/release/release-0.1.0.rst +0 -8
  306. data/embulk-docs/src/release/release-0.2.0.rst +0 -16
  307. data/embulk-docs/src/release/release-0.2.1.rst +0 -19
  308. data/embulk-docs/src/release/release-0.3.0.rst +0 -34
  309. data/embulk-docs/src/release/release-0.3.1.rst +0 -11
  310. data/embulk-docs/src/release/release-0.3.2.rst +0 -15
  311. data/embulk-docs/src/release/release-0.4.0.rst +0 -74
  312. data/embulk-docs/src/release/release-0.4.1.rst +0 -18
  313. data/embulk-docs/src/release/release-0.4.10.rst +0 -17
  314. data/embulk-docs/src/release/release-0.4.2.rst +0 -18
  315. data/embulk-docs/src/release/release-0.4.3.rst +0 -34
  316. data/embulk-docs/src/release/release-0.4.4.rst +0 -39
  317. data/embulk-docs/src/release/release-0.4.5.rst +0 -24
  318. data/embulk-docs/src/release/release-0.4.6.rst +0 -30
  319. data/embulk-docs/src/release/release-0.4.7.rst +0 -16
  320. data/embulk-docs/src/release/release-0.4.8.rst +0 -15
  321. data/embulk-docs/src/release/release-0.4.9.rst +0 -23
  322. data/embulk-docs/src/release/release-0.5.0.rst +0 -89
  323. data/embulk-docs/src/release/release-0.5.1.rst +0 -13
  324. data/embulk-docs/src/release/release-0.5.2.rst +0 -30
  325. data/embulk-docs/src/release/release-0.5.3.rst +0 -22
  326. data/embulk-docs/src/release/release-0.5.4.rst +0 -24
  327. data/embulk-docs/src/release/release-0.5.5.rst +0 -18
  328. data/embulk-docs/src/release/release-0.6.0.rst +0 -34
  329. data/embulk-docs/src/release/release-0.6.1.rst +0 -11
  330. data/embulk-docs/src/release/release-0.6.10.rst +0 -15
  331. data/embulk-docs/src/release/release-0.6.11.rst +0 -19
  332. data/embulk-docs/src/release/release-0.6.12.rst +0 -31
  333. data/embulk-docs/src/release/release-0.6.13.rst +0 -23
  334. data/embulk-docs/src/release/release-0.6.14.rst +0 -47
  335. data/embulk-docs/src/release/release-0.6.15.rst +0 -26
  336. data/embulk-docs/src/release/release-0.6.16.rst +0 -26
  337. data/embulk-docs/src/release/release-0.6.17.rst +0 -39
  338. data/embulk-docs/src/release/release-0.6.18.rst +0 -14
  339. data/embulk-docs/src/release/release-0.6.19.rst +0 -18
  340. data/embulk-docs/src/release/release-0.6.2.rst +0 -17
  341. data/embulk-docs/src/release/release-0.6.20.rst +0 -19
  342. data/embulk-docs/src/release/release-0.6.21.rst +0 -20
  343. data/embulk-docs/src/release/release-0.6.22.rst +0 -26
  344. data/embulk-docs/src/release/release-0.6.23.rst +0 -17
  345. data/embulk-docs/src/release/release-0.6.24.rst +0 -13
  346. data/embulk-docs/src/release/release-0.6.25.rst +0 -12
  347. data/embulk-docs/src/release/release-0.6.26.rst +0 -17
  348. data/embulk-docs/src/release/release-0.6.27.rst +0 -11
  349. data/embulk-docs/src/release/release-0.6.3.rst +0 -23
  350. data/embulk-docs/src/release/release-0.6.4.rst +0 -13
  351. data/embulk-docs/src/release/release-0.6.5.rst +0 -17
  352. data/embulk-docs/src/release/release-0.6.6.rst +0 -17
  353. data/embulk-docs/src/release/release-0.6.7.rst +0 -17
  354. data/embulk-docs/src/release/release-0.6.8.rst +0 -24
  355. data/embulk-docs/src/release/release-0.6.9.rst +0 -24
  356. data/embulk-docs/src/release/release-0.7.0.rst +0 -96
  357. data/embulk-docs/src/release/release-0.7.1.rst +0 -22
  358. data/embulk-docs/src/release/release-0.7.10.rst +0 -13
  359. data/embulk-docs/src/release/release-0.7.11.rst +0 -12
  360. data/embulk-docs/src/release/release-0.7.2.rst +0 -25
  361. data/embulk-docs/src/release/release-0.7.3.rst +0 -21
  362. data/embulk-docs/src/release/release-0.7.4.rst +0 -14
  363. data/embulk-docs/src/release/release-0.7.5.rst +0 -22
  364. data/embulk-docs/src/release/release-0.7.6.rst +0 -18
  365. data/embulk-docs/src/release/release-0.7.7.rst +0 -13
  366. data/embulk-docs/src/release/release-0.7.8.rst +0 -14
  367. data/embulk-docs/src/release/release-0.7.9.rst +0 -14
  368. data/embulk-docs/src/release/release-0.8.0.rst +0 -74
  369. data/embulk-docs/src/release/release-0.8.1.rst +0 -18
  370. data/embulk-docs/src/release/release-0.8.10.rst +0 -35
  371. data/embulk-docs/src/release/release-0.8.11.rst +0 -12
  372. data/embulk-docs/src/release/release-0.8.12.rst +0 -12
  373. data/embulk-docs/src/release/release-0.8.13.rst +0 -12
  374. data/embulk-docs/src/release/release-0.8.14.rst +0 -31
  375. data/embulk-docs/src/release/release-0.8.15.rst +0 -17
  376. data/embulk-docs/src/release/release-0.8.16.rst +0 -43
  377. data/embulk-docs/src/release/release-0.8.17.rst +0 -11
  378. data/embulk-docs/src/release/release-0.8.18.rst +0 -27
  379. data/embulk-docs/src/release/release-0.8.19.rst +0 -43
  380. data/embulk-docs/src/release/release-0.8.2.rst +0 -19
  381. data/embulk-docs/src/release/release-0.8.20.rst +0 -11
  382. data/embulk-docs/src/release/release-0.8.21.rst +0 -17
  383. data/embulk-docs/src/release/release-0.8.22.rst +0 -15
  384. data/embulk-docs/src/release/release-0.8.23.rst +0 -14
  385. data/embulk-docs/src/release/release-0.8.24.rst +0 -15
  386. data/embulk-docs/src/release/release-0.8.25.rst +0 -14
  387. data/embulk-docs/src/release/release-0.8.26.rst +0 -16
  388. data/embulk-docs/src/release/release-0.8.27.rst +0 -15
  389. data/embulk-docs/src/release/release-0.8.28.rst +0 -14
  390. data/embulk-docs/src/release/release-0.8.29.rst +0 -14
  391. data/embulk-docs/src/release/release-0.8.3.rst +0 -15
  392. data/embulk-docs/src/release/release-0.8.30.rst +0 -14
  393. data/embulk-docs/src/release/release-0.8.31.rst +0 -12
  394. data/embulk-docs/src/release/release-0.8.32.rst +0 -14
  395. data/embulk-docs/src/release/release-0.8.33.rst +0 -13
  396. data/embulk-docs/src/release/release-0.8.34.rst +0 -12
  397. data/embulk-docs/src/release/release-0.8.35.rst +0 -12
  398. data/embulk-docs/src/release/release-0.8.36.rst +0 -32
  399. data/embulk-docs/src/release/release-0.8.37.rst +0 -20
  400. data/embulk-docs/src/release/release-0.8.38.rst +0 -12
  401. data/embulk-docs/src/release/release-0.8.39.rst +0 -12
  402. data/embulk-docs/src/release/release-0.8.4.rst +0 -18
  403. data/embulk-docs/src/release/release-0.8.5.rst +0 -11
  404. data/embulk-docs/src/release/release-0.8.6.rst +0 -14
  405. data/embulk-docs/src/release/release-0.8.7.rst +0 -18
  406. data/embulk-docs/src/release/release-0.8.8.rst +0 -18
  407. data/embulk-docs/src/release/release-0.8.9.rst +0 -14
  408. data/embulk-jruby-strptime/build.gradle +0 -3
  409. data/embulk-jruby-strptime/src/main/java/org/embulk/spi/time/RubyDateParser.java +0 -121
  410. data/embulk-jruby-strptime/src/main/java/org/embulk/spi/time/StrptimeFormat.java +0 -53
  411. data/embulk-jruby-strptime/src/main/java/org/embulk/spi/time/StrptimeParser.java +0 -884
  412. data/embulk-jruby-strptime/src/main/java/org/embulk/spi/time/StrptimeToken.java +0 -111
  413. data/embulk-jruby-strptime/src/main/java/org/embulk/spi/time/TimeZoneConverter.java +0 -466
  414. data/embulk-jruby-strptime/src/main/java/org/embulk/spi/time/lexer/StrptimeLexer.flex +0 -62
  415. data/embulk-jruby-strptime/src/main/java/org/embulk/spi/time/lexer/StrptimeLexer.java +0 -577
  416. data/embulk-standards/build.gradle +0 -7
  417. data/embulk-standards/src/main/java/org/embulk/standards/Bzip2FileDecoderPlugin.java +0 -55
  418. data/embulk-standards/src/main/java/org/embulk/standards/Bzip2FileEncoderPlugin.java +0 -67
  419. data/embulk-standards/src/main/java/org/embulk/standards/ConfigInputPlugin.java +0 -170
  420. data/embulk-standards/src/main/java/org/embulk/standards/CsvFormatterPlugin.java +0 -295
  421. data/embulk-standards/src/main/java/org/embulk/standards/CsvParserPlugin.java +0 -416
  422. data/embulk-standards/src/main/java/org/embulk/standards/CsvTokenizer.java +0 -545
  423. data/embulk-standards/src/main/java/org/embulk/standards/GzipFileDecoderPlugin.java +0 -55
  424. data/embulk-standards/src/main/java/org/embulk/standards/GzipFileEncoderPlugin.java +0 -71
  425. data/embulk-standards/src/main/java/org/embulk/standards/JsonParserPlugin.java +0 -235
  426. data/embulk-standards/src/main/java/org/embulk/standards/LocalFileInputPlugin.java +0 -232
  427. data/embulk-standards/src/main/java/org/embulk/standards/LocalFileOutputPlugin.java +0 -148
  428. data/embulk-standards/src/main/java/org/embulk/standards/NullOutputPlugin.java +0 -59
  429. data/embulk-standards/src/main/java/org/embulk/standards/RemoveColumnsFilterPlugin.java +0 -268
  430. data/embulk-standards/src/main/java/org/embulk/standards/RenameFilterPlugin.java +0 -479
  431. data/embulk-standards/src/main/java/org/embulk/standards/StandardPluginExtension.java +0 -16
  432. data/embulk-standards/src/main/java/org/embulk/standards/StandardPluginModule.java +0 -60
  433. data/embulk-standards/src/main/java/org/embulk/standards/StdoutOutputPlugin.java +0 -91
  434. data/embulk-standards/src/main/resources/META-INF/services/org.embulk.spi.Extension +0 -1
  435. data/embulk-standards/src/test/java/org/embulk/standards/TestCsvFormatterPlugin.java +0 -312
  436. data/embulk-standards/src/test/java/org/embulk/standards/TestCsvParserPlugin.java +0 -75
  437. data/embulk-standards/src/test/java/org/embulk/standards/TestCsvTokenizer.java +0 -457
  438. data/embulk-standards/src/test/java/org/embulk/standards/TestJsonParserPlugin.java +0 -351
  439. data/embulk-standards/src/test/java/org/embulk/standards/TestRemoveColumnsFilterPlugin.java +0 -121
  440. data/embulk-standards/src/test/java/org/embulk/standards/TestRenameFilterPlugin.java +0 -1020
  441. data/embulk-standards/src/test/java/org/embulk/standards/guess/TestCsvAllStringsGuessPlugin.java +0 -38
  442. data/embulk-standards/src/test/java/org/embulk/standards/guess/TestCsvGuessPlugin.java +0 -248
  443. data/embulk-standards/src/test/java/org/embulk/standards/preview/TestFilePreview.java +0 -73
  444. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_int_single_column_row.csv +0 -1
  445. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_int_single_column_row_and_header.csv +0 -2
  446. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_int_single_column_row_and_header_guessed.yml +0 -12
  447. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_int_single_column_row_and_header_seed.yml +0 -1
  448. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_int_single_column_row_guessed.yml +0 -12
  449. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_int_single_column_row_seed.yml +0 -1
  450. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_rows.csv +0 -1
  451. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_rows_and_header.csv +0 -2
  452. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_rows_and_header_guessed.yml +0 -16
  453. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_rows_and_header_seed.yml +0 -1
  454. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_rows_and_header_with_trim_needed.csv +0 -2
  455. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_rows_and_header_with_trim_needed_guessed.yml +0 -16
  456. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_rows_and_header_with_trim_needed_seed.yml +0 -1
  457. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_rows_guessed.yml +0 -16
  458. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_rows_seed.yml +0 -1
  459. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_rows_with_trim_needed.csv +0 -1
  460. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_rows_with_trim_needed_guessed.yml +0 -16
  461. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_rows_with_trim_needed_seed.yml +0 -1
  462. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_string_single_column_row.csv +0 -1
  463. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_string_single_column_row_and_header.csv +0 -2
  464. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_string_single_column_row_and_header_guessed.yml +0 -12
  465. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_string_single_column_row_and_header_seed.yml +0 -1
  466. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_string_single_column_row_guessed.yml +0 -12
  467. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_string_single_column_row_seed.yml +0 -1
  468. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_2_int_single_column_rows.csv +0 -2
  469. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_2_int_single_column_rows_guessed.yml +0 -12
  470. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_2_int_single_column_rows_seed.yml +0 -1
  471. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_2_rows.csv +0 -2
  472. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_2_rows_and_header.csv +0 -3
  473. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_2_rows_and_header_guessed.yml +0 -16
  474. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_2_rows_and_header_seed.yml +0 -1
  475. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_2_rows_guessed.yml +0 -16
  476. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_2_rows_seed.yml +0 -1
  477. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_2_string_single_column_rows.csv +0 -2
  478. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_2_string_single_column_rows_guessed.yml +0 -12
  479. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_2_string_single_column_rows_seed.yml +0 -1
  480. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_backslash_escape.csv +0 -5
  481. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_backslash_escape_guessed.yml +0 -17
  482. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_backslash_escape_seed.yml +0 -1
  483. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_double_single_column.csv +0 -12
  484. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_double_single_column_guessed.yml +0 -12
  485. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_double_single_column_seed.yml +0 -1
  486. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_int_single_column.csv +0 -4
  487. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_int_single_column_guessed.yml +0 -12
  488. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_int_single_column_seed.yml +0 -1
  489. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_int_single_column_with_header.csv +0 -5
  490. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_int_single_column_with_header_guessed.yml +0 -12
  491. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_int_single_column_with_header_seed.yml +0 -1
  492. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_semicolon_delimiter.csv +0 -5
  493. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_semicolon_delimiter_guessed.yml +0 -17
  494. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_semicolon_delimiter_seed.yml +0 -1
  495. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_simple.csv +0 -5
  496. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_simple_guessed.yml +0 -17
  497. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_simple_seed.yml +0 -1
  498. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_single_quote.csv +0 -5
  499. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_single_quote_guessed.yml +0 -17
  500. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_single_quote_seed.yml +0 -1
  501. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_skip_suggest_if_empty_sample_records.csv +0 -5
  502. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_skip_suggest_if_empty_sample_records_guessed.yml +0 -2
  503. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_skip_suggest_if_empty_sample_records_seed.yml +0 -1
  504. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_string_single_column.csv +0 -4
  505. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_string_single_column_guessed.yml +0 -12
  506. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_string_single_column_seed.yml +0 -1
  507. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_string_single_column_with_header.csv +0 -5
  508. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_string_single_column_with_header_guessed.yml +0 -12
  509. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_string_single_column_with_header_seed.yml +0 -1
  510. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_tab_delimiter.csv +0 -4
  511. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_tab_delimiter_guessed.yml +0 -16
  512. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_tab_delimiter_seed.yml +0 -1
  513. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv_all_strings/test/test_simple.csv +0 -5
  514. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv_all_strings/test/test_simple_guessed.yml +0 -17
  515. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv_all_strings/test/test_simple_seed.yml +0 -1
  516. data/embulk-standards/src/test/resources/org/embulk/standards/preview/file/test/test_sample_buffer_bytes.csv +0 -5
  517. data/embulk-standards/src/test/resources/org/embulk/standards/preview/file/test/test_sample_buffer_bytes_exec.yml +0 -1
  518. data/embulk-standards/src/test/resources/org/embulk/standards/preview/file/test/test_sample_buffer_bytes_load.yml +0 -19
  519. data/embulk-standards/src/test/resources/org/embulk/standards/preview/file/test/test_sample_buffer_bytes_previewed.csv +0 -1
  520. data/embulk-standards/src/test/resources/org/embulk/standards/preview/file/test/test_simple.csv +0 -5
  521. data/embulk-standards/src/test/resources/org/embulk/standards/preview/file/test/test_simple_load.yml +0 -19
  522. data/embulk-standards/src/test/resources/org/embulk/standards/preview/file/test/test_simple_previewed.csv +0 -4
  523. data/embulk-standards/src/test/resources/org/embulk/standards/remove_columns/test/test_keep.csv +0 -5
  524. data/embulk-standards/src/test/resources/org/embulk/standards/remove_columns/test/test_keep_expected.csv +0 -4
  525. data/embulk-standards/src/test/resources/org/embulk/standards/remove_columns/test/test_keep_filter.yml +0 -2
  526. data/embulk-standards/src/test/resources/org/embulk/standards/remove_columns/test/test_keep_in.yml +0 -18
  527. data/embulk-standards/src/test/resources/org/embulk/standards/remove_columns/test/test_keep_with_duplicated_column_names.csv +0 -5
  528. data/embulk-standards/src/test/resources/org/embulk/standards/remove_columns/test/test_keep_with_duplicated_column_names.yml +0 -2
  529. data/embulk-standards/src/test/resources/org/embulk/standards/remove_columns/test/test_keep_with_duplicated_column_names_expected.csv +0 -4
  530. data/embulk-standards/src/test/resources/org/embulk/standards/remove_columns/test/test_keep_with_duplicated_column_names_in.yml +0 -17
  531. data/embulk-standards/src/test/resources/org/embulk/standards/remove_columns/test/test_keep_with_unmatched_filter.yml +0 -3
  532. data/embulk-standards/src/test/resources/org/embulk/standards/remove_columns/test/test_keep_without_unmatched_filter.yml +0 -2
  533. data/embulk-standards/src/test/resources/org/embulk/standards/remove_columns/test/test_remove.csv +0 -5
  534. data/embulk-standards/src/test/resources/org/embulk/standards/remove_columns/test/test_remove_expected.csv +0 -4
  535. data/embulk-standards/src/test/resources/org/embulk/standards/remove_columns/test/test_remove_filter.yml +0 -2
  536. data/embulk-standards/src/test/resources/org/embulk/standards/remove_columns/test/test_remove_in.yml +0 -18
  537. data/embulk-standards/src/test/resources/org/embulk/standards/remove_columns/test/test_remove_with_unmatched_filter.yml +0 -3
  538. data/embulk-standards/src/test/resources/org/embulk/standards/remove_columns/test/test_remove_without_unmatched_filter.yml +0 -2
  539. data/embulk-test/build.gradle +0 -6
  540. data/embulk-test/src/main/java/org/embulk/test/EmbulkTests.java +0 -75
  541. data/embulk-test/src/main/java/org/embulk/test/PreviewResultInputPlugin.java +0 -65
  542. data/embulk-test/src/main/java/org/embulk/test/TestingBulkLoader.java +0 -129
  543. data/embulk-test/src/main/java/org/embulk/test/TestingEmbulk.java +0 -710
  544. data/gradle/wrapper/gradle-wrapper.jar +0 -0
  545. data/gradle/wrapper/gradle-wrapper.properties +0 -5
  546. data/gradlew +0 -172
  547. data/gradlew.bat +0 -84
  548. data/lib/embulk/data/bundle/.bundle/config +0 -3
  549. data/lib/embulk/data/bundle/.ruby-version +0 -1
  550. data/lib/embulk/data/bundle/Gemfile +0 -31
  551. data/lib/embulk/data/bundle/embulk/filter/example.rb +0 -42
  552. data/lib/embulk/data/bundle/embulk/input/example.rb +0 -54
  553. data/lib/embulk/data/bundle/embulk/output/example.rb +0 -58
  554. data/lib/embulk/data/new/LICENSE.txt +0 -21
  555. data/lib/embulk/data/new/README.md.vm +0 -106
  556. data/lib/embulk/data/new/gitignore.vm +0 -17
  557. data/lib/embulk/data/new/java/build.gradle.vm +0 -96
  558. data/lib/embulk/data/new/java/config/checkstyle/checkstyle.xml +0 -128
  559. data/lib/embulk/data/new/java/config/checkstyle/default.xml +0 -108
  560. data/lib/embulk/data/new/java/decoder.java.vm +0 -86
  561. data/lib/embulk/data/new/java/encoder.java.vm +0 -88
  562. data/lib/embulk/data/new/java/file_input.java.vm +0 -145
  563. data/lib/embulk/data/new/java/file_output.java.vm +0 -95
  564. data/lib/embulk/data/new/java/filter.java.vm +0 -57
  565. data/lib/embulk/data/new/java/formatter.java.vm +0 -55
  566. data/lib/embulk/data/new/java/gradle/wrapper/gradle-wrapper.jar +0 -0
  567. data/lib/embulk/data/new/java/gradle/wrapper/gradle-wrapper.properties +0 -5
  568. data/lib/embulk/data/new/java/gradlew +0 -172
  569. data/lib/embulk/data/new/java/gradlew.bat +0 -84
  570. data/lib/embulk/data/new/java/input.java.vm +0 -89
  571. data/lib/embulk/data/new/java/output.java.vm +0 -79
  572. data/lib/embulk/data/new/java/parser.java.vm +0 -61
  573. data/lib/embulk/data/new/java/plugin_loader.rb.vm +0 -3
  574. data/lib/embulk/data/new/java/test.java.vm +0 -5
  575. data/lib/embulk/data/new/ruby/.ruby-version +0 -1
  576. data/lib/embulk/data/new/ruby/Gemfile +0 -2
  577. data/lib/embulk/data/new/ruby/Rakefile +0 -3
  578. data/lib/embulk/data/new/ruby/decoder_guess.rb.vm +0 -25
  579. data/lib/embulk/data/new/ruby/filter.rb.vm +0 -50
  580. data/lib/embulk/data/new/ruby/formatter.rb.vm +0 -49
  581. data/lib/embulk/data/new/ruby/gemspec.vm +0 -20
  582. data/lib/embulk/data/new/ruby/input.rb.vm +0 -59
  583. data/lib/embulk/data/new/ruby/output.rb.vm +0 -61
  584. data/lib/embulk/data/new/ruby/parser.rb.vm +0 -44
  585. data/lib/embulk/data/new/ruby/parser_guess.rb.vm +0 -65
  586. data/lib/embulk/data/package_data.rb +0 -59
  587. data/lib/embulk/runner.rb +0 -53
  588. data/settings.gradle +0 -8
  589. data/test/helper.rb +0 -23
  590. data/test/monkey_strptime/mri/date/test_date_strptime.rb +0 -515
  591. data/test/monkey_strptime/run-test.rb +0 -29
  592. data/test/vanilla/guess/test_csv_all_strings.rb +0 -43
  593. data/test/vanilla/guess/test_csv_guess.rb +0 -170
  594. data/test/vanilla/guess/test_schema_guess.rb +0 -47
  595. data/test/vanilla/guess/test_time_format_guess.rb +0 -135
  596. data/test/vanilla/run-test.rb +0 -14
  597. data/test/vanilla/time/test_timestamp_parser.rb +0 -117
@@ -1,14 +0,0 @@
1
- Release 0.8.9
2
- ==================================
3
-
4
- General Changes
5
- ------------------
6
-
7
- * Added ``date:`` option to timestamp parser. If format doesn't include date part, date option is used as the default date. For example, parsing text "02:46:29" with ``format: %H:%M:%S`` and ``date: 2016-02-03`` options returns "2016-02-03 02:46:29".
8
-
9
- * Upgraded msgpack-core version from 0.8.6 to 0.8.7. Release notes of msgpack-java: https://github.com/msgpack/msgpack-java/blob/develop/RELEASE_NOTES.md
10
-
11
-
12
- Release Date
13
- ------------------
14
- 2016-05-12
@@ -1,3 +0,0 @@
1
- dependencies {
2
- compile 'org.jruby:jruby-complete:' + project.jrubyVersion
3
- }
@@ -1,121 +0,0 @@
1
- package org.embulk.spi.time;
2
-
3
- import org.jruby.runtime.ThreadContext;
4
-
5
- import java.util.HashMap;
6
- import java.util.List;
7
-
8
- import static org.embulk.spi.time.StrptimeParser.FormatBag.has;
9
- import static org.jruby.RubyRational.newRationalCanonicalize;
10
-
11
- /**
12
- * This class has {@code StrptimeParser} and provides methods that are calls from JRuby.
13
- *
14
- * TODO
15
- * This class is tentatively required for executing test/mri/date/test_date_strptime.rb
16
- * (#617). The {@code StrptimeParser} and {@code RubyDateParser} will be merged into
17
- * JRuby (jruby/jruby#4591). embulk-jruby-strptime is removed when Embulk start using
18
- * the JRuby that bundles embulk-jruby-strptime.
19
- */
20
- public class RubyDateParser
21
- {
22
- private final StrptimeParser strptimeParser;
23
-
24
- public RubyDateParser()
25
- {
26
- this.strptimeParser = new StrptimeParser();
27
- }
28
-
29
- /**
30
- * Date._strptime method in JRuby 9.1.5.0's lib/ruby/stdlib/date/format.rb is replaced
31
- * with this method. This is Java implementation of date__strptime method in MRI 2.3.1's
32
- * ext/date/date_strptime.c.
33
- * @see <a href="https://github.com/jruby/jruby/blob/036ce39f0476d4bd718e23e64caff36bb50b8dbc/lib/ruby/stdlib/date/format.rb">format.rb</a>
34
- * @see <a href="https://github.com/ruby/ruby/blob/394fa89c67722d35bdda89f10c7de5c304a5efb1/ext/date/date_strptime.c">date_strptime.c</a>
35
- */
36
- public HashMap<String, Object> parse(ThreadContext context, final String format, final String text)
37
- {
38
- final List<StrptimeToken> compiledPattern = strptimeParser.compilePattern(format);
39
- final StrptimeParser.FormatBag bag = strptimeParser.parse(compiledPattern, text);
40
- if (bag != null) {
41
- return convertFormatBagToHash(context, bag);
42
- }
43
- else {
44
- return null;
45
- }
46
- }
47
-
48
- private HashMap<String, Object> convertFormatBagToHash(ThreadContext context, StrptimeParser.FormatBag bag)
49
- {
50
- final HashMap<String, Object> map = new HashMap<>();
51
-
52
- if (has(bag.getMDay())) {
53
- map.put("mday", bag.getMDay());
54
- }
55
- if (has(bag.getWDay())) {
56
- map.put("wday", bag.getWDay());
57
- }
58
- if (has(bag.getCWDay())) {
59
- map.put("cwday", bag.getCWDay());
60
- }
61
- if (has(bag.getYDay())) {
62
- map.put("yday", bag.getYDay());
63
- }
64
- if (has(bag.getCWeek())) {
65
- map.put("cweek", bag.getCWeek());
66
- }
67
- if (has(bag.getCWYear())) {
68
- map.put("cwyear", bag.getCWYear());
69
- }
70
- if (has(bag.getMin())) {
71
- map.put("min", bag.getMin());
72
- }
73
- if (has(bag.getMon())) {
74
- map.put("mon", bag.getMon());
75
- }
76
- if (has(bag.getHour())) {
77
- map.put("hour", bag.getHour());
78
- }
79
- if (has(bag.getYear())) {
80
- map.put("year", bag.getYear());
81
- }
82
- if (has(bag.getSec())) {
83
- map.put("sec", bag.getSec());
84
- }
85
- if (has(bag.getWNum0())) {
86
- map.put("wnum0", bag.getWNum0());
87
- }
88
- if (has(bag.getWNum1())) {
89
- map.put("wnum1", bag.getWNum1());
90
- }
91
- if (bag.getZone() != null) {
92
- map.put("zone", bag.getZone());
93
- int offset = TimeZoneConverter.dateZoneToDiff(bag.getZone());
94
- if (offset != Integer.MIN_VALUE) {
95
- map.put("offset", offset);
96
- }
97
- }
98
- if (has(bag.getSecFraction())) {
99
- map.put("sec_fraction", newRationalCanonicalize(context, bag.getSecFraction(), (long)Math.pow(10, bag.getSecFractionSize())));
100
- }
101
- if (bag.hasSeconds()) {
102
- if (has(bag.getSecondsSize())) {
103
- map.put("seconds", newRationalCanonicalize(context, bag.getSeconds(), (long) Math.pow(10, bag.getSecondsSize())));
104
- }
105
- else {
106
- map.put("seconds", bag.getSeconds());
107
- }
108
- }
109
- if (has(bag.getMerid())) {
110
- map.put("_merid", bag.getMerid());
111
- }
112
- if (has(bag.getCent())) {
113
- map.put("_cent", bag.getCent());
114
- }
115
- if (bag.getLeftover() != null) {
116
- map.put("leftover", bag.getLeftover());
117
- }
118
-
119
- return map;
120
- }
121
- }
@@ -1,53 +0,0 @@
1
- package org.embulk.spi.time;
2
-
3
- /**
4
- * This class is ported from org.jruby.util.RubyDateFormatter.Format in JRuby
5
- * 9.1.5.0 and modified for StrptimeParser under EPL.
6
- * @see <a href="https://github.com/jruby/jruby/blob/036ce39f0476d4bd718e23e64caff36bb50b8dbc/core/src/main/java/org/jruby/util/RubyDateFormatter.java>RubyDateFormatter.java</a>.
7
- *
8
- * TODO
9
- * This class is tentatively required for {@code StrptimeParser} class.
10
- * The {@code StrptimeParser} and {@code RubyDateParser} will be merged into JRuby
11
- * (jruby/jruby#4591). embulk-jruby-strptime is removed when Embulk start using
12
- * the JRuby that bundles embulk-jruby-strptime.
13
- */
14
- enum StrptimeFormat
15
- {
16
- FORMAT_STRING, // raw string, no formatting
17
- FORMAT_SPECIAL, // composition of other formats
18
-
19
- FORMAT_WEEK_LONG, // %A
20
- FORMAT_WEEK_SHORT, // %a
21
- FORMAT_MONTH_LONG, // %B
22
- FORMAT_MONTH_SHORT, // %b, %h
23
- FORMAT_CENTURY, // %C
24
- FORMAT_DAY, // %d
25
- FORMAT_DAY_S, // %e
26
- FORMAT_WEEKYEAR, // %G
27
- FORMAT_WEEKYEAR_SHORT, // %g
28
- FORMAT_HOUR, // %H
29
- FORMAT_HOUR_M, // %I
30
- FORMAT_DAY_YEAR, // %j
31
- FORMAT_HOUR_BLANK, // %k
32
- FORMAT_MILLISEC, // %L
33
- FORMAT_HOUR_S, // %l
34
- FORMAT_MINUTES, // %M
35
- FORMAT_MONTH, // %m
36
- FORMAT_NANOSEC, // %N
37
- FORMAT_MERIDIAN_LOWER_CASE, // %P
38
- FORMAT_MERIDIAN, // %p
39
- FORMAT_MILLISEC_EPOCH, // %Q Only for Date/DateTime from here
40
- FORMAT_SECONDS, // %S
41
- FORMAT_EPOCH, // %s
42
- FORMAT_WEEK_YEAR_S, // %U
43
- FORMAT_DAY_WEEK2, // %u
44
- FORMAT_WEEK_WEEKYEAR, // %V
45
- FORMAT_WEEK_YEAR_M, // %W
46
- FORMAT_DAY_WEEK, // %w
47
- FORMAT_YEAR_LONG, // %Y
48
- FORMAT_YEAR_SHORT, // %y
49
-
50
- FORMAT_COLON_ZONE_OFF, // %z, %:z, %::z, %:::z must be given number of colons as data
51
-
52
- FORMAT_ZONE_ID; // %Z Change between Time and Date
53
- }
@@ -1,884 +0,0 @@
1
- package org.embulk.spi.time;
2
-
3
- import java.io.IOException;
4
- import java.io.Reader;
5
- import java.io.StringReader;
6
- import java.util.EnumSet;
7
- import java.util.LinkedList;
8
- import java.util.List;
9
- import java.util.Arrays;
10
- import java.util.regex.Matcher;
11
- import java.util.regex.Pattern;
12
-
13
- import org.embulk.spi.time.lexer.StrptimeLexer;
14
-
15
- /**
16
- * This is Java implementation of ext/date/date_strptime.c in Ruby v2.3.1.
17
- * @see <a href="https://github.com/ruby/ruby/blob/394fa89c67722d35bdda89f10c7de5c304a5efb1/ext/date/date_strptime.c">date_strptime.c</a>
18
- *
19
- * TODO
20
- * This class is tentatively required for {@code TimestampParser} class.
21
- * The {@code StrptimeParser} and {@code RubyDateParser} will be merged into JRuby
22
- * (jruby/jruby#4591). embulk-jruby-strptime is removed when Embulk start using
23
- * the JRuby that bundles embulk-jruby-strptime.
24
- */
25
- public class StrptimeParser
26
- {
27
- // day_names
28
- private static final String[] DAY_NAMES = new String[] {
29
- "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday",
30
- "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"
31
- };
32
-
33
- // month_names
34
- private static final String[] MONTH_NAMES = new String[] {
35
- "January", "February", "March", "April", "May", "June", "July", "August", "September",
36
- "October", "November", "December", "Jan", "Feb", "Mar", "Apr", "May", "Jun",
37
- "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
38
- };
39
-
40
- // merid_names
41
- private static final String[] MERID_NAMES = new String[] {
42
- "am", "pm", "a.m.", "p.m."
43
- };
44
-
45
- /**
46
- * Ported Date::Format::Bag from JRuby 9.1.5.0's lib/ruby/stdlib/date/format.rb.
47
- * @see <a href="https://github.com/jruby/jruby/blob/036ce39f0476d4bd718e23e64caff36bb50b8dbc/lib/ruby/stdlib/date/format.rb">format.rb</a>
48
- */
49
- public static class FormatBag
50
- {
51
- private int mDay = Integer.MIN_VALUE;
52
- private int wDay = Integer.MIN_VALUE;
53
- private int cWDay = Integer.MIN_VALUE;
54
- private int yDay = Integer.MIN_VALUE;
55
- private int cWeek = Integer.MIN_VALUE;
56
- private int cWYear = Integer.MIN_VALUE;
57
- private int min = Integer.MIN_VALUE;
58
- private int mon = Integer.MIN_VALUE;
59
- private int hour = Integer.MIN_VALUE;
60
- private int year = Integer.MIN_VALUE;
61
- private int sec = Integer.MIN_VALUE;
62
- private int wNum0 = Integer.MIN_VALUE;
63
- private int wNum1 = Integer.MIN_VALUE;
64
-
65
- private String zone = null;
66
-
67
- private int secFraction = Integer.MIN_VALUE; // Rational
68
- private int secFractionSize = Integer.MIN_VALUE;
69
-
70
- private long seconds = Long.MIN_VALUE; // long or Rational
71
- private int secondsSize = Integer.MIN_VALUE;
72
-
73
- private int merid = Integer.MIN_VALUE;
74
- private int cent = Integer.MIN_VALUE;
75
-
76
- private boolean fail = false;
77
- private String leftover = null;
78
-
79
- public int getMDay()
80
- {
81
- return mDay;
82
- }
83
-
84
- public int getWDay()
85
- {
86
- return wDay;
87
- }
88
-
89
- public int getCWDay()
90
- {
91
- return cWDay;
92
- }
93
-
94
- public int getYDay()
95
- {
96
- return yDay;
97
- }
98
-
99
- public int getCWeek()
100
- {
101
- return cWeek;
102
- }
103
-
104
- public int getCWYear()
105
- {
106
- return cWYear;
107
- }
108
-
109
- public int getMin()
110
- {
111
- return min;
112
- }
113
-
114
- public int getMon()
115
- {
116
- return mon;
117
- }
118
-
119
- public int getHour()
120
- {
121
- return hour;
122
- }
123
-
124
- public int getYear()
125
- {
126
- return year;
127
- }
128
-
129
- public int getSec()
130
- {
131
- return sec;
132
- }
133
-
134
- public int getWNum0()
135
- {
136
- return wNum0;
137
- }
138
-
139
- public int getWNum1()
140
- {
141
- return wNum1;
142
- }
143
-
144
- public String getZone()
145
- {
146
- return zone;
147
- }
148
-
149
- public int getSecFraction()
150
- {
151
- return secFraction;
152
- }
153
-
154
- public int getSecFractionSize()
155
- {
156
- return secFractionSize;
157
- }
158
-
159
- public long getSeconds()
160
- {
161
- return seconds;
162
- }
163
-
164
- public int getSecondsSize()
165
- {
166
- return secondsSize;
167
- }
168
-
169
- public int getMerid()
170
- {
171
- return merid;
172
- }
173
-
174
- public int getCent()
175
- {
176
- return cent;
177
- }
178
-
179
- void fail()
180
- {
181
- fail = true;
182
- }
183
-
184
- public String getLeftover()
185
- {
186
- return leftover;
187
- }
188
-
189
- public boolean setYearIfNotSet(int v)
190
- {
191
- if (has(year)) {
192
- return false;
193
- }
194
- else {
195
- year = v;
196
- return true;
197
- }
198
- }
199
-
200
- public boolean setMonthIfNotSet(int v)
201
- {
202
- if (has(mon)) {
203
- return false;
204
- }
205
- else {
206
- mon = v;
207
- return true;
208
- }
209
- }
210
-
211
- public boolean setMdayIfNotSet(int v)
212
- {
213
- if (has(mDay)) {
214
- return false;
215
- }
216
- else {
217
- mDay = v;
218
- return true;
219
- }
220
- }
221
-
222
- public boolean hasSeconds()
223
- {
224
- return seconds != Long.MIN_VALUE;
225
- }
226
-
227
- public static boolean has(int v)
228
- {
229
- return v != Integer.MIN_VALUE;
230
- }
231
- }
232
-
233
- private final StrptimeLexer lexer;
234
-
235
- public StrptimeParser()
236
- {
237
- this.lexer = new StrptimeLexer((Reader) null);
238
- }
239
-
240
- /**
241
- * Ported from org.jruby.util.RubyDateFormatter#addToPattern in JRuby 9.1.5.0
242
- * under EPL.
243
- * @see <a href="https://github.com/jruby/jruby/blob/036ce39f0476d4bd718e23e64caff36bb50b8dbc/core/src/main/java/org/jruby/util/RubyDateFormatter.java">RubyDateFormatter.java</a>
244
- */
245
- private void addToPattern(final List<StrptimeToken> compiledPattern, final String str)
246
- {
247
- for (int i = 0; i < str.length(); i++) {
248
- final char c = str.charAt(i);
249
- if (('A' <= c && c <= 'Z') || ('a' <= c && c <= 'z')) {
250
- compiledPattern.add(StrptimeToken.format(c));
251
- }
252
- else {
253
- compiledPattern.add(StrptimeToken.str(Character.toString(c)));
254
- }
255
- }
256
- }
257
-
258
- /**
259
- * Ported from org.jruby.util.RubyDateFormatter#compilePattern in JRuby 9.1.5.0
260
- * under EPL.
261
- * @see <a href="https://github.com/jruby/jruby/blob/036ce39f0476d4bd718e23e64caff36bb50b8dbc/core/src/main/java/org/jruby/util/RubyDateFormatter.java">RubyDateFormatter.java</a>
262
- */
263
- public List<StrptimeToken> compilePattern(final String pattern)
264
- {
265
- final List<StrptimeToken> compiledPattern = new LinkedList<>();
266
- final Reader reader = new StringReader(pattern); // TODO Use try-with-resource statement
267
- lexer.yyreset(reader);
268
-
269
- StrptimeToken token;
270
- try {
271
- while ((token = lexer.yylex()) != null) {
272
- if (token.getFormat() != StrptimeFormat.FORMAT_SPECIAL) {
273
- compiledPattern.add(token);
274
- }
275
- else {
276
- char c = (Character) token.getData();
277
- switch (c) {
278
- case 'c':
279
- addToPattern(compiledPattern, "a b e H:M:S Y");
280
- break;
281
- case 'D':
282
- case 'x':
283
- addToPattern(compiledPattern, "m/d/y");
284
- break;
285
- case 'F':
286
- addToPattern(compiledPattern, "Y-m-d");
287
- break;
288
- case 'n':
289
- compiledPattern.add(StrptimeToken.str("\n"));
290
- break;
291
- case 'R':
292
- addToPattern(compiledPattern, "H:M");
293
- break;
294
- case 'r':
295
- addToPattern(compiledPattern, "I:M:S p");
296
- break;
297
- case 'T':
298
- case 'X':
299
- addToPattern(compiledPattern, "H:M:S");
300
- break;
301
- case 't':
302
- compiledPattern.add(StrptimeToken.str("\t"));
303
- break;
304
- case 'v':
305
- addToPattern(compiledPattern, "e-b-Y");
306
- break;
307
- case 'Z':
308
- // +HH:MM in 'date', never zone name
309
- compiledPattern.add(StrptimeToken.zoneOffsetColons(1));
310
- break;
311
- case '+':
312
- addToPattern(compiledPattern, "a b e H:M:S ");
313
- // %Z: +HH:MM in 'date', never zone name
314
- compiledPattern.add(StrptimeToken.zoneOffsetColons(1));
315
- addToPattern(compiledPattern, " Y");
316
- break;
317
- default:
318
- throw new Error("Unknown special char: " + c);
319
- }
320
- }
321
- }
322
- }
323
- catch (IOException e) {
324
- e.printStackTrace();
325
- }
326
-
327
- return compiledPattern;
328
- }
329
-
330
- public FormatBag parse(final List<StrptimeToken> compiledPattern, final String text)
331
- {
332
- final FormatBag bag = new StringParser(text).parse(compiledPattern);
333
- if (bag == null) {
334
- return null;
335
- }
336
-
337
- if (FormatBag.has(bag.cent)) {
338
- if (FormatBag.has(bag.cWYear)) {
339
- bag.cWYear += bag.cent * 100;
340
- }
341
- if (FormatBag.has(bag.year)) {
342
- bag.year += bag.cent * 100;
343
- }
344
-
345
- // delete bag._cent
346
- bag.cent = Integer.MIN_VALUE;
347
- }
348
-
349
- if (FormatBag.has(bag.merid)) {
350
- if (FormatBag.has(bag.hour)) {
351
- bag.hour %= 12;
352
- bag.hour += bag.merid;
353
- }
354
-
355
- // delete bag._merid
356
- bag.merid = Integer.MIN_VALUE;
357
- }
358
-
359
- return bag;
360
- }
361
-
362
- private static class StringParser
363
- {
364
- private static final Pattern ZONE_PARSE_REGEX = Pattern.compile("\\A(" +
365
- "(?:gmt|utc?)?[-+]\\d+(?:[,.:]\\d+(?::\\d+)?)?" +
366
- "|(?-i:[[\\p{Alpha}].\\s]+)(?:standard|daylight)\\s+time\\b" +
367
- "|(?-i:[[\\p{Alpha}]]+)(?:\\s+dst)?\\b" +
368
- ")", Pattern.CASE_INSENSITIVE);
369
-
370
- private final String text;
371
- private final FormatBag bag;
372
-
373
- private int pos;
374
- private boolean fail;
375
-
376
- private StringParser(String text)
377
- {
378
- this.text = text;
379
- this.bag = new FormatBag();
380
-
381
- this.pos = 0;
382
- this.fail = false;
383
- }
384
-
385
- private FormatBag parse(final List<StrptimeToken> compiledPattern)
386
- {
387
- for (int tokenIndex = 0; tokenIndex < compiledPattern.size(); tokenIndex++) {
388
- final StrptimeToken token = compiledPattern.get(tokenIndex);
389
-
390
- switch (token.getFormat()) {
391
- case FORMAT_STRING: {
392
- final String str = token.getData().toString();
393
- for (int i = 0; i < str.length(); i++) {
394
- final char c = str.charAt(i);
395
- if (isSpace(c)) {
396
- while (!isEndOfText(text, pos) && isSpace(text.charAt(pos))) {
397
- pos++;
398
- }
399
- }
400
- else {
401
- if (isEndOfText(text, pos) || c != text.charAt(pos)) {
402
- fail = true;
403
- }
404
- pos++;
405
- }
406
- }
407
- break;
408
- }
409
- case FORMAT_WEEK_LONG: // %A - The full weekday name (``Sunday'')
410
- case FORMAT_WEEK_SHORT: { // %a - The abbreviated name (``Sun'')
411
- final int dayIndex = findIndexInPatterns(DAY_NAMES);
412
- if (dayIndex >= 0) {
413
- bag.wDay = dayIndex % 7;
414
- pos += DAY_NAMES[dayIndex].length();
415
- }
416
- else {
417
- fail = true;
418
- }
419
- break;
420
- }
421
- case FORMAT_MONTH_LONG: // %B - The full month name (``January'')
422
- case FORMAT_MONTH_SHORT: { // %b, %h - The abbreviated month name (``Jan'')
423
- final int monIndex = findIndexInPatterns(MONTH_NAMES);
424
- if (monIndex >= 0) {
425
- bag.mon = monIndex % 12 + 1;
426
- pos += MONTH_NAMES[monIndex].length();
427
- }
428
- else {
429
- fail = true;
430
- }
431
- break;
432
- }
433
- case FORMAT_CENTURY: { // %C - year / 100 (round down. 20 in 2009)
434
- final long cent;
435
- if (isNumberPattern(compiledPattern, tokenIndex)) {
436
- cent = readDigits(2);
437
- }
438
- else {
439
- cent = readDigitsMax();
440
- }
441
- bag.cent = (int)cent;
442
- break;
443
- }
444
- case FORMAT_DAY: // %d, %Od - Day of the month, zero-padded (01..31)
445
- case FORMAT_DAY_S: { // %e, %Oe - Day of the month, blank-padded ( 1..31)
446
- final long day;
447
- if (isBlank(text, pos)) {
448
- pos += 1; // blank
449
- day = readDigits(1);
450
- }
451
- else {
452
- day = readDigits(2);
453
- }
454
-
455
- if (!validRange(day, 1, 31)) {
456
- fail = true;
457
- }
458
- bag.mDay = (int)day;
459
- break;
460
- }
461
- case FORMAT_WEEKYEAR: { // %G - The week-based year
462
- final long year;
463
- if (isNumberPattern(compiledPattern, tokenIndex)) {
464
- year = readDigits(4);
465
- }
466
- else {
467
- year = readDigitsMax();
468
- }
469
- bag.cWYear = (int)year;
470
- break;
471
- }
472
- case FORMAT_WEEKYEAR_SHORT: { // %g - The last 2 digits of the week-based year (00..99)
473
- final long v = readDigits(2);
474
- if (!validRange(v, 0, 99)) {
475
- fail = true;
476
- }
477
- bag.cWYear = (int)v;
478
- if (!bag.has(bag.cent)) {
479
- bag.cent = v >= 69 ? 19 : 20;
480
- }
481
- break;
482
- }
483
- case FORMAT_HOUR: // %H, %OH - Hour of the day, 24-hour clock, zero-padded (00..23)
484
- case FORMAT_HOUR_BLANK: { // %k - Hour of the day, 24-hour clock, blank-padded ( 0..23)
485
- final long hour;
486
- if (isBlank(text, pos)) {
487
- pos += 1; // blank
488
- hour = readDigits(1);
489
- }
490
- else {
491
- hour = readDigits(2);
492
- }
493
-
494
- if (!validRange(hour, 0, 24)) {
495
- fail = true;
496
- }
497
- bag.hour = (int)hour;
498
- break;
499
- }
500
- case FORMAT_HOUR_M: // %I, %OI - Hour of the day, 12-hour clock, zero-padded (01..12)
501
- case FORMAT_HOUR_S: { // %l - Hour of the day, 12-hour clock, blank-padded ( 1..12)
502
- final long hour;
503
- if (isBlank(text, pos)) {
504
- pos += 1; // blank
505
- hour = readDigits(1);
506
- }
507
- else {
508
- hour = readDigits(2);
509
- }
510
-
511
- if (!validRange(hour, 1, 12)) {
512
- fail = true;
513
- }
514
- bag.hour = (int)hour;
515
- break;
516
- }
517
- case FORMAT_DAY_YEAR: { // %j - Day of the year (001..366)
518
- final long day = readDigits(3);
519
- if (!validRange(day, 1, 365)) {
520
- fail = true;
521
- }
522
- bag.yDay = (int)day;
523
- break;
524
- }
525
- case FORMAT_MILLISEC: // %L - Millisecond of the second (000..999)
526
- case FORMAT_NANOSEC: { // %N - Fractional seconds digits, default is 9 digits (nanosecond)
527
- boolean negative = false;
528
- if (isSign(text, pos)) {
529
- negative = text.charAt(pos) == '-';
530
- pos++;
531
- }
532
-
533
- final long v;
534
- final int initPos = pos;
535
- if (isNumberPattern(compiledPattern, tokenIndex)) {
536
- if (token.getFormat() == StrptimeFormat.FORMAT_MILLISEC) {
537
- v = readDigits(3);
538
- }
539
- else {
540
- v = readDigits(9);
541
- }
542
- }
543
- else {
544
- v = readDigitsMax();
545
- }
546
-
547
- bag.secFraction = (int)(!negative ? v : -v);
548
- bag.secFractionSize = pos - initPos;
549
- break;
550
- }
551
- case FORMAT_MINUTES: { // %M, %OM - Minute of the hour (00..59)
552
- final long min = readDigits(2);
553
- if (!validRange(min, 0, 59)) {
554
- fail = true;
555
- }
556
- bag.min = (int)min;
557
- break;
558
- }
559
- case FORMAT_MONTH: { // %m, %Om - Month of the year, zero-padded (01..12)
560
- final long mon = readDigits(2);
561
- if (!validRange(mon, 1, 12)) {
562
- fail = true;
563
- }
564
- bag.mon = (int)mon;
565
- break;
566
- }
567
- case FORMAT_MERIDIAN: // %P - Meridian indicator, lowercase (``am'' or ``pm'')
568
- case FORMAT_MERIDIAN_LOWER_CASE: { // %p - Meridian indicator, uppercase (``AM'' or ``PM'')
569
- final int meridIndex = findIndexInPatterns(MERID_NAMES);
570
- if (meridIndex >= 0) {
571
- bag.merid = meridIndex % 2 == 0 ? 0 : 12;
572
- pos += MERID_NAMES[meridIndex].length();
573
- }
574
- else {
575
- fail = true;
576
- }
577
- break;
578
- }
579
- case FORMAT_MILLISEC_EPOCH: { // %Q - Number of milliseconds since 1970-01-01 00:00:00 UTC.
580
- boolean negative = false;
581
- if (isMinus(text, pos)) {
582
- negative = true;
583
- pos++;
584
- }
585
-
586
- final long sec = readDigitsMax();
587
- bag.seconds = !negative ? sec : -sec;
588
- bag.secondsSize = 3;
589
- break;
590
- }
591
- case FORMAT_SECONDS: { // %S - Second of the minute (00..59)
592
- final long sec = readDigits(2);
593
- if (!validRange(sec, 0, 60)) {
594
- fail = true;
595
- }
596
- bag.sec = (int)sec;
597
- break;
598
- }
599
- case FORMAT_EPOCH: { // %s - Number of seconds since 1970-01-01 00:00:00 UTC.
600
- boolean negative = false;
601
- if (isMinus(text, pos)) {
602
- negative = true;
603
- pos++;
604
- }
605
-
606
- final long sec = readDigitsMax();
607
- bag.seconds = (int)(!negative ? sec : -sec);
608
- break;
609
- }
610
- case FORMAT_WEEK_YEAR_S: // %U, %OU - Week number of the year. The week starts with Sunday. (00..53)
611
- case FORMAT_WEEK_YEAR_M: { // %W, %OW - Week number of the year. The week starts with Monday. (00..53)
612
- final long week = readDigits(2);
613
- if (!validRange(week, 0, 53)) {
614
- fail = true;
615
- }
616
-
617
- if (token.getFormat() == StrptimeFormat.FORMAT_WEEK_YEAR_S) {
618
- bag.wNum0 = (int)week;
619
- } else {
620
- bag.wNum1 = (int)week;
621
- }
622
- break;
623
- }
624
- case FORMAT_DAY_WEEK2: { // %u, %Ou - Day of the week (Monday is 1, 1..7)
625
- final long day = readDigits(1);
626
- if (!validRange(day, 1, 7)) {
627
- fail = true;
628
- }
629
- bag.cWDay = (int)day;
630
- break;
631
- }
632
- case FORMAT_WEEK_WEEKYEAR: { // %V, %OV - Week number of the week-based year (01..53)
633
- final long week = readDigits(2);
634
- if (!validRange(week, 1, 53)) {
635
- fail = true;
636
- }
637
- bag.cWeek = (int)week;
638
- break;
639
- }
640
- case FORMAT_DAY_WEEK: { // %w - Day of the week (Sunday is 0, 0..6)
641
- final long day = readDigits(1);
642
- if (!validRange(day, 0, 6)) {
643
- fail = true;
644
- }
645
- bag.wDay = (int)day;
646
- break;
647
- }
648
- case FORMAT_YEAR_LONG: {
649
- // %Y, %EY - Year with century (can be negative, 4 digits at least)
650
- // -0001, 0000, 1995, 2009, 14292, etc.
651
- boolean negative = false;
652
- if (isSign(text, pos)) {
653
- negative = text.charAt(pos) == '-';
654
- pos++;
655
- }
656
-
657
- final long year;
658
- if (isNumberPattern(compiledPattern, tokenIndex)) {
659
- year = readDigits(4);
660
- } else {
661
- year = readDigitsMax();
662
- }
663
-
664
- bag.year = (int)(!negative ? year : -year);
665
- break;
666
- }
667
- case FORMAT_YEAR_SHORT: { // %y, %Ey, %Oy - year % 100 (00..99)
668
- final long y = readDigits(2);
669
- if (!validRange(y, 0, 99)) {
670
- fail = true;
671
- }
672
- bag.year = (int)y;
673
- if (!bag.has(bag.cent)) {
674
- bag.cent = y >= 69 ? 19 : 20;
675
- }
676
- break;
677
- }
678
- case FORMAT_ZONE_ID: // %Z - Time zone abbreviation name
679
- case FORMAT_COLON_ZONE_OFF: {
680
- // %z - Time zone as hour and minute offset from UTC (e.g. +0900)
681
- // %:z - hour and minute offset from UTC with a colon (e.g. +09:00)
682
- // %::z - hour, minute and second offset from UTC (e.g. +09:00:00)
683
- // %:::z - hour, minute and second offset from UTC
684
- // (e.g. +09, +09:30, +09:30:30)
685
- if (isEndOfText(text, pos)) {
686
- fail = true;
687
- break;
688
- }
689
-
690
- final Matcher m = ZONE_PARSE_REGEX.matcher(text.substring(pos));
691
- if (m.find()) {
692
- // zone
693
- String zone = text.substring(pos, pos + m.end());
694
- bag.zone = zone;
695
- pos += zone.length();
696
- } else {
697
- fail = true;
698
- }
699
- break;
700
- }
701
- case FORMAT_SPECIAL:
702
- {
703
- throw new Error("FORMAT_SPECIAL is a special token only for the lexer.");
704
- }
705
- }
706
- }
707
-
708
- if (fail) {
709
- return null;
710
- }
711
-
712
- if (text.length() > pos) {
713
- bag.leftover = text.substring(pos, text.length());
714
- }
715
-
716
- return bag;
717
- }
718
-
719
- /**
720
- * Ported read_digits in MRI 2.3.1's ext/date/date_strptime.c
721
- * @see <a href="https://github.com/ruby/ruby/blob/394fa89c67722d35bdda89f10c7de5c304a5efb1/ext/date/date_strftime.c">date_strftime.c</a>
722
- */
723
- private long readDigits(final int len)
724
- {
725
- char c;
726
- long v = 0;
727
- final int initPos = pos;
728
-
729
- for (int i = 0; i < len; i++) {
730
- if (isEndOfText(text, pos)) {
731
- break;
732
- }
733
-
734
- c = text.charAt(pos);
735
- if (!isDigit(c)) {
736
- break;
737
- }
738
- else {
739
- v = v * 10 + toInt(c);
740
- }
741
- pos += 1;
742
- }
743
-
744
- if (pos == initPos) {
745
- fail = true;
746
- }
747
-
748
- return v;
749
- }
750
-
751
- /**
752
- * Ported from READ_DIGITS_MAX in MRI 2.3.1's ext/date/date_strptime.c under BSDL.
753
- * @see <a href="https://github.com/ruby/ruby/blob/394fa89c67722d35bdda89f10c7de5c304a5efb1/ext/date/date_strftime.c">date_strftime.c</a>
754
- */
755
- private long readDigitsMax()
756
- {
757
- return readDigits(Integer.MAX_VALUE);
758
- }
759
-
760
- /**
761
- * Returns -1 if text doesn't match with patterns.
762
- */
763
- private int findIndexInPatterns(final String[] patterns)
764
- {
765
- if (isEndOfText(text, pos)) {
766
- return -1;
767
- }
768
-
769
- for (int i = 0; i < patterns.length; i++) {
770
- final String pattern = patterns[i];
771
- final int len = pattern.length();
772
- if (!isEndOfText(text, pos + len - 1)
773
- && pattern.equalsIgnoreCase(text.substring(pos, pos + len))) { // strncasecmp
774
- return i;
775
- }
776
- }
777
-
778
- return -1; // text doesn't match at any patterns.
779
- }
780
-
781
- /**
782
- * Ported from num_pattern_p in MRI 2.3.1's ext/date/date_strptime.c under BSDL.
783
- * @see <a href="https://github.com/ruby/ruby/blob/394fa89c67722d35bdda89f10c7de5c304a5efb1/ext/date/date_strftime.c">date_strftime.c</a>
784
- */
785
- private static boolean isNumberPattern(final List<StrptimeToken> compiledPattern, final int i)
786
- {
787
- if (compiledPattern.size() <= i + 1) {
788
- return false;
789
- }
790
- else {
791
- final StrptimeToken nextToken = compiledPattern.get(i + 1);
792
- final StrptimeFormat f = nextToken.getFormat();
793
- if (f == StrptimeFormat.FORMAT_STRING && isDigit(((String) nextToken.getData()).charAt(0))) {
794
- return true;
795
- }
796
- else if (NUMBER_PATTERNS.contains(f)) {
797
- return true;
798
- }
799
- else {
800
- return false;
801
- }
802
- }
803
- }
804
-
805
- // CDdeFGgHIjkLlMmNQRrSsTUuVvWwXxYy
806
- private static final EnumSet<StrptimeFormat> NUMBER_PATTERNS =
807
- EnumSet.copyOf(Arrays.asList(
808
- StrptimeFormat.FORMAT_CENTURY, // 'C'
809
- // D
810
- StrptimeFormat.FORMAT_DAY, // 'd'
811
- StrptimeFormat.FORMAT_DAY_S, // 'e'
812
- // F
813
- StrptimeFormat.FORMAT_WEEKYEAR, // 'G'
814
- StrptimeFormat.FORMAT_WEEKYEAR_SHORT, // 'g'
815
- StrptimeFormat.FORMAT_HOUR, // 'H'
816
- StrptimeFormat.FORMAT_HOUR_M, // 'I'
817
- StrptimeFormat.FORMAT_DAY_YEAR, // 'j'
818
- StrptimeFormat.FORMAT_HOUR_BLANK, // 'k'
819
- StrptimeFormat.FORMAT_MILLISEC, // 'L'
820
- StrptimeFormat.FORMAT_HOUR_S, // 'l'
821
- StrptimeFormat.FORMAT_MINUTES, // 'M'
822
- StrptimeFormat.FORMAT_MONTH, // 'm'
823
- StrptimeFormat.FORMAT_NANOSEC, // 'N'
824
- // Q, R, r
825
- StrptimeFormat.FORMAT_SECONDS, // 'S'
826
- StrptimeFormat.FORMAT_EPOCH, // 's'
827
- // T
828
- StrptimeFormat.FORMAT_WEEK_YEAR_S, // 'U'
829
- StrptimeFormat.FORMAT_DAY_WEEK2, // 'u'
830
- StrptimeFormat.FORMAT_WEEK_WEEKYEAR, // 'V'
831
- // v
832
- StrptimeFormat.FORMAT_WEEK_YEAR_M, // 'W'
833
- StrptimeFormat.FORMAT_DAY_WEEK, // 'w'
834
- // X, x
835
- StrptimeFormat.FORMAT_YEAR_LONG, // 'Y'
836
- StrptimeFormat.FORMAT_YEAR_SHORT // 'y'
837
- ));
838
-
839
- /**
840
- * Ported from valid_pattern_p in MRI 2.3.1's ext/date/date_strptime.c under BSDL.
841
- * @see <a href="https://github.com/ruby/ruby/blob/394fa89c67722d35bdda89f10c7de5c304a5efb1/ext/date/date_strftime.c">date_strftime.c</a>
842
- */
843
- private static boolean validRange(long v, int lower, int upper)
844
- {
845
- return lower <= v && v <= upper;
846
- }
847
-
848
- private static boolean isSpace(char c)
849
- {
850
- return c == ' ' || c == '\t' || c == '\n' ||
851
- c == '\u000b' || c == '\f' || c == '\r';
852
- }
853
-
854
- private static boolean isDigit(char c)
855
- {
856
- return '0' <= c && c <= '9';
857
- }
858
-
859
- private static boolean isEndOfText(String text, int pos)
860
- {
861
- return pos >= text.length();
862
- }
863
-
864
- private static boolean isSign(String text, int pos)
865
- {
866
- return !isEndOfText(text, pos) && (text.charAt(pos) == '+' || text.charAt(pos) == '-');
867
- }
868
-
869
- private static boolean isMinus(String text, int pos)
870
- {
871
- return !isEndOfText(text, pos) && text.charAt(pos) == '-';
872
- }
873
-
874
- private static boolean isBlank(String text, int pos)
875
- {
876
- return !isEndOfText(text, pos) && text.charAt(pos) == ' ';
877
- }
878
-
879
- private static int toInt(char c)
880
- {
881
- return c - '0';
882
- }
883
- }
884
- }