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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b778ae4e05a2d4d578f8fb3f98af32929d2b1a00f2289fefe29b4a3e7d41a353
4
- data.tar.gz: f48433f936d8c11fba080224ba64df7b167717d24c72f1a8e92971ab603cb0fb
3
+ metadata.gz: 82b57ba6097d5ebadd19d3f81253687ef7690580b79f3642473a3db317a47158
4
+ data.tar.gz: efa490a8946226685a87ebf460403db9a4c15f3cdc727af55fc741005efc9f43
5
5
  SHA512:
6
- metadata.gz: 0ba3577b2116ff8f9a27fa1275555f7c322d9ea26df18ee6518a4dfdfb993ade238cc5c92951b33f8468a16baacad88f407707cf81a0cf22fd9c2aae63364059
7
- data.tar.gz: 6a10009dfa2ca2b0d2c4415ff4198469f1f5cb1b3460f66c390b785b8053435f2c38ec354d724584defbbc4f6361e089e9c10a698aff5101750e1d872205f1ff
6
+ metadata.gz: e3c221ed81baa86f134888b8dce1dbb2bd96950b0e8b4f968cef89b65fb7e39ab2a05c6ba4e014018ac305f7e7a378d1eccefb817c354602471cb7196a63061b
7
+ data.tar.gz: 1e121e9f9bfbe8073eaba64fe0086680f5bf0289453b1ca19df84cadbbdc3c3f3ed67bdd8482260b85a047d61cc9bb510a2ae114be95b708e1ad0f0f7f399fd6
@@ -1,3 +1,9 @@
1
+ # 3.1.1 (February 10th, 2020)
2
+
3
+ Fixes:
4
+
5
+ * Headers that contained a period broke due to cleanup performed in 3.1.0 (replaced internal attribute resolution with Objectable.)
6
+
1
7
  # 3.1.0 (December 26th, 2019)
2
8
 
3
9
  Additions/Changes:
@@ -29,7 +29,11 @@ module Bumblebee
29
29
  @header = header.to_s
30
30
  @property = property || @header
31
31
  @through = Array(through)
32
- @to_csv = Mutator.new(to_csv)
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
 
@@ -18,8 +18,8 @@ module Bumblebee
18
18
 
19
19
  attr_reader :converter, :type
20
20
 
21
- def initialize(arg)
22
- @resolver = Objectable.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
 
@@ -8,5 +8,5 @@
8
8
  #
9
9
 
10
10
  module Bumblebee
11
- VERSION = '3.1.0'
11
+ VERSION = '3.1.1'
12
12
  end
@@ -26,7 +26,7 @@ class PersonTemplate < Bumblebee::Template
26
26
  column 'City', property: 'city',
27
27
  through: %w[demo address]
28
28
 
29
- column 'State', property: 'st',
29
+ column 'St.', property: 'st',
30
30
  through: %w[demo address]
31
31
 
32
32
  column 'Zipcode', property: 'zip',
@@ -1,3 +1,3 @@
1
- ID #,First Name,Last Name,Street 1,Street 2,City,State,Zipcode,Current,Home #,Fax #,Email Address,Smokes,Current Balance,Visits,Family Members,Email Address Domain
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.0
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: 2019-12-26 00:00:00.000000000 Z
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