active-fedora 6.0.0 → 6.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (32) hide show
  1. data/.gitignore +1 -0
  2. data/History.txt +16 -0
  3. data/README.textile +12 -7
  4. data/active-fedora.gemspec +2 -2
  5. data/lib/active_fedora.rb +1 -0
  6. data/lib/active_fedora/associations/association_collection.rb +1 -1
  7. data/lib/active_fedora/associations/has_and_belongs_to_many_association.rb +12 -3
  8. data/lib/active_fedora/associations/has_many_association.rb +4 -0
  9. data/lib/active_fedora/attributes.rb +6 -0
  10. data/lib/active_fedora/auditable.rb +9 -0
  11. data/lib/active_fedora/base.rb +2 -0
  12. data/lib/active_fedora/delegating.rb +5 -3
  13. data/lib/active_fedora/indexing.rb +1 -1
  14. data/lib/active_fedora/nokogiri_datastream.rb +1 -2
  15. data/lib/active_fedora/querying.rb +1 -0
  16. data/lib/active_fedora/version.rb +1 -1
  17. data/lib/generators/active_fedora/config/solr/solr_generator.rb +1 -0
  18. data/lib/generators/active_fedora/config/solr/templates/jetty.yml +5 -0
  19. data/lib/generators/active_fedora/config/solr/templates/solr_conf/conf/schema.xml +1 -161
  20. data/lib/generators/active_fedora/config/solr/templates/solr_conf/conf/solrconfig.xml +16 -7
  21. data/lib/tasks/active_fedora_dev.rake +1 -1
  22. data/spec/fixtures/auditable.foxml.xml +110 -0
  23. data/spec/integration/base_spec.rb +7 -1
  24. data/spec/unit/auditable_spec.rb +31 -0
  25. data/spec/unit/base_delegate_spec.rb +74 -38
  26. data/spec/unit/base_spec.rb +6 -1
  27. data/spec/unit/has_and_belongs_to_many_collection_spec.rb +59 -0
  28. data/spec/unit/has_many_collection_spec.rb +26 -0
  29. metadata +96 -45
  30. checksums.yaml +0 -7
  31. data/solr/conf/schema.xml +0 -432
  32. data/solr/conf/solrconfig.xml +0 -158
@@ -1,6 +1,32 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe ActiveFedora::Associations::HasManyAssociation do
4
+ it "should call add_relationship" do
5
+ subject = stub("subject", :new_record? => false, :pid => 'subject:a', :internal_uri => 'info:fedora/subject:a')
6
+ predicate = stub(:klass => mock.class, :options=>{:property=>'predicate'}, :class_name=> nil)
7
+ ActiveFedora::SolrService.stub(:query).and_return([])
8
+ ac = ActiveFedora::Associations::HasManyAssociation.new(subject, predicate)
9
+ object = stub("object", :new_record? => false, :pid => 'object:b', :save => nil)
10
+
11
+ object.should_receive(:add_relationship).with('predicate', subject)
12
+
13
+ ac << object
14
+
15
+ end
16
+
17
+ it "should call remove_relationship" do
18
+ subject = stub("subject", :new_record? => false, :pid => 'subject:a', :internal_uri => 'info:fedora/subject:a')
19
+ predicate = stub(:klass => mock.class, :options=>{:property=>'predicate'}, :class_name=> nil)
20
+ ActiveFedora::SolrService.stub(:query).and_return([])
21
+ ac = ActiveFedora::Associations::HasManyAssociation.new(subject, predicate)
22
+ object = stub("object", :new_record? => false, :pid => 'object:b', :save => nil)
23
+
24
+ object.should_receive(:remove_relationship).with('predicate', subject)
25
+
26
+ ac.delete(object)
27
+
28
+ end
29
+
4
30
  it "should be able to replace the collection" do
5
31
  @owner = stub(:new_record? => false, :to_ary => nil, :internal_uri => 'info:fedora/changeme:99')
6
32
  @reflection = stub(:klass => mock.class, :options=>{:property=>'predicate'}, :class_name=> nil)
metadata CHANGED
@@ -1,7 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active-fedora
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.0.0
4
+ version: 6.1.0
5
+ prerelease:
5
6
  platform: ruby
6
7
  authors:
7
8
  - Matt Zumwalt
@@ -10,81 +11,92 @@ authors:
10
11
  autorequire:
11
12
  bindir: bin
12
13
  cert_chain: []
