active-fedora 9.1.2 → 9.2.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (101) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +1 -1
  3. data/Gemfile +1 -0
  4. data/History.txt +90 -0
  5. data/active-fedora.gemspec +2 -2
  6. data/lib/active_fedora.rb +17 -3
  7. data/lib/active_fedora/associations.rb +77 -0
  8. data/lib/active_fedora/associations/association.rb +2 -2
  9. data/lib/active_fedora/associations/basic_contains_association.rb +52 -0
  10. data/lib/active_fedora/associations/builder/directly_contains.rb +23 -0
  11. data/lib/active_fedora/associations/builder/directly_contains_one.rb +44 -0
  12. data/lib/active_fedora/associations/builder/has_and_belongs_to_many.rb +2 -23
  13. data/lib/active_fedora/associations/builder/indirectly_contains.rb +26 -0
  14. data/lib/active_fedora/associations/builder/property.rb +10 -0
  15. data/lib/active_fedora/associations/collection_association.rb +42 -45
  16. data/lib/active_fedora/associations/collection_proxy.rb +6 -0
  17. data/lib/active_fedora/associations/contained_finder.rb +41 -0
  18. data/lib/active_fedora/associations/container_proxy.rb +9 -0
  19. data/lib/active_fedora/associations/contains_association.rb +20 -38
  20. data/lib/active_fedora/associations/delete_proxy.rb +28 -0
  21. data/lib/active_fedora/associations/directly_contains_association.rb +56 -0
  22. data/lib/active_fedora/associations/directly_contains_one_association.rb +113 -0
  23. data/lib/active_fedora/associations/has_and_belongs_to_many_association.rb +6 -14
  24. data/lib/active_fedora/associations/has_many_association.rb +0 -3
  25. data/lib/active_fedora/associations/id_composite.rb +30 -0
  26. data/lib/active_fedora/associations/indirectly_contains_association.rb +90 -0
  27. data/lib/active_fedora/associations/rdf.rb +8 -4
  28. data/lib/active_fedora/associations/record_composite.rb +39 -0
  29. data/lib/active_fedora/attached_files.rb +1 -1
  30. data/lib/active_fedora/attributes.rb +28 -10
  31. data/lib/active_fedora/attributes/active_triple_attribute.rb +17 -0
  32. data/lib/active_fedora/attributes/om_attribute.rb +29 -0
  33. data/lib/active_fedora/attributes/rdf_datastream_attribute.rb +47 -0
  34. data/lib/active_fedora/attributes/stream_attribute.rb +46 -0
  35. data/lib/active_fedora/autosave_association.rb +2 -2
  36. data/lib/active_fedora/base.rb +3 -0
  37. data/lib/active_fedora/containers/container.rb +38 -0
  38. data/lib/active_fedora/containers/direct_container.rb +5 -0
  39. data/lib/active_fedora/containers/indirect_container.rb +7 -0
  40. data/lib/active_fedora/core.rb +4 -48
  41. data/lib/active_fedora/delegated_attribute.rb +5 -98
  42. data/lib/active_fedora/fedora.rb +1 -1
  43. data/lib/active_fedora/fedora_attributes.rb +4 -26
  44. data/lib/active_fedora/file.rb +87 -159
  45. data/lib/active_fedora/file/attributes.rb +63 -0
  46. data/lib/active_fedora/file/streaming.rb +46 -0
  47. data/lib/active_fedora/file_relation.rb +7 -0
  48. data/lib/active_fedora/identifiable.rb +87 -0
  49. data/lib/active_fedora/inbound_relation_connection.rb +21 -0
  50. data/lib/active_fedora/indexers.rb +10 -0
  51. data/lib/active_fedora/indexers/global_indexer.rb +30 -0
  52. data/lib/active_fedora/indexers/null_indexer.rb +12 -0
  53. data/lib/active_fedora/indexing/map.rb +4 -5
  54. data/lib/active_fedora/indexing_service.rb +3 -22
  55. data/lib/active_fedora/loadable_from_json.rb +8 -0
  56. data/lib/active_fedora/pathing.rb +24 -0
  57. data/lib/active_fedora/persistence.rb +15 -8
  58. data/lib/active_fedora/rdf.rb +2 -0
  59. data/lib/active_fedora/rdf/fcrepo4.rb +1 -0
  60. data/lib/active_fedora/rdf/field_map.rb +90 -0
  61. data/lib/active_fedora/rdf/field_map_entry.rb +28 -0
  62. data/lib/active_fedora/rdf/indexing_service.rb +9 -23
  63. data/lib/active_fedora/rdf/rdf_datastream.rb +1 -2
  64. data/lib/active_fedora/reflection.rb +16 -15
  65. data/lib/active_fedora/relation/delegation.rb +15 -4
  66. data/lib/active_fedora/relation/finder_methods.rb +4 -4
  67. data/lib/active_fedora/schema.rb +26 -0
  68. data/lib/active_fedora/schema_indexing_strategy.rb +25 -0
  69. data/lib/active_fedora/simple_datastream.rb +2 -2
  70. data/lib/active_fedora/solr_query_builder.rb +3 -2
  71. data/lib/active_fedora/version.rb +1 -1
  72. data/lib/active_fedora/with_metadata.rb +1 -1
  73. data/spec/integration/associations/rdf_spec.rb +49 -0
  74. data/spec/integration/base_spec.rb +19 -0
  75. data/spec/integration/belongs_to_association_spec.rb +6 -6
  76. data/spec/integration/collection_association_spec.rb +4 -4
  77. data/spec/integration/complex_rdf_datastream_spec.rb +12 -12
  78. data/spec/integration/datastream_rdf_nested_attributes_spec.rb +1 -1
  79. data/spec/integration/direct_container_spec.rb +254 -0
  80. data/spec/integration/directly_contains_one_association_spec.rb +102 -0
  81. data/spec/integration/file_spec.rb +16 -5
  82. data/spec/integration/has_many_associations_spec.rb +93 -58
  83. data/spec/integration/indirect_container_spec.rb +251 -0
  84. data/spec/integration/rdf_nested_attributes_spec.rb +1 -1
  85. data/spec/integration/relation_spec.rb +43 -27
  86. data/spec/spec_helper.rb +1 -1
  87. data/spec/unit/attributes_spec.rb +6 -6
  88. data/spec/unit/collection_proxy_spec.rb +28 -0
  89. data/spec/unit/file_spec.rb +1 -1
  90. data/spec/unit/files_hash_spec.rb +4 -4
  91. data/spec/unit/has_and_belongs_to_many_association_spec.rb +11 -9
  92. data/spec/unit/indexers/global_indexer_spec.rb +41 -0
  93. data/spec/unit/indexing_service_spec.rb +0 -21
  94. data/spec/unit/loadable_from_json_spec.rb +31 -0
  95. data/spec/unit/pathing_spec.rb +37 -0
  96. data/spec/unit/rdf/indexing_service_spec.rb +3 -3
  97. data/spec/unit/rdf_resource_datastream_spec.rb +26 -7
  98. data/spec/unit/schema_indexing_strategy_spec.rb +68 -0
  99. data/spec/unit/solr_query_builder_spec.rb +1 -1
  100. data/spec/unit/solr_service_spec.rb +1 -1
  101. metadata +49 -8
