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.
@@ -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|
@@ -41,7 +41,7 @@ end
41
41
 
42
42
  class UserConfig #for OpenStruct
43
43
  include Mongoid::Document
44
- field :entries, :type => OpenStruct
44
+ field :entries, :type => MongoidExt::OpenStruct
45
45
  end
46
46
 
47
47
  class User
@@ -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
- lambda {@avatar.fetch_file("an_avatar.png").read}.should raise_error
52
+ @avatar.fetch_file("an_avatar.png").read.should be_nil
53
53
  end
54
54
  end
55
55
 
@@ -11,7 +11,7 @@ class OpenStructTest < Test::Unit::TestCase
11
11
  end
12
12
 
13
13
  should "allow to add new keys" do
14
- entries = OpenStruct.new()
14
+ entries = MongoidExt::OpenStruct.new()
15
15
  entries.new_key = "my new key"
16
16
  @config.entries = entries
17
17
  @config.save
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
- prerelease: false
5
- segments:
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
- date: 2011-07-15 00:00:00 -05:00
18
- default_executable: mongoid_console
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: &id001 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
23
17
  none: false
24
- requirements:
18
+ requirements:
25
19
  - - ~>
26
- - !ruby/object:Gem::Version
27
- segments:
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: *id001
33
- - !ruby/object:Gem::Dependency
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: &id002 !ruby/object:Gem::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: *id002
48
- - !ruby/object:Gem::Dependency
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: &id003 !ruby/object:Gem::Requirement
48
+ requirement: !ruby/object:Gem::Requirement
51
49
  none: false
52
- requirements:
53
- - - ">="
54
- - !ruby/object:Gem::Version
55
- segments:
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: *id003
61
- - !ruby/object:Gem::Dependency
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: &id004 !ruby/object:Gem::Requirement
64
+ requirement: !ruby/object:Gem::Requirement
64
65
  none: false
65
- requirements:
66
- - - ">="
67
- - !ruby/object:Gem::Version
68
- segments:
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: *id004
74
- - !ruby/object:Gem::Dependency
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: &id005 !ruby/object:Gem::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: *id005
89
- - !ruby/object:Gem::Dependency
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: &id006 !ruby/object:Gem::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: *id006
104
- - !ruby/object:Gem::Dependency
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: &id007 !ruby/object:Gem::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: *id007
119
- - !ruby/object:Gem::Dependency
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: &id008 !ruby/object:Gem::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: *id008
134
- - !ruby/object:Gem::Dependency
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: &id009 !ruby/object:Gem::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: *id009
149
- - !ruby/object:Gem::Dependency
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: &id010 !ruby/object:Gem::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: *id010
164
- - !ruby/object:Gem::Dependency
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: &id011 !ruby/object:Gem::Requirement
176
+ requirement: !ruby/object:Gem::Requirement
167
177
  none: false
168
- requirements:
178
+ requirements:
169
179
  - - ~>
170
- - !ruby/object:Gem::Version
171
- segments:
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: *id011
178
- - !ruby/object:Gem::Dependency
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: &id012 !ruby/object:Gem::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: *id012
193
- - !ruby/object:Gem::Dependency
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: &id013 !ruby/object:Gem::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: *id013
208
- - !ruby/object:Gem::Dependency
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: &id014 !ruby/object:Gem::Requirement
224
+ requirement: !ruby/object:Gem::Requirement
211
225
  none: false
212
- requirements:
213
- - - ">="
214
- - !ruby/object:Gem::Version
215
- segments:
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: *id014
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
- segments:
300
- - 0
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
- segments:
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.3.7
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
-