13
- date: 2013-03-28 00:00:00.000000000 Z
14
+ date: 2013-04-29 00:00:00.000000000 Z
14
15
  dependencies:
15
16
  - !ruby/object:Gem::Dependency
16
17
  name: rsolr
17
18
  requirement: !ruby/object:Gem::Requirement
19
+ none: false
18
20
  requirements:
19
- - - '>='
21
+ - - ! '>='
20
22
  - !ruby/object:Gem::Version
21
23
  version: '0'
22
24
  type: :runtime
23
25
  prerelease: false
24
26
  version_requirements: !ruby/object:Gem::Requirement
27
+ none: false
25
28
  requirements:
26
- - - '>='
29
+ - - ! '>='
27
30
  - !ruby/object:Gem::Version
28
31
  version: '0'
29
32
  - !ruby/object:Gem::Dependency
30
33
  name: om
31
34
  requirement: !ruby/object:Gem::Requirement
35
+ none: false
32
36
  requirements:
33
37
  - - ~>
34
38
  - !ruby/object:Gem::Version
35
- version: 2.0.0
39
+ version: 2.1.0
36
40
  type: :runtime
37
41
  prerelease: false
38
42
  version_requirements: !ruby/object:Gem::Requirement
43
+ none: false
39
44
  requirements:
40
45
  - - ~>
41
46
  - !ruby/object:Gem::Version
42
- version: 2.0.0
47
+ version: 2.1.0
43
48
  - !ruby/object:Gem::Dependency
44
49
  name: nom-xml
45
50
  requirement: !ruby/object:Gem::Requirement
51
+ none: false
46
52
  requirements:
47
- - - '>='
53
+ - - ! '>='
48
54
  - !ruby/object:Gem::Version
49
55
  version: 0.5.1
50
56
  type: :runtime
51
57
  prerelease: false
52
58
  version_requirements: !ruby/object:Gem::Requirement
59
+ none: false
53
60
  requirements:
54
- - - '>='
61
+ - - ! '>='
55
62
  - !ruby/object:Gem::Version
56
63
  version: 0.5.1
57
64
  - !ruby/object:Gem::Dependency
58
65
  name: activeresource
59
66
  requirement: !ruby/object:Gem::Requirement
67
+ none: false
60
68
  requirements:
61
- - - '>='
69
+ - - ! '>='
62
70
  - !ruby/object:Gem::Version
63
71
  version: 3.0.0
64
72
  type: :runtime
65
73
  prerelease: false
66
74
  version_requirements: !ruby/object:Gem::Requirement
75
+ none: false
67
76
  requirements:
68
- - - '>='
77
+ - - ! '>='
69
78
  - !ruby/object:Gem::Version
70
79
  version: 3.0.0
71
80
  - !ruby/object:Gem::Dependency
72
81
  name: activesupport
73
82
  requirement: !ruby/object:Gem::Requirement
83
+ none: false
74
84
  requirements:
75
- - - '>='
85
+ - - ! '>='
76
86
  - !ruby/object:Gem::Version
77
87
  version: 3.0.0
78
88
  type: :runtime
79
89
  prerelease: false
80
90
  version_requirements: !ruby/object:Gem::Requirement
91
+ none: false
81
92
  requirements:
82
- - - '>='
93
+ - - ! '>='
83
94
  - !ruby/object:Gem::Version
84
95
  version: 3.0.0
85
96
  - !ruby/object:Gem::Dependency
86
97
  name: builder
87
98
  requirement: !ruby/object:Gem::Requirement
99
+ none: false
88
100
  requirements:
89
101
  - - ~>
90
102
  - !ruby/object:Gem::Version
@@ -92,6 +104,7 @@ dependencies:
92
104
  type: :runtime
93
105
  prerelease: false
94
106
  version_requirements: !ruby/object:Gem::Requirement
107
+ none: false
95
108
  requirements:
96
109
  - - ~>
97
110
  - !ruby/object:Gem::Version
@@ -99,48 +112,55 @@ dependencies:
99
112
  - !ruby/object:Gem::Dependency
100
113
  name: mediashelf-loggable
101
114
  requirement: !ruby/object:Gem::Requirement
115
+ none: false
102
116
  requirements:
103
- - - '>='
117
+ - - ! '>='
104
118
  - !ruby/object:Gem::Version
105
119
  version: '0'
106
120
  type: :runtime
107
121
  prerelease: false
108
122
  version_requirements: !ruby/object:Gem::Requirement
123
+ none: false
109
124
  requirements:
110
- - - '>='
125
+ - - ! '>='
111
126
  - !ruby/object:Gem::Version
