ocean-dynamo 0.1.1 → 0.1.2

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: 1edea2a1dd072df524a42c558831b59f14044a92
4
- data.tar.gz: 8186892ac7caaadc05ff76e1fc685b4066e6676c
3
+ metadata.gz: eccd38308405a737045ac18286f34b6c23cc2c89
4
+ data.tar.gz: 47afc68ac6376fbf0340545d2875cc64992a96b7
5
5
  SHA512:
6
- metadata.gz: 29380a531e0f32547c377b316e707561680a0a07260584adc7ed26d48d72b688b76dc10719c0bb59cc2833198f77de671bd15657e5e9a9507a4bc7fc3edd0788
7
- data.tar.gz: 9ef2050f6f9cadd6adcea44928996c43d438812dc4c1a89a7410c7a38a60d1c64befd835b7cdd41611205c5ce82e3770db2ab2570f98b08a7181942bd35bbbb7
6
+ metadata.gz: 0f096a9bc3e8d7e74b1412cb611abebd33472a4a93f2ed17b3340b09d31ee51a760e1a930e9f0609560c1924692e26f2115c86dc769841afec3d2a14acabf844
7
+ data.tar.gz: 4fcce617694af0423f12f71afef65feec00ce8c22e4c875d3e7ac9c50c08b17ce5336cb2a490a24a9563bccbb6ed69e889918a5804cb9d11139c38ccf2168255
data/README.rdoc CHANGED
@@ -10,10 +10,6 @@ OceanDynamo requires Ruby 2.0 and Ruby on Rails 4.0.0 or later.
10
10
 
11
11
  ==== Features
12
12
 
13
- OceanDynamo will use secondary indices to retrieve related table items,
14
- which means it will scale without limits. (NB: this is a pre-release which as yet doesn't
15
- implement relations, but they are underway.)
16
-
17
13
  As one important use case for OceanDynamo is to facilitate the conversion of SQL based
18
14
  ActiveRecord models to DynamoDB based models, it is important that the syntax and semantics
19
15
  of OceanDynamo's operations are as close as possible to those of ActiveRecord. This means
@@ -27,6 +23,13 @@ methods you're used to. The design goal is always to implement as much as possib
27
23
  ActiveRecord interface, without sacrificing scalability. This makes the task of switching from
28
24
  SQL to no-SQL much easier.
29
25
 
26
+ Due to its similarity to ActiveRecord, OceanDynamo works with FactoryGirl.
27
+ Furthermore, future versions will keep track of and delete instances after tests.
28
+
29
+ OceanDynamo will use secondary indices to retrieve related table items,
30
+ which means it will scale without limits. (NB: this is a pre-release which as yet doesn't
31
+ implement relations, but they are underway.)
32
+
30
33
 
31
34
  === Documentation
32
35
 
@@ -401,6 +401,13 @@ module OceanDynamo
401
401
  end
402
402
 
403
403
 
404
+ def valid?(context = nil)
405
+ context ||= (new_record? ? :create : :update)
406
+ output = super(context)
407
+ errors.empty? && output
408
+ end
409
+
410
+
404
411
  def save
405
412
  begin
406
413
  create_or_update
@@ -1,3 +1,3 @@
1
1
  module OceanDynamo
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ocean-dynamo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Bengtson
@@ -109,22 +109,24 @@ dependencies:
109
109
  - !ruby/object:Gem::Version
110
110
  version: 0.1.3
111
111
  description: "== OceanDynamo\n\nThis is the OceanDynamo ruby gem, implementing a highly
112
- scalable Amazon DynamoDB near drop-in \nreplacement for ActiveRecord.\n\nOceanDynamo
113
- will use secondary indices to retrieve related table items, \nwhich means it will
114
- scale without limits. (NB: this is a pre-release which as yet doesn't\nimplement
115
- relations, but they are underway.)\n\nAs one important use case for OceanDynamo
116
- is to facilitate the conversion of SQL based\nActiveRecord models to DynamoDB based
117
- models, it is important that the syntax and semantics\nof OceanDynamo's operations
118
- are as close as possible to those of ActiveRecord. This means\nthat all callbacks
119
- should be available, before, around and after, and that they should be\ncalled in
120
- the same order as in ActiveRecord. Ocean-dynamo follows this pattern closely and\nis
121
- of course based on ActiveModel.\n\nThe attribute and persistence layer of OceanDynamo
122
- is modeled on that of ActiveRecord:\nthere's +save+, +save!+, +create+, +update+,
123
- +update!+, +update_attribute+ and all the other\nmethods you're used to. The design
124
- goal is always to implement as much as possible of the\nActiveRecord interface,
125
- without sacrificing scalability. This makes the task of switching from\nSQL to no-SQL
126
- much easier.\n\nSee also Ocean, a Rails framework for creating highly scalable SOAs
127
- in the cloud, in which\nocean-dynamo is used as a central component: http://wiki.oceanframework.net"
112
+ scalable Amazon DynamoDB near drop-in \nreplacement for ActiveRecord.\n\nAs one
113
+ important use case for OceanDynamo is to facilitate the conversion of SQL based\nActiveRecord
114
+ models to DynamoDB based models, it is important that the syntax and semantics\nof
115
+ OceanDynamo's operations are as close as possible to those of ActiveRecord. This
116
+ means\nthat all callbacks should be available, before, around and after, and that
117
+ they should be\ncalled in the same order as in ActiveRecord. Ocean-dynamo follows
118
+ this pattern closely and\nis of course based on ActiveModel.\n\nThe attribute and
119
+ persistence layer of OceanDynamo is modeled on that of ActiveRecord:\nthere's +save+,
120
+ +save!+, +create+, +update+, +update!+, +update_attribute+ and all the other\nmethods
121
+ you're used to. The design goal is always to implement as much as possible of the\nActiveRecord
122
+ interface, without sacrificing scalability. This makes the task of switching from\nSQL
123
+ to no-SQL much easier.\n\nOceanDynamo will use secondary indices to retrieve related
124
+ table items, \nwhich means it will scale without limits. (NB: this is a pre-release
125
+ which as yet doesn't\nimplement relations, but they are underway.)\n\nDue to its
126
+ similarity to ActiveRecord, OceanDynamo works with FactoryGirl.\nFurthermore, future
127
+ versions will keep track of and delete instances after tests.\n\nSee also Ocean,
128
+ a Rails framework for creating highly scalable SOAs in the cloud, in which\nocean-dynamo
129
+ is used as a central component: http://wiki.oceanframework.net"
128
130
  email:
129
131
  - peter@peterbengtson.com
130
132
  executables: []