bumblebee 3.1.0 → 3.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/bumblebee/column.rb +5 -1
- data/lib/bumblebee/mutator.rb +2 -2
- data/lib/bumblebee/version.rb +1 -1
- data/spec/examples/person_template.rb +1 -1
- data/spec/fixtures/people/data.csv +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 82b57ba6097d5ebadd19d3f81253687ef7690580b79f3642473a3db317a47158
|
4
|
+
data.tar.gz: efa490a8946226685a87ebf460403db9a4c15f3cdc727af55fc741005efc9f43
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e3c221ed81baa86f134888b8dce1dbb2bd96950b0e8b4f968cef89b65fb7e39ab2a05c6ba4e014018ac305f7e7a378d1eccefb817c354602471cb7196a63061b
|
7
|
+
data.tar.gz: 1e121e9f9bfbe8073eaba64fe0086680f5bf0289453b1ca19df84cadbbdc3c3f3ed67bdd8482260b85a047d61cc9bb510a2ae114be95b708e1ad0f0f7f399fd6
|
data/CHANGELOG.md
CHANGED
data/lib/bumblebee/column.rb
CHANGED
@@ -29,7 +29,11 @@ module Bumblebee
|
|
29
29
|
@header = header.to_s
|
30
30
|
@property = property || @header
|
31
31
|
@through = Array(through)
|
32
|
-
|
32
|
+
|
33
|
+
# We need to ensure the to_csv mutator is not splitting any keys because its hash has already
|
34
|
+
# been resolved where each key is the actual presentational value (csv header).
|
35
|
+
@to_csv = Mutator.new(to_csv, resolver: Objectable.resolver(separator: ''))
|
36
|
+
|
33
37
|
@to_object = Mutator.new(to_object)
|
34
38
|
@resolver = Objectable.resolver
|
35
39
|
|
data/lib/bumblebee/mutator.rb
CHANGED
@@ -18,8 +18,8 @@ module Bumblebee
|
|
18
18
|
|
19
19
|
attr_reader :converter, :type
|
20
20
|
|
21
|
-
def initialize(arg)
|
22
|
-
@resolver
|
21
|
+
def initialize(arg, resolver: Objectable.resolver)
|
22
|
+
@resolver = resolver
|
23
23
|
@converter = arg.nil? || mutator?(arg) ? NullConverter.new : SimpleConverter.new(arg)
|
24
24
|
@type = mutator?(arg) ? Types.const_get(arg.to_s.upcase.to_sym) : nil
|
25
25
|
|
data/lib/bumblebee/version.rb
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
ID #,First Name,Last Name,Street 1,Street 2,City,
|
1
|
+
ID #,First Name,Last Name,Street 1,Street 2,City,St.,Zipcode,Current,Home #,Fax #,Email Address,Smokes,Current Balance,Visits,Family Members,Email Address Domain
|
2
2
|
1,Matt,Rizzo,555 Happy Ln.,Suite 208,Mukwongo,WI,12345,true,555-444-5555,555-444-5555,something@somewhere.org,false,124.53,2018-03-02;2018-06-04,"3,4",somewhere.org
|
3
3
|
2,Katie,Bunny,765 N. Hollywood Dr.,Apt 3B,Bel Air,CA,99999,false,123-456-7890,098-765-4321,st@elsewhere.org,true,-98.5,2010-09-10;2018-03-04,"5,6",elsewhere.org
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bumblebee
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.1.
|
4
|
+
version: 3.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matthew Ruggio
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-02-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: acts_as_hashable
|