toy-dynamo 0.0.12 → 0.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 92ecf8ce51026c044900cc8dded623bd296ea2eb
4
- data.tar.gz: a9bddc08d01341e0e0d146dbcdc0b22a703fe081
3
+ metadata.gz: f12795e1156d00c91369903150e12b7ed192a7b6
4
+ data.tar.gz: 32b4a40ee6afd98ca49a9cab1a694588dda4d7a0
5
5
  SHA512:
6
- metadata.gz: 511b5ff41880021abd0a8b73db773526c3a57832f8e87f18c13db1141263ecd1ce805a08517b1000ecc3a8ea44d5c1d1e0d16f0507f713f7a056ca42e20da9e2
7
- data.tar.gz: e961fba0945a4cc14168c9ee440efcc8585be08b7b0646e0de6af94590c8a98e8d2f73b61fa3db9ba1fc632a305fc4eee93bbad38c121fd8d981debb6e255fa4
6
+ metadata.gz: 954d17ee74c141e6d6268ab404e133178b9333675015fa4c4c5a356e16ddc863c06fcea8d40e8e3dc8cab53118f6783fecc255a83c59a58701a0994be743e470
7
+ data.tar.gz: 31950ddcecdce9ee4a089d09053827f98a63ebcc944add40633237cc017de381d86b25ac7395895665e229709123a672d15294806804fbe601bcc0361d485fdb
@@ -3,7 +3,7 @@ module Toy
3
3
  module Array
4
4
  def to_store(value, *)
5
5
  value = value.respond_to?(:lines) ? value.lines : value
6
- Marshal.dump(value.to_a)
6
+ AWS::DynamoDB::Binary.new(Marshal.dump(value.to_a))
7
7
  end
8
8
 
9
9
  def from_store(value, *)
@@ -2,11 +2,18 @@ module Toy
2
2
  module Extensions
3
3
  module Hash
4
4
  def to_store(value, *)
5
- Marshal.dump(value)
5
+ AWS::DynamoDB::Binary.new(Marshal.dump(value))
6
6
  end
7
7
 
8
8
  def from_store(value, *)
9
- value.nil? ? store_default : (value.class.is_a?(Hash) ? value : Marshal.load(value))
9
+ #begin
10
+ value.nil? ? store_default : (value.class.is_a?(Hash) ? value : Marshal.load(value))
11
+ #rescue ArgumentError => e
12
+ #if e.message =~ /dump format error/
13
+ #Toy::Dynamo::Config.logger.error "Could not unmarshal data!\n\t#{value.inspect}"
14
+ #store_default
15
+ #end
16
+ #end
10
17
  end
11
18
  end
12
19
  end
@@ -6,7 +6,7 @@ module Toy
6
6
  end
7
7
 
8
8
  def to_store(value, *)
9
- Marshal.dump(value)
9
+ AWS::DynamoDB::Binary.new(Marshal.dump(value))
10
10
  end
11
11
 
12
12
  def from_store(value, *)
@@ -1,5 +1,5 @@
1
1
  module Toy
2
2
  module Dynamo
3
- VERSION = "0.0.12"
3
+ VERSION = "0.0.13"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: toy-dynamo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.12
4
+ version: 0.0.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cary Dunn