mongoid-paranoia 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +5 -0
- data/gemfiles/Mongoid_4.gemfile +4 -0
- data/gemfiles/Mongoid_5.gemfile +4 -0
- data/lib/mongoid/paranoia/version.rb +1 -1
- data/mongoid-paranoia.gemspec +3 -2
- data/spec/spec_helper.rb +9 -2
- metadata +16 -173
- data/spec/app/models/account.rb +0 -28
- data/spec/app/models/acolyte.rb +0 -16
- data/spec/app/models/actor.rb +0 -19
- data/spec/app/models/actor_observer.rb +0 -15
- data/spec/app/models/actress.rb +0 -2
- data/spec/app/models/address_number.rb +0 -6
- data/spec/app/models/agency.rb +0 -5
- data/spec/app/models/agent.rb +0 -12
- data/spec/app/models/album.rb +0 -14
- data/spec/app/models/alert.rb +0 -5
- data/spec/app/models/animal.rb +0 -25
- data/spec/app/models/answer.rb +0 -4
- data/spec/app/models/article.rb +0 -10
- data/spec/app/models/artist.rb +0 -66
- data/spec/app/models/artwork.rb +0 -4
- data/spec/app/models/augmentation.rb +0 -11
- data/spec/app/models/band.rb +0 -25
- data/spec/app/models/bar.rb +0 -9
- data/spec/app/models/basic.rb +0 -6
- data/spec/app/models/bed.rb +0 -1
- data/spec/app/models/big_palette.rb +0 -2
- data/spec/app/models/birthday.rb +0 -13
- data/spec/app/models/book.rb +0 -12
- data/spec/app/models/breed.rb +0 -4
- data/spec/app/models/browser.rb +0 -6
- data/spec/app/models/building.rb +0 -5
- data/spec/app/models/building_address.rb +0 -5
- data/spec/app/models/bus.rb +0 -7
- data/spec/app/models/business.rb +0 -5
- data/spec/app/models/callback_recorder.rb +0 -25
- data/spec/app/models/callback_test.rb +0 -9
- data/spec/app/models/canvas.rb +0 -25
- data/spec/app/models/car.rb +0 -1
- data/spec/app/models/cat.rb +0 -8
- data/spec/app/models/category.rb +0 -8
- data/spec/app/models/child.rb +0 -4
- data/spec/app/models/child_doc.rb +0 -22
- data/spec/app/models/church.rb +0 -4
- data/spec/app/models/circle.rb +0 -3
- data/spec/app/models/circuit.rb +0 -4
- data/spec/app/models/circus.rb +0 -7
- data/spec/app/models/code.rb +0 -5
- data/spec/app/models/comment.rb +0 -16
- data/spec/app/models/contractor.rb +0 -5
- data/spec/app/models/cookie.rb +0 -6
- data/spec/app/models/country_code.rb +0 -8
- data/spec/app/models/definition.rb +0 -7
- data/spec/app/models/description.rb +0 -11
- data/spec/app/models/dictionary.rb +0 -10
- data/spec/app/models/division.rb +0 -10
- data/spec/app/models/dog.rb +0 -6
- data/spec/app/models/dokument.rb +0 -5
- data/spec/app/models/driver.rb +0 -7
- data/spec/app/models/drug.rb +0 -6
- data/spec/app/models/email.rb +0 -6
- data/spec/app/models/employer.rb +0 -5
- data/spec/app/models/entry.rb +0 -6
- data/spec/app/models/eraser.rb +0 -1
- data/spec/app/models/event.rb +0 -22
- data/spec/app/models/exhibition.rb +0 -4
- data/spec/app/models/exhibitor.rb +0 -5
- data/spec/app/models/eye.rb +0 -9
- data/spec/app/models/eye_bowl.rb +0 -9
- data/spec/app/models/face.rb +0 -8
- data/spec/app/models/filesystem.rb +0 -4
- data/spec/app/models/firefox.rb +0 -4
- data/spec/app/models/folder.rb +0 -7
- data/spec/app/models/folder_item.rb +0 -9
- data/spec/app/models/fruits.rb +0 -28
- data/spec/app/models/game.rb +0 -19
- data/spec/app/models/ghost.rb +0 -7
- data/spec/app/models/home.rb +0 -4
- data/spec/app/models/house.rb +0 -7
- data/spec/app/models/html_writer.rb +0 -3
- data/spec/app/models/image.rb +0 -22
- data/spec/app/models/implant.rb +0 -16
- data/spec/app/models/item.rb +0 -8
- data/spec/app/models/jar.rb +0 -7
- data/spec/app/models/label.rb +0 -40
- data/spec/app/models/language.rb +0 -5
- data/spec/app/models/lat_lng.rb +0 -15
- data/spec/app/models/league.rb +0 -11
- data/spec/app/models/learner.rb +0 -2
- data/spec/app/models/line_item.rb +0 -6
- data/spec/app/models/login.rb +0 -8
- data/spec/app/models/manufacturer.rb +0 -7
- data/spec/app/models/meat.rb +0 -4
- data/spec/app/models/membership.rb +0 -4
- data/spec/app/models/mixed_drink.rb +0 -4
- data/spec/app/models/movie.rb +0 -12
- data/spec/app/models/my_hash.rb +0 -2
- data/spec/app/models/name.rb +0 -21
- data/spec/app/models/node.rb +0 -5
- data/spec/app/models/note.rb +0 -12
- data/spec/app/models/ordered_post.rb +0 -6
- data/spec/app/models/ordered_preference.rb +0 -6
- data/spec/app/models/oscar.rb +0 -15
- data/spec/app/models/override.rb +0 -16
- data/spec/app/models/ownable.rb +0 -6
- data/spec/app/models/owner.rb +0 -6
- data/spec/app/models/page.rb +0 -5
- data/spec/app/models/page_question.rb +0 -4
- data/spec/app/models/palette.rb +0 -7
- data/spec/app/models/parent.rb +0 -5
- data/spec/app/models/parent_doc.rb +0 -6
- data/spec/app/models/passport.rb +0 -5
- data/spec/app/models/patient.rb +0 -9
- data/spec/app/models/pdf_writer.rb +0 -3
- data/spec/app/models/pencil.rb +0 -1
- data/spec/app/models/pet.rb +0 -23
- data/spec/app/models/pet_owner.rb +0 -6
- data/spec/app/models/phone_observer.rb +0 -6
- data/spec/app/models/pizza.rb +0 -7
- data/spec/app/models/player.rb +0 -35
- data/spec/app/models/post.rb +0 -42
- data/spec/app/models/powerup.rb +0 -11
- data/spec/app/models/preference.rb +0 -9
- data/spec/app/models/princess.rb +0 -8
- data/spec/app/models/product.rb +0 -15
- data/spec/app/models/profile.rb +0 -5
- data/spec/app/models/pronunciation.rb +0 -5
- data/spec/app/models/purchase.rb +0 -4
- data/spec/app/models/question.rb +0 -8
- data/spec/app/models/quiz.rb +0 -7
- data/spec/app/models/rating.rb +0 -8
- data/spec/app/models/record.rb +0 -46
- data/spec/app/models/registry.rb +0 -4
- data/spec/app/models/role.rb +0 -5
- data/spec/app/models/root_category.rb +0 -4
- data/spec/app/models/sandwich.rb +0 -4
- data/spec/app/models/scheduler.rb +0 -7
- data/spec/app/models/seo.rb +0 -7
- data/spec/app/models/series.rb +0 -4
- data/spec/app/models/server.rb +0 -13
- data/spec/app/models/shape.rb +0 -12
- data/spec/app/models/shelf.rb +0 -5
- data/spec/app/models/shipping_container.rb +0 -5
- data/spec/app/models/shop.rb +0 -6
- data/spec/app/models/short_agent.rb +0 -4
- data/spec/app/models/short_quiz.rb +0 -5
- data/spec/app/models/slave.rb +0 -6
- data/spec/app/models/song.rb +0 -8
- data/spec/app/models/square.rb +0 -4
- data/spec/app/models/strategy.rb +0 -3
- data/spec/app/models/sub_item.rb +0 -3
- data/spec/app/models/survey.rb +0 -5
- data/spec/app/models/target.rb +0 -5
- data/spec/app/models/template.rb +0 -5
- data/spec/app/models/thing.rb +0 -9
- data/spec/app/models/tool.rb +0 -8
- data/spec/app/models/topping.rb +0 -5
- data/spec/app/models/track.rb +0 -38
- data/spec/app/models/translation.rb +0 -5
- data/spec/app/models/tree.rb +0 -9
- data/spec/app/models/truck.rb +0 -3
- data/spec/app/models/user.rb +0 -20
- data/spec/app/models/user_account.rb +0 -10
- data/spec/app/models/validation_callback.rb +0 -10
- data/spec/app/models/vehicle.rb +0 -11
- data/spec/app/models/version.rb +0 -5
- data/spec/app/models/vet_visit.rb +0 -5
- data/spec/app/models/weapon.rb +0 -11
- data/spec/app/models/wiki_page.rb +0 -15
- data/spec/app/models/word.rb +0 -12
- data/spec/app/models/word_origin.rb +0 -11
- data/spec/app/models/writer.rb +0 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 08113a5edb37b905f8dcc195e001aac923c7eddc
|
4
|
+
data.tar.gz: 4bce6008277808ea52aa375e17f1411a4ba6d013
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: accdb726f19a90e549f7e283cc0a0ad6b4bf20f8a616301cf7c7469f53263bcbd6b8eb825e5fa6b8b9ec4f8a154f74012f3fe1f15d9813ea874944a8770bd06f
|
7
|
+
data.tar.gz: 457feabda00cf674d2c4c3caf8ed456d243558def13572a3a0b3ee18ec54e1236b49d387e48bd2f32f7d3bea40565e1cf44c0dc46549c7e6abaa59d3b584ead3
|
data/.travis.yml
CHANGED
data/mongoid-paranoia.gemspec
CHANGED
@@ -9,13 +9,14 @@ Gem::Specification.new do |gem|
|
|
9
9
|
gem.homepage = 'https://github.com/haihappen/mongoid-paranoia'
|
10
10
|
gem.summary = 'Extraction of mongoid-paranoia into its own gem.'
|
11
11
|
gem.description = "There may be times when you don't want documents to actually get deleted from the database, but \"flagged\" as deleted."
|
12
|
+
gem.licenses = ['MIT']
|
12
13
|
|
13
14
|
gem.files = `git ls-files`.split("\n")
|
14
15
|
gem.require_path = 'lib'
|
15
16
|
|
16
17
|
gem.add_dependency 'activesupport', '~> 4.0'
|
17
18
|
gem.add_dependency 'mongoid', '>= 4.0.0', '<= 5.0.0'
|
18
|
-
gem.add_development_dependency 'mongoid-versioning', '>= 1.1.0'
|
19
|
-
gem.add_development_dependency 'rake'
|
19
|
+
gem.add_development_dependency 'mongoid-versioning', '~> 1.1', '>= 1.1.0'
|
20
|
+
gem.add_development_dependency 'rake', '~> 10.0'
|
20
21
|
gem.add_development_dependency 'rspec', '~> 3'
|
21
22
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -18,8 +18,11 @@ ENV["MONGOID_SPEC_PORT"] ||= "27017"
|
|
18
18
|
HOST = ENV["MONGOID_SPEC_HOST"]
|
19
19
|
PORT = ENV["MONGOID_SPEC_PORT"].to_i
|
20
20
|
|
21
|
-
# Moped.logger.level = Logger::DEBUG
|
21
|
+
# Moped.logger.level = Logger::DEBUG # TODO Remove Mongoid 4 support.
|
22
22
|
# Mongoid.logger.level = Logger::DEBUG
|
23
|
+
if defined?(Mongo)
|
24
|
+
Mongo::Logger.logger.level = Logger::WARN
|
25
|
+
end
|
23
26
|
|
24
27
|
# When testing locally we use the database named mongoid_test. However when
|
25
28
|
# tests are running in parallel on Travis we need to use different database
|
@@ -66,7 +69,11 @@ RSpec.configure do |config|
|
|
66
69
|
# drop the database after the suite.
|
67
70
|
config.after(:suite) do
|
68
71
|
if ENV["CI"]
|
69
|
-
|
72
|
+
if defined?(Mongo)
|
73
|
+
Mongo::Client.new(["#{HOST}:#{PORT}"], database: database_id).database.drop
|
74
|
+
else
|
75
|
+
Mongoid::Threaded.sessions[:default].drop
|
76
|
+
end
|
70
77
|
end
|
71
78
|
end
|
72
79
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mongoid-paranoia
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mario Uher
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-10-
|
11
|
+
date: 2015-10-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -48,6 +48,9 @@ dependencies:
|
|
48
48
|
name: mongoid-versioning
|
49
49
|
requirement: !ruby/object:Gem::Requirement
|
50
50
|
requirements:
|
51
|
+
- - "~>"
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '1.1'
|
51
54
|
- - ">="
|
52
55
|
- !ruby/object:Gem::Version
|
53
56
|
version: 1.1.0
|
@@ -55,6 +58,9 @@ dependencies:
|
|
55
58
|
prerelease: false
|
56
59
|
version_requirements: !ruby/object:Gem::Requirement
|
57
60
|
requirements:
|
61
|
+
- - "~>"
|
62
|
+
- !ruby/object:Gem::Version
|
63
|
+
version: '1.1'
|
58
64
|
- - ">="
|
59
65
|
- !ruby/object:Gem::Version
|
60
66
|
version: 1.1.0
|
@@ -62,16 +68,16 @@ dependencies:
|
|
62
68
|
name: rake
|
63
69
|
requirement: !ruby/object:Gem::Requirement
|
64
70
|
requirements:
|
65
|
-
- - "
|
71
|
+
- - "~>"
|
66
72
|
- !ruby/object:Gem::Version
|
67
|
-
version: '0'
|
73
|
+
version: '10.0'
|
68
74
|
type: :development
|
69
75
|
prerelease: false
|
70
76
|
version_requirements: !ruby/object:Gem::Requirement
|
71
77
|
requirements:
|
72
|
-
- - "
|
78
|
+
- - "~>"
|
73
79
|
- !ruby/object:Gem::Version
|
74
|
-
version: '0'
|
80
|
+
version: '10.0'
|
75
81
|
- !ruby/object:Gem::Dependency
|
76
82
|
name: rspec
|
77
83
|
requirement: !ruby/object:Gem::Requirement
|
@@ -99,6 +105,8 @@ files:
|
|
99
105
|
- Gemfile
|
100
106
|
- README.md
|
101
107
|
- Rakefile
|
108
|
+
- gemfiles/Mongoid_4.gemfile
|
109
|
+
- gemfiles/Mongoid_5.gemfile
|
102
110
|
- lib/mongoid/core_ext/builders/nested_attributes/many.rb
|
103
111
|
- lib/mongoid/core_ext/document.rb
|
104
112
|
- lib/mongoid/core_ext/relations/embedded/many.rb
|
@@ -106,189 +114,23 @@ files:
|
|
106
114
|
- lib/mongoid/paranoia.rb
|
107
115
|
- lib/mongoid/paranoia/version.rb
|
108
116
|
- mongoid-paranoia.gemspec
|
109
|
-
- spec/app/models/account.rb
|
110
|
-
- spec/app/models/acolyte.rb
|
111
|
-
- spec/app/models/actor.rb
|
112
|
-
- spec/app/models/actor_observer.rb
|
113
|
-
- spec/app/models/actress.rb
|
114
117
|
- spec/app/models/address.rb
|
115
118
|
- spec/app/models/address_component.rb
|
116
|
-
- spec/app/models/address_number.rb
|
117
|
-
- spec/app/models/agency.rb
|
118
|
-
- spec/app/models/agent.rb
|
119
|
-
- spec/app/models/album.rb
|
120
|
-
- spec/app/models/alert.rb
|
121
|
-
- spec/app/models/animal.rb
|
122
|
-
- spec/app/models/answer.rb
|
123
119
|
- spec/app/models/appointment.rb
|
124
|
-
- spec/app/models/article.rb
|
125
|
-
- spec/app/models/artist.rb
|
126
|
-
- spec/app/models/artwork.rb
|
127
|
-
- spec/app/models/augmentation.rb
|
128
120
|
- spec/app/models/author.rb
|
129
|
-
- spec/app/models/band.rb
|
130
|
-
- spec/app/models/bar.rb
|
131
|
-
- spec/app/models/basic.rb
|
132
|
-
- spec/app/models/bed.rb
|
133
|
-
- spec/app/models/big_palette.rb
|
134
|
-
- spec/app/models/birthday.rb
|
135
|
-
- spec/app/models/book.rb
|
136
|
-
- spec/app/models/breed.rb
|
137
|
-
- spec/app/models/browser.rb
|
138
|
-
- spec/app/models/building.rb
|
139
|
-
- spec/app/models/building_address.rb
|
140
|
-
- spec/app/models/bus.rb
|
141
|
-
- spec/app/models/business.rb
|
142
|
-
- spec/app/models/callback_recorder.rb
|
143
|
-
- spec/app/models/callback_test.rb
|
144
|
-
- spec/app/models/canvas.rb
|
145
|
-
- spec/app/models/car.rb
|
146
|
-
- spec/app/models/cat.rb
|
147
|
-
- spec/app/models/category.rb
|
148
|
-
- spec/app/models/child.rb
|
149
|
-
- spec/app/models/child_doc.rb
|
150
|
-
- spec/app/models/church.rb
|
151
|
-
- spec/app/models/circle.rb
|
152
|
-
- spec/app/models/circuit.rb
|
153
|
-
- spec/app/models/circus.rb
|
154
|
-
- spec/app/models/code.rb
|
155
|
-
- spec/app/models/comment.rb
|
156
|
-
- spec/app/models/contractor.rb
|
157
|
-
- spec/app/models/cookie.rb
|
158
|
-
- spec/app/models/country_code.rb
|
159
|
-
- spec/app/models/definition.rb
|
160
|
-
- spec/app/models/description.rb
|
161
|
-
- spec/app/models/dictionary.rb
|
162
|
-
- spec/app/models/division.rb
|
163
121
|
- spec/app/models/doctor.rb
|
164
|
-
- spec/app/models/dog.rb
|
165
|
-
- spec/app/models/dokument.rb
|
166
|
-
- spec/app/models/driver.rb
|
167
|
-
- spec/app/models/drug.rb
|
168
|
-
- spec/app/models/email.rb
|
169
|
-
- spec/app/models/employer.rb
|
170
|
-
- spec/app/models/entry.rb
|
171
|
-
- spec/app/models/eraser.rb
|
172
|
-
- spec/app/models/event.rb
|
173
|
-
- spec/app/models/exhibition.rb
|
174
|
-
- spec/app/models/exhibitor.rb
|
175
|
-
- spec/app/models/eye.rb
|
176
|
-
- spec/app/models/eye_bowl.rb
|
177
|
-
- spec/app/models/face.rb
|
178
122
|
- spec/app/models/favorite.rb
|
179
|
-
- spec/app/models/filesystem.rb
|
180
|
-
- spec/app/models/firefox.rb
|
181
123
|
- spec/app/models/fish.rb
|
182
|
-
- spec/app/models/folder.rb
|
183
|
-
- spec/app/models/folder_item.rb
|
184
|
-
- spec/app/models/fruits.rb
|
185
|
-
- spec/app/models/game.rb
|
186
|
-
- spec/app/models/ghost.rb
|
187
|
-
- spec/app/models/home.rb
|
188
|
-
- spec/app/models/house.rb
|
189
|
-
- spec/app/models/html_writer.rb
|
190
|
-
- spec/app/models/image.rb
|
191
|
-
- spec/app/models/implant.rb
|
192
|
-
- spec/app/models/item.rb
|
193
|
-
- spec/app/models/jar.rb
|
194
|
-
- spec/app/models/label.rb
|
195
|
-
- spec/app/models/language.rb
|
196
|
-
- spec/app/models/lat_lng.rb
|
197
|
-
- spec/app/models/league.rb
|
198
|
-
- spec/app/models/learner.rb
|
199
|
-
- spec/app/models/line_item.rb
|
200
124
|
- spec/app/models/location.rb
|
201
|
-
- spec/app/models/login.rb
|
202
|
-
- spec/app/models/manufacturer.rb
|
203
|
-
- spec/app/models/meat.rb
|
204
|
-
- spec/app/models/membership.rb
|
205
|
-
- spec/app/models/mixed_drink.rb
|
206
|
-
- spec/app/models/movie.rb
|
207
|
-
- spec/app/models/my_hash.rb
|
208
|
-
- spec/app/models/name.rb
|
209
|
-
- spec/app/models/node.rb
|
210
|
-
- spec/app/models/note.rb
|
211
|
-
- spec/app/models/ordered_post.rb
|
212
|
-
- spec/app/models/ordered_preference.rb
|
213
|
-
- spec/app/models/oscar.rb
|
214
|
-
- spec/app/models/override.rb
|
215
|
-
- spec/app/models/ownable.rb
|
216
|
-
- spec/app/models/owner.rb
|
217
|
-
- spec/app/models/page.rb
|
218
|
-
- spec/app/models/page_question.rb
|
219
|
-
- spec/app/models/palette.rb
|
220
125
|
- spec/app/models/paranoid_phone.rb
|
221
126
|
- spec/app/models/paranoid_post.rb
|
222
|
-
- spec/app/models/parent.rb
|
223
|
-
- spec/app/models/parent_doc.rb
|
224
|
-
- spec/app/models/passport.rb
|
225
|
-
- spec/app/models/patient.rb
|
226
|
-
- spec/app/models/pdf_writer.rb
|
227
|
-
- spec/app/models/pencil.rb
|
228
127
|
- spec/app/models/person.rb
|
229
|
-
- spec/app/models/pet.rb
|
230
|
-
- spec/app/models/pet_owner.rb
|
231
128
|
- spec/app/models/phone.rb
|
232
|
-
- spec/app/models/phone_observer.rb
|
233
|
-
- spec/app/models/pizza.rb
|
234
|
-
- spec/app/models/player.rb
|
235
|
-
- spec/app/models/post.rb
|
236
|
-
- spec/app/models/powerup.rb
|
237
|
-
- spec/app/models/preference.rb
|
238
|
-
- spec/app/models/princess.rb
|
239
|
-
- spec/app/models/product.rb
|
240
|
-
- spec/app/models/profile.rb
|
241
|
-
- spec/app/models/pronunciation.rb
|
242
|
-
- spec/app/models/purchase.rb
|
243
|
-
- spec/app/models/question.rb
|
244
|
-
- spec/app/models/quiz.rb
|
245
|
-
- spec/app/models/rating.rb
|
246
|
-
- spec/app/models/record.rb
|
247
|
-
- spec/app/models/registry.rb
|
248
|
-
- spec/app/models/role.rb
|
249
|
-
- spec/app/models/root_category.rb
|
250
|
-
- spec/app/models/sandwich.rb
|
251
|
-
- spec/app/models/scheduler.rb
|
252
|
-
- spec/app/models/seo.rb
|
253
|
-
- spec/app/models/series.rb
|
254
|
-
- spec/app/models/server.rb
|
255
129
|
- spec/app/models/service.rb
|
256
|
-
- spec/app/models/shape.rb
|
257
|
-
- spec/app/models/shelf.rb
|
258
|
-
- spec/app/models/shipping_container.rb
|
259
|
-
- spec/app/models/shop.rb
|
260
|
-
- spec/app/models/short_agent.rb
|
261
|
-
- spec/app/models/short_quiz.rb
|
262
|
-
- spec/app/models/slave.rb
|
263
|
-
- spec/app/models/song.rb
|
264
|
-
- spec/app/models/square.rb
|
265
|
-
- spec/app/models/strategy.rb
|
266
|
-
- spec/app/models/sub_item.rb
|
267
|
-
- spec/app/models/survey.rb
|
268
130
|
- spec/app/models/symptom.rb
|
269
131
|
- spec/app/models/tag.rb
|
270
|
-
- spec/app/models/target.rb
|
271
|
-
- spec/app/models/template.rb
|
272
|
-
- spec/app/models/thing.rb
|
273
132
|
- spec/app/models/title.rb
|
274
|
-
- spec/app/models/tool.rb
|
275
|
-
- spec/app/models/topping.rb
|
276
|
-
- spec/app/models/track.rb
|
277
|
-
- spec/app/models/translation.rb
|
278
|
-
- spec/app/models/tree.rb
|
279
|
-
- spec/app/models/truck.rb
|
280
|
-
- spec/app/models/user.rb
|
281
|
-
- spec/app/models/user_account.rb
|
282
|
-
- spec/app/models/validation_callback.rb
|
283
|
-
- spec/app/models/vehicle.rb
|
284
|
-
- spec/app/models/version.rb
|
285
|
-
- spec/app/models/vet_visit.rb
|
286
133
|
- spec/app/models/video.rb
|
287
|
-
- spec/app/models/weapon.rb
|
288
|
-
- spec/app/models/wiki_page.rb
|
289
|
-
- spec/app/models/word.rb
|
290
|
-
- spec/app/models/word_origin.rb
|
291
|
-
- spec/app/models/writer.rb
|
292
134
|
- spec/config/mongoid.yml
|
293
135
|
- spec/mongoid/attributes/nested_spec.rb
|
294
136
|
- spec/mongoid/criteria/scopable_spec.rb
|
@@ -298,7 +140,8 @@ files:
|
|
298
140
|
- spec/mongoid/validatable/uniqueness_spec.rb
|
299
141
|
- spec/spec_helper.rb
|
300
142
|
homepage: https://github.com/haihappen/mongoid-paranoia
|
301
|
-
licenses:
|
143
|
+
licenses:
|
144
|
+
- MIT
|
302
145
|
metadata: {}
|
303
146
|
post_install_message:
|
304
147
|
rdoc_options: []
|
data/spec/app/models/account.rb
DELETED
@@ -1,28 +0,0 @@
|
|
1
|
-
class Account
|
2
|
-
include Mongoid::Document
|
3
|
-
|
4
|
-
field :_id, type: String, default: ->{ name.try(:parameterize) }
|
5
|
-
|
6
|
-
field :number, type: String
|
7
|
-
field :balance, type: String
|
8
|
-
field :nickname, type: String
|
9
|
-
field :name, type: String
|
10
|
-
field :balanced, type: Boolean, default: ->{ balance? ? true : false }
|
11
|
-
|
12
|
-
field :overridden, type: String
|
13
|
-
|
14
|
-
embeds_many :memberships
|
15
|
-
belongs_to :creator, class_name: "User", foreign_key: :creator_id
|
16
|
-
belongs_to :person
|
17
|
-
has_many :alerts
|
18
|
-
has_and_belongs_to_many :agents
|
19
|
-
has_one :comment, validate: false
|
20
|
-
|
21
|
-
validates_presence_of :name
|
22
|
-
validates_presence_of :nickname, on: :upsert
|
23
|
-
validates_length_of :name, maximum: 10, on: :create
|
24
|
-
|
25
|
-
def overridden
|
26
|
-
self[:overridden] = "not recommended"
|
27
|
-
end
|
28
|
-
end
|
data/spec/app/models/acolyte.rb
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
class Acolyte
|
2
|
-
include Mongoid::Document
|
3
|
-
field :status
|
4
|
-
field :name
|
5
|
-
|
6
|
-
embeds_many :versions, as: :memorable
|
7
|
-
belongs_to :church
|
8
|
-
|
9
|
-
default_scope ->{ asc(:name) }
|
10
|
-
scope :active, ->{ where(status: "active") }
|
11
|
-
scope :named, ->{ where(:name.exists => true) }
|
12
|
-
|
13
|
-
def callback_test?
|
14
|
-
name == "callback-test"
|
15
|
-
end
|
16
|
-
end
|
data/spec/app/models/actor.rb
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
class Actor
|
2
|
-
include Mongoid::Document
|
3
|
-
field :name
|
4
|
-
field :after_custom_count, type: Integer, default: 0
|
5
|
-
has_and_belongs_to_many :tags
|
6
|
-
embeds_many :things, validate: false, cascade_callbacks: true
|
7
|
-
accepts_nested_attributes_for :things, allow_destroy: true
|
8
|
-
|
9
|
-
define_model_callbacks :custom
|
10
|
-
observable :custom
|
11
|
-
|
12
|
-
def do_something
|
13
|
-
run_callbacks(:custom) do
|
14
|
-
self.name = "custom"
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
18
|
-
|
19
|
-
require "app/models/actress"
|
@@ -1,15 +0,0 @@
|
|
1
|
-
class ActorObserver < Mongoid::Observer
|
2
|
-
attr_reader :last_after_create_record
|
3
|
-
|
4
|
-
def after_create(record)
|
5
|
-
@last_after_create_record = record
|
6
|
-
end
|
7
|
-
|
8
|
-
def after_custom(record)
|
9
|
-
record.after_custom_count += 1
|
10
|
-
end
|
11
|
-
|
12
|
-
def before_custom(record)
|
13
|
-
@after_custom_called = true
|
14
|
-
end
|
15
|
-
end
|
data/spec/app/models/actress.rb
DELETED