mongomapper-versioned 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -78,6 +78,8 @@ Each `Version` contains a copy of the document that was versioned. You can roll
78
78
  @user.reload
79
79
  ````
80
80
 
81
+ After you roll back, newer versions are automatically removed.
82
+
81
83
  ### Version IDs
82
84
 
83
85
  A versioned document has a `version_id` key. When you update a document, the new Version document takes on the ID of the document's current `version_id` value. The document gets a new `version_id`.
@@ -1,3 +1,3 @@
1
1
  module Versioned
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -23,7 +23,7 @@ module Versioned
23
23
  after_destroy :destroy_versions
24
24
 
25
25
  cattr_accessor :max_versions
26
- attr_accessor :updater, :version_created_at
26
+ attr_accessor :updater
27
27
  attr_writer :rolling_back
28
28
  end
29
29
 
@@ -32,9 +32,7 @@ module Versioned
32
32
  end
33
33
 
34
34
  def save(options={})
35
- options.assert_valid_keys(:updater, :version_created_at)
36
35
  self.updater = options.delete(:updater)
37
- self.version_created_at = options.delete(:version_created_at)
38
36
  super
39
37
  end
40
38
 
@@ -45,7 +43,6 @@ module Versioned
45
43
  end
46
44
  ensure
47
45
  self.updater = nil
48
- self.version_created_at = nil
49
46
  end
50
47
 
51
48
  def generate_version_id
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongomapper-versioned
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-01-16 00:00:00.000000000 Z
12
+ date: 2012-01-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
16
- requirement: &70092868791380 !ruby/object:Gem::Requirement
16
+ requirement: &70101954339260 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 3.1.0
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70092868791380
24
+ version_requirements: *70101954339260
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: bson_ext
27
- requirement: &70092868790820 !ruby/object:Gem::Requirement
27
+ requirement: &70101954338680 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70092868790820
35
+ version_requirements: *70101954338680
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: mongo_mapper
38
- requirement: &70092868790140 !ruby/object:Gem::Requirement
38
+ requirement: &70101954338080 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: 0.10.1
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *70092868790140
46
+ version_requirements: *70101954338080
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: mongomapper_id2
49
- requirement: &70092868789500 !ruby/object:Gem::Requirement
49
+ requirement: &70101954337440 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '0'
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *70092868789500
57
+ version_requirements: *70101954337440
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: rake
60
- requirement: &70092868788360 !ruby/object:Gem::Requirement
60
+ requirement: &70101954336940 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: '0'
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *70092868788360
68
+ version_requirements: *70101954336940
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: shoulda
71
- requirement: &70092868787940 !ruby/object:Gem::Requirement
71
+ requirement: &70101954336500 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ! '>='
@@ -76,10 +76,10 @@ dependencies:
76
76
  version: '0'
77
77
  type: :development
78
78
  prerelease: false
79
- version_requirements: *70092868787940
79
+ version_requirements: *70101954336500
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: ruby-debug19
82
- requirement: &70092868787380 !ruby/object:Gem::Requirement
82
+ requirement: &70101954336020 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ! '>='
@@ -87,10 +87,10 @@ dependencies:
87
87
  version: '0'
88
88
  type: :development
89
89
  prerelease: false
90
- version_requirements: *70092868787380
90
+ version_requirements: *70101954336020
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: timecop
93
- requirement: &70092868786800 !ruby/object:Gem::Requirement
93
+ requirement: &70101954335560 !ruby/object:Gem::Requirement
94
94
  none: false
95
95
  requirements:
96
96
  - - ! '>='
@@ -98,7 +98,7 @@ dependencies:
98
98
  version: '0'
99
99
  type: :development
100
100
  prerelease: false
101
- version_requirements: *70092868786800
101
+ version_requirements: *70101954335560
102
102
  description:
103
103
  email: alexkwolfe@gmail.com
104
104
  executables: []
@@ -133,12 +133,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
133
133
  - - ! '>='
134
134
  - !ruby/object:Gem::Version
135
135
  version: '0'
136
+ segments:
137
+ - 0
138
+ hash: 1231796656342040495
136
139
  required_rubygems_version: !ruby/object:Gem::Requirement
137
140
  none: false
138
141
  requirements:
139
142
  - - ! '>='
140
143
  - !ruby/object:Gem::Version
141
144
  version: '0'
145
+ segments:
146
+ - 0
147
+ hash: 1231796656342040495
142
148
  requirements: []
143
149
  rubyforge_project:
144
150
  rubygems_version: 1.8.15