mongoid_ext 0.6.2 → 0.7.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +1 -1
- data/Gemfile.lock +20 -18
- data/VERSION +1 -1
- data/lib/mongoid_ext/criteria_ext.rb +0 -3
- data/lib/mongoid_ext/document_ext.rb +8 -10
- data/lib/mongoid_ext/file.rb +20 -4
- data/lib/mongoid_ext/file_list.rb +28 -2
- data/lib/mongoid_ext/filter/result_set.rb +3 -0
- data/lib/mongoid_ext/js/filter.js +42 -21
- data/lib/mongoid_ext/js/find_tags.js +7 -4
- data/lib/mongoid_ext/js/tag_cloud.js +17 -15
- data/lib/mongoid_ext/modifiers.rb +24 -25
- data/lib/mongoid_ext/paranoia.rb +1 -1
- data/lib/mongoid_ext/patches.rb +14 -1
- data/lib/mongoid_ext/storage.rb +23 -14
- data/lib/mongoid_ext/types/embedded_hash.rb +40 -5
- data/lib/mongoid_ext/types/open_struct.rb +13 -9
- data/lib/mongoid_ext/types/timestamp.rb +6 -4
- data/lib/mongoid_ext/types/translation.rb +4 -2
- data/lib/mongoid_ext/versioning.rb +62 -65
- data/lib/mongoid_ext/voteable.rb +8 -8
- data/mongoid_ext.gemspec +11 -13
- data/test/helper.rb +1 -2
- data/test/models.rb +1 -1
- data/test/test_storage.rb +1 -1
- data/test/types/test_open_struct.rb +1 -1
- metadata +172 -165
data/test/helper.rb
CHANGED
@@ -8,11 +8,10 @@ require 'timecop'
|
|
8
8
|
require 'mocha'
|
9
9
|
require 'pp'
|
10
10
|
|
11
|
-
require 'support/custom_matchers'
|
12
|
-
|
13
11
|
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
14
12
|
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
15
13
|
|
14
|
+
require 'support/custom_matchers'
|
16
15
|
require 'mongoid_ext'
|
17
16
|
|
18
17
|
Mongoid.configure do |config|
|
data/test/models.rb
CHANGED
data/test/test_storage.rb
CHANGED
@@ -49,7 +49,7 @@ class StorageTest < Test::Unit::TestCase
|
|
49
49
|
|
50
50
|
should "not store the file if object is new" do
|
51
51
|
@avatar.put_file("an_avatar.png", @data)
|
52
|
-
|
52
|
+
@avatar.fetch_file("an_avatar.png").read.should be_nil
|
53
53
|
end
|
54
54
|
end
|
55
55
|
|
metadata
CHANGED
@@ -1,233 +1,249 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: mongoid_ext
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
|
6
|
-
- 0
|
7
|
-
- 6
|
8
|
-
- 2
|
9
|
-
version: 0.6.2
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.7.1
|
5
|
+
prerelease:
|
10
6
|
platform: ruby
|
11
|
-
authors:
|
7
|
+
authors:
|
12
8
|
- David A. Cuadrado
|
13
9
|
autorequire:
|
14
10
|
bindir: bin
|
15
11
|
cert_chain: []
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
dependencies:
|
20
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2012-07-27 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
21
15
|
name: mongoid
|
22
|
-
requirement:
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
23
17
|
none: false
|
24
|
-
requirements:
|
18
|
+
requirements:
|
25
19
|
- - ~>
|
26
|
-
- !ruby/object:Gem::Version
|
27
|
-
|
28
|
-
- 2
|
29
|
-
version: "2"
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '2.3'
|
30
22
|
type: :runtime
|
31
23
|
prerelease: false
|
32
|
-
version_requirements:
|
33
|
-
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ~>
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '2.3'
|
30
|
+
- !ruby/object:Gem::Dependency
|
34
31
|
name: uuidtools
|
35
|
-
requirement:
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
36
33
|
none: false
|
37
|
-
requirements:
|
38
|
-
- -
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
segments:
|
41
|
-
- 2
|
42
|
-
- 1
|
43
|
-
- 1
|
34
|
+
requirements:
|
35
|
+
- - ! '>='
|
36
|
+
- !ruby/object:Gem::Version
|
44
37
|
version: 2.1.1
|
45
38
|
type: :runtime
|
46
39
|
prerelease: false
|
47
|
-
version_requirements:
|
48
|
-
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: 2.1.1
|
46
|
+
- !ruby/object:Gem::Dependency
|
49
47
|
name: i18n
|
50
|
-
requirement:
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
51
49
|
none: false
|
52
|
-
requirements:
|
53
|
-
- -
|
54
|
-
- !ruby/object:Gem::Version
|
55
|
-
|
56
|
-
- 0
|
57
|
-
version: "0"
|
50
|
+
requirements:
|
51
|
+
- - ! '>='
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0'
|
58
54
|
type: :runtime
|
59
55
|
prerelease: false
|
60
|
-
version_requirements:
|
61
|
-
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
- !ruby/object:Gem::Dependency
|
62
63
|
name: tzinfo
|
63
|
-
requirement:
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
64
65
|
none: false
|
65
|
-
requirements:
|
66
|
-
- -
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
|
69
|
-
- 0
|
70
|
-
version: "0"
|
66
|
+
requirements:
|
67
|
+
- - ! '>='
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '0'
|
71
70
|
type: :runtime
|
72
71
|
prerelease: false
|
73
|
-
version_requirements:
|
74
|
-
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ! '>='
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '0'
|
78
|
+
- !ruby/object:Gem::Dependency
|
75
79
|
name: differ
|
76
|
-
requirement:
|
80
|
+
requirement: !ruby/object:Gem::Requirement
|
77
81
|
none: false
|
78
|
-
requirements:
|
79
|
-
- -
|
80
|
-
- !ruby/object:Gem::Version
|
81
|
-
segments:
|
82
|
-
- 0
|
83
|
-
- 1
|
84
|
-
- 2
|
82
|
+
requirements:
|
83
|
+
- - ! '>='
|
84
|
+
- !ruby/object:Gem::Version
|
85
85
|
version: 0.1.2
|
86
86
|
type: :runtime
|
87
87
|
prerelease: false
|
88
|
-
version_requirements:
|
89
|
-
|
88
|
+
version_requirements: !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
90
|
+
requirements:
|
91
|
+
- - ! '>='
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: 0.1.2
|
94
|
+
- !ruby/object:Gem::Dependency
|
90
95
|
name: encryptor
|
91
|
-
requirement:
|
96
|
+
requirement: !ruby/object:Gem::Requirement
|
92
97
|
none: false
|
93
|
-
requirements:
|
98
|
+
requirements:
|
94
99
|
- - ~>
|
95
|
-
- !ruby/object:Gem::Version
|
96
|
-
segments:
|
97
|
-
- 1
|
98
|
-
- 1
|
99
|
-
- 3
|
100
|
+
- !ruby/object:Gem::Version
|
100
101
|
version: 1.1.3
|
101
102
|
type: :runtime
|
102
103
|
prerelease: false
|
103
|
-
version_requirements:
|
104
|
-
|
104
|
+
version_requirements: !ruby/object:Gem::Requirement
|
105
|
+
none: false
|
106
|
+
requirements:
|
107
|
+
- - ~>
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: 1.1.3
|
110
|
+
- !ruby/object:Gem::Dependency
|
105
111
|
name: yard
|
106
|
-
requirement:
|
112
|
+
requirement: !ruby/object:Gem::Requirement
|
107
113
|
none: false
|
108
|
-
requirements:
|
114
|
+
requirements:
|
109
115
|
- - ~>
|
110
|
-
- !ruby/object:Gem::Version
|
111
|
-
segments:
|
112
|
-
- 0
|
113
|
-
- 6
|
114
|
-
- 0
|
116
|
+
- !ruby/object:Gem::Version
|
115
117
|
version: 0.6.0
|
116
118
|
type: :development
|
117
119
|
prerelease: false
|
118
|
-
version_requirements:
|
119
|
-
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
none: false
|
122
|
+
requirements:
|
123
|
+
- - ~>
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: 0.6.0
|
126
|
+
- !ruby/object:Gem::Dependency
|
120
127
|
name: bundler
|
121
|
-
requirement:
|
128
|
+
requirement: !ruby/object:Gem::Requirement
|
122
129
|
none: false
|
123
|
-
requirements:
|
130
|
+
requirements:
|
124
131
|
- - ~>
|
125
|
-
- !ruby/object:Gem::Version
|
126
|
-
segments:
|
127
|
-
- 1
|
128
|
-
- 0
|
129
|
-
- 0
|
132
|
+
- !ruby/object:Gem::Version
|
130
133
|
version: 1.0.0
|
131
134
|
type: :development
|
132
135
|
prerelease: false
|
133
|
-
version_requirements:
|
134
|
-
|
136
|
+
version_requirements: !ruby/object:Gem::Requirement
|
137
|
+
none: false
|
138
|
+
requirements:
|
139
|
+
- - ~>
|
140
|
+
- !ruby/object:Gem::Version
|
141
|
+
version: 1.0.0
|
142
|
+
- !ruby/object:Gem::Dependency
|
135
143
|
name: jeweler
|
136
|
-
requirement:
|
144
|
+
requirement: !ruby/object:Gem::Requirement
|
137
145
|
none: false
|
138
|
-
requirements:
|
146
|
+
requirements:
|
139
147
|
- - ~>
|
140
|
-
- !ruby/object:Gem::Version
|
141
|
-
segments:
|
142
|
-
- 1
|
143
|
-
- 5
|
144
|
-
- 2
|
148
|
+
- !ruby/object:Gem::Version
|
145
149
|
version: 1.5.2
|
146
150
|
type: :development
|
147
151
|
prerelease: false
|
148
|
-
version_requirements:
|
149
|
-
|
152
|
+
version_requirements: !ruby/object:Gem::Requirement
|
153
|
+
none: false
|
154
|
+
requirements:
|
155
|
+
- - ~>
|
156
|
+
- !ruby/object:Gem::Version
|
157
|
+
version: 1.5.2
|
158
|
+
- !ruby/object:Gem::Dependency
|
150
159
|
name: shoulda
|
151
|
-
requirement:
|
160
|
+
requirement: !ruby/object:Gem::Requirement
|
152
161
|
none: false
|
153
|
-
requirements:
|
162
|
+
requirements:
|
154
163
|
- - ~>
|
155
|
-
- !ruby/object:Gem::Version
|
156
|
-
segments:
|
157
|
-
- 2
|
158
|
-
- 11
|
159
|
-
- 3
|
164
|
+
- !ruby/object:Gem::Version
|
160
165
|
version: 2.11.3
|
161
166
|
type: :development
|
162
167
|
prerelease: false
|
163
|
-
version_requirements:
|
164
|
-
|
168
|
+
version_requirements: !ruby/object:Gem::Requirement
|
169
|
+
none: false
|
170
|
+
requirements:
|
171
|
+
- - ~>
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: 2.11.3
|
174
|
+
- !ruby/object:Gem::Dependency
|
165
175
|
name: jnunemaker-matchy
|
166
|
-
requirement:
|
176
|
+
requirement: !ruby/object:Gem::Requirement
|
167
177
|
none: false
|
168
|
-
requirements:
|
178
|
+
requirements:
|
169
179
|
- - ~>
|
170
|
-
- !ruby/object:Gem::Version
|
171
|
-
|
172
|
-
- 0
|
173
|
-
- 4
|
174
|
-
version: "0.4"
|
180
|
+
- !ruby/object:Gem::Version
|
181
|
+
version: '0.4'
|
175
182
|
type: :development
|
176
183
|
prerelease: false
|
177
|
-
version_requirements:
|
178
|
-
|
184
|
+
version_requirements: !ruby/object:Gem::Requirement
|
185
|
+
none: false
|
186
|
+
requirements:
|
187
|
+
- - ~>
|
188
|
+
- !ruby/object:Gem::Version
|
189
|
+
version: '0.4'
|
190
|
+
- !ruby/object:Gem::Dependency
|
179
191
|
name: shoulda
|
180
|
-
requirement:
|
192
|
+
requirement: !ruby/object:Gem::Requirement
|
181
193
|
none: false
|
182
|
-
requirements:
|
194
|
+
requirements:
|
183
195
|
- - ~>
|
184
|
-
- !ruby/object:Gem::Version
|
185
|
-
segments:
|
186
|
-
- 2
|
187
|
-
- 11
|
188
|
-
- 3
|
196
|
+
- !ruby/object:Gem::Version
|
189
197
|
version: 2.11.3
|
190
198
|
type: :development
|
191
199
|
prerelease: false
|
192
|
-
version_requirements:
|
193
|
-
|
200
|
+
version_requirements: !ruby/object:Gem::Requirement
|
201
|
+
none: false
|
202
|
+
requirements:
|
203
|
+
- - ~>
|
204
|
+
- !ruby/object:Gem::Version
|
205
|
+
version: 2.11.3
|
206
|
+
- !ruby/object:Gem::Dependency
|
194
207
|
name: mocha
|
195
|
-
requirement:
|
208
|
+
requirement: !ruby/object:Gem::Requirement
|
196
209
|
none: false
|
197
|
-
requirements:
|
210
|
+
requirements:
|
198
211
|
- - ~>
|
199
|
-
- !ruby/object:Gem::Version
|
200
|
-
segments:
|
201
|
-
- 0
|
202
|
-
- 9
|
203
|
-
- 4
|
212
|
+
- !ruby/object:Gem::Version
|
204
213
|
version: 0.9.4
|
205
214
|
type: :development
|
206
215
|
prerelease: false
|
207
|
-
version_requirements:
|
208
|
-
|
216
|
+
version_requirements: !ruby/object:Gem::Requirement
|
217
|
+
none: false
|
218
|
+
requirements:
|
219
|
+
- - ~>
|
220
|
+
- !ruby/object:Gem::Version
|
221
|
+
version: 0.9.4
|
222
|
+
- !ruby/object:Gem::Dependency
|
209
223
|
name: timecop
|
210
|
-
requirement:
|
224
|
+
requirement: !ruby/object:Gem::Requirement
|
211
225
|
none: false
|
212
|
-
requirements:
|
213
|
-
- -
|
214
|
-
- !ruby/object:Gem::Version
|
215
|
-
|
216
|
-
- 0
|
217
|
-
version: "0"
|
226
|
+
requirements:
|
227
|
+
- - ! '>='
|
228
|
+
- !ruby/object:Gem::Version
|
229
|
+
version: '0'
|
218
230
|
type: :development
|
219
231
|
prerelease: false
|
220
|
-
version_requirements:
|
232
|
+
version_requirements: !ruby/object:Gem::Requirement
|
233
|
+
none: false
|
234
|
+
requirements:
|
235
|
+
- - ! '>='
|
236
|
+
- !ruby/object:Gem::Version
|
237
|
+
version: '0'
|
221
238
|
description: mongoid plugins
|
222
239
|
email: krawek@gmail.com
|
223
|
-
executables:
|
240
|
+
executables:
|
224
241
|
- mongoid_console
|
225
242
|
extensions: []
|
226
|
-
|
227
|
-
extra_rdoc_files:
|
243
|
+
extra_rdoc_files:
|
228
244
|
- LICENSE
|
229
245
|
- README.rdoc
|
230
|
-
files:
|
246
|
+
files:
|
231
247
|
- .document
|
232
248
|
- Gemfile
|
233
249
|
- Gemfile.lock
|
@@ -282,37 +298,28 @@ files:
|
|
282
298
|
- test/types/test_open_struct.rb
|
283
299
|
- test/types/test_set.rb
|
284
300
|
- test/types/test_timestamp.rb
|
285
|
-
has_rdoc: true
|
286
301
|
homepage: http://github.com/dcu/mongoid_ext
|
287
302
|
licenses: []
|
288
|
-
|
289
303
|
post_install_message:
|
290
304
|
rdoc_options: []
|
291
|
-
|
292
|
-
require_paths:
|
305
|
+
require_paths:
|
293
306
|
- lib
|
294
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
307
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
295
308
|
none: false
|
296
|
-
requirements:
|
297
|
-
- -
|
298
|
-
- !ruby/object:Gem::Version
|
299
|
-
|
300
|
-
|
301
|
-
version: "0"
|
302
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
309
|
+
requirements:
|
310
|
+
- - ! '>='
|
311
|
+
- !ruby/object:Gem::Version
|
312
|
+
version: '0'
|
313
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
303
314
|
none: false
|
304
|
-
requirements:
|
305
|
-
- -
|
306
|
-
- !ruby/object:Gem::Version
|
307
|
-
|
308
|
-
- 0
|
309
|
-
version: "0"
|
315
|
+
requirements:
|
316
|
+
- - ! '>='
|
317
|
+
- !ruby/object:Gem::Version
|
318
|
+
version: '0'
|
310
319
|
requirements: []
|
311
|
-
|
312
320
|
rubyforge_project:
|
313
|
-
rubygems_version: 1.
|
321
|
+
rubygems_version: 1.8.24
|
314
322
|
signing_key:
|
315
323
|
specification_version: 3
|
316
324
|
summary: mongoid plugins
|
317
325
|
test_files: []
|
318
|
-
|