speedmax-couch_potato 0.2.0 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :major: 0
3
3
  :minor: 2
4
- :patch: 0
4
+ :patch: 1
@@ -1,7 +1,7 @@
1
1
  module CouchPotato
2
2
  class Database
3
3
 
4
- class ValidationsFailedError < ::Exception; end
4
+ class ValidationsFailedError < ::StandardError; end
5
5
 
6
6
  def initialize(couchrest_database)
7
7
  @database = couchrest_database
@@ -15,7 +15,7 @@ module CouchPotato
15
15
  end
16
16
 
17
17
  def save_document(document)
18
- return unless document.dirty?
18
+ return true unless document.dirty?
19
19
  if document.new?
20
20
  create_document document
21
21
  else
@@ -20,6 +20,12 @@ describe 'dirty attribute tracking' do
20
20
  @db.save_document(plate)
21
21
  end
22
22
 
23
+ it "should return true when not dirty" do
24
+ plate = Plate.new :food => 'sushi'
25
+ @db.save_document!(plate)
26
+ @db.save_document(plate).should be_true
27
+ end
28
+
23
29
  it "should save when there are dirty attributes" do
24
30
  plate = Plate.new :food => 'sushi'
25
31
  @db.save_document!(plate)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: speedmax-couch_potato
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Lang
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-04-28 00:00:00 -07:00
12
+ date: 2009-05-05 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -33,14 +33,14 @@ dependencies:
33
33
  version: "0"
34
34
  version:
35
35
  - !ruby/object:Gem::Dependency
36
- name: jchris-couchrest
36
+ name: couchrest
37
37
  type: :runtime
38
38
  version_requirement:
39
39
  version_requirements: !ruby/object:Gem::Requirement
40
40
  requirements:
41
41
  - - ">="
42
42
  - !ruby/object:Gem::Version
43
- version: 0.9.12
43
+ version: "0.24"
44
44
  version:
45
45
  description: Ruby persistence layer for CouchDB
46
46
  email: alex@upstream-berlin.com