mongoid-history 0.1.6 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.6
1
+ 0.1.7
@@ -6,6 +6,5 @@ require File.expand_path(File.dirname(__FILE__) + '/mongoid/history/trackable')
6
6
  require File.expand_path(File.dirname(__FILE__) + '/mongoid/history/sweeper')
7
7
 
8
8
  Mongoid::History.modifier_class_name = "User"
9
- Mongoid::History.trackable_classes = []
10
9
  Mongoid::History.trackable_class_options = {}
11
10
  Mongoid::History.current_user_method ||= :current_user
@@ -1,7 +1,6 @@
1
1
  module Mongoid
2
2
  module History
3
3
  mattr_accessor :tracker_class_name
4
- mattr_accessor :trackable_classes
5
4
  mattr_accessor :trackable_class_options
6
5
  mattr_accessor :modifier_class_name
7
6
  mattr_accessor :current_user_method
@@ -46,8 +46,6 @@ module Mongoid::History
46
46
  before_create :track_create if options[:track_create]
47
47
  before_destroy :track_destroy if options[:track_destroy]
48
48
 
49
- Mongoid::History.trackable_classes ||= []
50
- Mongoid::History.trackable_classes << self
51
49
  Mongoid::History.trackable_class_options ||= {}
52
50
  Mongoid::History.trackable_class_options[model_name] = options
53
51
  end
@@ -4,14 +4,16 @@
4
4
  # -*- encoding: utf-8 -*-
5
5
 
6
6
  Gem::Specification.new do |s|
7
- s.name = "mongoid-history"
8
- s.version = "0.1.6"
7
+ s.name = %q{mongoid-history}
8
+ s.version = "0.1.7"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = ["Aaron Qian", "Justin Grimes"]
12
- s.date = "2011-12-07"
13
- s.description = "In frustration of Mongoid::Versioning, I created this plugin for tracking historical changes for any document, including embedded ones. It achieves this by storing all history tracks in a single collection that you define. (See Usage for more details) Embedded documents are referenced by storing an association path, which is an array of document_name and document_id fields starting from the top most parent document and down to the embedded document that should track history.\n\n This plugin implements multi-user undo, which allows users to undo any history change in any order. Undoing a document also creates a new history track. This is great for auditing and preventing vandalism, but it is probably not suitable for use cases such as a wiki."
14
- s.email = ["aq1018@gmail.com", "justin.mgrimes@gmail.com"]
11
+ s.authors = [%q{Aaron Qian}, %q{Justin Grimes}]
12
+ s.date = %q{2011-12-09}
13
+ s.description = %q{In frustration of Mongoid::Versioning, I created this plugin for tracking historical changes for any document, including embedded ones. It achieves this by storing all history tracks in a single collection that you define. (See Usage for more details) Embedded documents are referenced by storing an association path, which is an array of document_name and document_id fields starting from the top most parent document and down to the embedded document that should track history.
14
+
15
+ This plugin implements multi-user undo, which allows users to undo any history change in any order. Undoing a document also creates a new history track. This is great for auditing and preventing vandalism, but it is probably not suitable for use cases such as a wiki.}
16
+ s.email = [%q{aq1018@gmail.com}, %q{justin.mgrimes@gmail.com}]
15
17
  s.extra_rdoc_files = [
16
18
  "LICENSE.txt",
17
19
  "README.rdoc"
@@ -36,11 +38,11 @@ Gem::Specification.new do |s|
36
38
  "spec/trackable_spec.rb",
37
39
  "spec/tracker_spec.rb"
38
40
  ]