@@ -9,7 +9,7 @@ describe ActiveFedora::SolrQueryBuilder do
9
9
 
10
10
  describe '#construct_query_for_ids' do
11
11
  it "should generate a useable solr query from an array of Fedora ids" do
12
- expect(ActiveFedora::SolrQueryBuilder.construct_query_for_ids(["my:_ID1_", "my:_ID2_", "my:_ID3_"])).to eq '_query_:"{!raw f=id}my:_ID1_" OR _query_:"{!raw f=id}my:_ID2_" OR _query_:"{!raw f=id}my:_ID3_"'
12
+ expect(ActiveFedora::SolrQueryBuilder.construct_query_for_ids(["my:_ID1_", "my:_ID2_", "my:_ID3_"])).to eq '{!terms f=id}my:_ID1_,my:_ID2_,my:_ID3_'
13
13
 
14
14
  end
15
15
  it "should return a valid solr query even if given an empty array as input" do
@@ -37,7 +37,7 @@ describe ActiveFedora::SolrService do
37
37
  describe '#construct_query_for_pids' do
38
38
  it "should generate a useable solr query from an array of Fedora ids" do
39
39
  expect(Deprecation).to receive(:warn)
40
- expect(ActiveFedora::SolrService.construct_query_for_pids(["my:_ID1_", "my:_ID2_", "my:_ID3_"])).to eq '_query_:"{!raw f=id}my:_ID1_" OR _query_:"{!raw f=id}my:_ID2_" OR _query_:"{!raw f=id}my:_ID3_"'
40
+ expect(ActiveFedora::SolrService.construct_query_for_pids(["my:_ID1_", "my:_ID2_", "my:_ID3_"])).to eq '{!terms f=id}my:_ID1_,my:_ID2_,my:_ID3_'
41
41
 
42
42
  end
43
43
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active-fedora
3
3
  version: !ruby/object:Gem::Version
4
- version: 9.1.2
4
+ version: 9.2.0.rc1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Zumwalt
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2015-06-11 00:00:00.000000000 Z
13
+ date: 2015-06-30 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rsolr
@@ -74,14 +74,14 @@ dependencies:
74
74
  requirements:
75
75
  - - "~>"
76
76
  - !ruby/object:Gem::Version
77
- version: 0.6.0
77
+ version: 0.7.1
78
78
  type: :runtime
79
79
  prerelease: false
80
80
  version_requirements: !ruby/object:Gem::Requirement
81
81
  requirements:
82
82
  - - "~>"
83
83
  - !ruby/object:Gem::Version
84
- version: 0.6.0
84
+ version: 0.7.1
85
85
  - !ruby/object:Gem::Dependency
86
86
  name: rdf-rdfxml
87
87
  requirement: !ruby/object:Gem::Requirement
@@ -130,14 +130,14 @@ dependencies:
130
130
  requirements:
131
131
  - - "~>"
132
132
  - !ruby/object:Gem::Version
133
- version: 0.3.0
133
+ version: 0.3.1
134
134
  type: :runtime
135
135
  prerelease: false
136
136
  version_requirements: !ruby/object:Gem::Requirement
137
137
  requirements:
138
138
  - - "~>"
139
139
  - !ruby/object:Gem::Version
140
- version: 0.3.0
140
+ version: 0.3.1
141
141
  - !ruby/object:Gem::Dependency
142
142
  name: rdoc
143
143
  requirement: !ruby/object:Gem::Requirement
@@ -288,22 +288,34 @@ files:
288
288
  - lib/active_fedora/associations.rb
289
289
  - lib/active_fedora/associations/association.rb
290
290
  - lib/active_fedora/associations/association_scope.rb
291
+ - lib/active_fedora/associations/basic_contains_association.rb
291
292
  - lib/active_fedora/associations/belongs_to_association.rb
292
293
  - lib/active_fedora/associations/builder/association.rb
293
294
  - lib/active_fedora/associations/builder/belongs_to.rb
294
295
  - lib/active_fedora/associations/builder/collection_association.rb
295
296
  - lib/active_fedora/associations/builder/contains.rb
297
+ - lib/active_fedora/associations/builder/directly_contains.rb
298
+ - lib/active_fedora/associations/builder/directly_contains_one.rb
296
299
  - lib/active_fedora/associations/builder/has_and_belongs_to_many.rb
297
300
  - lib/active_fedora/associations/builder/has_many.rb
301
+ - lib/active_fedora/associations/builder/indirectly_contains.rb
298
302
  - lib/active_fedora/associations/builder/property.rb
299
303
  - lib/active_fedora/associations/builder/singular_association.rb
300
304
  - lib/active_fedora/associations/builder/singular_property.rb
301
305
  - lib/active_fedora/associations/collection_association.rb
302
306
  - lib/active_fedora/associations/collection_proxy.rb
307
+ - lib/active_fedora/associations/contained_finder.rb
308
+ - lib/active_fedora/associations/container_proxy.rb
303
309
  - lib/active_fedora/associations/contains_association.rb
310
+ - lib/active_fedora/associations/delete_proxy.rb
311
+ - lib/active_fedora/associations/directly_contains_association.rb
312
+ - lib/active_fedora/associations/directly_contains_one_association.rb
304
313
  - lib/active_fedora/associations/has_and_belongs_to_many_association.rb
305
314
  - lib/active_fedora/associations/has_many_association.rb
315
+ - lib/active_fedora/associations/id_composite.rb
316
+ - lib/active_fedora/associations/indirectly_contains_association.rb
306
317
  - lib/active_fedora/associations/rdf.rb
318
+ - lib/active_fedora/associations/record_composite.rb
307
319
  - lib/active_fedora/associations/singular_association.rb
308
320
  - lib/active_fedora/associations/singular_rdf.rb
309
321
  - lib/active_fedora/attached_files.rb
@@ -312,10 +324,14 @@ files:
312
324
  - lib/active_fedora/attribute_methods/read.rb
313
325
  - lib/active_fedora/attribute_methods/write.rb
314
326
  - lib/active_fedora/attributes.rb
327
+ - lib/active_fedora/attributes/active_triple_attribute.rb
315
328
  - lib/active_fedora/attributes/node_config.rb
329
+ - lib/active_fedora/attributes/om_attribute.rb
316
330
  - lib/active_fedora/attributes/primary_key.rb
317
331
  - lib/active_fedora/attributes/property_builder.rb
332
+ - lib/active_fedora/attributes/rdf_datastream_attribute.rb
318
333
  - lib/active_fedora/attributes/serializers.rb
334
+ - lib/active_fedora/attributes/stream_attribute.rb
319
335
  - lib/active_fedora/autosave_association.rb
320
336
  - lib/active_fedora/base.rb
321
337
  - lib/active_fedora/caching_connection.rb
@@ -324,6 +340,9 @@ files:
324
340
  - lib/active_fedora/clean_connection.rb
325
341
  - lib/active_fedora/cleaner.rb
326
342
  - lib/active_fedora/config.rb
343
+ - lib/active_fedora/containers/container.rb
344
+ - lib/active_fedora/containers/direct_container.rb
345
+ - lib/active_fedora/containers/indirect_container.rb
327
346
  - lib/active_fedora/core.rb
328
347
  - lib/active_fedora/core/fedora_id_translator.rb
329
348
  - lib/active_fedora/core/fedora_uri_translator.rb
@@ -335,10 +354,18 @@ files:
335
354
  - lib/active_fedora/fedora.rb
336
355
  - lib/active_fedora/fedora_attributes.rb
337
356
  - lib/active_fedora/file.rb
357
+ - lib/active_fedora/file/attributes.rb
358
+ - lib/active_fedora/file/streaming.rb
338
359
  - lib/active_fedora/file_configurator.rb
339
360
  - lib/active_fedora/file_path_builder.rb
361
+ - lib/active_fedora/file_relation.rb
340
362
  - lib/active_fedora/files_hash.rb
341
363
  - lib/active_fedora/fixity_service.rb
364
+ - lib/active_fedora/identifiable.rb
365
+ - lib/active_fedora/inbound_relation_connection.rb
366
+ - lib/active_fedora/indexers.rb
367
+ - lib/active_fedora/indexers/global_indexer.rb
368
+ - lib/active_fedora/indexers/null_indexer.rb
342
369
  - lib/active_fedora/indexing.rb
343
370
  - lib/active_fedora/indexing/map.rb
344
371
  - lib/active_fedora/indexing_service.rb
@@ -354,6 +381,7 @@ files:
354
381
  - lib/active_fedora/nom_datastream.rb
355
382
  - lib/active_fedora/null_relation.rb
356
383
  - lib/active_fedora/om_datastream.rb
384
+ - lib/active_fedora/pathing.rb
357
385
  - lib/active_fedora/persistence.rb
358
386
  - lib/active_fedora/predicates.rb
359
387
  - lib/active_fedora/profile_indexing_service.rb
@@ -366,6 +394,8 @@ files:
366
394
  - lib/active_fedora/rdf/datastream_indexing.rb
367
395
  - lib/active_fedora/rdf/fcrepo.rb
368
396
  - lib/active_fedora/rdf/fcrepo4.rb
397
+ - lib/active_fedora/rdf/field_map.rb
398
+ - lib/active_fedora/rdf/field_map_entry.rb
369
399
  - lib/active_fedora/rdf/indexing_service.rb
370
400
  - lib/active_fedora/rdf/ldp.rb
371
401
  - lib/active_fedora/rdf/ntriples_rdf_datastream.rb
@@ -385,6 +415,8 @@ files:
385
415
  - lib/active_fedora/rspec_matchers/belong_to_associated_active_fedora_object_matcher.rb
386
416
  - lib/active_fedora/rspec_matchers/have_many_associated_active_fedora_objects_matcher.rb
387
417
  - lib/active_fedora/rspec_matchers/have_predicate_matcher.rb
418
+ - lib/active_fedora/schema.rb
419
+ - lib/active_fedora/schema_indexing_strategy.rb
388
420
  - lib/active_fedora/scoping.rb
