hydra-head 4.1.3 → 5.0.0.pre1
Sign up to get free protection for your applications and to get access to all the features.
- metadata +28 -617
- data/.gitignore +0 -73
- data/.gitmodules +0 -4
- data/Gemfile +0 -14
- data/HISTORY.textile +0 -99
- data/INSTALL_PREREQ.textile +0 -3
- data/LICENSE +0 -14
- data/README.textile +0 -129
- data/Rakefile +0 -5
- data/app/assets/images/hydra/powered_by_hydra.png +0 -0
- data/app/assets/images/hydra/search-button.png +0 -0
- data/app/assets/javascripts/date-picker/booking/index.html +0 -368
- data/app/assets/javascripts/date-picker/calendarHTML.txt +0 -84
- data/app/assets/javascripts/date-picker/css/datepicker.css +0 -511
- data/app/assets/javascripts/date-picker/css/demo.css +0 -229
- data/app/assets/javascripts/date-picker/index.html +0 -798
- data/app/assets/javascripts/date-picker/js/datepicker.js +0 -2898
- data/app/assets/javascripts/date-picker/js/datepicker.packed.js +0 -1
- data/app/assets/javascripts/date-picker/js/lang/ar.js +0 -9
- data/app/assets/javascripts/date-picker/js/lang/cs.js +0 -9
- data/app/assets/javascripts/date-picker/js/lang/da.js +0 -10
- data/app/assets/javascripts/date-picker/js/lang/de.js +0 -10
- data/app/assets/javascripts/date-picker/js/lang/en.js +0 -9
- data/app/assets/javascripts/date-picker/js/lang/eo.js +0 -13
- data/app/assets/javascripts/date-picker/js/lang/es.js +0 -9
- data/app/assets/javascripts/date-picker/js/lang/et.js +0 -23
- data/app/assets/javascripts/date-picker/js/lang/fi.js +0 -7
- data/app/assets/javascripts/date-picker/js/lang/fr.js +0 -69
- data/app/assets/javascripts/date-picker/js/lang/he.js +0 -9
- data/app/assets/javascripts/date-picker/js/lang/hu.js +0 -9
- data/app/assets/javascripts/date-picker/js/lang/id.js +0 -9
- data/app/assets/javascripts/date-picker/js/lang/it.js +0 -11
- data/app/assets/javascripts/date-picker/js/lang/kr.js +0 -9
- data/app/assets/javascripts/date-picker/js/lang/lt.js +0 -8
- data/app/assets/javascripts/date-picker/js/lang/lv.js +0 -9
- data/app/assets/javascripts/date-picker/js/lang/nl.js +0 -9
- data/app/assets/javascripts/date-picker/js/lang/no.js +0 -9
- data/app/assets/javascripts/date-picker/js/lang/pl.js +0 -10
- data/app/assets/javascripts/date-picker/js/lang/pt-br.js +0 -11
- data/app/assets/javascripts/date-picker/js/lang/pt.js +0 -9
- data/app/assets/javascripts/date-picker/js/lang/ru.js +0 -11
- data/app/assets/javascripts/date-picker/js/lang/se.js +0 -9
- data/app/assets/javascripts/date-picker/js/lang/si.js +0 -9
- data/app/assets/javascripts/date-picker/js/lang/tr.js +0 -9
- data/app/assets/javascripts/date-picker/language/index.html +0 -240
- data/app/assets/javascripts/date-picker/media/Thumbs.db +0 -0
- data/app/assets/javascripts/date-picker/media/backstripes.gif +0 -0
- data/app/assets/javascripts/date-picker/media/bg_header.jpg +0 -0
- data/app/assets/javascripts/date-picker/media/bullet1.gif +0 -0
- data/app/assets/javascripts/date-picker/media/bullet2.gif +0 -0
- data/app/assets/javascripts/date-picker/media/cal-grey.gif +0 -0
- data/app/assets/javascripts/date-picker/media/cal.gif +0 -0
- data/app/assets/javascripts/date-picker/media/gradient-e5e5e5-ffffff.gif +0 -0
- data/app/assets/javascripts/hydra/hydra-head.js +0 -195
- data/app/assets/javascripts/hydra/mediashelf.datepicker.js +0 -39
- data/app/assets/javascripts/hydra/mediashelf.placeholder.js +0 -67
- data/app/assets/javascripts/jquery.form.js +0 -1076
- data/app/assets/javascripts/jquery.ui.datepicker.js +0 -1793
- data/app/assets/javascripts/spin.min.js +0 -2
- data/app/assets/stylesheets/hydra/html_refactor.css +0 -79
- data/app/assets/stylesheets/hydra/hydrangea-split-button.css +0 -18
- data/app/assets/stylesheets/hydra/hydrangea.css +0 -288
- data/app/assets/stylesheets/hydra/ie-styles.css +0 -149
- data/app/assets/stylesheets/hydra/styles.css +0 -946
- data/app/assets/stylesheets/redmond/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/app/assets/stylesheets/redmond/images/ui-bg_flat_55_fbec88_40x100.png +0 -0
- data/app/assets/stylesheets/redmond/images/ui-bg_glass_75_d0e5f5_1x400.png +0 -0
- data/app/assets/stylesheets/redmond/images/ui-bg_glass_85_dfeffc_1x400.png +0 -0
- data/app/assets/stylesheets/redmond/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/app/assets/stylesheets/redmond/images/ui-bg_gloss-wave_55_5c9ccc_500x100.png +0 -0
- data/app/assets/stylesheets/redmond/images/ui-bg_inset-hard_100_f5f8f9_1x100.png +0 -0
- data/app/assets/stylesheets/redmond/images/ui-bg_inset-hard_100_fcfdfd_1x100.png +0 -0
- data/app/assets/stylesheets/redmond/images/ui-icons_217bc0_256x240.png +0 -0
- data/app/assets/stylesheets/redmond/images/ui-icons_2e83ff_256x240.png +0 -0
- data/app/assets/stylesheets/redmond/images/ui-icons_469bdd_256x240.png +0 -0
- data/app/assets/stylesheets/redmond/images/ui-icons_6da8d5_256x240.png +0 -0
- data/app/assets/stylesheets/redmond/images/ui-icons_cd0a0a_256x240.png +0 -0
- data/app/assets/stylesheets/redmond/images/ui-icons_d8e7f3_256x240.png +0 -0
- data/app/assets/stylesheets/redmond/images/ui-icons_f9bd01_256x240.png +0 -0
- data/app/assets/stylesheets/redmond/jquery-ui-1.8.5.custom.css +0 -572
- data/app/controllers/downloads_controller.rb +0 -20
- data/app/controllers/hydra/application_controller.rb +0 -5
- data/app/controllers/hydra/assets_controller.rb +0 -12
- data/app/controllers/hydra/contributors_controller.rb +0 -115
- data/app/controllers/hydra/file_assets_controller.rb +0 -3
- data/app/controllers/hydra/permissions_controller.rb +0 -117
- data/app/controllers/user_sessions_controller.rb +0 -13
- data/app/helpers/application_helper.rb +0 -3
- data/app/helpers/article_metadata_helper.rb +0 -4
- data/app/helpers/blacklight_helper.rb +0 -4
- data/app/helpers/downloads_helper.rb +0 -4
- data/app/helpers/facets_helper.rb +0 -4
- data/app/helpers/generic_content_objects_helper.rb +0 -4
- data/app/helpers/hydra/application_helper_behavior.rb +0 -8
- data/app/helpers/hydra/article_metadata_helper_behavior.rb +0 -95
- data/app/helpers/hydra/blacklight_helper_behavior.rb +0 -128
- data/app/helpers/hydra/downloads_helper_behavior.rb +0 -24
- data/app/helpers/hydra/facets_helper_behavior.rb +0 -34
- data/app/helpers/hydra/generic_content_objects_helper_behavior.rb +0 -17
- data/app/helpers/hydra/hydra_assets_helper_behavior.rb +0 -76
- data/app/helpers/hydra/hydra_fedora_metadata_helper_behavior.rb +0 -379
- data/app/helpers/hydra/hydra_helper_behavior.rb +0 -195
- data/app/helpers/hydra/hydra_uploader_helper_behavior.rb +0 -23
- data/app/helpers/hydra/inline_editable_metadata_helper_behavior.rb +0 -21
- data/app/helpers/hydra/javascript_includes_helper_behavior.rb +0 -94
- data/app/helpers/hydra/personalization_helper_behavior.rb +0 -49
- data/app/helpers/hydra/release_process_helper_behavior.rb +0 -37
- data/app/helpers/hydra_assets_helper.rb +0 -4
- data/app/helpers/hydra_fedora_metadata_helper.rb +0 -4
- data/app/helpers/hydra_helper.rb +0 -4
- data/app/helpers/hydra_uploader_helper.rb +0 -4
- data/app/helpers/inline_editable_metadata_helper.rb +0 -4
- data/app/helpers/javascript_includes_helper.rb +0 -4
- data/app/helpers/personalization_helper.rb +0 -4
- data/app/helpers/release_process_helper.rb +0 -4
- data/app/models/file_asset.rb +0 -5
- data/app/models/generic_content.rb +0 -26
- data/app/models/generic_image.rb +0 -67
- data/app/models/hydra/datastream/properties.rb +0 -24
- data/app/models/mods_asset.rb +0 -24
- data/app/models/superuser.rb +0 -14
- data/app/models/user_attribute.rb +0 -37
- data/app/models/uses_default_partials.rb +0 -23
- data/app/views/_add_assets_links.html.erb +0 -14
- data/app/views/_flash_msg.html.erb +0 -5
- data/app/views/_user_util_links.html.erb +0 -31
- data/app/views/catalog/_citation.html.erb +0 -11
- data/app/views/catalog/_constraints_element.html.erb +0 -34
- data/app/views/catalog/_delete_partials/_default.html.erb +0 -22
- data/app/views/catalog/_document_list.html.erb +0 -11
- data/app/views/catalog/_edit_partials/_default.html.erb +0 -57
- data/app/views/catalog/_edit_partials/_default_details.html.erb +0 -13
- data/app/views/catalog/_facets.html.erb +0 -37
- data/app/views/catalog/_home.html.erb +0 -6
- data/app/views/catalog/_home_text.html.erb +0 -4
- data/app/views/catalog/_index_partials/_default.html.erb +0 -20
- data/app/views/catalog/_index_partials/_default_details.html.erb +0 -14
- data/app/views/catalog/_index_partials/_default_group.html.erb +0 -15
- data/app/views/catalog/_opensearch_response_metadata.html.erb +0 -2
- data/app/views/catalog/_show_partials/_default.html.erb +0 -21
- data/app/views/catalog/_show_partials/_default_details.html.erb +0 -15
- data/app/views/catalog/_show_partials/_facets.html.erb +0 -52
- data/app/views/catalog/_sms_form.html.erb +0 -21
- data/app/views/catalog/_sort_and_per_page.html.erb +0 -23
- data/app/views/catalog/_uva_tabs.html.erb +0 -10
- data/app/views/catalog/about.html.erb +0 -0
- data/app/views/catalog/show.html.erb +0 -40
- data/app/views/contributors/_add_contributor_split_button.html.erb +0 -10
- data/app/views/contributors/_edit_conference.html.erb +0 -29
- data/app/views/contributors/_edit_organization.html.erb +0 -29
- data/app/views/contributors/_edit_person.html.erb +0 -39
- data/app/views/contributors/_index.html.erb +0 -11
- data/app/views/contributors/_new.html.erb +0 -10
- data/app/views/contributors/_show_conference.html.erb +0 -12
- data/app/views/contributors/_show_organization.html.erb +0 -21
- data/app/views/contributors/_show_person.html.erb +0 -17
- data/app/views/contributors/new.html.erb +0 -14
- data/app/views/downloads/index.html.erb +0 -1
- data/app/views/generic_content_objects/_contributor_form.html.erb +0 -11
- data/app/views/generic_content_objects/_description_form.html.erb +0 -7
- data/app/views/generic_content_objects/_edit_description.html.erb +0 -23
- data/app/views/generic_content_objects/_new.html.erb +0 -0
- data/app/views/generic_content_objects/_show_description.html.erb +0 -41
- data/app/views/generic_contents/_edit.html.erb +0 -10
- data/app/views/generic_contents/_index.html.erb +0 -21
- data/app/views/generic_contents/_show.html.erb +0 -6
- data/app/views/generic_contents/_show_content.html.erb +0 -7
- data/app/views/generic_images/_edit.html.erb +0 -36
- data/app/views/generic_images/_index.html.erb +0 -24
- data/app/views/generic_images/_show.html.erb +0 -13
- data/app/views/generic_images/_show_all.html.erb +0 -14
- data/app/views/generic_images/_show_content.html.erb +0 -7
- data/app/views/hydra/file_assets/_asset_saved_flash.html.erb +0 -2
- data/app/views/hydra/file_assets/_deletable_result.html.erb +0 -5
- data/app/views/hydra/file_assets/_file_assets_form.html.erb +0 -11
- data/app/views/hydra/file_assets/_index.html.erb +0 -29
- data/app/views/hydra/file_assets/_new.html.erb +0 -6
- data/app/views/hydra/file_assets/_result.html.erb +0 -11
- data/app/views/hydra/file_assets/index.html.erb +0 -5
- data/app/views/hydra/permissions/_edit_person_permissions.html.erb +0 -30
- data/app/views/hydra/permissions/_index.html.erb +0 -46
- data/app/views/hydra/permissions/_new.html.erb +0 -14
- data/app/views/hydra/permissions/_permissions_form.html.erb +0 -23
- data/app/views/hydra/permissions/index.html.erb +0 -1
- data/app/views/hydra/permissions/new.html.erb +0 -1
- data/app/views/layouts/hydra-head.html.erb +0 -47
- data/app/views/mods_assets/_additional_info_form.html.erb +0 -44
- data/app/views/mods_assets/_contributor_form.html.erb +0 -14
- data/app/views/mods_assets/_edit.html.erb +0 -10
- data/app/views/mods_assets/_edit_description.html.erb +0 -73
- data/app/views/mods_assets/_edit_journal.html.erb +0 -57
- data/app/views/mods_assets/_index.html.erb +0 -1
- data/app/views/mods_assets/_index_list.html.erb +0 -37
- data/app/views/mods_assets/_index_table.html.erb +0 -7
- data/app/views/mods_assets/_progress_box.html.erb +0 -82
- data/app/views/mods_assets/_publication_form.html.erb +0 -13
- data/app/views/mods_assets/_show.html.erb +0 -39
- data/app/views/mods_assets/_show_additional_info.html.erb +0 -17
- data/app/views/mods_assets/_show_contributors.html.erb +0 -7
- data/app/views/mods_assets/_show_description.html.erb +0 -35
- data/app/views/mods_assets/_show_file_assets.html.erb +0 -22
- data/app/views/mods_assets/_show_journal.html.erb +0 -42
- data/app/views/mods_assets/_show_permissions.html.erb +0 -15
- data/app/views/mods_assets/_show_publication.html.erb +0 -8
- data/app/views/shared/_delete_asset_confirmation.html.erb +0 -17
- data/app/views/user_sessions/_login_form.html.erb +0 -10
- data/app/views/user_sessions/logged_out.html.erb +0 -1
- data/config/fedora.yml +0 -15
- data/config/jetty.yml +0 -6
- data/config/locales/hydra.en.yml +0 -7
- data/config/role_map_cucumber.yml +0 -10
- data/config/role_map_development.yml +0 -12
- data/config/role_map_production.yml +0 -2
- data/config/role_map_test.yml +0 -14
- data/config/routes.rb +0 -12
- data/config/solr.yml +0 -9
- data/config/solr_mappings.yml +0 -22
- data/db/migrate/20101105214243_add_user_attributes_table.rb +0 -15
- data/db/migrate/20101108192527_create_superusers.rb +0 -12
- data/fedora_conf/conf/development/fedora.fcfg +0 -1021
- data/fedora_conf/conf/test/fedora.fcfg +0 -1021
- data/hydra-head.gemspec +0 -41
- data/init.rb +0 -4
- data/install.rb +0 -1
- data/lib/application_helper.rb +0 -3
- data/lib/generators/hydra/assets_generator.rb +0 -50
- data/lib/generators/hydra/cucumber_support_generator.rb +0 -29
- data/lib/generators/hydra/head_generator.rb +0 -165
- data/lib/generators/hydra/hyhead_fixtures_generator.rb +0 -27
- data/lib/generators/hydra/templates/catalog_controller.rb +0 -162
- data/lib/generators/hydra/templates/config/fedora.yml +0 -14
- data/lib/generators/hydra/templates/config/initializers/action_dispatch_http_upload_monkey_patch.rb +0 -12
- data/lib/generators/hydra/templates/config/initializers/hydra_config.rb +0 -44
- data/lib/generators/hydra/templates/config/role_map_cucumber.yml +0 -10
- data/lib/generators/hydra/templates/config/role_map_development.yml +0 -12
- data/lib/generators/hydra/templates/config/role_map_production.yml +0 -2
- data/lib/generators/hydra/templates/config/role_map_test.yml +0 -15
- data/lib/generators/hydra/templates/config/solr.yml +0 -10
- data/lib/generators/hydra/templates/config/solr_mappings.yml +0 -22
- data/lib/generators/hydra/templates/fedora_conf/conf/development/fedora.fcfg +0 -1021
- data/lib/generators/hydra/templates/fedora_conf/conf/test/fedora.fcfg +0 -1021
- data/lib/generators/hydra/templates/migrations/create_superusers.rb +0 -12
- data/lib/generators/hydra/templates/solr_conf/conf/schema.xml +0 -124
- data/lib/generators/hydra/templates/solr_conf/conf/solrconfig.xml +0 -394
- data/lib/generators/hydra/templates/solr_conf/solr.xml +0 -35
- data/lib/hydra-head.rb +0 -29
- data/lib/hydra-head/controller.rb +0 -29
- data/lib/hydra-head/engine.rb +0 -29
- data/lib/hydra-head/routes.rb +0 -90
- data/lib/hydra-head/version.rb +0 -4
- data/lib/hydra.rb +0 -52
- data/lib/hydra/assets.rb +0 -7
- data/lib/hydra/assets_controller_helper.rb +0 -122
- data/lib/hydra/catalog.rb +0 -11
- data/lib/hydra/controller.rb +0 -26
- data/lib/hydra/controller/assets_controller_behavior.rb +0 -143
- data/lib/hydra/controller/catalog_controller_behavior.rb +0 -56
- data/lib/hydra/controller/controller_behavior.rb +0 -59
- data/lib/hydra/controller/file_assets_behavior.rb +0 -144
- data/lib/hydra/controller/repository_controller_behavior.rb +0 -119
- data/lib/hydra/controller/upload_behavior.rb +0 -139
- data/lib/hydra/file_assets.rb +0 -11
- data/lib/hydra/file_assets_helper.rb +0 -12
- data/lib/hydra/generic_content.rb +0 -130
- data/lib/hydra/generic_image.rb +0 -112
- data/lib/hydra/generic_user_attributes.rb +0 -41
- data/lib/hydra/global_configurable.rb +0 -46
- data/lib/hydra/model_methods.rb +0 -104
- data/lib/hydra/model_mixins.rb +0 -8
- data/lib/hydra/model_mixins/common_metadata.rb +0 -25
- data/lib/hydra/model_mixins/solr_document_extension.rb +0 -24
- data/lib/hydra/models/file_asset.rb +0 -78
- data/lib/hydra/repository_controller.rb +0 -28
- data/lib/hydra/rights_metadata.rb +0 -194
- data/lib/hydra/solr.rb +0 -9
- data/lib/hydra/submission_workflow.rb +0 -138
- data/lib/hydra/superuser_attributes.rb +0 -19
- data/lib/hydra/ui.rb +0 -6
- data/lib/hydra/ui/controller.rb +0 -46
- data/lib/hydra/workflow.rb +0 -5
- data/lib/hydra/workflow/controller.rb +0 -3
- data/lib/mediashelf/active_fedora_helper.rb +0 -73
- data/lib/prev_next_links.rb +0 -33
- data/lib/railties/active-fedora.rake +0 -1
- data/lib/railties/hydra-fixtures.rake +0 -50
- data/lib/railties/hydra_jetty.rake +0 -53
- data/lib/user_attributes_loader.rb +0 -26
- data/solr/conf/schema.xml +0 -116
- data/solr/conf/solrconfig.xml +0 -311
- data/solr/solr.xml +0 -35
- data/solr_conf/conf/schema.xml +0 -124
- data/solr_conf/conf/solrconfig.xml +0 -394
- data/solr_conf/solr.xml +0 -35
- data/tasks/active-fedora.rake +0 -1
- data/tasks/hydra-head-fixtures.rake +0 -58
- data/tasks/hydra-head.rake +0 -209
- data/tasks/hydra_jetty.rake +0 -53
- data/tasks/hyhead_rspec.rake +0 -57
- data/tasks/replicator.rake +0 -27
- data/tasks/solrizer-fedora.rake +0 -53
- data/tasks/solrizer.rake +0 -13
- data/test_support/etc/Gemfile +0 -46
- data/test_support/etc/common_metadata_asset.rb +0 -18
- data/test_support/features/absent_model_edit.feature +0 -27
- data/test_support/features/absent_model_search_result.feature +0 -18
- data/test_support/features/absent_model_show.feature +0 -27
- data/test_support/features/button_add_assets.feature +0 -22
- data/test_support/features/button_add_generic_content.feature +0 -11
- data/test_support/features/button_add_image.feature +0 -11
- data/test_support/features/button_add_mods_asset.feature +0 -11
- data/test_support/features/button_delete_asset.feature +0 -13
- data/test_support/features/contributor_add.feature +0 -44
- data/test_support/features/default_partials_edit.feature +0 -27
- data/test_support/features/default_partials_search_result.feature +0 -22
- data/test_support/features/default_partials_show.feature +0 -24
- data/test_support/features/file_upload.feature +0 -80
- data/test_support/features/generic_content_create.feature +0 -7
- data/test_support/features/generic_content_edit.feature +0 -21
- data/test_support/features/generic_content_search_result.feature +0 -22
- data/test_support/features/generic_content_show.feature +0 -20
- data/test_support/features/generic_image_create.feature +0 -7
- data/test_support/features/generic_image_edit.feature +0 -21
- data/test_support/features/generic_image_search_result.feature +0 -22
- data/test_support/features/generic_image_show.feature +0 -20
- data/test_support/features/home_page.feature +0 -9
- data/test_support/features/html_validity.feature +0 -43
- data/test_support/features/mods_asset_contributors_edit.feature +0 -88
- data/test_support/features/mods_asset_create.feature +0 -17
- data/test_support/features/mods_asset_edit.feature +0 -65
- data/test_support/features/mods_asset_edit_without_permission.feature +0 -15
- data/test_support/features/mods_asset_search_result.feature +0 -24
- data/test_support/features/mods_asset_show.feature +0 -90
- data/test_support/features/nonexistent_object_show.feature +0 -9
- data/test_support/features/permissions_add.feature +0 -16
- data/test_support/features/permissions_edit.feature +0 -65
- data/test_support/features/step_definitions/catalog_index_steps.rb +0 -14
- data/test_support/features/step_definitions/create_asset_steps.rb +0 -3
- data/test_support/features/step_definitions/edit_metadata_steps.rb +0 -72
- data/test_support/features/step_definitions/file_list_steps.rb +0 -36
- data/test_support/features/step_definitions/html_validity_steps.rb +0 -64
- data/test_support/features/step_definitions/hydra_metadata_steps.rb +0 -3
- data/test_support/features/step_definitions/hydra_steps.rb +0 -8
- data/test_support/features/step_definitions/inline_editable_edit_steps.rb +0 -77
- data/test_support/features/step_definitions/search_steps.rb +0 -88
- data/test_support/features/step_definitions/searching_steps.rb +0 -22
- data/test_support/features/step_definitions/show_document_steps.rb +0 -89
- data/test_support/features/step_definitions/user_steps.rb +0 -42
- data/test_support/features/step_definitions/web_steps.rb +0 -223
- data/test_support/features/support/env.rb +0 -57
- data/test_support/features/support/paths.rb +0 -85
- data/test_support/features/switch_users.feature +0 -14
- data/test_support/features/view_catalog_index.feature +0 -18
- data/test_support/fixtures/empty_file.txt +0 -0
- data/test_support/fixtures/hydra_test_default_partials.foxml.xml +0 -80
- data/test_support/fixtures/hydra_test_generic_content.foxml.xml +0 -138
- data/test_support/fixtures/hydra_test_generic_image.foxml.xml +0 -395
- data/test_support/fixtures/hydra_test_no_model.foxml.xml +0 -79
- data/test_support/fixtures/hydrangea_fixture_archivist_only_mods_article.foxml.xml +0 -1212
- data/test_support/fixtures/hydrangea_fixture_file_asset1.foxml.xml +0 -4946
- data/test_support/fixtures/hydrangea_fixture_mods_article1.foxml.xml +0 -234
- data/test_support/fixtures/hydrangea_fixture_mods_article2.foxml.xml +0 -177
- data/test_support/fixtures/hydrangea_fixture_mods_article3.foxml.xml +0 -170
- data/test_support/fixtures/hydrangea_fixture_mods_dataset1.foxml.xml +0 -187
- data/test_support/fixtures/hydrangea_fixture_uploaded_svg1.foxml.xml +0 -676
- data/test_support/fixtures/hydrus_admin_class1.foxml.xml +0 -176
- data/test_support/fixtures/image.jp2 +0 -0
- data/test_support/fixtures/libra-oa_1.foxml.xml +0 -2324
- data/test_support/fixtures/libra-oa_2.foxml.xml +0 -2422
- data/test_support/fixtures/libra-oa_7.foxml.xml +0 -1735
- data/test_support/fixtures/small_file.txt +0 -1
- data/test_support/spec/controllers/catalog_controller_spec.rb +0 -138
- data/test_support/spec/controllers/catalog_controller_viewing_context_spec.rb +0 -67
- data/test_support/spec/controllers/catalog_valid_html_spec.rb +0 -123
- data/test_support/spec/controllers/contributors_controller_spec.rb +0 -67
- data/test_support/spec/controllers/file_assets_controller_spec.rb +0 -194
- data/test_support/spec/controllers/hydra-assets_controller_spec.rb +0 -151
- data/test_support/spec/controllers/hydra_controller_spec.rb +0 -43
- data/test_support/spec/controllers/hydra_ui_controller_spec.rb +0 -21
- data/test_support/spec/controllers/permissions_controller_spec.rb +0 -39
- data/test_support/spec/controllers/user_sessions_controller_spec.rb +0 -35
- data/test_support/spec/factories.rb +0 -11
- data/test_support/spec/helpers/access_controls_enforcement_spec.rb +0 -119
- data/test_support/spec/helpers/access_controls_evaluation_spec.rb +0 -26
- data/test_support/spec/helpers/assets_controller_helper_spec.rb +0 -63
- data/test_support/spec/helpers/blacklight_helper_spec.rb +0 -60
- data/test_support/spec/helpers/file_assets_helper_spec.rb +0 -116
- data/test_support/spec/helpers/generic_content_objects_helper_spec.rb +0 -17
- data/test_support/spec/helpers/hydra-repository_controller_spec.rb +0 -54
- data/test_support/spec/helpers/hydra_assets_helper_spec.rb +0 -143
- data/test_support/spec/helpers/hydra_fedora_metadata_helper_spec.rb +0 -255
- data/test_support/spec/helpers/hydra_helper_spec.rb +0 -105
- data/test_support/spec/helpers/hydra_model_methods_spec.rb +0 -88
- data/test_support/spec/helpers/hydra_uploader_helper_spec.rb +0 -26
- data/test_support/spec/helpers/javascript_includes_helper_spec.rb +0 -51
- data/test_support/spec/integration/file_asset_spec.rb +0 -68
- data/test_support/spec/lib/catalog_spec.rb +0 -23
- data/test_support/spec/lib/global_configurable_spec.rb +0 -98
- data/test_support/spec/lib/hydra_submission_workflow_spec.rb +0 -141
- data/test_support/spec/lib/model_methods_spec.rb +0 -29
- data/test_support/spec/models/file_asset_spec.rb +0 -25
- data/test_support/spec/models/generic_content_spec.rb +0 -39
- data/test_support/spec/models/generic_image_spec.rb +0 -75
- data/test_support/spec/models/mods_asset_spec.rb +0 -20
- data/test_support/spec/models/solr_document_spec.rb +0 -17
- data/test_support/spec/models/user_spec.rb +0 -94
- data/test_support/spec/rcov.opts +0 -3
- data/test_support/spec/spec.opts +0 -4
- data/test_support/spec/spec_helper.rb +0 -63
- data/test_support/spec/support/matchers/helper_matcher.rb +0 -14
- data/test_support/spec/support/matchers/solr_matchers.rb +0 -60
- data/test_support/spec/unit/hydra-head-engine_spec.rb +0 -8
- data/test_support/spec/unit/hydra-head_spec.rb +0 -8
@@ -1,51 +0,0 @@
|
|
1
|
-
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
|
2
|
-
include JavascriptIncludesHelper
|
3
|
-
# include HydraHelper # This helper provides the Controller's javascript_includes method
|
4
|
-
|
5
|
-
describe JavascriptIncludesHelper do
|
6
|
-
before :all do
|
7
|
-
@behavior = Hydra::JavascriptIncludesHelperBehavior.deprecation_behavior
|
8
|
-
Hydra::JavascriptIncludesHelperBehavior.deprecation_behavior = :silence
|
9
|
-
end
|
10
|
-
|
11
|
-
after :all do
|
12
|
-
Hydra::JavascriptIncludesHelperBehavior.deprecation_behavior = @behavior
|
13
|
-
end
|
14
|
-
|
15
|
-
before(:each) do
|
16
|
-
# Mock behavior of Controller's javascript_includes method
|
17
|
-
@javascript_includes = []
|
18
|
-
helper.stubs(:javascript_includes).returns(@javascript_includes)
|
19
|
-
end
|
20
|
-
|
21
|
-
describe "include_javascript_for" do
|
22
|
-
it "should call custom helpers if they're defined" do
|
23
|
-
helper.expects(:include_javascript_for_hydrangea_articles_edit)
|
24
|
-
helper.include_javascript_for "hydrangea_articles", "edit"
|
25
|
-
end
|
26
|
-
it "should rely on default_javascript_includes when given content type is not explicitly covered" do
|
27
|
-
helper.expects(:include_default_javascript).with("edit")
|
28
|
-
helper.include_javascript_for "my_type", "edit"
|
29
|
-
end
|
30
|
-
it "should rely on default_javascript_includes when given action is not explicitly covered" do
|
31
|
-
helper.expects(:include_default_javascript).with("delete")
|
32
|
-
helper.include_javascript_for "catalog", "delete"
|
33
|
-
end
|
34
|
-
end
|
35
|
-
|
36
|
-
describe "include_default_javascript" do
|
37
|
-
it "should do nothing if no includes are defined for the given action" do
|
38
|
-
helper.expects(:javascript_includes).never
|
39
|
-
helper.include_default_javascript("flip")
|
40
|
-
end
|
41
|
-
it "should use catalog includes for edit" do
|
42
|
-
helper.expects(:include_javascript_for_catalog_edit)
|
43
|
-
helper.include_default_javascript("edit")
|
44
|
-
end
|
45
|
-
it "should use catalog includes for show" do
|
46
|
-
helper.expects(:include_javascript_for_catalog_show)
|
47
|
-
helper.include_default_javascript("show")
|
48
|
-
end
|
49
|
-
end
|
50
|
-
|
51
|
-
end
|
@@ -1,68 +0,0 @@
|
|
1
|
-
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
|
2
|
-
|
3
|
-
class DummyFileAsset < ActiveFedora::Base
|
4
|
-
def initialize(attr={})
|
5
|
-
super(attr)
|
6
|
-
add_relationship(:has_model, "info:fedora/afmodel:FileAsset")
|
7
|
-
end
|
8
|
-
end
|
9
|
-
|
10
|
-
describe FileAsset do
|
11
|
-
before(:each) do
|
12
|
-
@file_asset = FileAsset.new
|
13
|
-
end
|
14
|
-
after(:each) do
|
15
|
-
begin
|
16
|
-
@file_asset.delete
|
17
|
-
rescue
|
18
|
-
end
|
19
|
-
end
|
20
|
-
describe "with parts" do
|
21
|
-
before(:each) do
|
22
|
-
@asset1 = ActiveFedora::Base.new
|
23
|
-
@asset1.save
|
24
|
-
end
|
25
|
-
|
26
|
-
after(:each) do
|
27
|
-
@asset1.delete
|
28
|
-
end
|
29
|
-
|
30
|
-
describe ".container_id" do
|
31
|
-
it "should return asset container objects via is_part_of relationships" do
|
32
|
-
#none
|
33
|
-
@file_asset.container_id.should be_nil
|
34
|
-
#is_part_of
|
35
|
-
@file_asset.container = @asset1
|
36
|
-
@file_asset.container_id.should == @asset1.pid
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end
|
40
|
-
|
41
|
-
describe ".to_solr" do
|
42
|
-
it "should load base fields correctly if active_fedora_model is FileAsset" do
|
43
|
-
@file_asset.update_indexed_attributes({:title=>{0=>"testing"}})
|
44
|
-
solr_doc = @file_asset.to_solr
|
45
|
-
solr_doc["title_t"].should == ["testing"]
|
46
|
-
end
|
47
|
-
it "should load base fields for FileAsset for model_only if active_fedora_model is not FileAsset but is not child of FileAsset" do
|
48
|
-
pending "I'm unconvinced as to the usefullness of this test. Why create as one type then reload as another? - Justin"
|
49
|
-
@dummy_file_asset = DummyFileAsset.new
|
50
|
-
@dummy_file_asset.save
|
51
|
-
file_asset = FileAsset.find(@dummy_file_asset.pid)
|
52
|
-
ENABLE_SOLR_UPDATES = false
|
53
|
-
#it should save change to Fedora, but not solr
|
54
|
-
file_asset.update_indexed_attributes({:title=>{0=>"testing"}})
|
55
|
-
file_asset.save
|
56
|
-
ENABLE_SOLR_UPDATES = true
|
57
|
-
solr_doc = DummyFileAsset.find_by_solr(@dummy_file_asset.pid).hits.first
|
58
|
-
solr_doc["title_t"].should be_nil
|
59
|
-
@dummy_file_asset.update_index
|
60
|
-
solr_doc = DummyFileAsset.find_by_solr(@dummy_file_asset.pid).hits.first
|
61
|
-
solr_doc["title_t"].should == ["testing"]
|
62
|
-
begin
|
63
|
-
@dummy_file_asset.delete
|
64
|
-
rescue
|
65
|
-
end
|
66
|
-
end
|
67
|
-
end
|
68
|
-
end
|
@@ -1,23 +0,0 @@
|
|
1
|
-
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
|
2
|
-
|
3
|
-
describe Hydra::Controller::CatalogControllerBehavior do
|
4
|
-
|
5
|
-
before(:all) do
|
6
|
-
@behavior = Hydra::Controller::CatalogControllerBehavior.deprecation_behavior
|
7
|
-
Hydra::Controller::CatalogControllerBehavior.deprecation_behavior = :silence
|
8
|
-
|
9
|
-
class CatalogTest < ApplicationController
|
10
|
-
include Hydra::Controller::CatalogControllerBehavior
|
11
|
-
end
|
12
|
-
@catalog = CatalogTest.new
|
13
|
-
end
|
14
|
-
|
15
|
-
after(:all) do
|
16
|
-
Hydra::Controller::CatalogControllerBehavior.deprecation_behavior = @behavior
|
17
|
-
end
|
18
|
-
|
19
|
-
it "should extend classes with the necessary Hydra modules" do
|
20
|
-
CatalogTest.included_modules.should include(Hydra::AccessControlsEnforcement)
|
21
|
-
end
|
22
|
-
|
23
|
-
end
|
@@ -1,98 +0,0 @@
|
|
1
|
-
# -*- encoding : utf-8 -*-
|
2
|
-
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
|
3
|
-
|
4
|
-
describe Blacklight::GlobalConfigurable do
|
5
|
-
|
6
|
-
class TestConfig
|
7
|
-
extend Blacklight::GlobalConfigurable
|
8
|
-
end
|
9
|
-
|
10
|
-
before(:each) do
|
11
|
-
TestConfig.reset_configs!
|
12
|
-
end
|
13
|
-
|
14
|
-
it "should respond to configure" do
|
15
|
-
TestConfig.respond_to? :configure
|
16
|
-
end
|
17
|
-
|
18
|
-
describe "the default state" do
|
19
|
-
describe "config" do
|
20
|
-
it "should be a Hash" do
|
21
|
-
TestConfig.config.should be_a Hash
|
22
|
-
end
|
23
|
-
end
|
24
|
-
describe "configs[:shared]" do
|
25
|
-
it "should be a Hash" do
|
26
|
-
TestConfig.configs[:shared].should be_a Hash
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|
30
|
-
|
31
|
-
describe "configs[:shared]" do
|
32
|
-
it "should not have the values of its members altered by other environments" do
|
33
|
-
TestConfig.configure do |config|
|
34
|
-
config[:key] = ":shared value"
|
35
|
-
end
|
36
|
-
TestConfig.configure(::Rails.env) do |config|
|
37
|
-
config[:key] = ":test value"
|
38
|
-
end
|
39
|
-
TestConfig.config[:key].should == ":test value"
|
40
|
-
TestConfig.configs[:shared][:key].should == ":shared value"
|
41
|
-
TestConfig.configs[::Rails.env][:key].should == ":test value"
|
42
|
-
end
|
43
|
-
end
|
44
|
-
|
45
|
-
describe "the #configure method behavior" do
|
46
|
-
it "requires a block" do
|
47
|
-
lambda{TestConfig.configure}.should raise_error(LocalJumpError)
|
48
|
-
end
|
49
|
-
it "yields a hash" do
|
50
|
-
TestConfig.configure{|config| config.should be_a(Hash) }
|
51
|
-
end
|
52
|
-
it "should clear the configs if reset_configs! is called" do
|
53
|
-
TestConfig.configure do |config|
|
54
|
-
config[:asdf] = 'asdf'
|
55
|
-
end
|
56
|
-
TestConfig.configs[:shared][:asdf].should == 'asdf'
|
57
|
-
TestConfig.reset_configs!
|
58
|
-
TestConfig.configs[:shared][:asdf].should == nil
|
59
|
-
end
|
60
|
-
|
61
|
-
it "should merge settings from the :shared environment" do
|
62
|
-
TestConfig.configure do |config|
|
63
|
-
config[:app_id] = 'Blacklight'
|
64
|
-
config[:mode] = :shared!
|
65
|
-
end
|
66
|
-
TestConfig.configure(::Rails.env) do |config|
|
67
|
-
config[:mode] = ::Rails.env
|
68
|
-
end
|
69
|
-
TestConfig.config[:app_id].should == 'Blacklight'
|
70
|
-
TestConfig.config[:mode].should_not == :shared!
|
71
|
-
TestConfig.config[:mode].should == ::Rails.env
|
72
|
-
end
|
73
|
-
end
|
74
|
-
|
75
|
-
describe "config" do
|
76
|
-
it "should return an empty Hash if nothing was configured" do
|
77
|
-
TestConfig.config.should == {}
|
78
|
-
end
|
79
|
-
|
80
|
-
it "should return only what is in configs[:shared] if no other environment was configured" do
|
81
|
-
TestConfig.configure(:shared) do |config|
|
82
|
-
config[:foo] = 'bar'
|
83
|
-
config[:baz] = 'dang'
|
84
|
-
end
|
85
|
-
TestConfig.config.should == {:foo => 'bar', :baz => 'dang'}
|
86
|
-
TestConfig.config.should == TestConfig.configs[:shared]
|
87
|
-
end
|
88
|
-
|
89
|
-
it "should return a merge of configs[:shared] and configs[RAILS_ENV]" do
|
90
|
-
TestConfig.configure(:shared) do |config|
|
91
|
-
config[:foo] = 'bar'
|
92
|
-
config[:baz] = 'dang'
|
93
|
-
end
|
94
|
-
end
|
95
|
-
end
|
96
|
-
|
97
|
-
|
98
|
-
end
|
@@ -1,141 +0,0 @@
|
|
1
|
-
require File.expand_path( File.join( File.dirname(__FILE__),'..','spec_helper') )
|
2
|
-
|
3
|
-
mods_asset_model = "info:fedora/afmodel:ModsAsset"
|
4
|
-
|
5
|
-
describe Hydra::SubmissionWorkflow do
|
6
|
-
before(:each) do
|
7
|
-
@document = SolrDocument.new({:has_model_s => [mods_asset_model]})
|
8
|
-
end
|
9
|
-
include Hydra::SubmissionWorkflow
|
10
|
-
|
11
|
-
describe "first step in workflow" do
|
12
|
-
it "should return the first step of a given workflow" do
|
13
|
-
first_step_in_workflow.should == "contributor"
|
14
|
-
end
|
15
|
-
end
|
16
|
-
|
17
|
-
describe "next in workflow" do
|
18
|
-
it "should provide the next step based on the provided step" do
|
19
|
-
next_step_in_workflow(:contributor).should == "publication"
|
20
|
-
end
|
21
|
-
it "should return nil if there is no step (denoting the last step)" do
|
22
|
-
next_step_in_workflow(:permissions).should be_nil
|
23
|
-
end
|
24
|
-
it "should return the step after the first if a blank current step is provided (e.g. started from the first step so no wf_step param)" do
|
25
|
-
next_step_in_workflow(nil).should == "publication"
|
26
|
-
next_step_in_workflow("").should == "publication"
|
27
|
-
end
|
28
|
-
end
|
29
|
-
|
30
|
-
describe "partial for step" do
|
31
|
-
it "should return the partial for the given step" do
|
32
|
-
workflow_partial_for_step(:contributor).should match(/contributor_form/)
|
33
|
-
end
|
34
|
-
end
|
35
|
-
|
36
|
-
describe "previous show partials" do
|
37
|
-
it "should return all of the previous show partials for display in the HTML-only workflow" do
|
38
|
-
prev_partials = previous_show_partials(:permissions)
|
39
|
-
prev_partials.is_a?(Array).should be_true
|
40
|
-
prev_partials.length.should == 4
|
41
|
-
prev_partials.first.should match(/mods.*contributors/)
|
42
|
-
prev_partials.last.should match(/mods.*file_assets/)
|
43
|
-
end
|
44
|
-
it "should return an empty array for the first step in the workflow" do
|
45
|
-
previous_show_partials(:contributor).should == []
|
46
|
-
previous_show_partials("").should == []
|
47
|
-
end
|
48
|
-
end
|
49
|
-
|
50
|
-
describe "model specific configurations" do
|
51
|
-
it "should return the appropriate configuration when an @document object is available" do
|
52
|
-
config = model_config
|
53
|
-
config.is_a?(Array).should be_true
|
54
|
-
config.length.should == 5
|
55
|
-
partial_is_mods = []
|
56
|
-
config.each do |c|
|
57
|
-
c.is_a?(Hash).should be_true
|
58
|
-
c.has_key?(:name).should be_true
|
59
|
-
c.has_key?(:edit_partial).should be_true
|
60
|
-
partial_is_mods << c[:edit_partial].include?("mods_assets")
|
61
|
-
end
|
62
|
-
partial_is_mods.include?(true).should be_true
|
63
|
-
end
|
64
|
-
it "should return the appropriate config when a model is available in the params hash" do
|
65
|
-
@document = nil
|
66
|
-
to = SubmissionWorkflowObject.new
|
67
|
-
to.stubs(:params).returns({:content_type => "generic_content"})
|
68
|
-
config = to.model_config
|
69
|
-
config.is_a?(Array).should be_true
|
70
|
-
config.length.should == 4
|
71
|
-
partial_is_generic = []
|
72
|
-
config.each do |c|
|
73
|
-
c.is_a?(Hash).should be_true
|
74
|
-
c.has_key?(:name).should be_true
|
75
|
-
c.has_key?(:edit_partial).should be_true
|
76
|
-
partial_is_generic << c[:edit_partial].include?("generic_content")
|
77
|
-
end
|
78
|
-
partial_is_generic.include?(true).should be_true
|
79
|
-
end
|
80
|
-
it "should return the appropriate config when the ID of an object is available in the params hash" do
|
81
|
-
@document = nil
|
82
|
-
to = SubmissionWorkflowObject.new
|
83
|
-
to.stubs(:params).returns({:id=>"hydrangea:fixture_mods_article1"})
|
84
|
-
config = to.model_config
|
85
|
-
config.is_a?(Array).should be_true
|
86
|
-
config.length.should == 5
|
87
|
-
config.each do |c|
|
88
|
-
c.is_a?(Hash).should be_true
|
89
|
-
c.has_key?(:name).should be_true
|
90
|
-
c.has_key?(:edit_partial).should be_true
|
91
|
-
end
|
92
|
-
end
|
93
|
-
it "should return the configuration for non mods assets (generic_content)" do
|
94
|
-
@document = nil
|
95
|
-
to = SubmissionWorkflowObject.new
|
96
|
-
to.stubs(:params).returns(:id=>"hydra:test_generic_content")
|
97
|
-
config = to.model_config
|
98
|
-
config.is_a?(Array).should be_true
|
99
|
-
config.length.should == 4
|
100
|
-
partial_is_generic = []
|
101
|
-
config.each do |c|
|
102
|
-
c.is_a?(Hash).should be_true
|
103
|
-
c.has_key?(:name).should be_true
|
104
|
-
c.has_key?(:edit_partial).should be_true
|
105
|
-
partial_is_generic << c[:edit_partial].include?("generic_content")
|
106
|
-
end
|
107
|
-
partial_is_generic.include?(true).should be_true
|
108
|
-
end
|
109
|
-
it "should return nil if an ID is the only context available and it is not a valid object" do
|
110
|
-
@document = nil
|
111
|
-
to = SubmissionWorkflowObject.new
|
112
|
-
to.stubs(:params).returns(:id=>"hydra:not_an_actual_record")
|
113
|
-
to.model_config.should be_nil
|
114
|
-
end
|
115
|
-
end
|
116
|
-
describe "before_filter validation" do
|
117
|
-
it "should redirect back when the validation method returns false." do
|
118
|
-
@document = nil
|
119
|
-
to = SubmissionWorkflowObject.new
|
120
|
-
to.stubs(:params).returns({:id=>"hydrangea:fixture_mods_article1",:action=>"create"})
|
121
|
-
to.expects(:redirect_to).with(:back)
|
122
|
-
to.validate_workflow_step
|
123
|
-
end
|
124
|
-
it "should not redirect when the validation method returns true." do
|
125
|
-
@document = nil
|
126
|
-
to = SubmissionWorkflowObject.new
|
127
|
-
to.stubs(:params).returns({:id=>"hydrangea:fixture_mods_article1",:action=>"update"})
|
128
|
-
to.expects(:redirect_to).never
|
129
|
-
to.validate_workflow_step
|
130
|
-
end
|
131
|
-
end
|
132
|
-
end
|
133
|
-
class SubmissionWorkflowObject
|
134
|
-
include Hydra::SubmissionWorkflow
|
135
|
-
def mods_assets_create_validation
|
136
|
-
return false
|
137
|
-
end
|
138
|
-
def mods_assets_update_validation
|
139
|
-
return true
|
140
|
-
end
|
141
|
-
end
|
@@ -1,29 +0,0 @@
|
|
1
|
-
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
|
2
|
-
|
3
|
-
describe Hydra::ModelMethods do
|
4
|
-
|
5
|
-
before :all do
|
6
|
-
class TestModel < ActiveFedora::Base
|
7
|
-
include Hydra::ModelMixins::CommonMetadata
|
8
|
-
include Hydra::ModelMethods
|
9
|
-
has_metadata :name => "properties", :type => Hydra::Datastream::Properties
|
10
|
-
end
|
11
|
-
end
|
12
|
-
|
13
|
-
describe "apply_depositor_metadata" do
|
14
|
-
subject {TestModel.new }
|
15
|
-
it "should add edit access" do
|
16
|
-
subject.apply_depositor_metadata('naomi')
|
17
|
-
subject.rightsMetadata.individuals.should == {'naomi' => 'edit'}
|
18
|
-
end
|
19
|
-
it "should not overwrite people with edit access" do
|
20
|
-
subject.rightsMetadata.permissions({:person=>"jessie"}, 'edit')
|
21
|
-
subject.apply_depositor_metadata('naomi')
|
22
|
-
subject.rightsMetadata.individuals.should == {'naomi' => 'edit', 'jessie' =>'edit'}
|
23
|
-
end
|
24
|
-
it "should set depositor" do
|
25
|
-
subject.apply_depositor_metadata('chris')
|
26
|
-
subject.properties.depositor.should == ['chris']
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|
@@ -1,25 +0,0 @@
|
|
1
|
-
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
|
2
|
-
|
3
|
-
describe FileAsset do
|
4
|
-
|
5
|
-
before(:each) do
|
6
|
-
@file_asset = FileAsset.new
|
7
|
-
@file_asset.stubs(:create_date).returns("2008-07-02T05:09:42.015Z")
|
8
|
-
@file_asset.stubs(:modified_date).returns("2008-09-29T21:21:52.892Z")
|
9
|
-
end
|
10
|
-
|
11
|
-
it "Should be a kind of ActiveFedora::Base" do
|
12
|
-
@file_asset.should be_kind_of(ActiveFedora::Base)
|
13
|
-
end
|
14
|
-
|
15
|
-
it "should include Hydra Model Methods" do
|
16
|
-
@file_asset.class.included_modules.should include(Hydra::ModelMethods)
|
17
|
-
@file_asset.should respond_to(:apply_depositor_metadata)
|
18
|
-
end
|
19
|
-
|
20
|
-
describe 'label' do
|
21
|
-
asset = FileAsset.new
|
22
|
-
asset.label = 'image.jp2'
|
23
|
-
asset.label.should == 'image.jp2'
|
24
|
-
end
|
25
|
-
end
|
@@ -1,39 +0,0 @@
|
|
1
|
-
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
|
2
|
-
require "active_fedora"
|
3
|
-
|
4
|
-
describe GenericContent do
|
5
|
-
before :all do
|
6
|
-
@behavior = GenericContent.deprecation_behavior
|
7
|
-
@h_behavior = Hydra::GenericContent.deprecation_behavior
|
8
|
-
GenericContent.deprecation_behavior = :silence
|
9
|
-
Hydra::GenericContent.deprecation_behavior = :silence
|
10
|
-
end
|
11
|
-
|
12
|
-
after :all do
|
13
|
-
GenericContent.deprecation_behavior = @behavior
|
14
|
-
Hydra::GenericContent.deprecation_behavior = @h_behavior
|
15
|
-
end
|
16
|
-
|
17
|
-
before(:each) do
|
18
|
-
@hydra_content = GenericContent.new
|
19
|
-
end
|
20
|
-
|
21
|
-
it "Should be a kind of ActiveFedora::Base" do
|
22
|
-
@hydra_content.should be_kind_of(ActiveFedora::Base)
|
23
|
-
end
|
24
|
-
|
25
|
-
it "should include Hydra Model Methods" do
|
26
|
-
@hydra_content.class.included_modules.should include(Hydra::ModelMethods)
|
27
|
-
@hydra_content.should respond_to(:apply_depositor_metadata)
|
28
|
-
end
|
29
|
-
|
30
|
-
it "should have accessors for its default datastreams of content and original" do
|
31
|
-
@hydra_content.should respond_to(:has_content?)
|
32
|
-
@hydra_content.should respond_to(:content)
|
33
|
-
@hydra_content.should respond_to(:content=)
|
34
|
-
@hydra_content.should respond_to(:has_original?)
|
35
|
-
@hydra_content.should respond_to(:original)
|
36
|
-
@hydra_content.should respond_to(:original=)
|
37
|
-
end
|
38
|
-
|
39
|
-
end
|