dino_utils 0.1.5 → 0.1.6

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: 5682c48fb846e6cd839eedd96c889463c4a139ed
4
- data.tar.gz: 5da39e00d0397763122a059aea5ab3de932a9174
3
+ metadata.gz: 3f66c7d51c434edb1b1cdb759519f6b6c894a37f
4
+ data.tar.gz: 6f01d7f1da07016d7eb101d92788d788db905dd8
5
5
  SHA512:
6
- metadata.gz: a059bd4e36207aa59796d650cdbb77772a7f51d6f2e858f90e63236f42bcb4c894b8e25e583a31e5ec59805ca3e145d64a6f0172ac1edf989525fc72a2251fe7
7
- data.tar.gz: 5476b4bb2cdd5f504d33f2db4c9793b4afe2477dc72e0f15ce4f913b2d50500e266555f7c5879db5d4d8ce41db838f7085f229aea97ab6f2e00d5f8b7496a7fe
6
+ metadata.gz: 4133b6773ab962ebedeb27479c72b5112707f1d56a8d3a274a98dd4b429a166d90c8acf8977f28cdeaa4624b38312170a89021c2554543b386dced30a47bf184
7
+ data.tar.gz: be11af8b162c558b3c4fa3baa05c9013832bd21b5eb9242088d35d5bf7d35dbc26ad34a1a1b9772fc8913a997de89217f2b3b0011fe5df39bb8a0f0312080327
data/lib/dino/upsert.rb CHANGED
@@ -21,6 +21,7 @@ module Dino
21
21
  def self.upsert(klass, data, options = {}, &block)
22
22
  retry_count = 0
23
23
  data_copy = {}
24
+ data ||= []
24
25
  data.each do |k, v|
25
26
  if v.kind_of?(Hash)
26
27
  v = klass.column_for_attribute(k).type_cast_for_database(v)
@@ -1,3 +1,3 @@
1
1
  module DinoUtils
2
- VERSION = "0.1.5"
2
+ VERSION = "0.1.6"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dino_utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joe Van Dyk
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-01-07 00:00:00.000000000 Z
11
+ date: 2016-01-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler