dyna_model 0.0.9 → 0.0.10

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: dc459be343530c48011ba904ffd9c63471f1019d
4
- data.tar.gz: b825c0d34229dd97637876a93aef82a607098ba4
3
+ metadata.gz: 2d5e27d9e9de34a45c6ec3390a074995175dbad6
4
+ data.tar.gz: 36a109c5554802a340dc51e64de92a699d3420cf
5
5
  SHA512:
6
- metadata.gz: 36075469a864e5175e3f9a5ab58115eeac91e9855fbbce69974d8c3a37ab26839f90aba0d2aad07e980f5dba4577673b6194e9984168dd4f15bc8bb8908e3192
7
- data.tar.gz: 5595a51d3846421051df79a6b7033dbe6d82188099e4ed56f60a12bb0f5f79cc63c8a2d0a4be18f3e7faf45efd67a974c43bb3698be10cbac8d73339adf7c40f
6
+ metadata.gz: fce744ec9abf3038e262a83c3e1f49a0598de82e8f71f990d609e353a7130437e0b19693cbec1ecfe7e7cb22e43c878e5d39d4dc1da2bfb528360b0faa32f90b
7
+ data.tar.gz: 782765392ab7d3184e660373b6a3a492bf8e8e7f12981d57dffa8427890e44304201fc476f07184c4d38c341f474f192750e67cfcb2ea4a0a439ce9455b56472
@@ -29,7 +29,7 @@ module DynaModel
29
29
  end
30
30
 
31
31
  def write_dyna_model_s3_backup!
32
- self.class.dyna_model_s3_backup_bucket.objects[File.join(self.class.dyna_model_s3_backup_config[:prefix], "#{self.guid}.json")].write(self.to_dyna_model_s3_backup_json)
32
+ self.class.dyna_model_s3_backup_bucket.objects[File.join(self.class.dyna_model_s3_backup_config[:prefix], "#{self.dynamo_db_guid}.json")].write(self.to_dyna_model_s3_backup_json)
33
33
  end
34
34
 
35
35
  def to_dyna_model_s3_backup_json
@@ -86,9 +86,9 @@ module DynaModel
86
86
  obj = obj_json["class"].constantize.new
87
87
  obj.attributes = obj_json["attributes"]
88
88
  if obj.save
89
- puts "Saved #{obj.guid}."
89
+ puts "Saved #{obj.dynamo_db_guid}."
90
90
  else
91
- puts "Failed to save #{obj.guid}. #{obj.errors.full_messages.to_sentence}"
91
+ puts "Failed to save #{obj.dynamo_db_guid}. #{obj.errors.full_messages.to_sentence}"
92
92
  end
93
93
  end
94
94
  end
@@ -96,7 +96,7 @@ module DynaModel
96
96
  if range_key_key
97
97
  range_key_attribute = self.attributes[range_key_key.to_s]
98
98
  raise(ArgumentError, "Could not find attribute definition for range_key #{range_key_key}") unless range_key_attribute
99
- raise(ArgumentError, "Invalid attribute type for range_key") unless [AWS::Record::Attributes::StringAttr, AWS::Record::Attributes::IntegerAttr, AWS::Record::Attributes::FloatAttr].include?(range_key_attribute.class)
99
+ raise(ArgumentError, "Invalid attribute type for range_key") unless [AWS::Record::Attributes::StringAttr, AWS::Record::Attributes::IntegerAttr, AWS::Record::Attributes::FloatAttr, AWS::Record::Attributes::DateAttr, AWS::Record::Attributes::DateTimeAttr].include?(range_key_attribute.class)
100
100
 
101
101
  validates_presence_of range_key_attribute.name.to_sym
102
102
 
@@ -1,3 +1,3 @@
1
1
  module DynaModel
2
- VERSION = "0.0.9"
2
+ VERSION = "0.0.10"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dyna_model
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cary Dunn
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-30 00:00:00.000000000 Z
11
+ date: 2014-05-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler