curate 0.0.1 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE +14 -0
- data/app/controllers/application_controller.rb +69 -0
- data/app/controllers/catalog_controller.rb +336 -0
- data/app/controllers/classify_concerns_controller.rb +29 -0
- data/app/controllers/common_objects_controller.rb +27 -0
- data/app/controllers/curation_concern/base_controller.rb +26 -0
- data/app/controllers/curation_concern/generic_files_controller.rb +82 -0
- data/app/controllers/dashboard_controller.rb +85 -0
- data/app/controllers/downloads_controller.rb +22 -0
- data/app/controllers/errors_controller.rb +19 -0
- data/app/controllers/help_requests_controller.rb +38 -0
- data/app/controllers/terms_of_service_agreements_controller.rb +44 -0
- data/app/controllers/welcome_controller.rb +14 -0
- data/app/helpers/application_helper.rb +89 -0
- data/app/helpers/blacklight_helper.rb +19 -0
- data/app/helpers/common_objects_helper.rb +5 -0
- data/app/inputs/multi_value_input.rb +71 -0
- data/app/models/access_right.rb +53 -0
- data/app/models/classify_concern.rb +30 -0
- data/app/models/contributor_agreement.rb +58 -0
- data/app/models/digital_object_identifier.rb +83 -0
- data/app/models/doi_config.rb +26 -0
- data/app/models/help_request.rb +34 -0
- data/app/models/mint_doi.rb +51 -0
- data/app/models/mint_purl.rb +40 -0
- data/app/models/object_access.rb +17 -0
- data/app/models/purl.rb +18 -0
- data/app/models/purl_config.rb +10 -0
- data/app/models/repo_object.rb +24 -0
- data/app/models/solr_document.rb +35 -0
- data/app/repository_datastreams/file_content_datastream.rb +36 -0
- data/app/repository_models/curation_concern/embargoable.rb +43 -0
- data/app/repository_models/curation_concern/with_access_right.rb +31 -0
- data/app/repository_models/generic_file.rb +36 -0
- data/app/services/anti_virus_scanner.rb +28 -0
- data/app/services/curation_concern.rb +22 -0
- data/app/services/curation_concern/base_actor.rb +48 -0
- data/app/services/curation_concern/generic_file_actor.rb +38 -0
- data/app/validators/future_date_validator.rb +19 -0
- data/app/views/_footer.html.erb +19 -0
- data/app/views/_ga.html.erb +6 -0
- data/app/views/_logo.html.erb +34 -0
- data/app/views/_masthead.html.erb +34 -0
- data/app/views/catalog/_bookmark_control.html.erb +25 -0
- data/app/views/catalog/_bookmark_form.html.erb +8 -0
- data/app/views/catalog/_citation.html.erb +11 -0
- data/app/views/catalog/_constraints.html.erb +6 -0
- data/app/views/catalog/_constraints_element.html.erb +20 -0
- data/app/views/catalog/_delete_partials/_default.html.erb +29 -0
- data/app/views/catalog/_did_you_mean.html.erb +10 -0
- data/app/views/catalog/_document.html.erb +19 -0
- data/app/views/catalog/_document_list.html.erb +2 -0
- data/app/views/catalog/_edit_partials/_default.html.erb +58 -0
- data/app/views/catalog/_edit_partials/_default_details.html.erb +13 -0
- data/app/views/catalog/_email_form.html.erb +11 -0
- data/app/views/catalog/_facet_layout.html.erb +12 -0
- data/app/views/catalog/_facet_limit.html.erb +19 -0
- data/app/views/catalog/_facet_selected.html.erb +12 -0
- data/app/views/catalog/_facets.html.erb +5 -0
- data/app/views/catalog/_folder_control.html.erb +12 -0
- data/app/views/catalog/_home.html.erb +2 -0
- data/app/views/catalog/_home_text.html.erb +10 -0
- data/app/views/catalog/_index_default.html.erb +11 -0
- data/app/views/catalog/_index_partials/_default_group.html.erb +37 -0
- data/app/views/catalog/_marc_view.html.erb +33 -0
- data/app/views/catalog/_opensearch_response_metadata.html.erb +2 -0
- data/app/views/catalog/_previous_next_doc.html.erb +6 -0
- data/app/views/catalog/_refworks_form.html.erb +7 -0
- data/app/views/catalog/_results_pagination.html.erb +6 -0
- data/app/views/catalog/_search_form.html.erb +20 -0
- data/app/views/catalog/_show_default.html.erb +9 -0
- data/app/views/catalog/_show_partials/_default.html.erb +22 -0
- data/app/views/catalog/_show_partials/_default_details.html.erb +15 -0
- data/app/views/catalog/_show_partials/_facets.html.erb +52 -0
- data/app/views/catalog/_show_sidebar.html.erb +1 -0
- data/app/views/catalog/_show_tools.html.erb +46 -0
- data/app/views/catalog/_sms_form.html.erb +21 -0
- data/app/views/catalog/_sort_and_per_page.html.erb +38 -0
- data/app/views/catalog/_uva_tabs.html.erb +10 -0
- data/app/views/catalog/about.html.erb +0 -0
- data/app/views/catalog/citation.html.erb +1 -0
- data/app/views/catalog/email.erb +1 -0
- data/app/views/catalog/endnote.endnote.erb +1 -0
- data/app/views/catalog/index.atom.builder +109 -0
- data/app/views/catalog/index.html.erb +55 -0
- data/app/views/catalog/index.rss.builder +19 -0
- data/app/views/catalog/librarian_view.html.erb +3 -0
- data/app/views/catalog/opensearch.json.erb +0 -0
- data/app/views/catalog/opensearch.xml.builder +10 -0
- data/app/views/catalog/send_email_record.erb +0 -0
- data/app/views/catalog/show.endnote.erb +1 -0
- data/app/views/catalog/show.html.erb +40 -0
- data/app/views/catalog/show.refworks.erb +1 -0
- data/app/views/catalog/sms.erb +1 -0
- data/app/views/classify_concerns/new.html.erb +24 -0
- data/app/views/common_objects/_generic_file.html.erb +0 -0
- data/app/views/common_objects/_senior_thesis.html.erb +2 -0
- data/app/views/common_objects/show.html.erb +11 -0
- data/app/views/common_objects/show_stub_information.html.erb +13 -0
- data/app/views/curation_concern/_content_license.html.erb +16 -0
- data/app/views/curation_concern/_contributor_agreement.html.erb +27 -0
- data/app/views/curation_concern/_doi.html.erb +43 -0
- data/app/views/curation_concern/_media_display.html.erb +1 -0
- data/app/views/curation_concern/_permission.html.erb +39 -0
- data/app/views/curation_concern/_related_files.html.erb +46 -0
- data/app/views/curation_concern/generic_files/_attributes.html.erb +63 -0
- data/app/views/curation_concern/generic_files/_form.html.erb +57 -0
- data/app/views/curation_concern/generic_files/edit.html.erb +5 -0
- data/app/views/curation_concern/generic_files/new.html.erb +5 -0
- data/app/views/curation_concern/generic_files/show.html.erb +12 -0
- data/app/views/curation_concern/senior_theses/_attributes.html.erb +13 -0
- data/app/views/curation_concern/senior_theses/_form.html.erb +88 -0
- data/app/views/curation_concern/senior_theses/edit.html.erb +15 -0
- data/app/views/curation_concern/senior_theses/new.html.erb +14 -0
- data/app/views/curation_concern/senior_theses/show.html.erb +18 -0
- data/app/views/dashboard/_constraints.html.erb +22 -0
- data/app/views/dashboard/_did_you_mean.html.erb +26 -0
- data/app/views/dashboard/_document_list.html.erb +20 -0
- data/app/views/dashboard/_facet_layout.html.erb +27 -0
- data/app/views/dashboard/_facet_limit.html.erb +35 -0
- data/app/views/dashboard/_facet_pagination.html.erb +25 -0
- data/app/views/dashboard/_facet_selected.html.erb +28 -0
- data/app/views/dashboard/_facets.html.erb +22 -0
- data/app/views/dashboard/_index_partials/_default_group.html.erb +37 -0
- data/app/views/dashboard/_index_partials/_list_files.html.erb +66 -0
- data/app/views/dashboard/_index_partials/_thumbnail_display.html.erb +0 -0
- data/app/views/dashboard/_results_pagination.html.erb +22 -0
- data/app/views/dashboard/_search_form.html.erb +36 -0
- data/app/views/dashboard/_show_partials/_default.html.erb +38 -0
- data/app/views/dashboard/_show_partials/_default_details.html.erb +31 -0
- data/app/views/dashboard/_show_partials/_facets.html.erb +103 -0
- data/app/views/dashboard/_sort_and_per_page.html.erb +18 -0
- data/app/views/dashboard/facet.html.erb +38 -0
- data/app/views/dashboard/get_related_file.html.erb +4 -0
- data/app/views/dashboard/index.html.erb +60 -0
- data/app/views/errors/401.html.erb +5 -0
- data/app/views/errors/404.html.erb +16 -0
- data/app/views/errors/500.html.erb +10 -0
- data/app/views/help_requests/new.html.erb +60 -0
- data/app/views/layouts/application.html.erb +14 -0
- data/app/views/layouts/boilerplate.html.erb +28 -0
- data/app/views/layouts/common_objects.html.erb +45 -0
- data/app/views/layouts/curate_nd.html.erb +55 -0
- data/app/views/layouts/curate_nd/1_column.html.erb +22 -0
- data/app/views/layouts/curate_nd/2_column.html.erb +26 -0
- data/app/views/layouts/curate_nd/catalog.html.erb +22 -0
- data/app/views/layouts/curate_nd/dashboard.html.erb +22 -0
- data/app/views/layouts/hydra-head.html.erb +95 -0
- data/app/views/shared/_action_bar.html.erb +30 -0
- data/app/views/shared/_flash_message.html.erb +9 -0
- data/app/views/shared/_site_search.html.erb +18 -0
- data/app/views/terms_of_service_agreements/new.html.erb +136 -0
- data/app/views/welcome/index.html.erb +21 -0
- data/app/workers/characterize_job.rb +4 -0
- data/app/workers/doi_worker.rb +16 -0
- data/config/routes.rb +35 -0
- data/lib/curate.rb +6 -0
- data/lib/curate/engine.rb +46 -0
- data/lib/curate/version.rb +1 -1
- data/spec/abilities/generic_file_abilities_spec.rb +55 -0
- data/spec/controllers/application_controller_spec.rb +38 -0
- data/spec/controllers/classify_concerns_controller_spec.rb +36 -0
- data/spec/controllers/common_objects_controller_spec.rb +112 -0
- data/spec/controllers/curation_concern/base_controller_spec.rb +14 -0
- data/spec/controllers/curation_concern/generic_files_controller_spec.rb +156 -0
- data/spec/controllers/dashboard_controller_spec.rb +85 -0
- data/spec/controllers/downloads_controller_spec.rb +42 -0
- data/spec/controllers/help_requests_controller_spec.rb +42 -0
- data/spec/controllers/terms_of_service_agreements_controller_spec.rb +30 -0
- data/spec/controllers/welcome_controller_spec.rb +10 -0
- data/spec/dummy/app/models/solr_document.rb +4 -0
- data/spec/dummy/app/models/user.rb +13 -0
- data/spec/dummy/config/application.rb +8 -1
- data/spec/dummy/config/database.yml +21 -22
- data/spec/dummy/config/doi.yml +11 -0
- data/spec/dummy/config/fedora.yml +20 -0
- data/spec/dummy/config/initializers/devise.rb +232 -0
- data/spec/dummy/config/initializers/hydra_config.rb +41 -0
- data/spec/dummy/config/initializers/mailboxer.rb +17 -0
- data/spec/dummy/config/initializers/redis_config.rb +45 -0
- data/spec/dummy/config/initializers/sufia.rb +66 -0
- data/spec/dummy/config/purl.yml +15 -0
- data/spec/dummy/config/redis.yml +6 -0
- data/spec/dummy/config/role_map_ci.yml +15 -0
- data/spec/dummy/config/role_map_cucumber.yml +10 -0
- data/spec/dummy/config/role_map_development.yml +12 -0
- data/spec/dummy/config/role_map_pre_production.yml +2 -0
- data/spec/dummy/config/role_map_production.yml +2 -0
- data/spec/dummy/config/role_map_test.yml +15 -0
- data/spec/dummy/config/routes.rb +4 -55
- data/spec/dummy/config/solr.yml +17 -0
- data/spec/dummy/db/migrate/20130130142162_create_purl.rb +55 -0
- data/spec/dummy/db/migrate/20130312135359_create_help_requests.rb +22 -0
- data/spec/dummy/db/migrate/20130408165008_create_users.rb +11 -0
- data/spec/dummy/db/migrate/20130408165009_acts_as_follower_migration.rb +31 -0
- data/spec/dummy/db/migrate/20130408165010_add_social_to_users.rb +27 -0
- data/spec/dummy/db/migrate/20130408165011_create_single_use_links.rb +12 -0
- data/spec/dummy/db/migrate/20130408165012_add_ldap_attrs_to_user.rb +41 -0
- data/spec/dummy/db/migrate/20130408165013_add_avatars_to_users.rb +23 -0
- data/spec/dummy/db/migrate/20130408165014_create_checksum_audit_logs.rb +34 -0
- data/spec/dummy/db/migrate/20130408165015_create_version_committers.rb +29 -0
- data/spec/dummy/db/migrate/20130408165016_add_groups_to_users.rb +25 -0
- data/spec/dummy/db/migrate/20130408165017_create_local_authorities.rb +64 -0
- data/spec/dummy/db/migrate/20130408165018_create_trophies.rb +10 -0
- data/spec/dummy/db/migrate/20130408165022_create_mailboxer.mailboxer_engine.rb +62 -0
- data/spec/dummy/db/migrate/20130408165023_add_notified_object.mailboxer_engine.rb +18 -0
- data/spec/dummy/db/migrate/20130408165024_add_notification_code.mailboxer_engine.rb +14 -0
- data/spec/dummy/db/migrate/20130408165025_add_attachments.mailboxer_engine.rb +10 -0
- data/spec/dummy/db/migrate/20130408165026_rename_receipts_read.mailboxer_engine.rb +10 -0
- data/spec/dummy/db/schema.rb +197 -0
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/fedora_conf/conf/development/fedora.fcfg +953 -0
- data/spec/dummy/fedora_conf/conf/test/fedora.fcfg +953 -0
- data/spec/dummy/log/development.log +1791 -0
- data/spec/dummy/log/test.log +176333 -0
- data/spec/dummy/solr_conf/conf/schema.xml +692 -0
- data/spec/dummy/solr_conf/conf/solrconfig.xml +299 -0
- data/spec/dummy/solr_conf/solr.xml +35 -0
- data/spec/factories/create_curation_concern.rb +11 -0
- data/spec/factories/create_generic_file.rb +36 -0
- data/spec/factories/help_requests.rb +10 -0
- data/spec/factories/mock_curation_concerns.rb +4 -0
- data/spec/factories/users.rb +8 -0
- data/spec/helpers/application_helper_spec.rb +139 -0
- data/spec/helpers/common_objects_helper_spec.rb +9 -0
- data/spec/models/access_right_spec.rb +47 -0
- data/spec/models/classify_concern_spec.rb +30 -0
- data/spec/models/contributor_agreement_spec.rb +45 -0
- data/spec/models/digital_object_identifier_spec.rb +50 -0
- data/spec/models/help_request_spec.rb +5 -0
- data/spec/models/mint_doi_spec.rb +79 -0
- data/spec/models/mint_purl_spec.rb +38 -0
- data/spec/models/object_access_spec.rb +24 -0
- data/spec/models/purl_spec.rb +22 -0
- data/spec/models/repo_object_spec.rb +39 -0
- data/spec/repository_models/curation_concern/embargoable_spec.rb +69 -0
- data/spec/repository_models/generic_file_spec.rb +38 -0
- data/spec/services/anti_virus_scanner_spec.rb +26 -0
- data/spec/services/curation_concern/base_actor_spec.rb +28 -0
- data/spec/services/curation_concern/generic_file_actor_spec.rb +75 -0
- data/spec/services/curation_concern_spec.rb +34 -0
- data/spec/spec_helper.rb +54 -1
- data/spec/support/environment_override.rb +17 -0
- data/spec/support/matchers/raise_rescue_response_type_matcher.rb +42 -0
- data/spec/support/mock_curation_concern.rb +61 -0
- data/spec/support/shared/shared_examples_is_embargoable.rb +9 -0
- data/spec/support/shared/shared_examples_with_access_rights.rb +33 -0
- data/spec/workers/characterize_job_spec.rb +26 -0
- metadata +686 -10
- data/MIT-LICENSE +0 -20
@@ -0,0 +1,41 @@
|
|
1
|
+
# The following lines determine which user attributes your hydrangea app will use
|
2
|
+
# This configuration allows you to use the out of the box ActiveRecord associations between users and user_attributes
|
3
|
+
# It also allows you to specify your own user attributes
|
4
|
+
# The easiest way to override these methods would be to create your own module to include in User
|
5
|
+
# For example you could create a module for your local LDAP instance called MyLocalLDAPUserAttributes:
|
6
|
+
# User.send(:include, MyLocalLDAPAttributes)
|
7
|
+
# As long as your module includes methods for full_name, affiliation, and photo the personalization_helper should function correctly
|
8
|
+
#
|
9
|
+
if Hydra.respond_to?(:configure)
|
10
|
+
Hydra.configure(:shared) do |config|
|
11
|
+
|
12
|
+
config[:submission_workflow] = {
|
13
|
+
:mods_assets => [{:name => "contributor", :edit_partial => "mods_assets/contributor_form", :show_partial => "mods_assets/show_contributors"},
|
14
|
+
{:name => "publication", :edit_partial => "mods_assets/publication_form", :show_partial => "mods_assets/show_publication"},
|
15
|
+
{:name => "additional_info", :edit_partial => "mods_assets/additional_info_form", :show_partial => "mods_assets/show_additional_info"},
|
16
|
+
{:name => "files", :edit_partial => "hydra/file_assets/file_assets_form", :show_partial => "mods_assets/show_file_assets"},
|
17
|
+
{:name => "permissions", :edit_partial => "hydra/permissions/permissions_form", :show_partial => "mods_assets/show_permissions"}
|
18
|
+
],
|
19
|
+
# Not being used right now
|
20
|
+
:generic_contents => [{:name => "description", :edit_partial => "generic_content_objects/description_form", :show_partial => "generic_contents/show_description"},
|
21
|
+
{:name => "files", :edit_partial => "hydra/file_assets/file_assets_form", :show_partial => "file_assets/index"},
|
22
|
+
{:name => "permissions", :edit_partial => "hydra/permissions/permissions_form", :show_partial => "generic_contents/show_permissions"},
|
23
|
+
{:name => "contributor", :edit_partial => "generic_content_objects/contributor_form", :show_partial => "generic_contents/show_contributors"}
|
24
|
+
]
|
25
|
+
}
|
26
|
+
|
27
|
+
# This specifies the solr field names of permissions-related fields.
|
28
|
+
# You only need to change these values if you've indexed permissions by some means other than the Hydra's built-in tooling.
|
29
|
+
# If you change these, you must also update the permissions request handler in your solrconfig.xml to return those values
|
30
|
+
config[:permissions] = {
|
31
|
+
:discover => {:group =>"discover_access_group_t", :individual=>"discover_access_person_t"},
|
32
|
+
:read => {:group =>"read_access_group_t", :individual=>"read_access_person_t"},
|
33
|
+
:edit => {:group =>"edit_access_group_t", :individual=>"edit_access_person_t"},
|
34
|
+
:owner => "depositor_t",
|
35
|
+
:embargo_release_date => "embargo_release_date_dt"
|
36
|
+
}
|
37
|
+
|
38
|
+
# specify the user model
|
39
|
+
config[:user_model] = 'User'
|
40
|
+
end
|
41
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
Mailboxer.setup do |config|
|
2
|
+
|
3
|
+
#Configures if you applications uses or no the email sending for Notifications and Messages
|
4
|
+
config.uses_emails = true
|
5
|
+
|
6
|
+
#Configures the default from for the email sent for Messages and Notifications of Mailboxer
|
7
|
+
config.default_from = "no-reply@mailboxer.com"
|
8
|
+
|
9
|
+
#Configures the methods needed by mailboxer
|
10
|
+
config.email_method = :mailboxer_email
|
11
|
+
config.name_method = :name
|
12
|
+
|
13
|
+
#Configures if you use or not a search engine and wich one are you using
|
14
|
+
#Supported enignes: [:solr,:sphinx]
|
15
|
+
config.search_enabled = false
|
16
|
+
config.search_engine = :solr
|
17
|
+
end
|
@@ -0,0 +1,45 @@
|
|
1
|
+
# Copyright © 2012 The Pennsylvania State University
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
if defined?(PhusionPassenger)
|
16
|
+
PhusionPassenger.on_event(:starting_worker_process) do |forked|
|
17
|
+
# We're in smart spawning mode.
|
18
|
+
if forked
|
19
|
+
# Re-establish redis connection
|
20
|
+
require 'redis'
|
21
|
+
config = YAML::load(ERB.new(IO.read(File.join(Rails.root, 'config', 'redis.yml'))).result)[Rails.env].with_indifferent_access
|
22
|
+
|
23
|
+
# The important two lines
|
24
|
+
$redis.client.disconnect if $redis
|
25
|
+
$redis = Redis.new(host: config[:host], port: config[:port], thread_safe: true) rescue nil
|
26
|
+
Resque.redis.client.reconnect if Resque.redis
|
27
|
+
end
|
28
|
+
end
|
29
|
+
else
|
30
|
+
config = YAML::load(ERB.new(IO.read(File.join(Rails.root, 'config', 'redis.yml'))).result)[Rails.env].with_indifferent_access
|
31
|
+
$redis = Redis.new(host: config[:host], port: config[:port], thread_safe: true) rescue nil
|
32
|
+
end
|
33
|
+
|
34
|
+
|
35
|
+
# Code borrowed from Obie's Redis patterns talk at RailsConf'12
|
36
|
+
Nest.class_eval do
|
37
|
+
def initialize(key, redis=$redis)
|
38
|
+
super(key.to_param)
|
39
|
+
@redis = redis
|
40
|
+
end
|
41
|
+
|
42
|
+
def [](key)
|
43
|
+
self.class.new("#{self}:#{key.to_param}", @redis)
|
44
|
+
end
|
45
|
+
end
|
@@ -0,0 +1,66 @@
|
|
1
|
+
# Returns an array containing the vhost 'CoSign service' value and URL
|
2
|
+
Sufia.config do |config|
|
3
|
+
config.id_namespace = "sufia"
|
4
|
+
config.fits_path = "fits.sh"
|
5
|
+
config.fits_to_desc_mapping= {
|
6
|
+
:file_title => :title,
|
7
|
+
:file_author => :creator
|
8
|
+
}
|
9
|
+
|
10
|
+
config.max_days_between_audits = 7
|
11
|
+
|
12
|
+
config.cc_licenses = {
|
13
|
+
'Attribution 3.0 United States' => 'http://creativecommons.org/licenses/by/3.0/us/',
|
14
|
+
'Attribution-ShareAlike 3.0 United States' => 'http://creativecommons.org/licenses/by-sa/3.0/us/',
|
15
|
+
'Attribution-NonCommercial 3.0 United States' => 'http://creativecommons.org/licenses/by-nc/3.0/us/',
|
16
|
+
'Attribution-NoDerivs 3.0 United States' => 'http://creativecommons.org/licenses/by-nd/3.0/us/',
|
17
|
+
'Attribution-NonCommercial-NoDerivs 3.0 United States' => 'http://creativecommons.org/licenses/by-nc-nd/3.0/us/',
|
18
|
+
'Attribution-NonCommercial-ShareAlike 3.0 United States' => 'http://creativecommons.org/licenses/by-nc-sa/3.0/us/',
|
19
|
+
'Public Domain Mark 1.0' => 'http://creativecommons.org/publicdomain/mark/1.0/',
|
20
|
+
'CC0 1.0 Universal' => 'http://creativecommons.org/publicdomain/zero/1.0/',
|
21
|
+
'All rights reserved' => 'All rights reserved'
|
22
|
+
}
|
23
|
+
|
24
|
+
config.cc_licenses_reverse = Hash[*config.cc_licenses.to_a.flatten.reverse]
|
25
|
+
|
26
|
+
config.resource_types = {
|
27
|
+
"Article" => "Article",
|
28
|
+
"Audio" => "Audio",
|
29
|
+
"Book" => "Book",
|
30
|
+
"Capstone Project" => "Capstone Project",
|
31
|
+
"Conference Proceeding" => "Conference Proceeding",
|
32
|
+
"Dataset" => "Dataset",
|
33
|
+
"Dissertation" => "Dissertation",
|
34
|
+
"Image" => "Image",
|
35
|
+
"Journal" => "Journal",
|
36
|
+
"Map or Cartographic Material" => "Map or Cartographic Material",
|
37
|
+
"Masters Thesis" => "Masters Thesis",
|
38
|
+
"Part of Book" => "Part of Book",
|
39
|
+
"Poster" => "Poster",
|
40
|
+
"Presentation" => "Presentation",
|
41
|
+
"Project" => "Project",
|
42
|
+
"Report" => "Report",
|
43
|
+
"Research Paper" => "Research Paper",
|
44
|
+
"Software or Program Code" => "Software or Program Code",
|
45
|
+
"Video" => "Video",
|
46
|
+
"Other" => "Other",
|
47
|
+
}
|
48
|
+
|
49
|
+
config.permission_levels = {
|
50
|
+
"Choose Access"=>"none",
|
51
|
+
"View/Download" => "read",
|
52
|
+
"Edit" => "edit"
|
53
|
+
}
|
54
|
+
|
55
|
+
config.owner_permission_levels = {
|
56
|
+
"Edit" => "edit"
|
57
|
+
}
|
58
|
+
|
59
|
+
config.queue = Sufia::Resque::Queue
|
60
|
+
|
61
|
+
# Map hostnames onto Google Analytics tracking IDs
|
62
|
+
#config.google_analytics_id = 'UA-99999999-1'
|
63
|
+
|
64
|
+
end
|
65
|
+
|
66
|
+
|
@@ -0,0 +1,15 @@
|
|
1
|
+
development: &development
|
2
|
+
url: http://localhost:3000/view/
|
3
|
+
|
4
|
+
test: &test
|
5
|
+
<<: *development
|
6
|
+
|
7
|
+
ci:
|
8
|
+
<<: *test
|
9
|
+
|
10
|
+
pre_production:
|
11
|
+
url: http://repopurlpprd.library.nd.edu/view/
|
12
|
+
|
13
|
+
production:
|
14
|
+
url: http://repository.library.nd.edu/view/
|
15
|
+
|
@@ -0,0 +1,15 @@
|
|
1
|
+
archivist:
|
2
|
+
- archivist1@example.com
|
3
|
+
- archivist2@example.com
|
4
|
+
- leland_himself@example.com
|
5
|
+
admin_policy_object_editor:
|
6
|
+
- archivist1@example.com
|
7
|
+
donor:
|
8
|
+
- donor1@example.com
|
9
|
+
- leland_himself@example.com
|
10
|
+
researcher:
|
11
|
+
- archivist1@example.com
|
12
|
+
- researcher1@example.com
|
13
|
+
patron:
|
14
|
+
- patron1@example.com
|
15
|
+
- leland_himself@example.com
|
@@ -0,0 +1,15 @@
|
|
1
|
+
archivist:
|
2
|
+
- archivist1@example.com
|
3
|
+
- archivist2@example.com
|
4
|
+
- leland_himself@example.com
|
5
|
+
admin_policy_object_editor:
|
6
|
+
- archivist1@example.com
|
7
|
+
donor:
|
8
|
+
- donor1@example.com
|
9
|
+
- leland_himself@example.com
|
10
|
+
researcher:
|
11
|
+
- archivist1@example.com
|
12
|
+
- researcher1@example.com
|
13
|
+
patron:
|
14
|
+
- patron1@example.com
|
15
|
+
- leland_himself@example.com
|
data/spec/dummy/config/routes.rb
CHANGED
@@ -1,58 +1,7 @@
|
|
1
1
|
Dummy::Application.routes.draw do
|
2
|
-
|
3
|
-
# first created -> highest priority.
|
2
|
+
devise_for :users
|
4
3
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
# Sample of named route:
|
10
|
-
# match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase
|
11
|
-
# This route can be invoked with purchase_url(:id => product.id)
|
12
|
-
|
13
|
-
# Sample resource route (maps HTTP verbs to controller actions automatically):
|
14
|
-
# resources :products
|
15
|
-
|
16
|
-
# Sample resource route with options:
|
17
|
-
# resources :products do
|
18
|
-
# member do
|
19
|
-
# get 'short'
|
20
|
-
# post 'toggle'
|
21
|
-
# end
|
22
|
-
#
|
23
|
-
# collection do
|
24
|
-
# get 'sold'
|
25
|
-
# end
|
26
|
-
# end
|
27
|
-
|
28
|
-
# Sample resource route with sub-resources:
|
29
|
-
# resources :products do
|
30
|
-
# resources :comments, :sales
|
31
|
-
# resource :seller
|
32
|
-
# end
|
33
|
-
|
34
|
-
# Sample resource route with more complex sub-resources
|
35
|
-
# resources :products do
|
36
|
-
# resources :comments
|
37
|
-
# resources :sales do
|
38
|
-
# get 'recent', :on => :collection
|
39
|
-
# end
|
40
|
-
# end
|
41
|
-
|
42
|
-
# Sample resource route within a namespace:
|
43
|
-
# namespace :admin do
|
44
|
-
# # Directs /admin/products/* to Admin::ProductsController
|
45
|
-
# # (app/controllers/admin/products_controller.rb)
|
46
|
-
# resources :products
|
47
|
-
# end
|
48
|
-
|
49
|
-
# You can have the root of your site routed with "root"
|
50
|
-
# just remember to delete public/index.html.
|
51
|
-
# root :to => 'welcome#index'
|
52
|
-
|
53
|
-
# See how all your routes lay out with "rake routes"
|
54
|
-
|
55
|
-
# This is a legacy wild controller route that's not recommended for RESTful applications.
|
56
|
-
# Note: This route will make all actions in every controller accessible via GET requests.
|
57
|
-
# match ':controller(/:action(/:id))(.:format)'
|
4
|
+
namespace :curation_concern, path: :concern do
|
5
|
+
resources :mock_curation_concern, except: :index
|
6
|
+
end
|
58
7
|
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
#
|
2
|
+
# FYI: This file is replaced by a copy for deploys
|
3
|
+
# to ci, pre_production, and production.
|
4
|
+
#
|
5
|
+
|
6
|
+
# This is a sample config file that does not have multiple solr instances. You will also need to be sure to
|
7
|
+
# edit the fedora.yml file to match the solr URL for active-fedora.
|
8
|
+
development:
|
9
|
+
url: http://localhost:8983/solr/development
|
10
|
+
test: &TEST
|
11
|
+
url: <%= "http://127.0.0.1:#{ENV['TEST_JETTY_PORT'] || 8983}/solr/test" %>
|
12
|
+
cucumber:
|
13
|
+
<<: *TEST
|
14
|
+
ci:
|
15
|
+
<<: *TEST
|
16
|
+
production:
|
17
|
+
url: http://your.production.server:8080/bl_solr/core0
|
@@ -0,0 +1,55 @@
|
|
1
|
+
# Copyright © 2012 The Pennsylvania State University
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
class CreatePurl < ActiveRecord::Migration
|
16
|
+
def self.up
|
17
|
+
create_table :repo_object, {:primary_key => :repo_object_id} do |t|
|
18
|
+
t.integer :repo_object_id
|
19
|
+
t.string :filename
|
20
|
+
t.string :url
|
21
|
+
t.datetime :date_added
|
22
|
+
t.string :add_source_ip
|
23
|
+
t.datetime :date_modified
|
24
|
+
t.string :information
|
25
|
+
end
|
26
|
+
|
27
|
+
create_table :purl, {:primary_key => :purl_id} do |t|
|
28
|
+
t.integer :purl_id
|
29
|
+
t.integer :repo_object_id
|
30
|
+
t.string :access_count
|
31
|
+
t.datetime :last_accessed
|
32
|
+
t.string :source_app
|
33
|
+
t.datetime :date_created
|
34
|
+
end
|
35
|
+
|
36
|
+
create_table :object_access, {:primary_key => :access_id} do |t|
|
37
|
+
t.integer :access_id
|
38
|
+
t.datetime :date_accessed
|
39
|
+
t.string :ip_address
|
40
|
+
t.string :host_name
|
41
|
+
t.string :user_agent
|
42
|
+
t.string :request_method
|
43
|
+
t.string :path_info
|
44
|
+
t.integer :repo_object_id
|
45
|
+
t.integer :purl_id
|
46
|
+
end
|
47
|
+
|
48
|
+
end
|
49
|
+
|
50
|
+
def self.down
|
51
|
+
drop_table :repo_object
|
52
|
+
drop_table :purl
|
53
|
+
drop_table :object_access
|
54
|
+
end
|
55
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
class CreateHelpRequests < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
create_table :help_requests do |t|
|
4
|
+
t.string :view_port
|
5
|
+
t.text :current_url
|
6
|
+
t.string :user_agent
|
7
|
+
t.string :resolution
|
8
|
+
t.text :how_can_we_help_you
|
9
|
+
t.boolean :javascript_enabled
|
10
|
+
t.string :release_version
|
11
|
+
t.integer :user_id
|
12
|
+
|
13
|
+
t.timestamps
|
14
|
+
end
|
15
|
+
add_index :help_requests, :user_id
|
16
|
+
add_index :help_requests, :created_at
|
17
|
+
end
|
18
|
+
|
19
|
+
def self.down
|
20
|
+
drop_table :help_requests
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# Copyright © 2012 The Pennsylvania State University
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
class ActsAsFollowerMigration < ActiveRecord::Migration
|
16
|
+
def self.up
|
17
|
+
create_table :follows, :force => true do |t|
|
18
|
+
t.references :followable, :polymorphic => true, :null => false
|
19
|
+
t.references :follower, :polymorphic => true, :null => false
|
20
|
+
t.boolean :blocked, :default => false, :null => false
|
21
|
+
t.timestamps
|
22
|
+
end
|
23
|
+
|
24
|
+
add_index :follows, ["follower_id", "follower_type"], :name => "fk_follows"
|
25
|
+
add_index :follows, ["followable_id", "followable_type"], :name => "fk_followables"
|
26
|
+
end
|
27
|
+
|
28
|
+
def self.down
|
29
|
+
drop_table :follows
|
30
|
+
end
|
31
|
+
end
|