dynamini 2.9.3 → 2.9.4

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: 1dfc513f038cc378fa09c49d4371fb55de060207
4
- data.tar.gz: 278157bffc21bbae3fbaa3a7e2a1652571afc4e3
3
+ metadata.gz: ebd0e269336c9f95ef216c388e639937d4521d48
4
+ data.tar.gz: 0e88fb606a0c2a40f12c9895b578e3de70e51ada
5
5
  SHA512:
6
- metadata.gz: bb4bc3eeaf5c7f7b1321fd0aa29da4bcc5d5c8b968f3e2ab5619cc60fe8dde8ac53ca2135b3c73de70dcbaf4797183cec0a82ceabac6678c097c1a2d6522ff2b
7
- data.tar.gz: 51d96dc40837859551f3fffd6a1dcbdf5d5137613a4e610bb5f980c744c67d78d55c001f986e9be9518e70b4e29fc3af983cecdc65dfcb376ecebe7e17f624b0
6
+ metadata.gz: b7d3fb89285521304043e7ccbd302d16621dfaf0202117cba4d79df46cf5c3335bb83e0c49740e11dd268a95d679d804f9b0e2455c19445d282658f2b33b111f
7
+ data.tar.gz: 0151358e63ad145f0c672355165c7c272992743960c9786b098bda3d9f64415a3aae9a568229dd2aee42a12a2f0fd00117c80872b2b05b029c12d059a86edcc8
data/dynamini.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'dynamini'
3
- s.version = '2.9.3'
3
+ s.version = '2.9.4'
4
4
  s.summary = 'DynamoDB interface'
5
5
  s.description = 'Lightweight DynamoDB interface gem designed as
6
6
  a drop-in replacement for ActiveRecord.
@@ -4,7 +4,7 @@ module Dynamini
4
4
  module TypeHandler
5
5
 
6
6
  GETTER_PROCS = {
7
- integer: proc { |v| v&.to_i },
7
+ integer: proc { |v| v.to_i if v },
8
8
  date: proc do |v|
9
9
  if v.is_a?(Date)
10
10
  v
@@ -17,22 +17,22 @@ module Dynamini
17
17
  Time.methods.include?(:zone) ? Time.zone.at(v.to_f) : Time.at(v.to_f)
18
18
  end
19
19
  end,
20
- float: proc { |v| v&.to_f },
21
- symbol: proc { |v| v&.to_sym },
22
- string: proc { |v| v&.to_s },
20
+ float: proc { |v| v.to_f if v },
21
+ symbol: proc { |v| v.to_sym if v },
22
+ string: proc { |v| v.to_s if v },
23
23
  boolean: proc { |v| v },
24
24
  array: proc { |v| v.is_a?(Enumerable) ? v.to_a : [v] },
25
25
  set: proc { |v| v.is_a?(Enumerable) ? Set.new(v) : Set.new([v]) }
26
26
  }.freeze
27
27
 
28
28
  SETTER_PROCS = {
29
- integer: proc { |v| v&.to_i },
29
+ integer: proc { |v| v.to_i if v },
30
30
  time: proc { |v| (v.is_a?(Date) ? v.to_time : v).to_f },
31
- float: proc { |v| v&.to_f },
32
- symbol: proc { |v| v&.to_s },
33
- string: proc { |v| v&.to_s },
31
+ float: proc { |v| v.to_f if v },
32
+ symbol: proc { |v| v.to_s if v },
33
+ string: proc { |v| v.to_s if v },
34
34
  boolean: proc { |v| v },
35
- date: proc { |v| v&.to_time.to_f },
35
+ date: proc { |v| v.to_time.to_f if v },
36
36
  array: proc { |v| v.is_a?(Enumerable) ? v.to_a : [v] },
37
37
  set: proc { |v| v.is_a?(Enumerable) ? Set.new(v) : Set.new([v]) }
38
38
  }.freeze
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dynamini
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.9.3
4
+ version: 2.9.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Greg Ward