dynameek 0.3.2 → 0.3.3

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- dynameek (0.3.1)
4
+ dynameek (0.3.2)
5
5
  aws-sdk
6
6
 
7
7
  GEM
@@ -22,6 +22,11 @@ module Dynameek
22
22
  when :datetime
23
23
  value.to_time.to_f
24
24
  when :binary
25
+ if value.is_a?(Hash) && value.default_proc
26
+ value = value.clone
27
+ value.default = nil
28
+ end
29
+
25
30
  Marshal.dump(value)
26
31
  else
27
32
  value
@@ -1,3 +1,3 @@
1
1
  module Dynameek
2
- VERSION = "0.3.2"
2
+ VERSION = "0.3.3"
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
+ it "should allow you to store binary data removing default_proc" do
23
+ con = nil
24
+ hsh = Hash.new{|h, k| h[k] = :a}
25
+ hsh[:hello] = :sup
26
+ lambda{
27
+ con = Simple.create(:my_id => 1, :some_value => "hello", :binary_value => hsh)
28
+ }.should_not raise_error
29
+ con.hash_key.should == 1
30
+ con.some_value.should == "hello"
31
+ con = Simple.find(1)
32
+ con.binary_value[:hello].should == :sup
33
+ end
22
34
  it "should allow you to create a new simple" do
23
35
  con = nil
24
36
  lambda{
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: dynameek
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.3.2
5
+ version: 0.3.3
6
6
  platform: ruby
7
7
  authors:
8
8
  - Max Dupenois