streamingly 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/streamingly/serde.rb +16 -2
- data/lib/streamingly/version.rb +1 -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: 3868d732dd4b4cae20b4e659401dfb3d30f2d1f8
|
4
|
+
data.tar.gz: 4123fd67e1617b8d8f08e414989508760b7b1014
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c56860e644409b403cee9670c6706360ee04e617c8875d7eebb6df7bbc87c397a6361cd401b5407caf057a7377b17f6d8ef296b92a90622f4da286ee188d834b
|
7
|
+
data.tar.gz: b99332851d72cb7ec2363db6524985ac6dd7a12e51c8ac7d42955fb46c26fec771bc257ed866376e58e8da127f3c0c1a550b29f1b4d3b68ade217fc4b4da6083
|
data/lib/streamingly/serde.rb
CHANGED
@@ -33,8 +33,22 @@ module Streamingly
|
|
33
33
|
end
|
34
34
|
|
35
35
|
def self.from_tabbed_csv(string)
|
36
|
-
k,v = string.split("\t")
|
37
|
-
|
36
|
+
k, v = string.split("\t", 2)
|
37
|
+
key = from_string_or_csv(k)
|
38
|
+
value = if v.include? "\t"
|
39
|
+
from_tabbed_csv(v)
|
40
|
+
else
|
41
|
+
from_string_or_csv(v)
|
42
|
+
end
|
43
|
+
KV.new(key, value)
|
44
|
+
end
|
45
|
+
|
46
|
+
def self.from_string_or_csv(string)
|
47
|
+
if string.include? ','
|
48
|
+
from_csv(string)
|
49
|
+
else
|
50
|
+
string
|
51
|
+
end
|
38
52
|
end
|
39
53
|
|
40
54
|
def self.resolve_class(class_name)
|
data/lib/streamingly/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: streamingly
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Gillooly
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-12-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -109,7 +109,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
109
109
|
version: '0'
|
110
110
|
requirements: []
|
111
111
|
rubyforge_project:
|
112
|
-
rubygems_version: 2.2.
|
112
|
+
rubygems_version: 2.2.2
|
113
113
|
signing_key:
|
114
114
|
specification_version: 4
|
115
115
|
summary: Helpful classes for writing streaming Hadoop jobs in Ruby
|