389
421
  - lib/active_fedora/scoping/default.rb
390
422
  - lib/active_fedora/scoping/named.rb
@@ -437,6 +469,7 @@ files:
437
469
  - spec/fixtures/rails_root/config/solr_mappings_af_0.1.yml
438
470
  - spec/fixtures/rails_root/config/solr_mappings_bl_2.4.yml
439
471
  - spec/fixtures/solr_rdf_descMetadata.nt
472
+ - spec/integration/associations/rdf_spec.rb
440
473
  - spec/integration/associations_spec.rb
441
474
  - spec/integration/attached_files_spec.rb
442
475
  - spec/integration/attributes_spec.rb
@@ -450,6 +483,8 @@ files:
450
483
  - spec/integration/complex_rdf_datastream_spec.rb
451
484
  - spec/integration/datastream_rdf_nested_attributes_spec.rb
452
485
  - spec/integration/delete_all_spec.rb
486
+ - spec/integration/direct_container_spec.rb
487
+ - spec/integration/directly_contains_one_association_spec.rb
453
488
  - spec/integration/eradicate_spec.rb
454
489
  - spec/integration/fedora_solr_sync_spec.rb
455
490
  - spec/integration/field_to_solr_name_spec.rb
@@ -459,6 +494,7 @@ files:
459
494
  - spec/integration/has_and_belongs_to_many_associations_spec.rb
460
495
  - spec/integration/has_many_associations_spec.rb
461
496
  - spec/integration/indexing_spec.rb
497
+ - spec/integration/indirect_container_spec.rb
462
498
  - spec/integration/json_serialization_spec.rb
463
499
  - spec/integration/model_spec.rb
464
500
  - spec/integration/nested_attribute_spec.rb
@@ -496,6 +532,7 @@ files:
496
532
  - spec/unit/callback_spec.rb
497
533
  - spec/unit/change_set_spec.rb
498
534
  - spec/unit/code_configurator_spec.rb
535
+ - spec/unit/collection_proxy_spec.rb
499
536
  - spec/unit/config_spec.rb
500
537
  - spec/unit/core/fedora_id_translator_spec.rb
501
538
  - spec/unit/core/fedora_uri_translator_spec.rb
@@ -508,15 +545,18 @@ files:
508
545
  - spec/unit/forbidden_attributes_protection_spec.rb
509
546
  - spec/unit/has_and_belongs_to_many_association_spec.rb
510
547
  - spec/unit/has_many_association_spec.rb
548
+ - spec/unit/indexers/global_indexer_spec.rb
511
549
  - spec/unit/indexing_service_spec.rb
512
550
  - spec/unit/indexing_spec.rb
513
551
  - spec/unit/inheritance_spec.rb
514
552
  - spec/unit/ldp_resource_spec.rb
553
+ - spec/unit/loadable_from_json_spec.rb
515
554
  - spec/unit/logger_spec.rb
516
555
  - spec/unit/model_spec.rb
517
556
  - spec/unit/nom_datastream_spec.rb
518
557
  - spec/unit/ntriples_datastream_spec.rb
519
558
  - spec/unit/om_datastream_spec.rb
559
+ - spec/unit/pathing_spec.rb
520
560
  - spec/unit/persistence_spec.rb
521
561
  - spec/unit/predicates_spec.rb
522
562
  - spec/unit/property_predicate_spec.rb
@@ -534,6 +574,7 @@ files:
534
574
  - spec/unit/rspec_matchers/belong_to_associated_active_fedora_object_matcher_spec.rb
535
575
  - spec/unit/rspec_matchers/have_many_associated_active_fedora_objects_matcher_spec.rb
536
576
  - spec/unit/rspec_matchers/have_predicate_matcher_spec.rb
577
+ - spec/unit/schema_indexing_strategy_spec.rb
537
578
  - spec/unit/serializers_spec.rb
538
579
  - spec/unit/simple_datastream_spec.rb
539
580
  - spec/unit/solr_config_options_spec.rb
@@ -557,9 +598,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
557
598
  version: 1.9.3
558
599
  required_rubygems_version: !ruby/object:Gem::Requirement
559
600
  requirements:
560
- - - ">="
601
+ - - ">"
561
602
  - !ruby/object:Gem::Version
562
- version: '0'
603
+ version: 1.3.1
563
604
  requirements: []
564
605
  rubyforge_project:
565
606
  rubygems_version: 2.4.8