dynameek 0.3.7 → 0.3.8

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.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- dynameek (0.3.2)
4
+ dynameek (0.3.7)
5
5
  aws-sdk
6
6
 
7
7
  GEM
@@ -42,6 +42,7 @@ module Dynameek
42
42
  end
43
43
  stack = []
44
44
  safe = obj
45
+ make_safe.call(safe)
45
46
  stack.push(StackFrame.new(safe, 0))
46
47
 
47
48
  while(current_frame = stack.pop)
@@ -10,7 +10,7 @@ module Dynameek
10
10
  #Note that this is required for the multicolumn key
11
11
  val = self.send field
12
12
  val = self.class.convert_to_dynamodb(type, val)
13
- memo[field] = val
13
+ memo[field] = val unless val.nil?
14
14
  memo
15
15
  end
16
16
  self.class.before_save_callbacks.each{|method| self.send method}
@@ -1,3 +1,3 @@
1
1
  module Dynameek
2
- VERSION = "0.3.7"
2
+ VERSION = "0.3.8"
3
3
  end
@@ -19,6 +19,18 @@ describe Simple do
19
19
  con = Simple.find(1)
20
20
  con.binary_value[:hello].should == :sup
21
21
  end
22
+
23
+ it "should ingore nils" do
24
+ con = nil
25
+ lambda{
26
+ con = Simple.create(:my_id => 1, :some_value => "sup", :binary_value => nil)
27
+ }.should_not raise_error
28
+ con.hash_key.should == 1
29
+ con.some_value.should == "sup"
30
+ con = Simple.find(1)
31
+ con.binary_value.should be_nil
32
+ end
33
+
22
34
  it "should allow you to store binary data removing default_proc" do
23
35
  con = nil
24
36
  hsh = Hash.new{|h, k| h[k] = :a}
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: dynameek
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.3.7
5
+ version: 0.3.8
6
6
  platform: ruby
7
7
  authors:
8
8
  - Max Dupenois