112
127
  version: '0'
113
128
  - !ruby/object:Gem::Dependency
114
129
  name: rubydora
115
130
  requirement: !ruby/object:Gem::Requirement
131
+ none: false
116
132
  requirements:
117
133
  - - ~>
118
134
  - !ruby/object:Gem::Version
119
- version: '1.5'
135
+ version: '1.6'
120
136
  type: :runtime
121
137
  prerelease: false
122
138
  version_requirements: !ruby/object:Gem::Requirement
139
+ none: false
123
140
  requirements:
124
141
  - - ~>
125
142
  - !ruby/object:Gem::Version
126
- version: '1.5'
143
+ version: '1.6'
127
144
  - !ruby/object:Gem::Dependency
128
145
  name: rdf
129
146
  requirement: !ruby/object:Gem::Requirement
147
+ none: false
130
148
  requirements:
131
- - - '>='
149
+ - - ! '>='
132
150
  - !ruby/object:Gem::Version
133
151
  version: '0'
134
152
  type: :runtime
135
153
  prerelease: false
136
154
  version_requirements: !ruby/object:Gem::Requirement
155
+ none: false
137
156
  requirements:
138
- - - '>='
157
+ - - ! '>='
139
158
  - !ruby/object:Gem::Version
140
159
  version: '0'
141
160
  - !ruby/object:Gem::Dependency
142
161
  name: rdf-rdfxml
143
162
  requirement: !ruby/object:Gem::Requirement
163
+ none: false
144
164
  requirements:
145
165
  - - ~>
146
166
  - !ruby/object:Gem::Version
@@ -148,6 +168,7 @@ dependencies:
148
168
  type: :runtime
149
169
  prerelease: false
150
170
  version_requirements: !ruby/object:Gem::Requirement
171
+ none: false
151
172
  requirements:
152
173
  - - ~>
153
174
  - !ruby/object:Gem::Version
@@ -155,141 +176,161 @@ dependencies:
155
176
  - !ruby/object:Gem::Dependency
156
177
  name: deprecation
157
178
  requirement: !ruby/object:Gem::Requirement
179
+ none: false
158
180
  requirements:
159
- - - '>='
181
+ - - ! '>='
160
182
  - !ruby/object:Gem::Version
161
183
  version: '0'
162
184
  type: :runtime
163
185
  prerelease: false
164
186
  version_requirements: !ruby/object:Gem::Requirement
187
+ none: false
165
188
  requirements:
166
- - - '>='
189
+ - - ! '>='
167
190
  - !ruby/object:Gem::Version
168
191
  version: '0'
169
192
  - !ruby/object:Gem::Dependency
170
193
  name: rdoc
171
194
  requirement: !ruby/object:Gem::Requirement
195
+ none: false
172
196
  requirements:
173
- - - '>='
197
+ - - ! '>='
174
198
  - !ruby/object:Gem::Version
175
199
  version: '0'
176
200
  type: :development
177
201
  prerelease: false
178
202
  version_requirements: !ruby/object:Gem::Requirement
203
+ none: false
179
204
  requirements:
180
- - - '>='
205
+ - - ! '>='
181
206
  - !ruby/object:Gem::Version
182
207
  version: '0'
183
208
  - !ruby/object:Gem::Dependency
184
209
  name: yard
185
210
  requirement: !ruby/object:Gem::Requirement
211
+ none: false
186
212
  requirements:
187
- - - '>='
213
+ - - ! '>='
188
214
  - !ruby/object:Gem::Version
189
215
  version: '0'
190
216
  type: :development
191
217
  prerelease: false
192
218
  version_requirements: !ruby/object:Gem::Requirement
219
+ none: false
193
220
  requirements:
194
- - - '>='
221
+ - - ! '>='
195
222
  - !ruby/object:Gem::Version
196
223
  version: '0'
197
224
  - !ruby/object:Gem::Dependency
198
225
  name: RedCloth
199
226
  requirement: !ruby/object:Gem::Requirement
227
+ none: false
200
228
  requirements:
201
- - - '>='
229
+ - - ! '>='
202
230
  - !ruby/object:Gem::Version
203
231
  version: '0'
204
232
  type: :development
205
233
  prerelease: false
206
234
  version_requirements: !ruby/object:Gem::Requirement
235
+ none: false
207
236
  requirements:
208
- - - '>='
237
+ - - ! '>='
209
238
  - !ruby/object:Gem::Version
210
239
  version: '0'
