ruby_px 0.3.0 → 0.4.0
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/bin/console +1 -1
- data/lib/ruby_px/dataset.rb +2 -1
- data/ruby_px.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1de65efec0cbab985769ee3cc643c6c7b1e90196
|
4
|
+
data.tar.gz: ea27a5bc542d42c54e7947373177e7ce09a32966
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a72e451829655ecaa985b8f85f56b5c154a7a37c95d6e6a7add13b60bbf3f4a2ab3cf69d0ce4f2db595568db74b4f4604d712e5f380e9c96f231a992081a9946
|
7
|
+
data.tar.gz: 6a74e5337db838e84b2d6c3be0fd3c74372efbae95b790414694118bf35d0d82ab90d7182f7d24686b63496bf92fe60822ee5db169a9bbe068dc597db70e1385
|
data/bin/console
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
3
|
require "bundler/setup"
|
4
|
-
|
4
|
+
require_relative "../lib/ruby_px"
|
5
5
|
|
6
6
|
# You can add fixtures and/or initialization code here to make experimenting
|
7
7
|
# with your gem easier. You can also use a different console, if you like.
|
data/lib/ruby_px/dataset.rb
CHANGED
@@ -123,7 +123,7 @@ module RubyPx
|
|
123
123
|
return if @current_record.nil? || value.nil?
|
124
124
|
|
125
125
|
if @type == :data
|
126
|
-
value = value.split(
|
126
|
+
value = value.split(/[\ ;,\t]/).delete_if{ |s| s.blank? }.each(&:strip)
|
127
127
|
|
128
128
|
add_value_to_bucket(bucket,value) unless value == [';']
|
129
129
|
else
|
@@ -183,6 +183,7 @@ module RubyPx
|
|
183
183
|
value.strip!
|
184
184
|
end
|
185
185
|
if bucket[@current_record].nil?
|
186
|
+
value = Array.wrap(value) if @type == :values
|
186
187
|
bucket[@current_record] = value
|
187
188
|
else
|
188
189
|
bucket[@current_record].concat([value])
|
data/ruby_px.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby_px
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fernando Blat
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-11-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|