embulk-filter-to_json 0.0.4 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHENGELOG.md +5 -0
- data/README.md +1 -1
- data/build.gradle +1 -1
- data/src/main/java/org/embulk/filter/to_json/ToJsonFilterPlugin.java +12 -6
- metadata +13 -13
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA1:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: d8fbca15491e71b243c408b5754567d915cedf6e
         | 
| 4 | 
            +
              data.tar.gz: e0b1398e5c5abc50b3898d500daaa15e463dffad
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 9beae4e09a010357a338dad9acbb6edd217dd8b392a530f8c1039cd654bfc255a2710fad14f1d90620699f602d4a23f945f2c84d3dea6b5db35907f8202330d6
         | 
| 7 | 
            +
              data.tar.gz: b79a0459d1b8c747cddf860127fc49f9a885eacb767a3adf6f5f1e264c359bb7a9158edabdd2508be64fffb7df0706fa4ce81fcac9ccae4de2714fb931cb7da1
         | 
    
        data/CHENGELOG.md
    CHANGED
    
    | @@ -1,3 +1,8 @@ | |
| 1 | 
            +
            0.0.5 (2017-11-17)
         | 
| 2 | 
            +
            ==================
         | 
| 3 | 
            +
            - Use traditional constructors of TimestampFormatter against Embulk core deprecation.
         | 
| 4 | 
            +
              - https://github.com/civitaspo/embulk-filter-to_json/pull/6
         | 
| 5 | 
            +
             | 
| 1 6 | 
             
            0.0.4 (2016-01-25)
         | 
| 2 7 | 
             
            ==================
         | 
| 3 8 | 
             
            - incompatible change: `timezone` / `format` options removed
         | 
    
        data/README.md
    CHANGED
    
    
    
        data/build.gradle
    CHANGED
    
    
| @@ -22,7 +22,6 @@ import org.embulk.spi.time.TimestampFormatter; | |
| 22 22 | 
             
            import org.embulk.spi.type.Type;
         | 
| 23 23 | 
             
            import org.embulk.spi.type.Types;
         | 
| 24 24 | 
             
            import org.joda.time.DateTimeZone;
         | 
| 25 | 
            -
            import org.jruby.embed.ScriptingContainer;
         | 
| 26 25 | 
             
            import org.slf4j.Logger;
         | 
| 27 26 |  | 
| 28 27 | 
             
            import java.util.List;
         | 
| @@ -54,9 +53,6 @@ public class ToJsonFilterPlugin | |
| 54 53 | 
             
                    @Config("default_format")
         | 
| 55 54 | 
             
                    @ConfigDefault("\"%Y-%m-%d %H:%M:%S.%N %z\"")
         | 
| 56 55 | 
             
                    String getDefaultFormat();
         | 
| 57 | 
            -
             | 
| 58 | 
            -
                    @ConfigInject
         | 
| 59 | 
            -
                    ScriptingContainer getJRuby();
         | 
| 60 56 | 
             
                }
         | 
| 61 57 |  | 
| 62 58 | 
             
                public interface JsonColumn
         | 
| @@ -124,13 +120,23 @@ public class ToJsonFilterPlugin | |
| 124 120 | 
             
                    return new Schema(builder.build());
         | 
| 125 121 | 
             
                }
         | 
| 126 122 |  | 
| 123 | 
            +
                private static interface FormatterIntlTask extends Task, TimestampFormatter.Task {}
         | 
| 124 | 
            +
                private static interface FormatterIntlColumnOption extends Task, TimestampFormatter.TimestampColumnOption {}
         | 
| 125 | 
            +
             | 
| 127 126 | 
             
                @Override
         | 
| 128 127 | 
             
                public PageOutput open(TaskSource taskSource, final Schema inputSchema,
         | 
| 129 128 | 
             
                        final Schema outputSchema, final PageOutput output)
         | 