211
240
  - !ruby/object:Gem::Dependency
212
241
  name: rake
213
242
  requirement: !ruby/object:Gem::Requirement
243
+ none: false
214
244
  requirements:
215
- - - '>='
245
+ - - ! '>='
216
246
  - !ruby/object:Gem::Version
217
247
  version: '0'
218
248
  type: :development
219
249
  prerelease: false
220
250
  version_requirements: !ruby/object:Gem::Requirement
251
+ none: false
221
252
  requirements:
222
- - - '>='
253
+ - - ! '>='
223
254
  - !ruby/object:Gem::Version
224
255
  version: '0'
225
256
  - !ruby/object:Gem::Dependency
226
257
  name: jettywrapper
227
258
  requirement: !ruby/object:Gem::Requirement
259
+ none: false
228
260
  requirements:
229
- - - '>='
261
+ - - ! '>='
230
262
  - !ruby/object:Gem::Version
231
263
  version: 1.4.0
232
264
  type: :development
233
265
  prerelease: false
234
266
  version_requirements: !ruby/object:Gem::Requirement
267
+ none: false
235
268
  requirements:
236
- - - '>='
269
+ - - ! '>='
237
270
  - !ruby/object:Gem::Version
238
271
  version: 1.4.0
239
272
  - !ruby/object:Gem::Dependency
240
273
  name: rspec
241
274
  requirement: !ruby/object:Gem::Requirement
275
+ none: false
242
276
  requirements:
243
- - - '>='
277
+ - - ! '>='
244
278
  - !ruby/object:Gem::Version
245
279
  version: 2.9.0
246
280
  type: :development
247
281
  prerelease: false
248
282
  version_requirements: !ruby/object:Gem::Requirement
283
+ none: false
249
284
  requirements:
250
- - - '>='
285
+ - - ! '>='
251
286
  - !ruby/object:Gem::Version
252
287
  version: 2.9.0
253
288
  - !ruby/object:Gem::Dependency
254
289
  name: equivalent-xml
255
290
  requirement: !ruby/object:Gem::Requirement
291
+ none: false
256
292
  requirements:
257
- - - '>='
293
+ - - ! '>='
258
294
  - !ruby/object:Gem::Version
259
295
  version: '0'
260
296
  type: :development
261
297
  prerelease: false
262
298
  version_requirements: !ruby/object:Gem::Requirement
299
+ none: false
263
300
  requirements:
264
- - - '>='
301
+ - - ! '>='
265
302
  - !ruby/object:Gem::Version
266
303
  version: '0'
267
304
  - !ruby/object:Gem::Dependency
268
305
  name: rest-client
269
306
  requirement: !ruby/object:Gem::Requirement
307
+ none: false
270
308
  requirements:
271
- - - '>='
309
+ - - ! '>='
272
310
  - !ruby/object:Gem::Version
273
311
  version: '0'
274
312
  type: :development
275
313
  prerelease: false
276
314
  version_requirements: !ruby/object:Gem::Requirement
315
+ none: false
277
316
  requirements:
278
- - - '>='
317
+ - - ! '>='
279
318
  - !ruby/object:Gem::Version
280
319
  version: '0'
281
320
  - !ruby/object:Gem::Dependency
282
321
  name: webmock
283
322
  requirement: !ruby/object:Gem::Requirement
323
+ none: false
284
324
  requirements:
285
- - - '>='
325
+ - - ! '>='
286
326
  - !ruby/object:Gem::Version
287
327
  version: '0'
288
328
  type: :development
289
329
  prerelease: false
290
330
  version_requirements: !ruby/object:Gem::Requirement
331
+ none: false
291
332
  requirements:
292
- - - '>='
333
+ - - ! '>='
293
334
  - !ruby/object:Gem::Version
294
335
  version: '0'
295
336
  description: ActiveFedora provides for creating and managing objects in the Fedora
@@ -330,6 +371,7 @@ files:
330
371
  - lib/active_fedora/associations/has_many_association.rb
331
372
  - lib/active_fedora/attributes.rb
332
373
  - lib/active_fedora/attributes/serializers.rb
374
+ - lib/active_fedora/auditable.rb
333
375
  - lib/active_fedora/base.rb
334
376
  - lib/active_fedora/callbacks.rb
335
377
  - lib/active_fedora/config.rb
@@ -391,6 +433,7 @@ files:
391
433
  - lib/generators/active_fedora/config/fedora/templates/fedora_conf/conf/development/fedora.fcfg
