- What is the purpose for maintaining two lists where the only difference is whether an item can repeat?
- It seems that the use case for order is more common than the use case for unordered sets.
- The use case for an unordered set can be achieved using ordered lists code.
- Why not make ordered lists the default?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module Hydra | |
| module Collections | |
| class AddMembersToCollection | |
| ## | |
| # Add members to a collection. | |
| # | |
| # @param [Collection] :collection to which to add members | |
| # @param [Object] :new_member_ids being added | |
| # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # ----------------------------------- PCDM example adding a file to an object --------------------------------- | |
| require "hydra/pcdm" | |
| obj1 = Hydra::PCDM::Object.create | |
| file1 = File.open("war_and_peace.pdf","r") | |
| pcdm_file = Hydra::PCDM::File.new | |
| pcdm_file.content = file1 | |
| obj1.files << pcdm_file |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class ReindeerGroup < ActiveFedora::Base | |
| # create a basic container | |
| contains :info, class_name: 'Note' | |
| # create a direct container | |
| directly_contains :creator, has_member_relation: ::RDF::DC.creator, | |
| class_name: 'Person' | |
| # create an indirect container via active-fedora gem | |
| indirectly_contains :related_objects, has_member_relation: RDF::Vocab::ORE.aggregates, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class TestParent | |
| MY_CONSTANT = "Hello" | |
| class << self | |
| MY_EIGAN_CONSTANT = "World" | |
| end | |
| end | |
| class TestChild < TestParent | |
| begin |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| context "when multiple files are uploaded together" do | |
| let(:mock1) { GenericFile.new(id: 'test_1') } | |
| # let(:mock2) { GenericFile.new(id: 'test_2') } | |
| # let(:mock3) { GenericFile.new(id: 'test_3') } | |
| let(:file1) { fixture_file_upload('/world.png', 'image/png') } | |
| let(:file2) { fixture_file_upload('/image.jpg', 'image/jpg') } | |
| let(:file3) { fixture_file_upload('/4-20.png', 'image/png') } | |
| let(:batch1) { Batch.create } | |
| let(:batch1_id) { batch1.id } | |
| let(:batch2) { Batch.create } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| describe 'upload files to collection', :js do | |
| it "preselects the collection we are uploading files to" do | |
| attach_file('files[]', File.dirname(__FILE__) + '/../../spec/fixtures/image.jp2') | |
| attach_file('files[]', File.dirname(__FILE__) + '/../../spec/fixtures/jp2_fits.xml') | |
| expect(page).to have_css('button#main_upload_start[disabled]') | |
| first(:checkbox, 'terms_of_service').click |
- Configure minimagick to use posix-spawn instead of popen3 (rake task must be run). [Anna Headley]
- Citation config (TODO: flesh this out at time of next release)
- Lock manager (TODO: flesh this out at time of next release)
- Geonames username (TODO: flesh this out at time of next release) -- NOTE: must be overridden in config
- Add configuration allowing select menu on batch upload to upload files to a collection. [E. Lynette Rayle]
- Add button 'Upload files' on collection show page which goes to batch upload with collection select menu set to the calling collection [E. Lynette Rayle]
- Pin active-fedora version to ~>9.4 [E. Lynette Rayle]
- Pin hydra-collections to >=5.0.3, < 6.0 [E. Lynette Rayle]
- Pin hydra-jetty to 8.6.0, which pins Fedora to 4.4 [Adam Wead]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # How do ordered_members and members behave and interact | |
| # Setup | |
| col1 = Hydra::Works::Collection.new(id: 'c1') | |
| wrk1 = Hydra::Works::Work.new(id: 'w1') | |
| wrk2 = Hydra::Works::Work.new(id: 'w2') | |
| wrk3 = Hydra::Works::Work.new(id: 'w3') | |
| wrk4 = Hydra::Works::Work.new(id: 'w4') | |
| # 1. adding to members does NOT add to ordered members |
