ruby_px 0.3.0 → 0.4.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: 75f94a43c79f5da37d804b8c37974870b478a9f9
4
- data.tar.gz: 827b424d375f367ff5f9c83963144945212ee26c
3
+ metadata.gz: 1de65efec0cbab985769ee3cc643c6c7b1e90196
4
+ data.tar.gz: ea27a5bc542d42c54e7947373177e7ce09a32966
5
5
  SHA512:
6
- metadata.gz: 6fba11c5e430116203f3aadbb6e4e6aa6338ce9c7265142aade8e59595e99974144b6ec681b1e1dbfc1f475e93635aacdfab96e3b8fcc9c31f0af5a316603d5c
7
- data.tar.gz: 92d8b71132554056e42158b324627df96279ebf8c0c7ceabac4640b49da1b0c3aa21cf41be0436765e5cca2a49947c70a95c2a2cc526337dba838cdec58940a1
6
+ metadata.gz: a72e451829655ecaa985b8f85f56b5c154a7a37c95d6e6a7add13b60bbf3f4a2ab3cf69d0ce4f2db595568db74b4f4604d712e5f380e9c96f231a992081a9946
7
+ data.tar.gz: 6a74e5337db838e84b2d6c3be0fd3c74372efbae95b790414694118bf35d0d82ab90d7182f7d24686b63496bf92fe60822ee5db169a9bbe068dc597db70e1385
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  require "bundler/setup"
4
- require "pc-axis/dataset"
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.
@@ -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])
@@ -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 = "ruby_px"
7
- spec.version = '0.3.0'
7
+ spec.version = '0.4.0'
8
8
  spec.authors = ["Fernando Blat"]
9
9
  spec.email = ["ferblape@gmail.com"]
10
10
 
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.3.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-10-25 00:00:00.000000000 Z
11
+ date: 2016-11-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport