embulk-parser-json 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/embulk-parser-json.gemspec +1 -1
- data/lib/embulk/parser/json.rb +9 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e9403fc54ab64135da124a3791e34087dda9b62a
|
4
|
+
data.tar.gz: e3da372fe2d7ab82aac794864b9ff5de2eaf1464
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0975db258c9e8b38de2f1b9859b76e3e52a568db92963ad4b53a82e9a954646ef3e34514771f8133d33757702b0912f7a9231b6faf0fd83d266bc046abdd5d2c
|
7
|
+
data.tar.gz: a35875f4ba86f1dc576b67718e256a2dd91224426c42f5173609ae177ceedf89a788fe3ba47326d3ee5fa05121b304472df28cf97c11aa49c8e323b07367ff67
|
data/embulk-parser-json.gemspec
CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = "embulk-parser-json"
|
7
|
-
spec.version = "0.0.
|
7
|
+
spec.version = "0.0.2"
|
8
8
|
spec.authors = ["Takuma kanari"]
|
9
9
|
spec.email = ["chemtrails.t@gmail.com"]
|
10
10
|
spec.summary = %q{Embulk parser plugin for json}
|
data/lib/embulk/parser/json.rb
CHANGED
@@ -46,7 +46,15 @@ module Embulk
|
|
46
46
|
when "double"
|
47
47
|
v.to_f
|
48
48
|
when "boolean"
|
49
|
-
|
49
|
+
if v.nil?
|
50
|
+
nil
|
51
|
+
elsif v.kind_of?(String)
|
52
|
+
["yes", "true", "1"].include?(v.downcase)
|
53
|
+
elsif v.kind_of?(Numeric)
|
54
|
+
!v.zero?
|
55
|
+
else
|
56
|
+
!!v
|
57
|
+
end
|
50
58
|
when "timestamp"
|
51
59
|
v.empty? ? nil : Time.strptime(v, c["format"])
|
52
60
|
else
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: embulk-parser-json
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Takuma kanari
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-02-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jsonpath
|
@@ -86,7 +86,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
86
86
|
version: '0'
|
87
87
|
requirements: []
|
88
88
|
rubyforge_project:
|
89
|
-
rubygems_version: 2.
|
89
|
+
rubygems_version: 2.4.5.1
|
90
90
|
signing_key:
|
91
91
|
specification_version: 4
|
92
92
|
summary: Embulk parser plugin for json
|