embulk 0.8.26-java → 0.8.27-java

Sign up to get free protection for your applications and to get access to all the features.
@@ -3,7 +3,7 @@
3
3
  module Embulk
4
4
  @@warned = false
5
5
 
6
- VERSION_INTERNAL = '0.8.26'
6
+ VERSION_INTERNAL = '0.8.27'
7
7
 
8
8
  DEPRECATED_MESSAGE = 'Embulk::VERSION in (J)Ruby is deprecated. Use org.embulk.EmbulkVersion::VERSION instead. If this message is from a plugin, please tell this to the author of the plugin!'
9
9
  def self.const_missing(name)
@@ -4,4 +4,5 @@ include 'embulk-core'
4
4
  include 'embulk-standards'
5
5
  include 'embulk-cli'
6
6
  include 'embulk-test'
7
+ include 'embulk-jruby-strptime'
7
8
  include 'embulk-docs'
@@ -5,8 +5,22 @@ test_dir = File.join(base_dir, "test")
5
5
  $LOAD_PATH.unshift(lib_dir)
6
6
  $LOAD_PATH.unshift(test_dir)
7
7
 
8
+ require "date"
8
9
  require "test/unit"
9
10
 
11
+ module DateExt
12
+ def self.included base
13
+ base.instance_eval do
14
+ def _strptime(str, fmt='%F')
15
+ parser = org.embulk.spi.time.RubyDateParser.new
16
+ map = parser.parse(JRuby.runtime.current_context, fmt, str)
17
+ return map.nil? ? nil : map.to_hash.inject({}){|hash,(k,v)| hash[k.to_sym] = v; hash}
18
+ end
19
+ end
20
+ end
21
+ end
22
+ Date.send(:include, DateExt)
23
+
10
24
  Dir.glob("#{base_dir}/test/**/test{_,-}*.rb") do |file|
11
25
  require file.sub(/\.rb$/,"")
12
26
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: embulk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.26
4
+ version: 0.8.27
5
5
  platform: java
6
6
  authors:
7
7
  - Sadayuki Furuhashi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-07-01 00:00:00.000000000 Z
11
+ date: 2017-07-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -154,9 +154,10 @@ files:
154
154
  - classpath/commons-compress-1.10.jar
155
155
  - classpath/commons-lang-2.4.jar
156
156
  - classpath/commons-lang3-3.4.jar
157
- - classpath/embulk-cli-0.8.26.jar
158
- - classpath/embulk-core-0.8.26.jar
159
- - classpath/embulk-standards-0.8.26.jar
157
+ - classpath/embulk-cli-0.8.27.jar
158
+ - classpath/embulk-core-0.8.27.jar
159
+ - classpath/embulk-jruby-strptime-0.8.27.jar
160
+ - classpath/embulk-standards-0.8.27.jar
160
161
  - classpath/guava-18.0.jar
161
162
  - classpath/guice-4.0.jar
162
163
  - classpath/guice-bootstrap-0.1.1.jar
@@ -535,6 +536,7 @@ files:
535
536
  - embulk-docs/src/release/release-0.8.24.rst
536
537
  - embulk-docs/src/release/release-0.8.25.rst
537
538
  - embulk-docs/src/release/release-0.8.26.rst
539
+ - embulk-docs/src/release/release-0.8.27.rst
538
540
  - embulk-docs/src/release/release-0.8.3.rst
539
541
  - embulk-docs/src/release/release-0.8.4.rst
540
542
  - embulk-docs/src/release/release-0.8.5.rst
@@ -542,6 +544,14 @@ files:
542
544
  - embulk-docs/src/release/release-0.8.7.rst
543
545
  - embulk-docs/src/release/release-0.8.8.rst
544
546
  - embulk-docs/src/release/release-0.8.9.rst
547
+ - embulk-jruby-strptime/build.gradle
548
+ - embulk-jruby-strptime/src/main/java/org/embulk/spi/time/RubyDateParser.java
549
+ - embulk-jruby-strptime/src/main/java/org/embulk/spi/time/StrptimeFormat.java
550
+ - embulk-jruby-strptime/src/main/java/org/embulk/spi/time/StrptimeParser.java
551
+ - embulk-jruby-strptime/src/main/java/org/embulk/spi/time/StrptimeToken.java
552
+ - embulk-jruby-strptime/src/main/java/org/embulk/spi/time/TimeZoneConverter.java
553
+ - embulk-jruby-strptime/src/main/java/org/embulk/spi/time/lexer/StrptimeLexer.flex
554
+ - embulk-jruby-strptime/src/main/java/org/embulk/spi/time/lexer/StrptimeLexer.java
545
555
  - embulk-standards/build.gradle
546
556
  - embulk-standards/src/main/java/org/embulk/standards/Bzip2FileDecoderPlugin.java
547
557
  - embulk-standards/src/main/java/org/embulk/standards/Bzip2FileEncoderPlugin.java