diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 3833dd4d2..836c8145d 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -15,12 +15,12 @@ RSpec/SubjectStub: # Offense count: 10 RSpec/LeadingSubject: Exclude: - - 'spec/controllers/sufia/generic_works_controller_spec.rb' + - 'spec/controllers/hyrax/generic_works_controller_spec.rb' - 'spec/helpers/admin_stats_helper_spec.rb' - 'spec/lib/active_job_tenant_spec.rb' - 'spec/lib/importer/factory/string_literal_processor_spec.rb' - 'spec/lib/stanford/importer/mods_parser_spec.rb' - - 'spec/presenters/sufia/generic_work_show_presenter_spec.rb' + - 'spec/presenters/hyrax/generic_work_show_presenter_spec.rb' - 'spec/services/create_account_spec.rb' - 'spec/services/iiif_thumbnail_path_service_spec.rb' - 'spec/services/solr_config_uploader_spec.rb' diff --git a/Gemfile b/Gemfile index 39fd5b150..9a6692fd3 100644 --- a/Gemfile +++ b/Gemfile @@ -60,7 +60,7 @@ end gem 'blacklight', '~> 6.7' -gem 'sufia', git: 'https://github.com/projecthydra/sufia.git', branch: 'cc_subtree' +gem 'hyrax', git: 'https://github.com/projecthydra-labs/hyrax.git' gem 'rsolr', '~> 1.1.2' gem 'devise' diff --git a/Gemfile.lock b/Gemfile.lock index 1771ba446..c2f77ddd2 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -7,11 +7,10 @@ GIT activesupport (>= 4.0) GIT - remote: https://github.com/projecthydra/sufia.git - revision: eb5e3d416a4a9da2ea2f06498683a095d6c5c7cd - branch: cc_subtree + remote: https://github.com/projecthydra-labs/hyrax.git + revision: f9c6586a5a566bbb2b481cc934128cf69ade4cc1 specs: - sufia (8.0.0.alpha) + hyrax (0.0.1.alpha) active_attr (~> 0.9.0) active_fedora-noid (~> 2.0) almond-rails (~> 0.0.1) @@ -255,11 +254,11 @@ GEM dry-equalizer (~> 0.2) dry-types (~> 0.9, >= 0.9.0) ice_nine (~> 0.11) - dry-types (0.9.2) + dry-types (0.9.3) concurrent-ruby (~> 1.0) dry-configurable (~> 0.1) dry-container (~> 0.3) - dry-core (~> 0.2) + dry-core (~> 0.2, >= 0.2.1) dry-equalizer (~> 0.2) dry-logic (~> 0.4, >= 0.4.0) inflecto (~> 0.0.0, >= 0.0.2) @@ -462,7 +461,7 @@ GEM mime-types-data (~> 3.2015) mime-types-data (3.2016.0521) mimemagic (0.3.2) - mini_magick (4.5.1) + mini_magick (4.6.0) mini_portile2 (2.1.0) minitest (5.10.1) mods (2.1.0) @@ -778,6 +777,7 @@ DEPENDENCIES flipflop! fog-aws honeybadger (~> 2.0) + hyrax! iiif_manifest (~> 0.1.2) is_it_working jbuilder (~> 2.0) @@ -809,7 +809,6 @@ DEPENDENCIES simplecov solr_wrapper (~> 0.10) spring (~> 1.7) - sufia! turbolinks uglifier (>= 1.3.0) web-console (>= 3.3.0) diff --git a/app/actors/sufia/actors/generic_work_actor.rb b/app/actors/hyrax/actors/generic_work_actor.rb similarity index 61% rename from app/actors/sufia/actors/generic_work_actor.rb rename to app/actors/hyrax/actors/generic_work_actor.rb index 8fca206cb..3406a95bd 100644 --- a/app/actors/sufia/actors/generic_work_actor.rb +++ b/app/actors/hyrax/actors/generic_work_actor.rb @@ -1,8 +1,8 @@ # Generated via # `rails generate curation_concerns:work GenericWork` -module Sufia +module Hyrax module Actors - class GenericWorkActor < Sufia::Actors::BaseActor + class GenericWorkActor < Hyrax::Actors::BaseActor end end end diff --git a/app/actors/sufia/actors/image_actor.rb b/app/actors/hyrax/actors/image_actor.rb similarity index 61% rename from app/actors/sufia/actors/image_actor.rb rename to app/actors/hyrax/actors/image_actor.rb index 7b3d2b254..53da3a4df 100644 --- a/app/actors/sufia/actors/image_actor.rb +++ b/app/actors/hyrax/actors/image_actor.rb @@ -1,8 +1,8 @@ # Generated via # `rails generate curation_concerns:work Image` -module Sufia +module Hyrax module Actors - class ImageActor < Sufia::Actors::BaseActor + class ImageActor < Hyrax::Actors::BaseActor end end end diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index 737cd0326..b44d1bbfa 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -21,7 +21,7 @@ // Required by Blacklight //= require blacklight/blacklight -//= require sufia +//= require hyrax //= require jquery.flot.pie //= require flot_graph //= require statistics_tab_manager diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css index 5e2fc0cf1..d21d90e9e 100644 --- a/app/assets/stylesheets/application.css +++ b/app/assets/stylesheets/application.css @@ -10,7 +10,7 @@ * defined in the other CSS/SCSS files in this directory. It is generally better to create a new * file per style scope. * - *= require sufia + *= require hyrax *= require peek *= require peek/views/faraday *= require peek/views/performance_bar diff --git a/app/assets/stylesheets/sufia.scss b/app/assets/stylesheets/hyrax.scss similarity index 94% rename from app/assets/stylesheets/sufia.scss rename to app/assets/stylesheets/hyrax.scss index e594f3336..8bdf23cd5 100644 --- a/app/assets/stylesheets/sufia.scss +++ b/app/assets/stylesheets/hyrax.scss @@ -8,7 +8,7 @@ @import "bootstrap"; @import "blacklight/blacklight"; @import "font-awesome"; -@import "sufia/sufia"; +@import "hyrax/hyrax"; @import "hyku"; @import "accounts"; @import "viewer"; diff --git a/app/controllers/account_sign_up_controller.rb b/app/controllers/account_sign_up_controller.rb index 2b5b4f409..b7d98b846 100644 --- a/app/controllers/account_sign_up_controller.rb +++ b/app/controllers/account_sign_up_controller.rb @@ -4,7 +4,7 @@ class AccountSignUpController < ApplicationController # GET /accounts/new def new - add_breadcrumb t(:'sufia.controls.home'), root_path + add_breadcrumb t(:'hyrax.controls.home'), root_path add_breadcrumb 'New account', new_account_path end diff --git a/app/controllers/accounts_controller.rb b/app/controllers/accounts_controller.rb index 70ea76c78..243064c38 100644 --- a/app/controllers/accounts_controller.rb +++ b/app/controllers/accounts_controller.rb @@ -8,9 +8,9 @@ class AccountsController < ApplicationController # GET /accounts.json def index authorize! :manage, Account - add_breadcrumb t(:'sufia.controls.home'), root_path - add_breadcrumb t(:'sufia.toolbar.admin.menu'), sufia.admin_path - add_breadcrumb t(:'sufia.admin.sidebar.accounts'), accounts_path + add_breadcrumb t(:'hyrax.controls.home'), root_path + add_breadcrumb t(:'hyrax.toolbar.admin.menu'), hyrax.admin_path + add_breadcrumb t(:'hyrax.admin.sidebar.accounts'), accounts_path end # GET /accounts/1 @@ -20,17 +20,17 @@ def show # GET /accounts/new def new - add_breadcrumb t(:'sufia.controls.home'), root_path - add_breadcrumb t(:'sufia.toolbar.admin.menu'), sufia.admin_path - add_breadcrumb t(:'sufia.admin.sidebar.accounts'), accounts_path + add_breadcrumb t(:'hyrax.controls.home'), root_path + add_breadcrumb t(:'hyrax.toolbar.admin.menu'), hyrax.admin_path + add_breadcrumb t(:'hyrax.admin.sidebar.accounts'), accounts_path add_breadcrumb 'New account', new_account_path end # GET /accounts/1/edit def edit - add_breadcrumb t(:'sufia.controls.home'), root_path - add_breadcrumb t(:'sufia.toolbar.admin.menu'), sufia.admin_path - add_breadcrumb t(:'sufia.admin.sidebar.accounts'), accounts_path + add_breadcrumb t(:'hyrax.controls.home'), root_path + add_breadcrumb t(:'hyrax.toolbar.admin.menu'), hyrax.admin_path + add_breadcrumb t(:'hyrax.admin.sidebar.accounts'), accounts_path add_breadcrumb @account.tenant, edit_account_path(@account) end diff --git a/app/controllers/admin/users_controller.rb b/app/controllers/admin/users_controller.rb index fe4652483..bd4e27aea 100644 --- a/app/controllers/admin/users_controller.rb +++ b/app/controllers/admin/users_controller.rb @@ -1,11 +1,11 @@ module Admin class UsersController < ApplicationController before_action :ensure_admin! - include Sufia::UsersControllerBehavior + include Hyrax::UsersControllerBehavior layout 'admin' def self.local_prefixes - ['sufia/users'] + ['hyrax/users'] end private diff --git a/app/controllers/appearances_controller.rb b/app/controllers/appearances_controller.rb index f626c7171..0a338d5ea 100644 --- a/app/controllers/appearances_controller.rb +++ b/app/controllers/appearances_controller.rb @@ -5,9 +5,9 @@ class AppearancesController < ApplicationController # GET /sites/appearances/edit def edit - add_breadcrumb t(:'sufia.controls.home'), root_path - add_breadcrumb t(:'sufia.toolbar.admin.menu'), sufia.admin_path - add_breadcrumb t(:'sufia.admin.sidebar.appearance'), edit_site_appearances_path + add_breadcrumb t(:'hyrax.controls.home'), root_path + add_breadcrumb t(:'hyrax.toolbar.admin.menu'), hyrax.admin_path + add_breadcrumb t(:'hyrax.admin.sidebar.appearance'), edit_site_appearances_path end # PATCH/PUT /sites/1 diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 1fbd5ee52..9bc238a5e 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -10,10 +10,10 @@ class ApplicationController < ActionController::Base include Blacklight::Controller include Hydra::Controller::ControllerBehavior - # Adds Sufia behaviors into the application controller - include Sufia::Controller + # Adds Hyrax behaviors into the application controller + include Hyrax::Controller - include Sufia::ThemedLayoutController + include Hyrax::ThemedLayoutController with_themed_layout '1_column' helper_method :peek_enabled?, :current_account diff --git a/app/controllers/catalog_controller.rb b/app/controllers/catalog_controller.rb index c9c474886..403257353 100644 --- a/app/controllers/catalog_controller.rb +++ b/app/controllers/catalog_controller.rb @@ -27,7 +27,7 @@ def self.modified_field config.advanced_search[:query_parser] ||= 'dismax' config.advanced_search[:form_solr_parameters] ||= {} - config.search_builder_class = Sufia::CatalogSearchBuilder + config.search_builder_class = Hyrax::CatalogSearchBuilder # Show gallery view config.view.gallery.partials = [:index_header, :index] diff --git a/app/controllers/content_blocks_controller.rb b/app/controllers/content_blocks_controller.rb index b24dc0d53..1f4ca13cb 100644 --- a/app/controllers/content_blocks_controller.rb +++ b/app/controllers/content_blocks_controller.rb @@ -5,9 +5,9 @@ class ContentBlocksController < ApplicationController # GET /sites/1/edit def edit - add_breadcrumb t(:'sufia.controls.home'), root_path - add_breadcrumb t(:'sufia.toolbar.admin.menu'), sufia.admin_path - add_breadcrumb t(:'sufia.admin.sidebar.content_blocks'), edit_site_content_blocks_path + add_breadcrumb t(:'hyrax.controls.home'), root_path + add_breadcrumb t(:'hyrax.toolbar.admin.menu'), hyrax.admin_path + add_breadcrumb t(:'hyrax.admin.sidebar.content_blocks'), edit_site_content_blocks_path end # PATCH/PUT /sites/1 diff --git a/app/controllers/sufia/file_sets_controller.rb b/app/controllers/hyrax/file_sets_controller.rb similarity index 51% rename from app/controllers/sufia/file_sets_controller.rb rename to app/controllers/hyrax/file_sets_controller.rb index cdff11637..f642a9e6b 100644 --- a/app/controllers/sufia/file_sets_controller.rb +++ b/app/controllers/hyrax/file_sets_controller.rb @@ -1,7 +1,7 @@ -module Sufia +module Hyrax class FileSetsController < ApplicationController - include Sufia::FileSetsControllerBehavior - include Sufia::FileSetsControllerBehavior + include Hyrax::FileSetsControllerBehavior + include Hyrax::FileSetsControllerBehavior self.show_presenter = Hyku::FileSetPresenter end end diff --git a/app/controllers/sufia/generic_works_controller.rb b/app/controllers/hyrax/generic_works_controller.rb similarity index 69% rename from app/controllers/sufia/generic_works_controller.rb rename to app/controllers/hyrax/generic_works_controller.rb index 168231d12..19ed0e3af 100644 --- a/app/controllers/sufia/generic_works_controller.rb +++ b/app/controllers/hyrax/generic_works_controller.rb @@ -1,12 +1,12 @@ require 'iiif_manifest' -module Sufia +module Hyrax class GenericWorksController < ApplicationController - include Sufia::CurationConcernController - # Adds Sufia behaviors to the controller. - include Sufia::WorksControllerBehavior + include Hyrax::CurationConcernController + # Adds Hyrax behaviors to the controller. + include Hyrax::WorksControllerBehavior self.curation_concern_type = GenericWork - self.show_presenter = Sufia::GenericWorkShowPresenter + self.show_presenter = Hyrax::GenericWorkShowPresenter skip_load_and_authorize_resource only: :manifest diff --git a/app/controllers/sufia/images_controller.rb b/app/controllers/hyrax/images_controller.rb similarity index 52% rename from app/controllers/sufia/images_controller.rb rename to app/controllers/hyrax/images_controller.rb index c88bfe87e..bdf8ed525 100644 --- a/app/controllers/sufia/images_controller.rb +++ b/app/controllers/hyrax/images_controller.rb @@ -1,11 +1,11 @@ # Generated via # `rails generate curation_concerns:work Image` -module Sufia +module Hyrax class ImagesController < ApplicationController - include Sufia::CurationConcernController - # Adds Sufia behaviors to the controller. - include Sufia::WorksControllerBehavior + include Hyrax::CurationConcernController + # Adds Hyrax behaviors to the controller. + include Hyrax::WorksControllerBehavior self.curation_concern_type = Image end diff --git a/app/controllers/labels_controller.rb b/app/controllers/labels_controller.rb index 560fbca62..80139309f 100644 --- a/app/controllers/labels_controller.rb +++ b/app/controllers/labels_controller.rb @@ -5,9 +5,9 @@ class LabelsController < ApplicationController # GET /sites/1/edit def edit - add_breadcrumb t(:'sufia.controls.home'), root_path - add_breadcrumb t(:'sufia.toolbar.admin.menu'), sufia.admin_path - add_breadcrumb t(:'sufia.admin.sidebar.labels'), edit_site_labels_path + add_breadcrumb t(:'hyrax.controls.home'), root_path + add_breadcrumb t(:'hyrax.toolbar.admin.menu'), hyrax.admin_path + add_breadcrumb t(:'hyrax.admin.sidebar.labels'), edit_site_labels_path end # PATCH/PUT /sites/1 diff --git a/app/controllers/mailbox_controller.rb b/app/controllers/mailbox_controller.rb index d82a5b5f8..c1a528361 100644 --- a/app/controllers/mailbox_controller.rb +++ b/app/controllers/mailbox_controller.rb @@ -1,4 +1,4 @@ -require File.join(Sufia::Engine.paths['app/controllers'].first, 'mailbox_controller.rb') +require File.join(Hyrax::Engine.paths['app/controllers'].first, 'mailbox_controller.rb') class MailboxController layout 'admin' diff --git a/app/controllers/roles_controller.rb b/app/controllers/roles_controller.rb index 3014b6740..42ac85f7d 100644 --- a/app/controllers/roles_controller.rb +++ b/app/controllers/roles_controller.rb @@ -11,9 +11,9 @@ class RolesController < ApplicationController def index @users = @users.where(guest: false) - add_breadcrumb t(:'sufia.controls.home'), root_path - add_breadcrumb t(:'sufia.toolbar.admin.menu'), sufia.admin_path - add_breadcrumb t(:'sufia.admin.sidebar.roles_and_permissions'), site_roles_path + add_breadcrumb t(:'hyrax.controls.home'), root_path + add_breadcrumb t(:'hyrax.toolbar.admin.menu'), hyrax.admin_path + add_breadcrumb t(:'hyrax.admin.sidebar.roles_and_permissions'), site_roles_path end def update diff --git a/app/controllers/transfers_controller.rb b/app/controllers/transfers_controller.rb index 0f6881725..e057446bf 100644 --- a/app/controllers/transfers_controller.rb +++ b/app/controllers/transfers_controller.rb @@ -1,5 +1,5 @@ class TransfersController < ApplicationController - include Sufia::TransfersControllerBehavior + include Hyrax::TransfersControllerBehavior layout 'admin' end diff --git a/app/forms/sufia/generic_work_form.rb b/app/forms/hyrax/generic_work_form.rb similarity index 75% rename from app/forms/sufia/generic_work_form.rb rename to app/forms/hyrax/generic_work_form.rb index fc17fccb5..27e95b7fc 100644 --- a/app/forms/sufia/generic_work_form.rb +++ b/app/forms/hyrax/generic_work_form.rb @@ -1,7 +1,7 @@ # Generated via # `rails generate curation_concerns:work GenericWork` -module Sufia - class GenericWorkForm < Sufia::Forms::WorkForm +module Hyrax + class GenericWorkForm < Hyrax::Forms::WorkForm self.model_class = ::GenericWork include HydraEditor::Form::Permissions self.terms += [:resource_type] diff --git a/app/forms/sufia/image_form.rb b/app/forms/hyrax/image_form.rb similarity index 71% rename from app/forms/sufia/image_form.rb rename to app/forms/hyrax/image_form.rb index 91d601292..1bd92d30c 100644 --- a/app/forms/sufia/image_form.rb +++ b/app/forms/hyrax/image_form.rb @@ -1,7 +1,7 @@ # Generated via # `rails generate curation_concerns:work Image` -module Sufia - class ImageForm < Sufia::Forms::WorkForm +module Hyrax + class ImageForm < Hyrax::Forms::WorkForm self.model_class = ::Image self.terms += [:resource_type] end diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 3e6a2862e..1ad8469dd 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1,5 +1,5 @@ module ApplicationHelper - include ::SufiaHelper + include ::HyraxHelper include ContentBlockHelper def nav_link(href) diff --git a/app/helpers/content_block_helper.rb b/app/helpers/content_block_helper.rb index 596979645..f0e66f6ef 100644 --- a/app/helpers/content_block_helper.rb +++ b/app/helpers/content_block_helper.rb @@ -1,7 +1,7 @@ module ContentBlockHelper - include Sufia::ContentBlockHelperBehavior + include Hyrax::ContentBlockHelperBehavior - # This is like editable_content_block in sufia, but it doesn't allow editing + # This is like editable_content_block in hyrax, but it doesn't allow editing # rubocop:disable Rails/OutputSafety def displayable_content_block(content_block, **options) return if content_block.value.blank? diff --git a/app/helpers/sufia_helper.rb b/app/helpers/hyrax_helper.rb similarity index 78% rename from app/helpers/sufia_helper.rb rename to app/helpers/hyrax_helper.rb index b2e326b16..0fc4439b8 100644 --- a/app/helpers/sufia_helper.rb +++ b/app/helpers/hyrax_helper.rb @@ -1,7 +1,7 @@ -module SufiaHelper +module HyraxHelper include ::BlacklightHelper - include Sufia::BlacklightOverride - include Sufia::SufiaHelperBehavior + include Hyrax::BlacklightOverride + include Hyrax::HyraxHelperBehavior def application_name Site.application_name || super diff --git a/app/indexers/file_set_indexer.rb b/app/indexers/file_set_indexer.rb index 4075a1f88..f83d0fe2b 100644 --- a/app/indexers/file_set_indexer.rb +++ b/app/indexers/file_set_indexer.rb @@ -1,3 +1,3 @@ -class FileSetIndexer < Sufia::FileSetIndexer +class FileSetIndexer < Hyrax::FileSetIndexer self.thumbnail_path_service = IIIFThumbnailPathService end diff --git a/app/indexers/work_indexer.rb b/app/indexers/work_indexer.rb index de29a0969..9b979d868 100644 --- a/app/indexers/work_indexer.rb +++ b/app/indexers/work_indexer.rb @@ -1,3 +1,3 @@ -class WorkIndexer < Sufia::WorkIndexer +class WorkIndexer < Hyrax::WorkIndexer self.thumbnail_path_service = IIIFThumbnailPathService end diff --git a/app/models/ability.rb b/app/models/ability.rb index 3283df267..d17d491cd 100644 --- a/app/models/ability.rb +++ b/app/models/ability.rb @@ -1,6 +1,6 @@ class Ability include Hydra::Ability - include Sufia::Ability + include Hyrax::Ability self.ability_logic += [:everyone_can_create_curation_concerns, :superadmin_permissions] diff --git a/app/models/collection.rb b/app/models/collection.rb index 502da71bc..889ea65fc 100644 --- a/app/models/collection.rb +++ b/app/models/collection.rb @@ -1,6 +1,6 @@ # Generated by curation_concerns:models:install class Collection < ActiveFedora::Base - include ::Sufia::CollectionBehavior + include ::Hyrax::CollectionBehavior # You can replace these metadata if they're not suitable - include Sufia::BasicMetadata + include Hyrax::BasicMetadata end diff --git a/app/models/content_block.rb b/app/models/content_block.rb index 50ecf7be4..2f7e7ee8e 100644 --- a/app/models/content_block.rb +++ b/app/models/content_block.rb @@ -1,4 +1,4 @@ class ContentBlock < ActiveRecord::Base - include Sufia::ContentBlockBehavior + include Hyrax::ContentBlockBehavior include Hyku::ContentBlockBehavior end diff --git a/app/models/file_set.rb b/app/models/file_set.rb index e1baed317..facf5f58f 100644 --- a/app/models/file_set.rb +++ b/app/models/file_set.rb @@ -1,6 +1,6 @@ # Generated by curation_concerns:models:install class FileSet < ActiveFedora::Base - include ::Sufia::FileSetBehavior - include Sufia::FileSetBehavior + include ::Hyrax::FileSetBehavior + include Hyrax::FileSetBehavior self.indexer = FileSetIndexer end diff --git a/app/models/generic_work.rb b/app/models/generic_work.rb index 06e87ecb7..3463e91b3 100644 --- a/app/models/generic_work.rb +++ b/app/models/generic_work.rb @@ -1,7 +1,7 @@ class GenericWork < ActiveFedora::Base - include ::Sufia::WorkBehavior - include ::Sufia::BasicMetadata - include Sufia::WorkBehavior + include ::Hyrax::WorkBehavior + include ::Hyrax::BasicMetadata + include Hyrax::WorkBehavior validates :title, presence: { message: 'Your work must have a title.' } self.indexer = WorkIndexer diff --git a/app/models/image.rb b/app/models/image.rb index 99c3e7f94..84e8852c1 100644 --- a/app/models/image.rb +++ b/app/models/image.rb @@ -1,9 +1,9 @@ # Generated via # `rails generate curation_concerns:work Image` class Image < ActiveFedora::Base - include ::Sufia::WorkBehavior - include ::Sufia::BasicMetadata - include Sufia::WorkBehavior + include ::Hyrax::WorkBehavior + include ::Hyrax::BasicMetadata + include Hyrax::WorkBehavior self.human_readable_type = 'Image' # Change this to restrict which works can be added as a child. # self.valid_child_concerns = [] diff --git a/app/models/redis_endpoint.rb b/app/models/redis_endpoint.rb index dbf6a1e23..53f50ec4d 100644 --- a/app/models/redis_endpoint.rb +++ b/app/models/redis_endpoint.rb @@ -2,12 +2,12 @@ class RedisEndpoint < Endpoint store :options, accessors: [:namespace] def switch! - Sufia.config.redis_namespace = options[:namespace] + Hyrax.config.redis_namespace = options[:namespace] end # Reset the Redis namespace back to the default value def reset! - Sufia.config.redis_namespace = Settings.redis.default_namespace + Hyrax.config.redis_namespace = Settings.redis.default_namespace end def ping @@ -19,6 +19,6 @@ def ping private def redis_instance - Sufia::RedisEventStore.instance + Hyrax::RedisEventStore.instance end end diff --git a/app/models/search_builder.rb b/app/models/search_builder.rb index 693ab0171..9939502a3 100644 --- a/app/models/search_builder.rb +++ b/app/models/search_builder.rb @@ -2,5 +2,5 @@ class SearchBuilder < Blacklight::SearchBuilder include Blacklight::Solr::SearchBuilderBehavior include Hydra::AccessControlsEnforcement - include Sufia::SearchFilters + include Hyrax::SearchFilters end diff --git a/app/models/solr_document.rb b/app/models/solr_document.rb index 6c35888cc..ac32aa832 100644 --- a/app/models/solr_document.rb +++ b/app/models/solr_document.rb @@ -3,10 +3,10 @@ class SolrDocument include Blacklight::Solr::Document include Blacklight::Gallery::OpenseadragonSolrDocument - # Adds Sufia behaviors to the SolrDocument. - include Sufia::SolrDocumentBehavior - # Adds Sufia behaviors to the SolrDocument. - include Sufia::SolrDocumentBehavior + # Adds Hyrax behaviors to the SolrDocument. + include Hyrax::SolrDocumentBehavior + # Adds Hyrax behaviors to the SolrDocument. + include Hyrax::SolrDocumentBehavior # self.unique_key = 'id' diff --git a/app/models/user.rb b/app/models/user.rb index 0a0ee0241..73ef1cf42 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -3,10 +3,10 @@ class User < ActiveRecord::Base # Connects this user object to Hydra behaviors. include Hydra::User # Connects this user object to Curation Concerns behaviors. - include Sufia::User - # Connects this user object to Sufia behaviors. - include Sufia::User - include Sufia::UserUsageStats + include Hyrax::User + # Connects this user object to Hyrax behaviors. + include Hyrax::User + include Hyrax::UserUsageStats attr_accessible :email, :password, :password_confirmation if Blacklight::Utils.needs_attr_accessible? # Connects this user object to Blacklights Bookmarks. diff --git a/app/presenters/hyku/file_set_presenter.rb b/app/presenters/hyku/file_set_presenter.rb index bbc48aa69..98d4d5c33 100644 --- a/app/presenters/hyku/file_set_presenter.rb +++ b/app/presenters/hyku/file_set_presenter.rb @@ -1,5 +1,5 @@ module Hyku - class FileSetPresenter < Sufia::FileSetPresenter + class FileSetPresenter < Hyrax::FileSetPresenter include DisplaysImage end end diff --git a/app/presenters/sufia/generic_work_show_presenter.rb b/app/presenters/hyrax/generic_work_show_presenter.rb similarity index 78% rename from app/presenters/sufia/generic_work_show_presenter.rb rename to app/presenters/hyrax/generic_work_show_presenter.rb index 31b54b1ed..5aec1bf8c 100644 --- a/app/presenters/sufia/generic_work_show_presenter.rb +++ b/app/presenters/hyrax/generic_work_show_presenter.rb @@ -1,5 +1,5 @@ -module Sufia - class GenericWorkShowPresenter < Sufia::WorkShowPresenter +module Hyrax + class GenericWorkShowPresenter < Hyrax::WorkShowPresenter self.file_presenter_class = Hyku::FileSetPresenter def manifest_url diff --git a/app/services/iiif_thumbnail_path_service.rb b/app/services/iiif_thumbnail_path_service.rb index 7fc9c75d6..79777106b 100644 --- a/app/services/iiif_thumbnail_path_service.rb +++ b/app/services/iiif_thumbnail_path_service.rb @@ -1,4 +1,4 @@ -class IIIFThumbnailPathService < Sufia::WorkThumbnailPathService +class IIIFThumbnailPathService < Hyrax::WorkThumbnailPathService class << self protected diff --git a/app/views/accounts/index.html.erb b/app/views/accounts/index.html.erb index 0e0379bbe..324ee5c3f 100644 --- a/app/views/accounts/index.html.erb +++ b/app/views/accounts/index.html.erb @@ -1,5 +1,5 @@ <% content_for :page_header do %> -