392
434
  - lib/generators/active_fedora/config/fedora/templates/fedora_conf/conf/test/fedora.fcfg
393
435
  - lib/generators/active_fedora/config/solr/solr_generator.rb
436
+ - lib/generators/active_fedora/config/solr/templates/jetty.yml
394
437
  - lib/generators/active_fedora/config/solr/templates/solr.yml
395
438
  - lib/generators/active_fedora/config/solr/templates/solr_conf/conf/schema.xml
396
439
  - lib/generators/active_fedora/config/solr/templates/solr_conf/conf/solrconfig.xml
@@ -404,9 +447,8 @@ files:
404
447
  - script/console
405
448
  - script/destroy
406
449
  - script/generate
407
- - solr/conf/schema.xml
408
- - solr/conf/solrconfig.xml
409
450
  - spec/config_helper.rb
451
+ - spec/fixtures/auditable.foxml.xml
410
452
  - spec/fixtures/changeme155.xml
411
453
  - spec/fixtures/damsObjectModel.xml
412
454
  - spec/fixtures/dino.jpg
@@ -497,6 +539,7 @@ files:
497
539
  - spec/support/mock_fedora.rb
498
540
  - spec/unit/active_fedora_spec.rb
499
541
  - spec/unit/association_proxy_spec.rb
542
+ - spec/unit/auditable_spec.rb
500
543
  - spec/unit/base_active_model_spec.rb
501
544
  - spec/unit/base_cma_spec.rb
502
545
  - spec/unit/base_datastream_management_spec.rb
@@ -512,6 +555,7 @@ files:
512
555
  - spec/unit/datastream_spec.rb
513
556
  - spec/unit/datastreams_spec.rb
514
557
  - spec/unit/file_configurator_spec.rb
558
+ - spec/unit/has_and_belongs_to_many_collection_spec.rb
515
559
  - spec/unit/has_many_collection_spec.rb
516
560
  - spec/unit/inheritance_spec.rb
517
561
  - spec/unit/model_spec.rb
@@ -545,29 +589,34 @@ files:
545
589
  - spec/unit/validations_spec.rb
546
590
  homepage: https://github.com/projecthydra/active_fedora
547
591
  licenses: []
548
- metadata: {}
549
592
  post_install_message:
550
593
  rdoc_options: []
551
594
  require_paths:
552
595
  - lib
553
596
  required_ruby_version: !ruby/object:Gem::Requirement
597
+ none: false
554
598
  requirements:
555
- - - '>='
599
+ - - ! '>='
556
600
  - !ruby/object:Gem::Version
557
601
  version: 1.9.3
558
602
  required_rubygems_version: !ruby/object:Gem::Requirement
603
+ none: false
559
604
  requirements:
560
- - - '>='
605
+ - - ! '>='
561
606
  - !ruby/object:Gem::Version
562
607
  version: '0'
608
+ segments:
609
+ - 0
610
+ hash: -3481372531749864100
563
611
  requirements: []
564
612
  rubyforge_project:
565
- rubygems_version: 2.0.0
613
+ rubygems_version: 1.8.25
566
614
  signing_key:
567
- specification_version: 4
615
+ specification_version: 3
568
616
  summary: A convenience libary for manipulating documents in the Fedora Repository.
569
617
  test_files:
570
618
  - spec/config_helper.rb
619
+ - spec/fixtures/auditable.foxml.xml
571
620
  - spec/fixtures/changeme155.xml
572
621
  - spec/fixtures/damsObjectModel.xml
573
622
  - spec/fixtures/dino.jpg
@@ -658,6 +707,7 @@ test_files:
658
707
  - spec/support/mock_fedora.rb
659
708
  - spec/unit/active_fedora_spec.rb
660
709
  - spec/unit/association_proxy_spec.rb
710
+ - spec/unit/auditable_spec.rb
661
711
  - spec/unit/base_active_model_spec.rb
662
712
  - spec/unit/base_cma_spec.rb
663
713
  - spec/unit/base_datastream_management_spec.rb
@@ -673,6 +723,7 @@ test_files:
673
723
  - spec/unit/datastream_spec.rb
674
724
  - spec/unit/datastreams_spec.rb
675
725
  - spec/unit/file_configurator_spec.rb
726
+ - spec/unit/has_and_belongs_to_many_collection_spec.rb
676
727
  - spec/unit/has_many_collection_spec.rb
677
728
  - spec/unit/inheritance_spec.rb
678
729
  - spec/unit/model_spec.rb