39
- s.homepage = "http://github.com/aq1018/mongoid-history"
40
- s.licenses = ["MIT"]
41
- s.require_paths = ["lib"]
42
- s.rubygems_version = "1.8.10"
43
- s.summary = "history tracking, auditing, undo, redo for mongoid"
41
+ s.homepage = %q{http://github.com/aq1018/mongoid-history}
42
+ s.licenses = [%q{MIT}]
43
+ s.require_paths = [%q{lib}]
44
+ s.rubygems_version = %q{1.8.6}
45
+ s.summary = %q{history tracking, auditing, undo, redo for mongoid}
44
46
  s.test_files = [
45
47
  "spec/integration/integration_spec.rb",
46
48
  "spec/spec_helper.rb",
@@ -9,7 +9,6 @@ describe Mongoid::History::Trackable do
9
9
  end
10
10
 
11
11
  after :each do
12
- Mongoid::History.trackable_classes = nil
13
12
  Mongoid::History.trackable_class_options = nil
14
13
  end
15
14
 
@@ -17,12 +16,6 @@ describe Mongoid::History::Trackable do
17
16
  MyModel.should respond_to :track_history
18
17
  end
19
18
 
20
- it "should append trackable_classes ONLY when #track_history is called" do
21
- Mongoid::History.trackable_classes.should be_blank
22
- MyModel.track_history
23
- Mongoid::History.trackable_classes.should == [MyModel]
24
- end
25
-
26
19
  it "should append trackable_class_options ONLY when #track_history is called" do
27
20
  Mongoid::History.trackable_class_options.should be_blank
28
21
  MyModel.track_history
@@ -50,7 +43,6 @@ describe Mongoid::History::Trackable do
50
43
  end
51
44
 
52
45
  after :each do
53
- Mongoid::History.trackable_classes = nil
54
46
  Mongoid::History.trackable_class_options = nil
55
47
  end
56
48
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongoid-history
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,11 +10,11 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2011-12-07 00:00:00.000000000 Z
13
+ date: 2011-12-09 00:00:00.000000000Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: easy_diff
17
- requirement: &70219592290320 !ruby/object:Gem::Requirement
17
+ requirement: &19710360 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ! '>='
@@ -22,10 +22,10 @@ dependencies:
22
22
  version: '0'
23
23
  type: :runtime
24
24
  prerelease: false
25
- version_requirements: *70219592290320
25
+ version_requirements: *19710360
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: mongoid
28
- requirement: &70219592288680 !ruby/object:Gem::Requirement
28
+ requirement: &19709840 !ruby/object:Gem::Requirement
29
29
  none: false
30
30
  requirements:
31
31
  - - ~>
@@ -33,10 +33,10 @@ dependencies:
33
33
  version: '2.0'
34
34
  type: :runtime
35
35
  prerelease: false
36
- version_requirements: *70219592288680
36
+ version_requirements: *19709840
37
37
  - !ruby/object:Gem::Dependency
38
38
  name: bson_ext
39
- requirement: &70219592286380 !ruby/object:Gem::Requirement
39
+ requirement: &19709320 !ruby/object:Gem::Requirement
40
40
  none: false
41
41
  requirements:
42
42
  - - ! '>='
@@ -44,10 +44,10 @@ dependencies:
44
44
  version: 1.3.1
45
45
  type: :development
46
46
  prerelease: false
47
- version_requirements: *70219592286380
47
+ version_requirements: *19709320
48
48
  - !ruby/object:Gem::Dependency
49
49
  name: rspec
50
- requirement: &70219592301900 !ruby/object:Gem::Requirement
50
+ requirement: &19708820 !ruby/object:Gem::Requirement
51
51
  none: false
52
52
  requirements:
53
53
  - - ~>
@@ -55,10 +55,10 @@ dependencies:
55
55
  version: 2.3.0
56
56
  type: :development
57
57
  prerelease: false
58
- version_requirements: *70219592301900
58
+ version_requirements: *19708820
59
59
  - !ruby/object:Gem::Dependency
60
60
  name: yard
61
- requirement: &70219592301380 !ruby/object:Gem::Requirement
61
+ requirement: &19708260 !ruby/object:Gem::Requirement
62
62
  none: false
63
63
  requirements:
64
64
  - - ~>
@@ -66,10 +66,10 @@ dependencies:
66
66
  version: 0.6.0
67
67
  type: :development
68
68
  prerelease: false
69
- version_requirements: *70219592301380
69
+ version_requirements: *19708260
70
70
  - !ruby/object:Gem::Dependency
71
71
  name: bundler
72
- requirement: &70219592300780 !ruby/object:Gem::Requirement
72
+ requirement: &19707720 !ruby/object:Gem::Requirement
73
73
  none: false
74
74
  requirements:
75
75
  - - ~>
@@ -77,10 +77,10 @@ dependencies:
77
77
  version: 1.0.0
78
78
  type: :development
79
79
  prerelease: false
80
- version_requirements: *70219592300780
80
+ version_requirements: *19707720
81
81
  - !ruby/object:Gem::Dependency
82
82
  name: jeweler
83
- requirement: &70219592300260 !ruby/object:Gem::Requirement
83
+ requirement: &19707120 !ruby/object:Gem::Requirement
84
84
  none: false
85
85
  requirements:
86
86
  - - ~>
@@ -88,10 +88,10 @@ dependencies:
88
88
  version: 1.5.2
89
89
  type: :development
90
90
  prerelease: false
91
- version_requirements: *70219592300260
91
+ version_requirements: *19707120
92
92
  - !ruby/object:Gem::Dependency
93
93
  name: rcov
94
- requirement: &70219592299700 !ruby/object:Gem::Requirement
94
+ requirement: &19706560 !ruby/object:Gem::Requirement
95
95
  none: false
96
96
  requirements:
97
97
  - - ! '>='
@@ -99,10 +99,10 @@ dependencies:
99
99
  version: '0'
100
100
  type: :development
101
101
  prerelease: false
102
- version_requirements: *70219592299700
102
+ version_requirements: *19706560
103
103
  - !ruby/object:Gem::Dependency
104
104
  name: reek
105
- requirement: &70219592299080 !ruby/object:Gem::Requirement
105
+ requirement: &19705940 !ruby/object:Gem::Requirement
106
106
  none: false
107
107
  requirements:
108
108
  - - ~>
@@ -110,10 +110,10 @@ dependencies:
110
110
  version: 1.2.8
111
111
  type: :development
112
112
  prerelease: false
113
- version_requirements: *70219592299080
113
+ version_requirements: *19705940
114
114
  - !ruby/object:Gem::Dependency
115
115
  name: roodi
116
- requirement: &70219592298420 !ruby/object:Gem::Requirement
116
+ requirement: &19705280 !ruby/object:Gem::Requirement
117
117
  none: false
118
118
  requirements:
119
119
  - - ~>
@@ -121,10 +121,10 @@ dependencies:
121
121
  version: 2.1.0
122
122
  type: :development
123
123
  prerelease: false
124
- version_requirements: *70219592298420
124
+ version_requirements: *19705280
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: database_cleaner
127
- requirement: &70219592297560 !ruby/object:Gem::Requirement
127
+ requirement: &19704680 !ruby/object:Gem::Requirement
128
128
  none: false
129
129
  requirements:
130
130
  - - ! '>='
@@ -132,7 +132,7 @@ dependencies:
132
132
  version: '0'
133
133
  type: :development
134
134
  prerelease: false
135
- version_requirements: *70219592297560
135
+ version_requirements: *19704680
136
136
  description: ! "In frustration of Mongoid::Versioning, I created this plugin for tracking
137
137
  historical changes for any document, including embedded ones. It achieves this by
138
138
  storing all history tracks in a single collection that you define. (See Usage for
@@ -185,7 +185,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
185
185
  version: '0'
186
186
  segments:
187
187
  - 0
188
- hash: -2762440887153758005
188
+ hash: -2112048329123492134
189
189
  required_rubygems_version: !ruby/object:Gem::Requirement
190
190
  none: false
191
191
  requirements:
@@ -194,7 +194,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
194
194
  version: '0'
195
195
  requirements: []
196
196
  rubyforge_project:
197
- rubygems_version: 1.8.10
197
+ rubygems_version: 1.8.6
198
198
  signing_key:
199
199
  specification_version: 3
200
200
  summary: history tracking, auditing, undo, redo for mongoid