<%= t(:'sufia.admin.sidebar.accounts') %>

+

<%= t(:'hyrax.admin.sidebar.accounts') %>

<%= link_to new_account_path, class: 'btn btn-primary' do %> Create new account diff --git a/app/views/admin/stats/index.html.erb b/app/views/admin/stats/index.html.erb index e7406b8f1..4f8ced87f 100644 --- a/app/views/admin/stats/index.html.erb +++ b/app/views/admin/stats/index.html.erb @@ -17,7 +17,7 @@

Collections over time

<%= - graph_tag('collection-graph', [Sufia::Statistics::Collections::OverTime.new.points], { + graph_tag('collection-graph', [Hyrax::Statistics::Collections::OverTime.new.points], { xaxis: { mode: 'time', minTickSize: [7, 'day'] @@ -33,7 +33,7 @@

Works over time

<%= - graph_tag('works-graph', [Sufia::Statistics::Works::OverTime.new.points], { + graph_tag('works-graph', [Hyrax::Statistics::Works::OverTime.new.points], { xaxis: { mode: 'time', minTickSize: [7, 'day'] @@ -47,7 +47,7 @@ %>

Works by type:

<%= - graph_tag('works-by-type', Sufia::Statistics::Works::ByResourceType.new.query, series: { + graph_tag('works-by-type', Hyrax::Statistics::Works::ByResourceType.new.query, series: { pie: { show: true, } diff --git a/app/views/appearances/edit.html.erb b/app/views/appearances/edit.html.erb index 8c39f8093..ee7f2e6a4 100644 --- a/app/views/appearances/edit.html.erb +++ b/app/views/appearances/edit.html.erb @@ -1,5 +1,5 @@ <% content_for :page_header do %> -

<%= t(:'sufia.admin.sidebar.appearance') %>

+

<%= t(:'hyrax.admin.sidebar.appearance') %>

<% end %>
diff --git a/app/views/content_blocks/edit.html.erb b/app/views/content_blocks/edit.html.erb index 2ebaa9154..e5841120b 100644 --- a/app/views/content_blocks/edit.html.erb +++ b/app/views/content_blocks/edit.html.erb @@ -1,5 +1,5 @@ <% content_for :page_header do %> -

<%= t(:'sufia.admin.sidebar.content_blocks') %>

+

<%= t(:'hyrax.admin.sidebar.content_blocks') %>

<% end %>
diff --git a/app/views/sufia/admin/_sidebar.html.erb b/app/views/hyrax/admin/_sidebar.html.erb similarity index 64% rename from app/views/sufia/admin/_sidebar.html.erb rename to app/views/hyrax/admin/_sidebar.html.erb index ff57783cd..6d5455122 100644 --- a/app/views/sufia/admin/_sidebar.html.erb +++ b/app/views/hyrax/admin/_sidebar.html.erb @@ -1,34 +1,34 @@ diff --git a/app/views/sufia/base/_representative_media.html.erb b/app/views/hyrax/base/_representative_media.html.erb similarity index 100% rename from app/views/sufia/base/_representative_media.html.erb rename to app/views/hyrax/base/_representative_media.html.erb diff --git a/app/views/sufia/base/show.html.erb b/app/views/hyrax/base/show.html.erb similarity index 100% rename from app/views/sufia/base/show.html.erb rename to app/views/hyrax/base/show.html.erb diff --git a/app/views/sufia/generic_works/_generic_work.html.erb b/app/views/hyrax/generic_works/_generic_work.html.erb similarity index 100% rename from app/views/sufia/generic_works/_generic_work.html.erb rename to app/views/hyrax/generic_works/_generic_work.html.erb diff --git a/app/views/sufia/homepage/_announcement.html.erb b/app/views/hyrax/homepage/_announcement.html.erb similarity index 100% rename from app/views/sufia/homepage/_announcement.html.erb rename to app/views/hyrax/homepage/_announcement.html.erb diff --git a/app/views/sufia/homepage/_featured_researcher.html.erb b/app/views/hyrax/homepage/_featured_researcher.html.erb similarity index 61% rename from app/views/sufia/homepage/_featured_researcher.html.erb rename to app/views/hyrax/homepage/_featured_researcher.html.erb index 6f155f5ef..01e286098 100644 --- a/app/views/sufia/homepage/_featured_researcher.html.erb +++ b/app/views/hyrax/homepage/_featured_researcher.html.erb @@ -1,3 +1,3 @@

Featured Researcher

-<%= link_to 'View other featured researchers', sufia.featured_researchers_path %> +<%= link_to 'View other featured researchers', hyrax.featured_researchers_path %> <%= displayable_content_block @featured_researcher %> diff --git a/app/views/sufia/homepage/_marketing.html.erb b/app/views/hyrax/homepage/_marketing.html.erb similarity index 100% rename from app/views/sufia/homepage/_marketing.html.erb rename to app/views/hyrax/homepage/_marketing.html.erb diff --git a/app/views/sufia/images/_image.html.erb b/app/views/hyrax/images/_image.html.erb similarity index 100% rename from app/views/sufia/images/_image.html.erb rename to app/views/hyrax/images/_image.html.erb diff --git a/app/views/labels/edit.html.erb b/app/views/labels/edit.html.erb index b01c9a8f8..270c44efb 100644 --- a/app/views/labels/edit.html.erb +++ b/app/views/labels/edit.html.erb @@ -1,5 +1,5 @@ <% content_for :page_header do %> -

<%= t(:'sufia.admin.sidebar.labels') %>

+

<%= t(:'hyrax.admin.sidebar.labels') %>

<% end %>
diff --git a/app/views/layouts/multitenant.html.erb b/app/views/layouts/multitenant.html.erb index 23998b4fd..db2844c3d 100644 --- a/app/views/layouts/multitenant.html.erb +++ b/app/views/layouts/multitenant.html.erb @@ -1,5 +1,5 @@ -"> +"> <%= render "layouts/head_tag_content"%> diff --git a/app/views/roles/index.html.erb b/app/views/roles/index.html.erb index 73e3c92c8..9645c8c45 100644 --- a/app/views/roles/index.html.erb +++ b/app/views/roles/index.html.erb @@ -1,5 +1,5 @@ <% content_for :page_header do %> -

<%= t(:'sufia.admin.sidebar.roles_and_permissions') %>

+

<%= t(:'hyrax.admin.sidebar.roles_and_permissions') %>

<% end %>
diff --git a/app/views/shared/_footer.html.erb b/app/views/shared/_footer.html.erb index e2ffc434f..3c603959e 100644 --- a/app/views/shared/_footer.html.erb +++ b/app/views/shared/_footer.html.erb @@ -1,5 +1,5 @@
-

<%= t('sufia.footer.copyright_html') %>

+

<%= t('hyrax.footer.copyright_html') %>

diff --git a/app/views/status/index.html.erb b/app/views/status/index.html.erb index 5aea0cb18..f27eb14f7 100644 --- a/app/views/status/index.html.erb +++ b/app/views/status/index.html.erb @@ -1,4 +1,4 @@ -

<%= t(:'sufia.admin.sidebar.system_status')%>

+

<%= t(:'hyrax.admin.sidebar.system_status')%>

diff --git a/config/initializers/sufia.rb b/config/initializers/hyrax.rb similarity index 95% rename from config/initializers/sufia.rb rename to config/initializers/hyrax.rb index d689a3308..3a5fbd3cd 100644 --- a/config/initializers/sufia.rb +++ b/config/initializers/hyrax.rb @@ -1,4 +1,4 @@ -Sufia.config do |config| +Hyrax.config do |config| config.register_curation_concern :generic_work config.register_curation_concern :image @@ -43,7 +43,7 @@ # If you have ffmpeg installed and want to transcode audio and video uncomment this line # config.enable_ffmpeg = true - # Sufia uses NOIDs for files and collections instead of Fedora UUIDs + # Hyrax uses NOIDs for files and collections instead of Fedora UUIDs # where NOID = 10-character string and UUID = 32-character string w/ hyphens # config.enable_noids = true @@ -66,7 +66,7 @@ # Specify how many seconds back from the current time that we should show by default of the user's activity on the user's dashboard # config.activity_to_show_default_seconds_since_now = 24*60*60 - # Sufia can integrate with Zotero's Arkivo service for automatic deposit + # Hyrax can integrate with Zotero's Arkivo service for automatic deposit # of Zotero-managed research items. # config.arkivo_api = false diff --git a/config/initializers/stats_admin.rb b/config/initializers/stats_admin.rb index 28f3a5a2b..3b6767fb1 100644 --- a/config/initializers/stats_admin.rb +++ b/config/initializers/stats_admin.rb @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -module Sufia +module Hyrax class StatsAdmin def self.matches?(request) current_user = request.env['warden'].user diff --git a/config/locales/en.yml b/config/locales/en.yml index 3dd1c4352..00c3861f9 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -34,7 +34,7 @@ en: service: ok: 'OK' down: 'Down' - sufia: + hyrax: admin: sidebar: activity: 'Activity' diff --git a/config/locales/generic_work.en.yml b/config/locales/generic_work.en.yml index 262286ca4..6c4afe61a 100644 --- a/config/locales/generic_work.en.yml +++ b/config/locales/generic_work.en.yml @@ -1,5 +1,5 @@ en: - sufia: + hyrax: icons: generic_work: 'fa fa-file-text-o' select_type: diff --git a/config/locales/sufia.en.yml b/config/locales/hyrax.en.yml similarity index 97% rename from config/locales/sufia.en.yml rename to config/locales/hyrax.en.yml index b4bd83f76..a66235482 100644 --- a/config/locales/sufia.en.yml +++ b/config/locales/hyrax.en.yml @@ -1,5 +1,5 @@ en: - sufia: + hyrax: product_name: "Hydra-in-a-Box" product_twitter_handle: "@HydraInABox" institution_name: "Hydra in a Box" diff --git a/config/locales/image.en.yml b/config/locales/image.en.yml index 6384ceb91..2985f0752 100644 --- a/config/locales/image.en.yml +++ b/config/locales/image.en.yml @@ -1,5 +1,5 @@ en: - sufia: + hyrax: icons: image: 'fa fa-picture-o' select_type: diff --git a/config/routes.rb b/config/routes.rb index fab909c34..7db8cb520 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -12,14 +12,14 @@ get '/account/sign_up' => 'account_sign_up#new' post '/account/sign_up' => 'account_sign_up#create' - root 'sufia/homepage#index' + root 'hyrax/homepage#index' get 'splash', to: 'splash#index' get 'status', to: 'status#index' devise_for :users mount Blacklight::Engine => '/' - mount Sufia::Engine, at: '/' + mount Hyrax::Engine, at: '/' concern :searchable, Blacklight::Routes::Searchable.new concern :exportable, Blacklight::Routes::Exportable.new diff --git a/config/workflows/default_workflow.json b/config/workflows/default_workflow.json index c447e3664..3651ff4d8 100644 --- a/config/workflows/default_workflow.json +++ b/config/workflows/default_workflow.json @@ -10,8 +10,8 @@ "from_states": [], "transition_to": "deposited", "methods": [ - "Sufia::Workflow::GrantEditToDepositor", - "Sufia::Workflow::ActivateObject" + "Hyrax::Workflow::GrantEditToDepositor", + "Hyrax::Workflow::ActivateObject" ] } ] diff --git a/config/workflows/mediated_deposit_workflow.json b/config/workflows/mediated_deposit_workflow.json index 99c53a4a4..2d1df1e02 100644 --- a/config/workflows/mediated_deposit_workflow.json +++ b/config/workflows/mediated_deposit_workflow.json @@ -12,7 +12,7 @@ "notifications": [ { "notification_type": "email", - "name": "Sufia::Workflow::PendingReviewNotification", + "name": "Hyrax::Workflow::PendingReviewNotification", "to": ["approving"] } ] @@ -24,7 +24,7 @@ "notifications": [ { "notification_type": "email", - "name": "Sufia::Workflow::CompleteNotification", + "name": "Hyrax::Workflow::CompleteNotification", "to": ["approving"] } ], diff --git a/db/migrate/20161203173439_rename_sufia_features_to_hyrax_features.rb b/db/migrate/20161203173439_rename_sufia_features_to_hyrax_features.rb new file mode 100644 index 000000000..db76f79e1 --- /dev/null +++ b/db/migrate/20161203173439_rename_sufia_features_to_hyrax_features.rb @@ -0,0 +1,5 @@ +class RenameSufiaFeaturesToHyraxFeatures < ActiveRecord::Migration[5.0] + def change + rename_table :sufia_features, :hyrax_features + end +end diff --git a/db/schema.rb b/db/schema.rb index 47acd3778..69d46dc78 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20161202202754) do +ActiveRecord::Schema.define(version: 20161203173439) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -136,6 +136,13 @@ t.index ["user_id"], name: "index_file_view_stats_on_user_id", using: :btree end + create_table "hyrax_features", force: :cascade do |t| + t.string "key", null: false + t.boolean "enabled", default: false, null: false + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + create_table "local_authorities", force: :cascade do |t| t.string "name" end @@ -246,11 +253,8 @@ t.string "resource_type" t.datetime "created_at" t.datetime "updated_at" - t.string "title" - t.text "description" t.index ["name", "resource_type", "resource_id"], name: "index_roles_on_name_and_resource_type_and_resource_id", using: :btree t.index ["name"], name: "index_roles_on_name", using: :btree - t.index ["title"], name: "index_roles_on_title", using: :btree end create_table "searches", force: :cascade do |t| @@ -442,13 +446,6 @@ t.index ["lowerLabel"], name: "entries_by_lower_label", using: :btree end - create_table "sufia_features", force: :cascade do |t| - t.string "key", null: false - t.boolean "enabled", default: false, null: false - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - end - create_table "tinymce_assets", force: :cascade do |t| t.string "file" t.datetime "created_at", null: false diff --git a/lib/importer/attach_files.rb b/lib/importer/attach_files.rb index dcabe4c46..186abd0a1 100644 --- a/lib/importer/attach_files.rb +++ b/lib/importer/attach_files.rb @@ -29,7 +29,7 @@ def create_file(file_name) return end - actor = Sufia::Actors::FileSetActor.new(FileSet.new, User.batch_user) + actor = Hyrax::Actors::FileSetActor.new(FileSet.new, User.batch_user) actor.create_metadata(work) actor.create_content(File.new(path)) end diff --git a/lib/importer/factory/object_factory.rb b/lib/importer/factory/object_factory.rb index da4e0556d..5abf7f010 100644 --- a/lib/importer/factory/object_factory.rb +++ b/lib/importer/factory/object_factory.rb @@ -93,7 +93,7 @@ def create @object.apply_depositor_metadata(User.batch_user) @object.save! else - work_actor = Sufia::CurationConcern.actor(@object, User.batch_user) + work_actor = Hyrax::CurationConcern.actor(@object, User.batch_user) work_actor.create(attrs) end end diff --git a/spec/actors/sufia/actors/generic_work_actor_spec.rb b/spec/actors/hyrax/actors/generic_work_actor_spec.rb similarity index 75% rename from spec/actors/sufia/actors/generic_work_actor_spec.rb rename to spec/actors/hyrax/actors/generic_work_actor_spec.rb index 4225a2fc7..dba6646db 100644 --- a/spec/actors/sufia/actors/generic_work_actor_spec.rb +++ b/spec/actors/hyrax/actors/generic_work_actor_spec.rb @@ -2,7 +2,7 @@ # `rails generate curation_concerns:work GenericWork` require 'rails_helper' -RSpec.describe Sufia::Actors::GenericWorkActor do +RSpec.describe Hyrax::Actors::GenericWorkActor do it "has tests" do skip "Add your tests here" end diff --git a/spec/actors/sufia/actors/image_actor_spec.rb b/spec/actors/hyrax/actors/image_actor_spec.rb similarity index 77% rename from spec/actors/sufia/actors/image_actor_spec.rb rename to spec/actors/hyrax/actors/image_actor_spec.rb index 1fb5313e7..38a26e24a 100644 --- a/spec/actors/sufia/actors/image_actor_spec.rb +++ b/spec/actors/hyrax/actors/image_actor_spec.rb @@ -2,7 +2,7 @@ # `rails generate curation_concerns:work Image` require 'rails_helper' -RSpec.describe Sufia::Actors::ImageActor do +RSpec.describe Hyrax::Actors::ImageActor do it "has tests" do skip "Add your tests here" end diff --git a/spec/controllers/account_sign_up_controller_spec.rb b/spec/controllers/account_sign_up_controller_spec.rb index de2d77ec5..4c7cb3df6 100644 --- a/spec/controllers/account_sign_up_controller_spec.rb +++ b/spec/controllers/account_sign_up_controller_spec.rb @@ -22,7 +22,7 @@ describe "GET #new" do it "assigns a new account as @account" do get :new - expect(response).to render_template("layouts/sufia/1_column") + expect(response).to render_template("layouts/hyrax/1_column") expect(assigns(:account)).to be_a_new(Account) end end diff --git a/spec/controllers/sufia/file_sets_controller_spec.rb b/spec/controllers/hyrax/file_sets_controller_spec.rb similarity index 78% rename from spec/controllers/sufia/file_sets_controller_spec.rb rename to spec/controllers/hyrax/file_sets_controller_spec.rb index f5e5f60c9..6a48c794a 100644 --- a/spec/controllers/sufia/file_sets_controller_spec.rb +++ b/spec/controllers/hyrax/file_sets_controller_spec.rb @@ -1,6 +1,6 @@ require 'rails_helper' -RSpec.describe Sufia::FileSetsController do +RSpec.describe Hyrax::FileSetsController do describe 'show_presenter' do subject { described_class.show_presenter } it { is_expected.to eq Hyku::FileSetPresenter } diff --git a/spec/controllers/sufia/generic_works_controller_spec.rb b/spec/controllers/hyrax/generic_works_controller_spec.rb similarity index 88% rename from spec/controllers/sufia/generic_works_controller_spec.rb rename to spec/controllers/hyrax/generic_works_controller_spec.rb index a4ba855ee..dfeb53a43 100644 --- a/spec/controllers/sufia/generic_works_controller_spec.rb +++ b/spec/controllers/hyrax/generic_works_controller_spec.rb @@ -1,6 +1,6 @@ require 'rails_helper' -RSpec.describe Sufia::GenericWorksController do +RSpec.describe Hyrax::GenericWorksController do let(:user) { FactoryGirl.create(:user) } let(:work) { FactoryGirl.create(:work_with_one_file, user: user) } let(:file_set) { work.ordered_members.to_a.first } @@ -14,7 +14,7 @@ before do sign_in user allow(IIIFManifest::ManifestFactory).to receive(:new) - .with(Sufia::GenericWorkShowPresenter) + .with(Hyrax::GenericWorkShowPresenter) .and_return(manifest_factory) end @@ -31,7 +31,7 @@ end subject { controller.send :presenter } it "initializes a presenter" do - expect(subject).to be_kind_of Sufia::GenericWorkShowPresenter + expect(subject).to be_kind_of Hyrax::GenericWorkShowPresenter expect(subject.manifest_url).to eq "http://test.host/concern/generic_works/#{solr_document.id}/manifest" end end diff --git a/spec/controllers/sufia/images_controller_spec.rb b/spec/controllers/hyrax/images_controller_spec.rb similarity index 78% rename from spec/controllers/sufia/images_controller_spec.rb rename to spec/controllers/hyrax/images_controller_spec.rb index 2e50b69a5..288ff4d93 100644 --- a/spec/controllers/sufia/images_controller_spec.rb +++ b/spec/controllers/hyrax/images_controller_spec.rb @@ -2,7 +2,7 @@ # `rails generate curation_concerns:work Image` require 'rails_helper' -RSpec.describe Sufia::ImagesController do +RSpec.describe Hyrax::ImagesController do it "has tests" do skip "Add your tests here" end diff --git a/spec/features/admin_dashboard_spec.rb b/spec/features/admin_dashboard_spec.rb index 78fc3d7bb..ec4fecc37 100644 --- a/spec/features/admin_dashboard_spec.rb +++ b/spec/features/admin_dashboard_spec.rb @@ -9,7 +9,7 @@ end it 'shows the admin page' do - visit Sufia::Engine.routes.url_helpers.admin_path + visit Hyrax::Engine.routes.url_helpers.admin_path within '#sidebar' do expect(page).to have_link('Activity summary') expect(page).to have_link('Profile') diff --git a/spec/features/content_blocks_spec.rb b/spec/features/content_blocks_spec.rb index 591f00fbd..a04b705e5 100644 --- a/spec/features/content_blocks_spec.rb +++ b/spec/features/content_blocks_spec.rb @@ -31,7 +31,7 @@ ) end it 'updates the about page' do - visit sufia.about_path + visit hyrax.about_path expect(page).to have_content('FOOM') end end diff --git a/spec/features/edit_file_spec.rb b/spec/features/edit_file_spec.rb index 72a3bdeae..6df591fd7 100644 --- a/spec/features/edit_file_spec.rb +++ b/spec/features/edit_file_spec.rb @@ -16,7 +16,7 @@ context 'when the user tries to update file content, but forgets to select a file:' do it 'shows the edit page again' do - visit edit_sufia_file_set_path(file_set) + visit edit_hyrax_file_set_path(file_set) click_link 'Versions' click_button 'Upload New Version' expect(page).to have_content "Edit #{file_title}" diff --git a/spec/features/labels_spec.rb b/spec/features/labels_spec.rb index 59b62efa0..025b1f638 100644 --- a/spec/features/labels_spec.rb +++ b/spec/features/labels_spec.rb @@ -37,7 +37,7 @@ fill_in 'Institution name', with: 'Custom Inst Name' click_on 'Save' - visit sufia.agreement_path + visit hyrax.agreement_path expect(page).to have_content('fullname (Custom Inst Name) requires') end end @@ -54,7 +54,7 @@ fill_in 'Full institution name', with: 'Custom Full Inst Name' click_on 'Save' - visit sufia.agreement_path + visit hyrax.agreement_path expect(page).to have_content('Custom Full Inst Name (name) requires') end end diff --git a/spec/forms/sufia/generic_work_form_spec.rb b/spec/forms/hyrax/generic_work_form_spec.rb similarity index 79% rename from spec/forms/sufia/generic_work_form_spec.rb rename to spec/forms/hyrax/generic_work_form_spec.rb index 281f51004..4677a4acb 100644 --- a/spec/forms/sufia/generic_work_form_spec.rb +++ b/spec/forms/hyrax/generic_work_form_spec.rb @@ -2,7 +2,7 @@ # `rails generate curation_concerns:work GenericWork` require 'rails_helper' -RSpec.describe Sufia::GenericWorkForm do +RSpec.describe Hyrax::GenericWorkForm do it "has tests" do skip "Add your tests here" end diff --git a/spec/forms/sufia/image_form_spec.rb b/spec/forms/hyrax/image_form_spec.rb similarity index 81% rename from spec/forms/sufia/image_form_spec.rb rename to spec/forms/hyrax/image_form_spec.rb index 4afd9b934..f34432664 100644 --- a/spec/forms/sufia/image_form_spec.rb +++ b/spec/forms/hyrax/image_form_spec.rb @@ -2,7 +2,7 @@ # `rails generate curation_concerns:work Image` require 'rails_helper' -RSpec.describe Sufia::ImageForm do +RSpec.describe Hyrax::ImageForm do it "has tests" do skip "Add your tests here" end diff --git a/spec/helpers/sufia_helper_spec.rb b/spec/helpers/hyrax_helper_spec.rb similarity index 74% rename from spec/helpers/sufia_helper_spec.rb rename to spec/helpers/hyrax_helper_spec.rb index f1a57be26..b9a76da89 100644 --- a/spec/helpers/sufia_helper_spec.rb +++ b/spec/helpers/hyrax_helper_spec.rb @@ -1,6 +1,6 @@ require 'rails_helper' -RSpec.describe SufiaHelper, type: :helper do +RSpec.describe HyraxHelper, type: :helper do describe "#banner_image" do context "with uploaded banner image" do before do @@ -14,8 +14,8 @@ end context "without uploaded banner image" do - it "returns the configured Sufia banner image" do - expect(helper.banner_image).to eq(Sufia.config.banner_image) + it "returns the configured Hyrax banner image" do + expect(helper.banner_image).to eq(Hyrax.config.banner_image) end end end diff --git a/spec/lib/importer/factory/etd_factory_spec.rb b/spec/lib/importer/factory/etd_factory_spec.rb index d8382eb16..6c91d8925 100644 --- a/spec/lib/importer/factory/etd_factory_spec.rb +++ b/spec/lib/importer/factory/etd_factory_spec.rb @@ -27,7 +27,7 @@ allow(File).to receive(:exist?).and_call_original # For byebug, sprockets, etc allow(File).to receive(:exist?).with("tmp/files/img.png").and_return(true) allow(File).to receive(:new).and_return(file) - allow(Sufia::Actors::FileSetActor).to receive(:new) + allow(Hyrax::Actors::FileSetActor).to receive(:new) .with(FileSet, User).and_return(fs_actor) end context "for a new image" do diff --git a/spec/lib/importer/factory/image_factory_spec.rb b/spec/lib/importer/factory/image_factory_spec.rb index 6bdbca007..5ea948607 100644 --- a/spec/lib/importer/factory/image_factory_spec.rb +++ b/spec/lib/importer/factory/image_factory_spec.rb @@ -27,7 +27,7 @@ allow(File).to receive(:exist?).and_call_original # For byebug, sprockets, etc allow(File).to receive(:exist?).with("tmp/files/img.png").and_return(true) allow(File).to receive(:new).and_return(file) - allow(Sufia::Actors::FileSetActor).to receive(:new) + allow(Hyrax::Actors::FileSetActor).to receive(:new) .with(FileSet, User).and_return(fs_actor) end context "for a new image" do diff --git a/spec/models/account_spec.rb b/spec/models/account_spec.rb index a6c5d1cae..a1ee20315 100644 --- a/spec/models/account_spec.rb +++ b/spec/models/account_spec.rb @@ -45,7 +45,7 @@ end it 'switches the Redis namespace' do - expect(Sufia.config.redis_namespace).to eq 'foobaz' + expect(Hyrax.config.redis_namespace).to eq 'foobaz' end end @@ -66,7 +66,7 @@ expect(ActiveFedora::SolrService.instance.conn.uri.to_s).to eq 'http://example.com/solr/' expect(ActiveFedora.fedora.host).to eq 'http://example.com/fedora' expect(ActiveFedora.fedora.base_path).to eq '/dev' - expect(Sufia.config.redis_namespace).to eq 'foobaz' + expect(Hyrax.config.redis_namespace).to eq 'foobaz' end end @@ -77,7 +77,7 @@ expect(ActiveFedora::SolrService.instance.conn.uri.to_s).to eq 'http://127.0.0.1:8985/solr/hydra-test/' expect(ActiveFedora.fedora.host).to eq 'http://127.0.0.1:8986/rest' - expect(Sufia.config.redis_namespace).to eq previous_redis_namespace + expect(Hyrax.config.redis_namespace).to eq previous_redis_namespace end end diff --git a/spec/models/redis_endpoint_spec.rb b/spec/models/redis_endpoint_spec.rb index 1f86bc588..6e95bce0e 100644 --- a/spec/models/redis_endpoint_spec.rb +++ b/spec/models/redis_endpoint_spec.rb @@ -12,12 +12,12 @@ describe '#ping' do it 'checks if the service is up' do - allow(Sufia::RedisEventStore.instance).to receive(:ping).and_return('PONG') + allow(Hyrax::RedisEventStore.instance).to receive(:ping).and_return('PONG') expect(subject.ping).to be_truthy end it 'is false if the service is down' do - allow(Sufia::RedisEventStore.instance).to receive(:ping).and_raise(RuntimeError) + allow(Hyrax::RedisEventStore.instance).to receive(:ping).and_raise(RuntimeError) expect(subject.ping).to eq false end end diff --git a/spec/presenters/sufia/generic_work_show_presenter_spec.rb b/spec/presenters/hyrax/generic_work_show_presenter_spec.rb similarity index 95% rename from spec/presenters/sufia/generic_work_show_presenter_spec.rb rename to spec/presenters/hyrax/generic_work_show_presenter_spec.rb index 76236934c..66c677ec3 100644 --- a/spec/presenters/sufia/generic_work_show_presenter_spec.rb +++ b/spec/presenters/hyrax/generic_work_show_presenter_spec.rb @@ -1,6 +1,6 @@ require 'rails_helper' -RSpec.describe Sufia::GenericWorkShowPresenter do +RSpec.describe Hyrax::GenericWorkShowPresenter do let(:document) { { "has_model_ssim" => ['GenericWork'], 'id' => '99' } } let(:solr_document) { SolrDocument.new(document) } let(:request) { double(base_url: 'http://test.host') } diff --git a/spec/routing/curation_concerns_spec.rb b/spec/routing/curation_concerns_spec.rb index 024f8247a..afe1df47e 100644 --- a/spec/routing/curation_concerns_spec.rb +++ b/spec/routing/curation_concerns_spec.rb @@ -1,8 +1,8 @@ require 'rails_helper' -RSpec.describe Sufia::GenericWorksController do +RSpec.describe Hyrax::GenericWorksController do it "routes to manifest" do expect(get: '/concern/generic_works/1234/manifest') - .to route_to(controller: 'sufia/generic_works', action: 'manifest', id: '1234') + .to route_to(controller: 'hyrax/generic_works', action: 'manifest', id: '1234') end end diff --git a/spec/views/sufia/base/_representative_media.html.erb_spec.rb b/spec/views/hyrax/base/_representative_media.html.erb_spec.rb similarity index 78% rename from spec/views/sufia/base/_representative_media.html.erb_spec.rb rename to spec/views/hyrax/base/_representative_media.html.erb_spec.rb index 6aad12e03..e620c25ac 100644 --- a/spec/views/sufia/base/_representative_media.html.erb_spec.rb +++ b/spec/views/hyrax/base/_representative_media.html.erb_spec.rb @@ -1,8 +1,8 @@ require 'rails_helper' -RSpec.describe 'sufia/base/_representative_media.html.erb' do +RSpec.describe 'hyrax/base/_representative_media.html.erb' do let(:solr_doc) { double(representative_id: file_set.id, hydra_model: GenericWork) } - let(:pres) { Sufia::WorkShowPresenter.new(solr_doc, nil) } + let(:pres) { Hyrax::WorkShowPresenter.new(solr_doc, nil) } let(:file_set) { FileSet.create! { |fs| fs.apply_depositor_metadata('atz') } } let(:file_presenter) { double('file presenter', id: file_set.id, image?: true) } @@ -11,7 +11,7 @@ Hydra::Works::AddFileToFileSet.call(file_set, File.open(fixture_path + '/images/world.png'), :original_file) - render 'sufia/base/representative_media', presenter: pres + render 'hyrax/base/representative_media', presenter: pres end it 'has a universal viewer' do diff --git a/spec/views/pages/show.html.erb_spec.rb b/spec/views/pages/show.html.erb_spec.rb index 87de157ea..db6a873a6 100644 --- a/spec/views/pages/show.html.erb_spec.rb +++ b/spec/views/pages/show.html.erb_spec.rb @@ -10,6 +10,6 @@ it "renders the about_page content block" do render expect(rendered).to include(page.value) - expect(rendered).not_to include('tinymce') # Ensures sufia's view with editor is not rendered. + expect(rendered).not_to include('tinymce') # Ensures hyrax's view with editor is not rendered. end end