| 130 129 | 
             
                {
         | 
| 131 130 | 
             
                    final PluginTask task = taskSource.loadTask(PluginTask.class);
         | 
| 132 | 
            -
                    final DateTimeZone timezone | 
| 133 | 
            -
                     | 
| 131 | 
            +
                    final DateTimeZone timezone = DateTimeZone.forID(task.getDefaultTimezone());
         | 
| 132 | 
            +
                    // TODO: Switch to a newer TimestampFormatter constructor after a reasonable interval.
         | 
| 133 | 
            +
                    // Traditional constructor is used here for compatibility.
         | 
| 134 | 
            +
                    final ConfigSource configSource = Exec.newConfigSource();
         | 
| 135 | 
            +
                    configSource.set("format", task.getDefaultFormat());
         | 
| 136 | 
            +
                    configSource.set("timezone", timezone);
         | 
| 137 | 
            +
                    final TimestampFormatter timestampFormatter = new TimestampFormatter(
         | 
| 138 | 
            +
                        Exec.newConfigSource().loadConfig(FormatterIntlTask.class),
         | 
| 139 | 
            +
                        Optional.fromNullable(configSource.loadConfig(FormatterIntlColumnOption.class)));
         | 
| 134 140 | 
             
                    final List<String> columnNamesSkipIfNull = task.getColumnNamesSkipIfNull();
         | 
| 135 141 |  | 
| 136 142 | 
             
                    return new PageOutput()
         | 
    
        metadata
    CHANGED
    
    | @@ -1,43 +1,43 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: embulk-filter-to_json
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0.0. | 
| 4 | 
            +
              version: 0.0.5
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Civitaspo
         | 
| 8 8 | 
             
            autorequire:
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date:  | 
| 11 | 
            +
            date: 2017-11-17 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 | 
            -
              name: bundler
         | 
| 15 | 
            -
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 16 | 
            -
                requirements:
         | 
| 17 | 
            -
                - - ~>
         | 
| 18 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 19 | 
            -
                    version: '1.0'
         | 
| 20 14 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| 21 15 | 
             
                requirements:
         | 
| 22 16 | 
             
                - - ~>
         | 
| 23 17 | 
             
                  - !ruby/object:Gem::Version
         | 
| 24 18 | 
             
                    version: '1.0'
         | 
| 19 | 
            +
              name: bundler
         | 
| 25 20 | 
             
              prerelease: false
         | 
| 26 21 | 
             
              type: :development
         | 
| 27 | 
            -
            - !ruby/object:Gem::Dependency
         | 
| 28 | 
            -
              name: rake
         | 
| 29 22 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 30 23 | 
             
                requirements:
         | 
| 31 | 
            -
                - -  | 
| 24 | 
            +
                - - ~>
         | 
| 32 25 | 
             
                  - !ruby/object:Gem::Version
         | 
| 33 | 
            -
                    version: ' | 
| 26 | 
            +
                    version: '1.0'
         | 
| 27 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 34 28 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| 35 29 | 
             
                requirements:
         | 
| 36 30 | 
             
                - - '>='
         | 
| 37 31 | 
             
                  - !ruby/object:Gem::Version
         | 
| 38 32 | 
             
                    version: '10.0'
         | 
| 33 | 
            +
              name: rake
         | 
| 39 34 | 
             
              prerelease: false
         | 
| 40 35 | 
             
              type: :development
         | 
| 36 | 
            +
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 37 | 
            +
                requirements:
         | 
| 38 | 
            +
                - - '>='
         | 
| 39 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 40 | 
            +
                    version: '10.0'
         | 
| 41 41 | 
             
            description: To Json
         | 
| 42 42 | 
             
            email:
         | 
| 43 43 | 
             
            - civitaspo@gmail.com
         | 
| @@ -62,7 +62,7 @@ files: | |
| 62 62 | 
             
            - src/main/java/org/embulk/filter/to_json/ColumnVisitorToJsonImpl.java
         | 
| 63 63 | 
             
            - src/main/java/org/embulk/filter/to_json/ToJsonFilterPlugin.java
         | 
| 64 64 | 
             
            - src/test/java/org/embulk/filter/to_json/TestToJsonFilterPlugin.java
         | 
| 65 | 
            -
            - classpath/embulk-filter-to_json-0.0. | 
| 65 | 
            +
            - classpath/embulk-filter-to_json-0.0.5.jar
         | 
| 66 66 | 
             
            homepage: https://github.com/civitaspo/embulk-filter-to_json
         | 
| 67 67 | 
             
            licenses:
         | 
| 68 68 | 
             
            - MIT
         |