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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 58821c716d9d1b756cfca76758fe86c538017a4d
4
- data.tar.gz: b85d8a2398ab33ba1a08fa2770af84d0b2b0ebee
3
+ metadata.gz: 3868d732dd4b4cae20b4e659401dfb3d30f2d1f8
4
+ data.tar.gz: 4123fd67e1617b8d8f08e414989508760b7b1014
5
5
  SHA512:
6
- metadata.gz: 75cc3e16e31928a46816eb3dce6248e129a21ba5124716bcb258de9c01e75b9a7650befc0602d78e469110f5f00800fd22a7a7afba4ba0a9e528cd964a4bbb07
7
- data.tar.gz: d65f1bfd7b08897bb985674276a1a098185583123115941bc2d2f845225ae7e8f22a892ff0e12878ed9e4382aeb5e3369bd76bef0f2ab71d582e0198d771949a
6
+ metadata.gz: c56860e644409b403cee9670c6706360ee04e617c8875d7eebb6df7bbc87c397a6361cd401b5407caf057a7377b17f6d8ef296b92a90622f4da286ee188d834b
7
+ data.tar.gz: b99332851d72cb7ec2363db6524985ac6dd7a12e51c8ac7d42955fb46c26fec771bc257ed866376e58e8da127f3c0c1a550b29f1b4d3b68ade217fc4b4da6083
@@ -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
- KV.new(from_csv(k), from_csv(v))
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)
@@ -1,3 +1,3 @@
1
1
  module Streamingly
2
- VERSION = "0.1.0"
2
+ VERSION = "0.2.0"
3
3
  end
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.1.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-21 00:00:00.000000000 Z
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.0
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