embulk-formatter-jsonl 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -11,7 +11,7 @@ Format datum to jsonl, 1 json per 1 line
11
11
  ## Configuration
12
12
 
13
13
  - **encoding**: output encoding. must be one of "UTF-8", "UTF-16LE", "UTF-32BE", "UTF-32LE" or "UTF-32BE" (string default: 'UTF-8')
14
- - **newline**: newline character.
14
+ - **newline**: newline character. (string default: 'LF')
15
15
  - CRLF: use `\r`(0x0d) and `\n`(0x0a) as newline character
16
16
  - LF: use `\n`(0x0a) as newline character
17
17
  - CR: use `\r`(0x0d) as newline character
@@ -1,19 +1,20 @@
1
1
 
2
2
  Gem::Specification.new do |spec|
3
3
  spec.name = "embulk-formatter-jsonl"
4
- spec.version = "0.1.1"
4
+ spec.version = "0.1.2"
5
5
  spec.authors = ["TAKEI Yuya"]
6
6
  spec.summary = "Jsonl formatter plugin for Embulk"
7
7
  spec.description = ""
8
8
  spec.email = ["takei.yuya+github@gmail.com"]
9
9
  spec.licenses = ["MIT"]
10
- # TODO: spec.homepage = "https://github.com/takei+github/embulk-formatter-jsonl"
10
+ spec.homepage = "https://github.com/takei-yuya/embulk-formatter-jsonl"
11
11
 
12
12
  spec.files = `git ls-files`.split("\n") + Dir["classpath/*.jar"]
13
13
  spec.test_files = spec.files.grep(%r{^(test|spec)/})
14
14
  spec.require_paths = ["lib"]
15
15
 
16
16
  #spec.add_dependency 'YOUR_GEM_DEPENDENCY', ['~> YOUR_GEM_DEPENDENCY_VERSION']
17
+ spec.add_dependency 'jrjackson', ['~> 0.2.8']
17
18
  spec.add_development_dependency 'bundler', ['~> 1.0']
18
19
  spec.add_development_dependency 'rake', ['>= 10.0']
19
20
  end
@@ -1,4 +1,4 @@
1
- require 'json'
1
+ require 'jrjackson'
2
2
 
3
3
  module Embulk
4
4
  module Formatter
@@ -62,7 +62,7 @@ module Embulk
62
62
  @schema.each do |col|
63
63
  datum[col.name] = record[col.index]
64
64
  end
65
- @current_file.write "#{datum.to_json}#{@newline}".encode(@encoding)
65
+ @current_file.write "#{JrJackson::Json.dump(datum, :mode => :compat)}#{@newline}".encode(@encoding)
66
66
  end
67
67
  end
68
68
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: embulk-formatter-jsonl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,6 +11,22 @@ bindir: bin
11
11
  cert_chain: []
12
12
  date: 2015-02-26 00:00:00.000000000 Z
13
13
  dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: jrjackson
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ~>
20
+ - !ruby/object:Gem::Version
21
+ version: 0.2.8
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: 0.2.8
14
30
  - !ruby/object:Gem::Dependency
15
31
  name: bundler
16
32
  requirement: !ruby/object:Gem::Requirement
@@ -57,7 +73,7 @@ files:
57
73
  - Rakefile
58
74
  - embulk-formatter-jsonl.gemspec
59
75
  - lib/embulk/formatter/jsonl.rb
60
- homepage:
76
+ homepage: https://github.com/takei-yuya/embulk-formatter-jsonl
61
77
  licenses:
62
78
  - MIT
63
79
  post_install_message: