mongo_mapper_versioned 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -4,6 +4,7 @@ module MongoMapper
4
4
  class Version
5
5
 
6
6
  include MongoMapper::Document
7
+ include Comparable
7
8
 
8
9
  # stores id of versioned document
9
10
  key :versioned_id, ObjectId
@@ -13,6 +14,11 @@ module MongoMapper
13
14
 
14
15
  # stores versioned attributes
15
16
  key :data, Hash
17
+
18
+ # allow comparison
19
+ def <=>(other)
20
+ version_number <=> other.version_number
21
+ end
16
22
 
17
23
  end
18
24
  end
@@ -2,7 +2,7 @@
2
2
  module MongoMapper
3
3
  module Plugins
4
4
  module Versioned
5
- Version = '0.2.2'
5
+ Version = '0.2.3'
6
6
  end
7
7
  end
8
8
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongo_mapper_versioned
3
3
  version: !ruby/object:Gem::Version
4
- hash: 19
4
+ hash: 17
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 2
10
- version: 0.2.2
9
+ - 3
10
+ version: 0.2.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Tomas Celizna
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-02-18 00:00:00 +01:00
18
+ date: 2011-02-19 00:00:00 +01:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency