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,59 +0,0 @@
|
|
1
|
-
module Embulk
|
2
|
-
|
3
|
-
class PackageData
|
4
|
-
def initialize(base_name, dest_dir, erb_binding=nil)
|
5
|
-
require 'fileutils'
|
6
|
-
@base_name = base_name
|
7
|
-
@dest_dir = dest_dir
|
8
|
-
@erb_binding = erb_binding
|
9
|
-
end
|
10
|
-
|
11
|
-
def path(src)
|
12
|
-
Embulk.lib_path("embulk/data/#{@base_name}/#{src}")
|
13
|
-
end
|
14
|
-
|
15
|
-
def content(src)
|
16
|
-
File.read(path(src))
|
17
|
-
end
|
18
|
-
|
19
|
-
def bincontent(src)
|
20
|
-
File.binread(path(src))
|
21
|
-
end
|
22
|
-
|
23
|
-
def erb(src)
|
24
|
-
require 'erb'
|
25
|
-
ERB.new(content(src), nil, '%').result(@erb_binding)
|
26
|
-
end
|
27
|
-
|
28
|
-
def cp(src, dest_name)
|
29
|
-
dest = dest_path_message(dest_name)
|
30
|
-
File.open(dest, "wb") do |dst_io|
|
31
|
-
File.open(path(src), "rb") do |src_io|
|
32
|
-
FileUtils.copy_stream src_io, dst_io
|
33
|
-
end
|
34
|
-
end
|
35
|
-
end
|
36
|
-
|
37
|
-
def cp_erb(src, dest_name)
|
38
|
-
dest = dest_path_message(dest_name)
|
39
|
-
File.open(dest, "wb") {|f| f.write erb(src) }
|
40
|
-
end
|
41
|
-
|
42
|
-
def dest_path(dest_name)
|
43
|
-
File.join(@dest_dir, *dest_name.split('/'))
|
44
|
-
end
|
45
|
-
|
46
|
-
def dest_path_message(dest_name)
|
47
|
-
path = dest_path(dest_name)
|
48
|
-
puts " Creating #{path}"
|
49
|
-
FileUtils.mkdir_p File.dirname(path)
|
50
|
-
path
|
51
|
-
end
|
52
|
-
|
53
|
-
def set_executable(dest_name)
|
54
|
-
dest = dest_path(dest_name)
|
55
|
-
File.chmod(File.stat(dest).mode | 0111, dest)
|
56
|
-
end
|
57
|
-
end
|
58
|
-
|
59
|
-
end
|
data/lib/embulk/runner.rb
DELETED
@@ -1,53 +0,0 @@
|
|
1
|
-
module Embulk
|
2
|
-
|
3
|
-
class EmbulkRunner
|
4
|
-
def initialize(runner_java)
|
5
|
-
@runner_java = runner_java # Java::org.embulk.EmbulkRunner
|
6
|
-
end
|
7
|
-
|
8
|
-
def guess(config, options={})
|
9
|
-
output_path =
|
10
|
-
(options[:next_config_output_path] ? Java::java.lang.String.new(options[:next_config_output_path]) : nil)
|
11
|
-
|
12
|
-
case config
|
13
|
-
when String
|
14
|
-
@runner_java.guess(Java::java.lang.String.new(config), output_path)
|
15
|
-
when Hash, DataSource
|
16
|
-
@runner_java.guess(DataSource.new(config).to_java, output_path)
|
17
|
-
end
|
18
|
-
|
19
|
-
nil
|
20
|
-
end
|
21
|
-
|
22
|
-
def preview(config, options={})
|
23
|
-
format = (options[:format] ? Java::java.lang.String.new(options[:format]) : nil)
|
24
|
-
|
25
|
-
case config
|
26
|
-
when String
|
27
|
-
@runner_java.preview(Java::java.lang.String.new(config), format)
|
28
|
-
when Hash, DataSource
|
29
|
-
@runner_java.preview(DataSource.new(config).to_java, format)
|
30
|
-
end
|
31
|
-
|
32
|
-
nil
|
33
|
-
end
|
34
|
-
|
35
|
-
def run(config, options={})
|
36
|
-
config_diff_path =
|
37
|
-
(options[:next_config_diff_path] ? Java::java.lang.String.new(options[:next_config_diff_path]) : nil)
|
38
|
-
output_path = # deprecated
|
39
|
-
(options[:next_config_output_path] ? Java::java.lang.String.new(options[:next_config_output_path]) : nil)
|
40
|
-
resume_state_path =
|
41
|
-
(options[:resume_state_path] ? Java::java.lang.String.new(options[:resume_state_path]) : nil)
|
42
|
-
|
43
|
-
case config
|
44
|
-
when String
|
45
|
-
@runner_java.run(Java::java.lang.String.new(config), config_diff_path, output_path, resume_state_path)
|
46
|
-
when Hash, DataSource
|
47
|
-
@runner_java.run(DataSource.new(config).to_java, config_diff_path, output_path, resume_state_path)
|
48
|
-
end
|
49
|
-
|
50
|
-
nil
|
51
|
-
end
|
52
|
-
end
|
53
|
-
end
|
data/settings.gradle
DELETED
data/test/helper.rb
DELETED
@@ -1,23 +0,0 @@
|
|
1
|
-
require 'test/unit'
|
2
|
-
|
3
|
-
classpath_dir = File.expand_path('../classpath', File.dirname(__FILE__))
|
4
|
-
jars = Dir.entries(classpath_dir).select {|f| f =~ /\.jar$/ }.sort
|
5
|
-
jars.each do |jar|
|
6
|
-
require File.join(classpath_dir, jar)
|
7
|
-
end
|
8
|
-
|
9
|
-
require 'simplecov'
|
10
|
-
# fix inaccurate coverage
|
11
|
-
# see: https://github.com/colszowka/simplecov/blob/82920ca1502be78ccde4fd315634066093bb855d/lib/simplecov.rb#L7
|
12
|
-
ENV['JRUBY_OPTS'] = '-Xcli.debug=true --debug'
|
13
|
-
SimpleCov.profiles.define 'embulk' do
|
14
|
-
add_filter 'test/'
|
15
|
-
|
16
|
-
add_group 'Libraries', 'lib'
|
17
|
-
end
|
18
|
-
SimpleCov.start 'embulk'
|
19
|
-
|
20
|
-
require 'embulk/java/bootstrap'
|
21
|
-
require 'embulk'
|
22
|
-
|
23
|
-
Embulk.setup
|
@@ -1,515 +0,0 @@
|
|
1
|
-
# frozen_string_literal: false
|
2
|
-
require 'test/unit'
|
3
|
-
require 'date'
|
4
|
-
|
5
|
-
class TestDateStrptime < Test::Unit::TestCase
|
6
|
-
|
7
|
-
STRFTIME_2001_02_03 = {
|
8
|
-
'%A'=>['Saturday',{:wday=>6}],
|
9
|
-
'%a'=>['Sat',{:wday=>6}],
|
10
|
-
'%B'=>['February',{:mon=>2}],
|
11
|
-
'%b'=>['Feb',{:mon=>2}],
|
12
|
-
'%c'=>['Sat Feb 3 00:00:00 2001',
|
13
|
-
{:wday=>6,:mon=>2,:mday=>3,:hour=>0,:min=>0,:sec=>0,:year=>2001}],
|
14
|
-
'%d'=>['03',{:mday=>3}],
|
15
|
-
'%e'=>[' 3',{:mday=>3}],
|
16
|
-
'%H'=>['00',{:hour=>0}],
|
17
|
-
'%I'=>['12',{:hour=>0}],
|
18
|
-
'%j'=>['034',{:yday=>34}],
|
19
|
-
'%M'=>['00',{:min=>0}],
|
20
|
-
'%m'=>['02',{:mon=>2}],
|
21
|
-
'%p'=>['AM',{}],
|
22
|
-
'%S'=>['00',{:sec=>0}],
|
23
|
-
'%U'=>['04',{:wnum0=>4}],
|
24
|
-
'%W'=>['05',{:wnum1=>5}],
|
25
|
-
'%X'=>['00:00:00',{:hour=>0,:min=>0,:sec=>0}],
|
26
|
-
'%x'=>['02/03/01',{:mon=>2,:mday=>3,:year=>2001}],
|
27
|
-
'%Y'=>['2001',{:year=>2001}],
|
28
|
-
'%y'=>['01',{:year=>2001}],
|
29
|
-
'%Z'=>['+00:00',{:zone=>'+00:00',:offset=>0}],
|
30
|
-
'%%'=>['%',{}],
|
31
|
-
'%C'=>['20',{}],
|
32
|
-
'%D'=>['02/03/01',{:mon=>2,:mday=>3,:year=>2001}],
|
33
|
-
'%F'=>['2001-02-03',{:year=>2001,:mon=>2,:mday=>3}],
|
34
|
-
'%G'=>['2001',{:cwyear=>2001}],
|
35
|
-
'%g'=>['01',{:cwyear=>2001}],
|
36
|
-
'%h'=>['Feb',{:mon=>2}],
|
37
|
-
'%k'=>[' 0',{:hour=>0}],
|
38
|
-
'%L'=>['000',{:sec_fraction=>0}],
|
39
|
-
'%l'=>['12',{:hour=>0}],
|
40
|
-
'%N'=>['000000000',{:sec_fraction=>0}],
|
41
|
-
'%n'=>["\n",{}],
|
42
|
-
'%P'=>['am',{}],
|
43
|
-
'%Q'=>['981158400000',{:seconds=>981158400.to_r}],
|
44
|
-
'%R'=>['00:00',{:hour=>0,:min=>0}],
|
45
|
-
'%r'=>['12:00:00 AM',{:hour=>0,:min=>0,:sec=>0}],
|
46
|
-
'%s'=>['981158400',{:seconds=>981158400}],
|
47
|
-
'%T'=>['00:00:00',{:hour=>0,:min=>0,:sec=>0}],
|
48
|
-
'%t'=>["\t",{}],
|
49
|
-
'%u'=>['6',{:cwday=>6}],
|
50
|
-
'%V'=>['05',{:cweek=>5}],
|
51
|
-
'%v'=>[' 3-Feb-2001',{:mday=>3,:mon=>2,:year=>2001}],
|
52
|
-
'%z'=>['+0000',{:zone=>'+0000',:offset=>0}],
|
53
|
-
'%+'=>['Sat Feb 3 00:00:00 +00:00 2001',
|
54
|
-
{:wday=>6,:mon=>2,:mday=>3,
|
55
|
-
:hour=>0,:min=>0,:sec=>0,:zone=>'+00:00',:offset=>0,:year=>2001}],
|
56
|
-
}
|
57
|
-
|
58
|
-
STRFTIME_2001_02_03_CVS19 = {
|
59
|
-
}
|
60
|
-
|
61
|
-
STRFTIME_2001_02_03_GNUext = {
|
62
|
-
'%:z'=>['+00:00',{:zone=>'+00:00',:offset=>0}],
|
63
|
-
'%::z'=>['+00:00:00',{:zone=>'+00:00:00',:offset=>0}],
|
64
|
-
'%:::z'=>['+00',{:zone=>'+00',:offset=>0}],
|
65
|
-
}
|
66
|
-
|
67
|
-
STRFTIME_2001_02_03.update(STRFTIME_2001_02_03_CVS19)
|
68
|
-
STRFTIME_2001_02_03.update(STRFTIME_2001_02_03_GNUext)
|
69
|
-
|
70
|
-
def test__strptime
|
71
|
-
STRFTIME_2001_02_03.each do |f, s|
|
72
|
-
if (f == '%I' and s[0] == '12') or
|
73
|
-
(f == '%l' and s[0] == '12') # hour w/o merid
|
74
|
-
s[1][:hour] = 12
|
75
|
-
end
|
76
|
-
assert_equal(s[1], Date._strptime(s[0], f), [f, s].inspect)
|
77
|
-
case f[-1,1]
|
78
|
-
when 'c', 'C', 'x', 'X', 'y', 'Y'
|
79
|
-
f2 = f.sub(/\A%/, '%E')
|
80
|
-
assert_equal(s[1], Date._strptime(s[0], f2), [f2, s].inspect)
|
81
|
-
else
|
82
|
-
f2 = f.sub(/\A%/, '%E')
|
83
|
-
assert_equal(nil, Date._strptime(s[0], f2), [f2, s].inspect)
|
84
|
-
assert_equal({}, Date._strptime(f2, f2), [f2, s].inspect)
|
85
|
-
end
|
86
|
-
case f[-1,1]
|
87
|
-
when 'd', 'e', 'H', 'I', 'm', 'M', 'S', 'u', 'U', 'V', 'w', 'W', 'y'
|
88
|
-
f2 = f.sub(/\A%/, '%O')
|
89
|
-
assert_equal(s[1], Date._strptime(s[0], f2), [f2, s].inspect)
|
90
|
-
else
|
91
|
-
f2 = f.sub(/\A%/, '%O')
|
92
|
-
assert_equal(nil, Date._strptime(s[0], f2), [f2, s].inspect)
|
93
|
-
assert_equal({}, Date._strptime(f2, f2), [f2, s].inspect)
|
94
|
-
end
|
95
|
-
end
|
96
|
-
end
|
97
|
-
|
98
|
-
def test__strptime__2
|
99
|
-
h = Date._strptime('2001-02-03')
|
100
|
-
assert_equal([2001,2,3], h.values_at(:year,:mon,:mday))
|
101
|
-
|
102
|
-
h = DateTime._strptime('2001-02-03T12:13:14Z')
|
103
|
-
assert_equal([2001,2,3,12,13,14],
|
104
|
-
h.values_at(:year,:mon,:mday,:hour,:min,:sec))
|
105
|
-
|
106
|
-
assert_equal({}, Date._strptime('', ''))
|
107
|
-
assert_equal({:leftover=>"\s"*3}, Date._strptime("\s"*3, ''))
|
108
|
-
assert_equal({:leftover=>'x'}, Date._strptime("\nx", "\n"))
|
109
|
-
assert_equal({}, Date._strptime('', "\s"*3))
|
110
|
-
assert_equal({}, Date._strptime("\s"*3, "\s"*3))
|
111
|
-
assert_equal({}, Date._strptime("\tfoo\n\000\r", "\tfoo\n\000\r"))
|
112
|
-
assert_equal({}, Date._strptime("foo\n\nbar", "foo\sbar"))
|
113
|
-
assert_equal({}, Date._strptime("%\n", "%\n")) # gnu
|
114
|
-
assert_equal({}, Date._strptime('%%', '%%%'))
|
115
|
-
assert_equal({:wday=>6}, Date._strptime('Saturday'*1024 + ',', '%A'*1024 + ','))
|
116
|
-
assert_equal({:wday=>6}, Date._strptime('Saturday'*1024 + ',', '%a'*1024 + ','))
|
117
|
-
assert_equal({}, Date._strptime('Anton von Webern', 'Anton von Webern'))
|
118
|
-
end
|
119
|
-
|
120
|
-
def test__strptime__3
|
121
|
-
[
|
122
|
-
# iso8601
|
123
|
-
[['2001-02-03', '%Y-%m-%d'], [2001,2,3,nil,nil,nil,nil,nil,nil], __LINE__],
|
124
|
-
[['2001-02-03T23:59:60', '%Y-%m-%dT%H:%M:%S'], [2001,2,3,23,59,60,nil,nil,nil], __LINE__],
|
125
|
-
[['2001-02-03T23:59:60+09:00', '%Y-%m-%dT%H:%M:%S%Z'], [2001,2,3,23,59,60,'+09:00',9*3600,nil], __LINE__],
|
126
|
-
[['-2001-02-03T23:59:60+09:00', '%Y-%m-%dT%H:%M:%S%Z'], [-2001,2,3,23,59,60,'+09:00',9*3600,nil], __LINE__],
|
127
|
-
[['+012345-02-03T23:59:60+09:00', '%Y-%m-%dT%H:%M:%S%Z'], [12345,2,3,23,59,60,'+09:00',9*3600,nil], __LINE__],
|
128
|
-
[['-012345-02-03T23:59:60+09:00', '%Y-%m-%dT%H:%M:%S%Z'], [-12345,2,3,23,59,60,'+09:00',9*3600,nil], __LINE__],
|
129
|
-
|
130
|
-
# ctime(3), asctime(3)
|
131
|
-
[['Thu Jul 29 14:47:19 1999', '%c'], [1999,7,29,14,47,19,nil,nil,4], __LINE__],
|
132
|
-
[['Thu Jul 29 14:47:19 -1999', '%c'], [-1999,7,29,14,47,19,nil,nil,4], __LINE__],
|
133
|
-
|
134
|
-
# date(1)
|
135
|
-
[['Thu Jul 29 16:39:41 EST 1999', '%a %b %d %H:%M:%S %Z %Y'], [1999,7,29,16,39,41,'EST',-5*3600,4], __LINE__],
|
136
|
-
[['Thu Jul 29 16:39:41 MET DST 1999', '%a %b %d %H:%M:%S %Z %Y'], [1999,7,29,16,39,41,'MET DST',2*3600,4], __LINE__],
|
137
|
-
[['Thu Jul 29 16:39:41 AMT 1999', '%a %b %d %H:%M:%S %Z %Y'], [1999,7,29,16,39,41,'AMT',nil,4], __LINE__],
|
138
|
-
[['Thu Jul 29 16:39:41 AMT -1999', '%a %b %d %H:%M:%S %Z %Y'], [-1999,7,29,16,39,41,'AMT',nil,4], __LINE__],
|
139
|
-
[['Thu Jul 29 16:39:41 GMT+09 1999', '%a %b %d %H:%M:%S %Z %Y'], [1999,7,29,16,39,41,'GMT+09',9*3600,4], __LINE__],
|
140
|
-
[['Thu Jul 29 16:39:41 GMT+0908 1999', '%a %b %d %H:%M:%S %Z %Y'], [1999,7,29,16,39,41,'GMT+0908',9*3600+8*60,4], __LINE__],
|
141
|
-
[['Thu Jul 29 16:39:41 GMT+090807 1999', '%a %b %d %H:%M:%S %Z %Y'], [1999,7,29,16,39,41,'GMT+090807',9*3600+8*60+7,4], __LINE__],
|
142
|
-
[['Thu Jul 29 16:39:41 GMT-09 1999', '%a %b %d %H:%M:%S %Z %Y'], [1999,7,29,16,39,41,'GMT-09',-9*3600,4], __LINE__],
|
143
|
-
[['Thu Jul 29 16:39:41 GMT-09:08 1999', '%a %b %d %H:%M:%S %Z %Y'], [1999,7,29,16,39,41,'GMT-09:08',-9*3600-8*60,4], __LINE__],
|
144
|
-
[['Thu Jul 29 16:39:41 GMT-09:08:07 1999', '%a %b %d %H:%M:%S %Z %Y'], [1999,7,29,16,39,41,'GMT-09:08:07',-9*3600-8*60-7,4], __LINE__],
|
145
|
-
[['Thu Jul 29 16:39:41 GMT-3.5 1999', '%a %b %d %H:%M:%S %Z %Y'], [1999,7,29,16,39,41,'GMT-3.5',-3*3600-30*60,4], __LINE__],
|
146
|
-
[['Thu Jul 29 16:39:41 GMT-3,5 1999', '%a %b %d %H:%M:%S %Z %Y'], [1999,7,29,16,39,41,'GMT-3,5',-3*3600-30*60,4], __LINE__],
|
147
|
-
[['Thu Jul 29 16:39:41 Mountain Daylight Time 1999', '%a %b %d %H:%M:%S %Z %Y'], [1999,7,29,16,39,41,'Mountain Daylight Time',-6*3600,4], __LINE__],
|
148
|
-
[['Thu Jul 29 16:39:41 E. Australia Standard Time 1999', '%a %b %d %H:%M:%S %Z %Y'], [1999,7,29,16,39,41,'E. Australia Standard Time',10*3600,4], __LINE__],
|
149
|
-
|
150
|
-
# rfc822
|
151
|
-
[['Thu, 29 Jul 1999 09:54:21 UT', '%a, %d %b %Y %H:%M:%S %Z'], [1999,7,29,9,54,21,'UT',0,4], __LINE__],
|
152
|
-
[['Thu, 29 Jul 1999 09:54:21 GMT', '%a, %d %b %Y %H:%M:%S %Z'], [1999,7,29,9,54,21,'GMT',0,4], __LINE__],
|
153
|
-
[['Thu, 29 Jul 1999 09:54:21 PDT', '%a, %d %b %Y %H:%M:%S %Z'], [1999,7,29,9,54,21,'PDT',-7*3600,4], __LINE__],
|
154
|
-
[['Thu, 29 Jul 1999 09:54:21 z', '%a, %d %b %Y %H:%M:%S %Z'], [1999,7,29,9,54,21,'z',0,4], __LINE__],
|
155
|
-
[['Thu, 29 Jul 1999 09:54:21 +0900', '%a, %d %b %Y %H:%M:%S %Z'], [1999,7,29,9,54,21,'+0900',9*3600,4], __LINE__],
|
156
|
-
[['Thu, 29 Jul 1999 09:54:21 +0430', '%a, %d %b %Y %H:%M:%S %Z'], [1999,7,29,9,54,21,'+0430',4*3600+30*60,4], __LINE__],
|
157
|
-
[['Thu, 29 Jul 1999 09:54:21 -0430', '%a, %d %b %Y %H:%M:%S %Z'], [1999,7,29,9,54,21,'-0430',-4*3600-30*60,4], __LINE__],
|
158
|
-
[['Thu, 29 Jul -1999 09:54:21 -0430', '%a, %d %b %Y %H:%M:%S %Z'], [-1999,7,29,9,54,21,'-0430',-4*3600-30*60,4], __LINE__],
|
159
|
-
|
160
|
-
# etc
|
161
|
-
[['06-DEC-99', '%d-%b-%y'], [1999,12,6,nil,nil,nil,nil,nil,nil], __LINE__],
|
162
|
-
[['sUnDay oCtoBer 31 01', '%A %B %d %y'], [2001,10,31,nil,nil,nil,nil,nil,0], __LINE__],
|
163
|
-
[["October\t\n\v\f\r 15,\t\n\v\f\r99", '%B %d, %y'], [1999,10,15,nil,nil,nil,nil,nil,nil], __LINE__],
|
164
|
-
[["October\t\n\v\f\r 15,\t\n\v\f\r99", '%B%t%d,%n%y'], [1999,10,15,nil,nil,nil,nil,nil,nil], __LINE__],
|
165
|
-
|
166
|
-
[['09:02:11 AM', '%I:%M:%S %p'], [nil,nil,nil,9,2,11,nil,nil,nil], __LINE__],
|
167
|
-
[['09:02:11 A.M.', '%I:%M:%S %p'], [nil,nil,nil,9,2,11,nil,nil,nil], __LINE__],
|
168
|
-
[['09:02:11 PM', '%I:%M:%S %p'], [nil,nil,nil,21,2,11,nil,nil,nil], __LINE__],
|
169
|
-
[['09:02:11 P.M.', '%I:%M:%S %p'], [nil,nil,nil,21,2,11,nil,nil,nil], __LINE__],
|
170
|
-
|
171
|
-
[['12:33:44 AM', '%r'], [nil,nil,nil,0,33,44,nil,nil,nil], __LINE__],
|
172
|
-
[['01:33:44 AM', '%r'], [nil,nil,nil,1,33,44,nil,nil,nil], __LINE__],
|
173
|
-
[['11:33:44 AM', '%r'], [nil,nil,nil,11,33,44,nil,nil,nil], __LINE__],
|
174
|
-
[['12:33:44 PM', '%r'], [nil,nil,nil,12,33,44,nil,nil,nil], __LINE__],
|
175
|
-
[['01:33:44 PM', '%r'], [nil,nil,nil,13,33,44,nil,nil,nil], __LINE__],
|
176
|
-
[['11:33:44 PM', '%r'], [nil,nil,nil,23,33,44,nil,nil,nil], __LINE__],
|
177
|
-
|
178
|
-
[['11:33:44 PM AMT', '%I:%M:%S %p %Z'], [nil,nil,nil,23,33,44,'AMT',nil,nil], __LINE__],
|
179
|
-
[['11:33:44 P.M. AMT', '%I:%M:%S %p %Z'], [nil,nil,nil,23,33,44,'AMT',nil,nil], __LINE__],
|
180
|
-
|
181
|
-
[['fri1feb034pm+5', '%a%d%b%y%H%p%Z'], [2003,2,1,16,nil,nil,'+5',5*3600,5]]
|
182
|
-
].each do |x, y|
|
183
|
-
h = Date._strptime(*x)
|
184
|
-
a = h.values_at(:year,:mon,:mday,:hour,:min,:sec,:zone,:offset,:wday)
|
185
|
-
if y[1] == -1
|
186
|
-
a[1] = -1
|
187
|
-
a[2] = h[:yday]
|
188
|
-
end
|
189
|
-
assert_equal(y, a, [x, y, a].inspect)
|
190
|
-
end
|
191
|
-
end
|
192
|
-
|
193
|
-
def test__strptime__width
|
194
|
-
[
|
195
|
-
[['99', '%y'], [1999,nil,nil,nil,nil,nil,nil,nil,nil], __LINE__],
|
196
|
-
[['01', '%y'], [2001,nil,nil,nil,nil,nil,nil,nil,nil], __LINE__],
|
197
|
-
[['19 99', '%C %y'], [1999,nil,nil,nil,nil,nil,nil,nil,nil], __LINE__],
|
198
|
-
[['20 01', '%C %y'], [2001,nil,nil,nil,nil,nil,nil,nil,nil], __LINE__],
|
199
|
-
[['30 99', '%C %y'], [3099,nil,nil,nil,nil,nil,nil,nil,nil], __LINE__],
|
200
|
-
[['30 01', '%C %y'], [3001,nil,nil,nil,nil,nil,nil,nil,nil], __LINE__],
|
201
|
-
[['1999', '%C%y'], [1999,nil,nil,nil,nil,nil,nil,nil,nil], __LINE__],
|
202
|
-
[['2001', '%C%y'], [2001,nil,nil,nil,nil,nil,nil,nil,nil], __LINE__],
|
203
|
-
[['3099', '%C%y'], [3099,nil,nil,nil,nil,nil,nil,nil,nil], __LINE__],
|
204
|
-
[['3001', '%C%y'], [3001,nil,nil,nil,nil,nil,nil,nil,nil], __LINE__],
|
205
|
-
|
206
|
-
[['20060806', '%Y'], [20060806,nil,nil,nil,nil,nil,nil,nil,nil], __LINE__],
|
207
|
-
[['20060806', "%Y\s"], [20060806,nil,nil,nil,nil,nil,nil,nil,nil], __LINE__],
|
208
|
-
[['20060806', '%Y%m%d'], [2006,8,6,nil,nil,nil,nil,nil,nil], __LINE__],
|
209
|
-
[['2006908906', '%Y9%m9%d'], [2006,8,6,nil,nil,nil,nil,nil,nil], __LINE__],
|
210
|
-
[['12006 08 06', '%Y %m %d'], [12006,8,6,nil,nil,nil,nil,nil,nil], __LINE__],
|
211
|
-
[['12006-08-06', '%Y-%m-%d'], [12006,8,6,nil,nil,nil,nil,nil,nil], __LINE__],
|
212
|
-
[['200608 6', '%Y%m%e'], [2006,8,6,nil,nil,nil,nil,nil,nil], __LINE__],
|
213
|
-
|
214
|
-
[['2006333', '%Y%j'], [2006,-1,333,nil,nil,nil,nil,nil,nil], __LINE__],
|
215
|
-
[['20069333', '%Y9%j'], [2006,-1,333,nil,nil,nil,nil,nil,nil], __LINE__],
|
216
|
-
[['12006 333', '%Y %j'], [12006,-1,333,nil,nil,nil,nil,nil,nil], __LINE__],
|
217
|
-
[['12006-333', '%Y-%j'], [12006,-1,333,nil,nil,nil,nil,nil,nil], __LINE__],
|
218
|
-
|
219
|
-
[['232425', '%H%M%S'], [nil,nil,nil,23,24,25,nil,nil,nil], __LINE__],
|
220
|
-
[['23924925', '%H9%M9%S'], [nil,nil,nil,23,24,25,nil,nil,nil], __LINE__],
|
221
|
-
[['23 24 25', '%H %M %S'], [nil,nil,nil,23,24,25,nil,nil,nil], __LINE__],
|
222
|
-
[['23:24:25', '%H:%M:%S'], [nil,nil,nil,23,24,25,nil,nil,nil], __LINE__],
|
223
|
-
[[' 32425', '%k%M%S'], [nil,nil,nil,3,24,25,nil,nil,nil], __LINE__],
|
224
|
-
[[' 32425', '%l%M%S'], [nil,nil,nil,3,24,25,nil,nil,nil], __LINE__],
|
225
|
-
|
226
|
-
[['FriAug', '%a%b'], [nil,8,nil,nil,nil,nil,nil,nil,5], __LINE__],
|
227
|
-
[['FriAug', '%A%B'], [nil,8,nil,nil,nil,nil,nil,nil,5], __LINE__],
|
228
|
-
[['FridayAugust', '%A%B'], [nil,8,nil,nil,nil,nil,nil,nil,5], __LINE__],
|
229
|
-
[['FridayAugust', '%a%b'], [nil,8,nil,nil,nil,nil,nil,nil,5], __LINE__],
|
230
|
-
].each do |x,y,l|
|
231
|
-
h = Date._strptime(*x)
|
232
|
-
a = (h || {}).values_at(:year,:mon,:mday,:hour,:min,:sec,:zone,:offset,:wday)
|
233
|
-
if y[1] == -1
|
234
|
-
a[1] = -1
|
235
|
-
a[2] = h[:yday]
|
236
|
-
end
|
237
|
-
assert_equal(y, a, format('<failed at line %d>', l))
|
238
|
-
end
|
239
|
-
end
|
240
|
-
|
241
|
-
def test__strptime__fail
|
242
|
-
assert_not_nil(Date._strptime('2001.', '%Y.'))
|
243
|
-
assert_not_nil(Date._strptime("2001.\s", '%Y.'))
|
244
|
-
assert_not_nil(Date._strptime('2001.', "%Y.\s"))
|
245
|
-
assert_not_nil(Date._strptime("2001.\s", "%Y.\s"))
|
246
|
-
|
247
|
-
assert_nil(Date._strptime('2001', '%Y.'))
|
248
|
-
assert_nil(Date._strptime("2001\s", '%Y.'))
|
249
|
-
assert_nil(Date._strptime('2001', "%Y.\s"))
|
250
|
-
assert_nil(Date._strptime("2001\s", "%Y.\s"))
|
251
|
-
|
252
|
-
assert_nil(Date._strptime('2001-13-31', '%Y-%m-%d'))
|
253
|
-
assert_nil(Date._strptime('2001-12-00', '%Y-%m-%d'))
|
254
|
-
assert_nil(Date._strptime('2001-12-32', '%Y-%m-%d'))
|
255
|
-
assert_nil(Date._strptime('2001-12-00', '%Y-%m-%e'))
|
256
|
-
assert_nil(Date._strptime('2001-12-32', '%Y-%m-%e'))
|
257
|
-
assert_nil(Date._strptime('2001-12-31', '%y-%m-%d'))
|
258
|
-
|
259
|
-
assert_nil(Date._strptime('2004-000', '%Y-%j'))
|
260
|
-
assert_nil(Date._strptime('2004-367', '%Y-%j'))
|
261
|
-
assert_nil(Date._strptime('2004-366', '%y-%j'))
|
262
|
-
|
263
|
-
assert_not_nil(Date._strptime('24:59:59', '%H:%M:%S'))
|
264
|
-
assert_not_nil(Date._strptime('24:59:59', '%k:%M:%S'))
|
265
|
-
assert_not_nil(Date._strptime('24:59:60', '%H:%M:%S'))
|
266
|
-
assert_not_nil(Date._strptime('24:59:60', '%k:%M:%S'))
|
267
|
-
|
268
|
-
assert_nil(Date._strptime('24:60:59', '%H:%M:%S'))
|
269
|
-
assert_nil(Date._strptime('24:60:59', '%k:%M:%S'))
|
270
|
-
assert_nil(Date._strptime('24:59:61', '%H:%M:%S'))
|
271
|
-
assert_nil(Date._strptime('24:59:61', '%k:%M:%S'))
|
272
|
-
assert_nil(Date._strptime('00:59:59', '%I:%M:%S'))
|
273
|
-
assert_nil(Date._strptime('13:59:59', '%I:%M:%S'))
|
274
|
-
assert_nil(Date._strptime('00:59:59', '%l:%M:%S'))
|
275
|
-
assert_nil(Date._strptime('13:59:59', '%l:%M:%S'))
|
276
|
-
|
277
|
-
assert_not_nil(Date._strptime('0', '%U'))
|
278
|
-
assert_nil(Date._strptime('54', '%U'))
|
279
|
-
assert_not_nil(Date._strptime('0', '%W'))
|
280
|
-
assert_nil(Date._strptime('54', '%W'))
|
281
|
-
assert_nil(Date._strptime('0', '%V'))
|
282
|
-
assert_nil(Date._strptime('54', '%V'))
|
283
|
-
assert_nil(Date._strptime('0', '%u'))
|
284
|
-
assert_not_nil(Date._strptime('7', '%u'))
|
285
|
-
assert_not_nil(Date._strptime('0', '%w'))
|
286
|
-
assert_nil(Date._strptime('7', '%w'))
|
287
|
-
|
288
|
-
assert_nil(Date._strptime('Sanday', '%A'))
|
289
|
-
assert_nil(Date._strptime('Jenuary', '%B'))
|
290
|
-
assert_not_nil(Date._strptime('Sundai', '%A'))
|
291
|
-
assert_not_nil(Date._strptime('Januari', '%B'))
|
292
|
-
assert_nil(Date._strptime('Sundai,', '%A,'))
|
293
|
-
assert_nil(Date._strptime('Januari,', '%B,'))
|
294
|
-
end
|
295
|
-
|
296
|
-
def test_strptime
|
297
|
-
assert_equal(Date.new, Date.strptime)
|
298
|
-
d = Date.new(2002,3,14)
|
299
|
-
assert_equal(d, Date.strptime(d.to_s))
|
300
|
-
assert_equal(Date.new(2002,3,14), Date.strptime('2002-03-14'))
|
301
|
-
|
302
|
-
d = DateTime.new(2002,3,14,11,22,33, 0)
|
303
|
-
assert_equal(d, DateTime.strptime(d.to_s))
|
304
|
-
assert_equal(DateTime.new(2002,3,14,11,22,33, 0),
|
305
|
-
DateTime.strptime('2002-03-14T11:22:33Z'))
|
306
|
-
assert_equal(DateTime.new(2002,3,14,11,22,33, 0),
|
307
|
-
DateTime.strptime('2002-03-14T11:22:33Z', '%Y-%m-%dT%H:%M:%S%Z'))
|
308
|
-
assert_equal(DateTime.new(2002,3,14,11,22,33, 9.to_r/24),
|
309
|
-
DateTime.strptime('2002-03-14T11:22:33+09:00', '%Y-%m-%dT%H:%M:%S%Z'))
|
310
|
-
assert_equal(DateTime.new(2002,3,14,11,22,33, -9.to_r/24),
|
311
|
-
DateTime.strptime('2002-03-14T11:22:33-09:00', '%FT%T%Z'))
|
312
|
-
assert_equal(DateTime.new(2002,3,14,11,22,33, -9.to_r/24) + 123456789.to_r/1000000000/86400,
|
313
|
-
DateTime.strptime('2002-03-14T11:22:33.123456789-09:00', '%FT%T.%N%Z'))
|
314
|
-
end
|
315
|
-
|
316
|
-
def test_strptime__2
|
317
|
-
(Date.new(2006,6,1)..Date.new(2007,6,1)).each do |d|
|
318
|
-
[
|
319
|
-
'%Y %m %d',
|
320
|
-
'%C %y %m %d',
|
321
|
-
|
322
|
-
'%Y %j',
|
323
|
-
'%C %y %j',
|
324
|
-
|
325
|
-
'%G %V %w',
|
326
|
-
'%G %V %u',
|
327
|
-
'%C %g %V %w',
|
328
|
-
'%C %g %V %u',
|
329
|
-
|
330
|
-
'%Y %U %w',
|
331
|
-
'%Y %U %u',
|
332
|
-
'%Y %W %w',
|
333
|
-
'%Y %W %u',
|
334
|
-
'%C %y %U %w',
|
335
|
-
'%C %y %U %u',
|
336
|
-
'%C %y %W %w',
|
337
|
-
'%C %y %W %u',
|
338
|
-
].each do |fmt|
|
339
|
-
s = d.strftime(fmt)
|
340
|
-
d2 = Date.strptime(s, fmt)
|
341
|
-
assert_equal(d, d2, [fmt, d.to_s, d2.to_s].inspect)
|
342
|
-
end
|
343
|
-
|
344
|
-
[
|
345
|
-
'%Y %m %d %H %M %S',
|
346
|
-
'%Y %m %d %H %M %S %N',
|
347
|
-
'%C %y %m %d %H %M %S',
|
348
|
-
'%C %y %m %d %H %M %S %N',
|
349
|
-
|
350
|
-
'%Y %j %H %M %S',
|
351
|
-
'%Y %j %H %M %S %N',
|
352
|
-
'%C %y %j %H %M %S',
|
353
|
-
'%C %y %j %H %M %S %N',
|
354
|
-
|
355
|
-
'%s',
|
356
|
-
'%s %N',
|
357
|
-
'%Q',
|
358
|
-
'%Q %N',
|
359
|
-
].each do |fmt|
|
360
|
-
s = d.strftime(fmt)
|
361
|
-
d2 = DateTime.strptime(s, fmt)
|
362
|
-
assert_equal(d, d2, [fmt, d.to_s, d2.to_s].inspect)
|
363
|
-
end
|
364
|
-
end
|
365
|
-
end
|
366
|
-
|
367
|
-
def test_strptime__minus
|
368
|
-
d = DateTime.strptime('-1', '%s')
|
369
|
-
assert_equal([1969, 12, 31, 23, 59, 59],
|
370
|
-
[d.year, d.mon, d.mday, d.hour, d.min, d.sec])
|
371
|
-
d = DateTime.strptime('-86400', '%s')
|
372
|
-
assert_equal([1969, 12, 31, 0, 0, 0],
|
373
|
-
[d.year, d.mon, d.mday, d.hour, d.min, d.sec])
|
374
|
-
|
375
|
-
d = DateTime.strptime('-999', '%Q')
|
376
|
-
assert_equal([1969, 12, 31, 23, 59, 59, 1.to_r/10**3],
|
377
|
-
[d.year, d.mon, d.mday, d.hour, d.min, d.sec, d.sec_fraction])
|
378
|
-
d = DateTime.strptime('-1000', '%Q')
|
379
|
-
assert_equal([1969, 12, 31, 23, 59, 59, 0],
|
380
|
-
[d.year, d.mon, d.mday, d.hour, d.min, d.sec, d.sec_fraction])
|
381
|
-
end
|
382
|
-
|
383
|
-
def test_strptime__comp
|
384
|
-
n = DateTime.now
|
385
|
-
|
386
|
-
d = DateTime.strptime('073', '%j')
|
387
|
-
assert_equal([n.year, 73, 0, 0, 0],
|
388
|
-
[d.year, d.yday, d.hour, d.min, d.sec])
|
389
|
-
d = DateTime.strptime('13', '%d')
|
390
|
-
assert_equal([n.year, n.mon, 13, 0, 0, 0],
|
391
|
-
[d.year, d.mon, d.mday, d.hour, d.min, d.sec])
|
392
|
-
|
393
|
-
d = DateTime.strptime('Mar', '%b')
|
394
|
-
assert_equal([n.year, 3, 1, 0, 0, 0],
|
395
|
-
[d.year, d.mon, d.mday, d.hour, d.min, d.sec])
|
396
|
-
d = DateTime.strptime('2004', '%Y')
|
397
|
-
assert_equal([2004, 1, 1, 0, 0, 0],
|
398
|
-
[d.year, d.mon, d.mday, d.hour, d.min, d.sec])
|
399
|
-
|
400
|
-
d = DateTime.strptime('Mar 13', '%b %d')
|
401
|
-
assert_equal([n.year, 3, 13, 0, 0, 0],
|
402
|
-
[d.year, d.mon, d.mday, d.hour, d.min, d.sec])
|
403
|
-
d = DateTime.strptime('Mar 2004', '%b %Y')
|
404
|
-
assert_equal([2004, 3, 1, 0, 0, 0],
|
405
|
-
[d.year, d.mon, d.mday, d.hour, d.min, d.sec])
|
406
|
-
d = DateTime.strptime('23:55', '%H:%M')
|
407
|
-
assert_equal([n.year, n.mon, n.mday, 23, 55, 0],
|
408
|
-
[d.year, d.mon, d.mday, d.hour, d.min, d.sec])
|
409
|
-
d = DateTime.strptime('23:55:30', '%H:%M:%S')
|
410
|
-
assert_equal([n.year, n.mon, n.mday, 23, 55, 30],
|
411
|
-
[d.year, d.mon, d.mday, d.hour, d.min, d.sec])
|
412
|
-
|
413
|
-
d = DateTime.strptime('Sun 23:55', '%a %H:%M')
|
414
|
-
d2 = d - d.wday
|
415
|
-
assert_equal([d2.year, d2.mon, d2.mday, 23, 55, 0],
|
416
|
-
[d.year, d.mon, d.mday, d.hour, d.min, d.sec])
|
417
|
-
d = DateTime.strptime('Aug 23:55', '%b %H:%M')
|
418
|
-
assert_equal([n.year, 8, 1, 23, 55, 0],
|
419
|
-
[d.year, d.mon, d.mday, d.hour, d.min, d.sec])
|
420
|
-
|
421
|
-
d = DateTime.strptime('2004', '%G')
|
422
|
-
assert_equal([2004, 1, 1, 0, 0, 0],
|
423
|
-
[d.cwyear, d.cweek, d.cwday, d.hour, d.min, d.sec])
|
424
|
-
d = DateTime.strptime('11', '%V')
|
425
|
-
assert_equal([n.cwyear, 11, 1, 0, 0, 0],
|
426
|
-
[d.cwyear, d.cweek, d.cwday, d.hour, d.min, d.sec])
|
427
|
-
d = DateTime.strptime('6', '%u')
|
428
|
-
assert_equal([n.cwyear, n.cweek, 6, 0, 0, 0],
|
429
|
-
[d.cwyear, d.cweek, d.cwday, d.hour, d.min, d.sec])
|
430
|
-
|
431
|
-
d = DateTime.strptime('11-6', '%V-%u')
|
432
|
-
assert_equal([n.cwyear, 11, 6, 0, 0, 0],
|
433
|
-
[d.cwyear, d.cweek, d.cwday, d.hour, d.min, d.sec])
|
434
|
-
d = DateTime.strptime('2004-11', '%G-%V')
|
435
|
-
assert_equal([2004, 11, 1, 0, 0, 0],
|
436
|
-
[d.cwyear, d.cweek, d.cwday, d.hour, d.min, d.sec])
|
437
|
-
|
438
|
-
d = DateTime.strptime('11-6', '%U-%w')
|
439
|
-
assert_equal([n.year, 11, 6, 0, 0, 0],
|
440
|
-
[d.year, d.strftime('%U').to_i, d.wday, d.hour, d.min, d.sec])
|
441
|
-
d = DateTime.strptime('2004-11', '%Y-%U')
|
442
|
-
assert_equal([2004, 11, 0, 0, 0, 0],
|
443
|
-
[d.year, d.strftime('%U').to_i, d.wday, d.hour, d.min, d.sec])
|
444
|
-
|
445
|
-
d = DateTime.strptime('11-6', '%W-%w')
|
446
|
-
assert_equal([n.year, 11, 6, 0, 0, 0],
|
447
|
-
[d.year, d.strftime('%W').to_i, d.wday, d.hour, d.min, d.sec])
|
448
|
-
d = DateTime.strptime('2004-11', '%Y-%W')
|
449
|
-
assert_equal([2004, 11, 1, 0, 0, 0],
|
450
|
-
[d.year, d.strftime('%W').to_i, d.wday, d.hour, d.min, d.sec])
|
451
|
-
end
|
452
|
-
|
453
|
-
def test_strptime__d_to_s
|
454
|
-
d = Date.new(2002,3,14)
|
455
|
-
assert_equal(d, Date.strptime(d.to_s))
|
456
|
-
|
457
|
-
d = DateTime.new(2002,3,14,11,22,33, 9.to_r/24)
|
458
|
-
assert_equal(d, DateTime.strptime(d.to_s))
|
459
|
-
end
|
460
|
-
|
461
|
-
def test_strptime__ex
|
462
|
-
assert_raise(ArgumentError) do
|
463
|
-
Date.strptime('')
|
464
|
-
end
|
465
|
-
assert_raise(ArgumentError) do
|
466
|
-
DateTime.strptime('')
|
467
|
-
end
|
468
|
-
assert_raise(ArgumentError) do
|
469
|
-
Date.strptime('2001-02-29', '%F')
|
470
|
-
end
|
471
|
-
assert_raise(ArgumentError) do
|
472
|
-
DateTime.strptime('2001-02-29T23:59:60', '%FT%T')
|
473
|
-
end
|
474
|
-
assert_nothing_raised(ArgumentError) do
|
475
|
-
DateTime.strptime('2001-03-01T23:59:60', '%FT%T')
|
476
|
-
end
|
477
|
-
assert_raise(ArgumentError) do
|
478
|
-
DateTime.strptime('2001-03-01T23:59:61', '%FT%T')
|
479
|
-
end
|
480
|
-
assert_raise(ArgumentError) do
|
481
|
-
Date.strptime('23:55', '%H:%M')
|
482
|
-
end
|
483
|
-
assert_raise(ArgumentError) do
|
484
|
-
Date.strptime('01-31-2011', '%m/%d/%Y')
|
485
|
-
end
|
486
|
-
end
|
487
|
-
|
488
|
-
def test_given_string
|
489
|
-
s = '2001-02-03T04:05:06Z'
|
490
|
-
s0 = s.dup
|
491
|
-
|
492
|
-
assert_not_equal({}, Date._strptime(s, '%FT%T%Z'))
|
493
|
-
assert_equal(s0, s)
|
494
|
-
end
|
495
|
-
|
496
|
-
def test_sz
|
497
|
-
omit "Skip test_sz because it seems that the spec is still unstable."
|
498
|
-
|
499
|
-
d = DateTime.strptime('0 -0200', '%s %z')
|
500
|
-
assert_equal([1969, 12, 31, 22, 0, 0], [d.year, d.mon, d.mday, d.hour, d.min, d.sec])
|
501
|
-
assert_equal(Rational(-2, 24), d.offset)
|
502
|
-
d = DateTime.strptime('9 +0200', '%s %z')
|
503
|
-
assert_equal([1970, 1, 1, 2, 0, 9], [d.year, d.mon, d.mday, d.hour, d.min, d.sec])
|
504
|
-
assert_equal(Rational(2, 24), d.offset)
|
505
|
-
|
506
|
-
d = DateTime.strptime('0 -0200', '%Q %z')
|
507
|
-
assert_equal([1969, 12, 31, 22, 0, 0], [d.year, d.mon, d.mday, d.hour, d.min, d.sec])
|
508
|
-
assert_equal(Rational(-2, 24), d.offset)
|
509
|
-
d = DateTime.strptime('9000 +0200', '%Q %z')
|
510
|
-
assert_equal([1970, 1, 1, 2, 0, 9], [d.year, d.mon, d.mday, d.hour, d.min, d.sec])
|
511
|
-
assert_equal(Rational(2, 24), d.offset)
|
512
|
-
|
513
|
-
end
|
514
|
-
|
515
|
-
end
|