sufia 6.0.0 → 6.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.travis.yml +2 -5
- data/CONTRIBUTING.md +4 -4
- data/Gemfile +2 -1
- data/History.md +69 -0
- data/README.md +84 -4
- data/SUFIA_VERSION +1 -1
- data/app/assets/images/zotero.png +0 -0
- data/app/assets/javascripts/sufia/featured_works.js +20 -3
- data/app/assets/stylesheets/generic_files.css.erb +2 -2
- data/app/assets/stylesheets/sufia.css.scss +2 -2
- data/app/assets/stylesheets/sufia/_buttons.scss +2 -2
- data/app/assets/stylesheets/sufia/_collections.scss +4 -4
- data/app/assets/stylesheets/sufia/_dashboard.scss +1 -1
- data/app/assets/stylesheets/sufia/_file-listing.scss +3 -0
- data/app/assets/stylesheets/sufia/_modal.scss +4 -0
- data/app/assets/stylesheets/sufia/_settings.scss +4 -3
- data/app/assets/stylesheets/sufia/_styles.scss +4 -0
- data/app/controllers/admin/stats_controller.rb +68 -0
- data/app/controllers/api/items_controller.rb +78 -0
- data/app/controllers/api/zotero_controller.rb +70 -0
- data/app/controllers/authorities_controller.rb +6 -5
- data/app/controllers/concerns/sufia/batch_edits_controller_behavior.rb +2 -1
- data/app/controllers/concerns/sufia/breadcrumbs.rb +1 -1
- data/app/controllers/concerns/sufia/depositors_controller_behavior.rb +11 -0
- data/app/controllers/concerns/sufia/files_controller/browse_everything.rb +1 -1
- data/app/controllers/concerns/sufia/files_controller/local_ingest_behavior.rb +1 -1
- data/app/controllers/concerns/sufia/files_controller_behavior.rb +23 -11
- data/app/controllers/concerns/sufia/my_controller_behavior.rb +1 -7
- data/app/controllers/concerns/sufia/users_controller_behavior.rb +1 -2
- data/app/controllers/my/collections_controller.rb +1 -0
- data/app/controllers/my/files_controller.rb +1 -1
- data/app/helpers/sufia/sufia_helper_behavior.rb +28 -16
- data/app/models/my_search_builder.rb +4 -0
- data/app/search_builders/sufia/my_search_builder_behavior.rb +20 -0
- data/app/search_builders/sufia/search_builder.rb +1 -1
- data/app/views/admin/stats/index.html.erb +68 -0
- data/app/views/collections/_action_menu.html.erb +22 -20
- data/app/views/collections/_collection.html.erb +1 -1
- data/app/views/collections/_form_for_select_collection.html.erb +5 -3
- data/app/views/generic_files/_show_actions.html.erb +4 -2
- data/app/views/generic_files/show.html.erb +1 -1
- data/app/views/layouts/sufia-dashboard.html.erb +5 -4
- data/app/views/layouts/sufia-one-column.html.erb +2 -0
- data/app/views/layouts/sufia-two-column.html.erb +6 -4
- data/app/views/my/_facet_layout.html.erb +2 -2
- data/app/views/my/_facets.html.erb +4 -6
- data/app/views/my/index.html.erb +4 -3
- data/app/views/users/_edit_primary.html.erb +18 -17
- data/app/views/users/_follower_modal.html.erb +5 -1
- data/app/views/users/_following_modal.html.erb +5 -1
- data/app/views/users/_user_info.html.erb +6 -1
- data/app/views/users/_zotero.html.erb +12 -0
- data/config/locales/sufia.en.yml +10 -1
- data/config/routes.rb +23 -1
- data/lib/generators/sufia/admin_stat_generator.rb +17 -0
- data/lib/generators/sufia/install_generator.rb +8 -3
- data/{sufia-models/lib/generators/sufia/models/templates/config/resque_admin.rb → lib/generators/sufia/templates/sufia/stats_admin.rb} +3 -3
- data/lib/generators/sufia/upgrade400_generator.rb +2 -2
- data/lib/sufia.rb +3 -0
- data/lib/sufia/arkivo.rb +11 -0
- data/lib/sufia/arkivo/actor.rb +95 -0
- data/lib/sufia/arkivo/config.rb +11 -0
- data/lib/sufia/arkivo/create_subscription_job.rb +67 -0
- data/lib/sufia/arkivo/metadata_munger.rb +51 -0
- data/lib/sufia/arkivo/schema_validator.rb +55 -0
- data/lib/sufia/form_builder.rb +1 -1
- data/lib/sufia/inflections.rb +3 -0
- data/lib/sufia/version.rb +1 -1
- data/lib/sufia/zotero.rb +6 -0
- data/lib/sufia/zotero/config.rb +15 -0
- data/solr_conf/conf/solrconfig.xml +11 -0
- data/spec/controllers/admin_stats_controller_spec.rb +73 -0
- data/spec/controllers/api/items_controller_spec.rb +476 -0
- data/spec/controllers/api/zotero_controller_spec.rb +178 -0
- data/spec/controllers/batch_edits_controller_spec.rb +7 -0
- data/spec/controllers/collections_controller_spec.rb +1 -1
- data/spec/controllers/dashboard_controller_spec.rb +1 -1
- data/spec/controllers/depositors_controller_spec.rb +9 -5
- data/spec/controllers/generic_files_controller_spec.rb +5 -4
- data/spec/controllers/mailbox_controller_spec.rb +2 -2
- data/spec/controllers/my/collections_controller_spec.rb +1 -2
- data/spec/controllers/my/files_controller_spec.rb +5 -5
- data/spec/controllers/my/shares_controller_spec.rb +15 -3
- data/spec/controllers/pages_controller_spec.rb +1 -1
- data/spec/controllers/users_controller_spec.rb +10 -9
- data/spec/factories/api_items.rb +91 -0
- data/spec/factories/generic_files.rb +4 -0
- data/spec/factories/users.rb +4 -4
- data/spec/features/featured_item_spec.rb +26 -0
- data/spec/features/ingest_upload_files_spec.rb +2 -3
- data/spec/features/proxy_spec.rb +0 -1
- data/spec/helpers/permissions_helper_spec.rb +2 -2
- data/spec/helpers/sufia_helper_spec.rb +11 -5
- data/spec/inputs/select_with_help_input_spec.rb +2 -2
- data/spec/javascripts/helpers/.gitkeep +0 -0
- data/spec/javascripts/helpers/jasmine-jquery.js +832 -0
- data/spec/javascripts/jasmine_spec.rb +31 -0
- data/spec/javascripts/notify_update_link_spec.js +8 -0
- data/spec/javascripts/single_use_link_spec.js.coffee +23 -0
- data/spec/javascripts/support/jasmine.yml +124 -0
- data/spec/javascripts/support/jasmine_helper.rb +15 -0
- data/spec/javascripts/terms_of_service_spec.js.coffee +32 -0
- data/spec/javascripts/toggle_icon_spec.js +11 -0
- data/spec/jobs/active_fedora_id_based_job_spec.rb +3 -3
- data/spec/jobs/import_url_job_spec.rb +0 -2
- data/spec/lib/sufia/arkivo/actor_spec.rb +139 -0
- data/spec/lib/sufia/arkivo/create_subscription_job_spec.rb +54 -0
- data/spec/lib/sufia/arkivo/metadata_munger_spec.rb +48 -0
- data/spec/lib/sufia/arkivo/schema_validator_spec.rb +65 -0
- data/spec/lib/sufia/upload_complete_behavior_spec.rb +1 -1
- data/spec/lib/sufia/user_stat_importer_spec.rb +60 -0
- data/spec/lib/sufia/zotero/config_spec.rb +30 -0
- data/spec/models/collection_spec.rb +36 -7
- data/spec/models/file_download_stat_spec.rb +5 -5
- data/spec/models/file_usage_spec.rb +23 -0
- data/spec/models/file_view_stat_spec.rb +6 -6
- data/spec/models/fits_datastream_spec.rb +0 -5
- data/spec/models/generic_file_spec.rb +49 -14
- data/spec/models/local_authority_spec.rb +1 -1
- data/spec/models/proxy_deposit_request_spec.rb +1 -1
- data/spec/models/trophy_spec.rb +8 -8
- data/spec/models/user_spec.rb +33 -0
- data/spec/presenters/sufia/collection_presenter_spec.rb +1 -1
- data/spec/routing/api_route_spec.rb +91 -0
- data/spec/routing/route_spec.rb +1 -1
- data/spec/services/generic_file_audit_service_spec.rb +44 -8
- data/spec/spec_helper.rb +18 -3
- data/spec/support/features.rb +0 -2
- data/spec/support/locations.rb +0 -21
- data/spec/support/rake.rb +41 -0
- data/spec/support/selectors.rb +0 -50
- data/spec/tasks/rake_spec.rb +33 -12
- data/spec/test_app_templates/lib/generators/test_app_generator.rb +12 -0
- data/spec/views/admin/stats/index.html.erb_spec.rb +45 -0
- data/spec/views/catalog/sort_and_per_page.html.erb_spec.rb +0 -1
- data/spec/views/dashboard/index_spec.rb +1 -1
- data/spec/views/generic_file/edit.html.erb_spec.rb +1 -1
- data/spec/views/generic_file/show.html.erb_spec.rb +1 -3
- data/spec/views/users/_follower_modal.html.erb_spec.rb +44 -7
- data/spec/views/users/_following_modal.html.erb_spec.rb +49 -7
- data/spec/views/users/edit.html.erb_spec.rb +72 -0
- data/spec/views/users/show.html.erb_spec.rb +1 -1
- data/sufia.gemspec +6 -2
- data/tasks/sufia-user.rake +14 -0
- metadata +130 -156
- data/spec/lib/sufia/id_service_spec.rb +0 -32
- data/spec/services/noid_spec.rb +0 -9
- data/spec/support/poltergeist.rb +0 -11
- data/spec/support/rake_output.rb +0 -20
- data/sufia-models/.gitignore +0 -17
- data/sufia-models/Gemfile +0 -4
- data/sufia-models/LICENSE.md +0 -177
- data/sufia-models/README.md +0 -39
- data/sufia-models/Rakefile +0 -1
- data/sufia-models/app/actors/sufia/generic_file/actor.rb +0 -137
- data/sufia-models/app/jobs/active_fedora_id_based_job.rb +0 -22
- data/sufia-models/app/jobs/active_fedora_pid_based_job.rb +0 -7
- data/sufia-models/app/jobs/audit_job.rb +0 -62
- data/sufia-models/app/jobs/batch_update_job.rb +0 -72
- data/sufia-models/app/jobs/characterize_job.rb +0 -10
- data/sufia-models/app/jobs/create_derivatives_job.rb +0 -14
- data/sufia-models/app/jobs/import_url_job.rb +0 -52
- data/sufia-models/app/jobs/ingest_local_file_job.rb +0 -46
- data/sufia-models/app/jobs/resolrize_job.rb +0 -9
- data/sufia-models/app/models/batch.rb +0 -36
- data/sufia-models/app/models/checksum_audit_log.rb +0 -21
- data/sufia-models/app/models/concerns/sufia/ability.rb +0 -61
- data/sufia-models/app/models/concerns/sufia/collection_behavior.rb +0 -24
- data/sufia-models/app/models/concerns/sufia/file_stat_utils.rb +0 -35
- data/sufia-models/app/models/concerns/sufia/generic_file.rb +0 -25
- data/sufia-models/app/models/concerns/sufia/generic_file/batches.rb +0 -28
- data/sufia-models/app/models/concerns/sufia/generic_file/characterization.rb +0 -89
- data/sufia-models/app/models/concerns/sufia/generic_file/content.rb +0 -13
- data/sufia-models/app/models/concerns/sufia/generic_file/derivatives.rb +0 -26
- data/sufia-models/app/models/concerns/sufia/generic_file/export.rb +0 -343
- data/sufia-models/app/models/concerns/sufia/generic_file/featured.rb +0 -11
- data/sufia-models/app/models/concerns/sufia/generic_file/full_text_indexing.rb +0 -43
- data/sufia-models/app/models/concerns/sufia/generic_file/indexing.rb +0 -14
- data/sufia-models/app/models/concerns/sufia/generic_file/metadata.rb +0 -98
- data/sufia-models/app/models/concerns/sufia/generic_file/mime_types.rb +0 -69
- data/sufia-models/app/models/concerns/sufia/generic_file/permissions.rb +0 -11
- data/sufia-models/app/models/concerns/sufia/generic_file/proxy_deposit.rb +0 -31
- data/sufia-models/app/models/concerns/sufia/generic_file/trophies.rb +0 -14
- data/sufia-models/app/models/concerns/sufia/generic_file/versions.rb +0 -16
- data/sufia-models/app/models/concerns/sufia/generic_file/virus_check.rb +0 -37
- data/sufia-models/app/models/concerns/sufia/model_methods.rb +0 -20
- data/sufia-models/app/models/concerns/sufia/user.rb +0 -137
- data/sufia-models/app/models/concerns/sufia/user_usage_stats.rb +0 -15
- data/sufia-models/app/models/datastreams/file_content_datastream.rb +0 -4
- data/sufia-models/app/models/datastreams/fits_datastream.rb +0 -152
- data/sufia-models/app/models/domain_term.rb +0 -5
- data/sufia-models/app/models/featured_work.rb +0 -22
- data/sufia-models/app/models/file_download_stat.rb +0 -18
- data/sufia-models/app/models/file_usage.rb +0 -34
- data/sufia-models/app/models/file_view_stat.rb +0 -18
- data/sufia-models/app/models/follow.rb +0 -12
- data/sufia-models/app/models/generic_file.rb +0 -3
- data/sufia-models/app/models/geo_names_resource.rb +0 -18
- data/sufia-models/app/models/group.rb +0 -8
- data/sufia-models/app/models/local_authority.rb +0 -86
- data/sufia-models/app/models/local_authority_entry.rb +0 -3
- data/sufia-models/app/models/proxy_deposit_request.rb +0 -85
- data/sufia-models/app/models/proxy_deposit_rights.rb +0 -4
- data/sufia-models/app/models/single_use_link.rb +0 -42
- data/sufia-models/app/models/subject_local_authority_entry.rb +0 -2
- data/sufia-models/app/models/sufia/avatar_uploader.rb +0 -20
- data/sufia-models/app/models/sufia/avatar_validator.rb +0 -8
- data/sufia-models/app/models/sufia/collection.rb +0 -5
- data/sufia-models/app/models/sufia/download.rb +0 -9
- data/sufia-models/app/models/sufia/orcid_validator.rb +0 -12
- data/sufia-models/app/models/sufia/pageview.rb +0 -9
- data/sufia-models/app/models/trophy.rb +0 -10
- data/sufia-models/app/models/user_stat.rb +0 -2
- data/sufia-models/app/models/version_committer.rb +0 -2
- data/sufia-models/app/services/sufia/analytics.rb +0 -50
- data/sufia-models/app/services/sufia/generic_file_audit_service.rb +0 -83
- data/sufia-models/app/services/sufia/generic_file_indexing_service.rb +0 -12
- data/sufia-models/app/services/sufia/id_service.rb +0 -45
- data/sufia-models/app/services/sufia/noid.rb +0 -22
- data/sufia-models/app/services/sufia/repository_audit_service.rb +0 -9
- data/sufia-models/config/locales/sufia.en.yml +0 -6
- data/sufia-models/lib/generators/sufia/models/abstract_migration_generator.rb +0 -30
- data/sufia-models/lib/generators/sufia/models/cached_stats_generator.rb +0 -24
- data/sufia-models/lib/generators/sufia/models/fulltext_generator.rb +0 -27
- data/sufia-models/lib/generators/sufia/models/install_generator.rb +0 -106
- data/sufia-models/lib/generators/sufia/models/orcid_field_generator.rb +0 -19
- data/sufia-models/lib/generators/sufia/models/proxies_generator.rb +0 -24
- data/sufia-models/lib/generators/sufia/models/templates/app/models/collection.rb +0 -2
- data/sufia-models/lib/generators/sufia/models/templates/config/analytics.yml +0 -9
- data/sufia-models/lib/generators/sufia/models/templates/config/clamav.rb +0 -1
- data/sufia-models/lib/generators/sufia/models/templates/config/mailboxer.rb +0 -17
- data/sufia-models/lib/generators/sufia/models/templates/config/mime_types.rb +0 -6
- data/sufia-models/lib/generators/sufia/models/templates/config/redis.yml +0 -9
- data/sufia-models/lib/generators/sufia/models/templates/config/redis_config.rb +0 -32
- data/sufia-models/lib/generators/sufia/models/templates/config/resque-pool.yml +0 -1
- data/sufia-models/lib/generators/sufia/models/templates/config/resque_config.rb +0 -5
- data/sufia-models/lib/generators/sufia/models/templates/config/setup_mail.rb +0 -3
- data/sufia-models/lib/generators/sufia/models/templates/config/solrconfig.xml +0 -223
- data/sufia-models/lib/generators/sufia/models/templates/config/sufia.rb +0 -144
- data/sufia-models/lib/generators/sufia/models/templates/migrations/acts_as_follower_migration.rb +0 -17
- data/sufia-models/lib/generators/sufia/models/templates/migrations/add_avatars_to_users.rb +0 -15
- data/sufia-models/lib/generators/sufia/models/templates/migrations/add_external_key_to_content_blocks.rb +0 -6
- data/sufia-models/lib/generators/sufia/models/templates/migrations/add_groups_to_users.rb +0 -11
- data/sufia-models/lib/generators/sufia/models/templates/migrations/add_ldap_attrs_to_user.rb +0 -27
- data/sufia-models/lib/generators/sufia/models/templates/migrations/add_linkedin_to_users.rb +0 -5
- data/sufia-models/lib/generators/sufia/models/templates/migrations/add_orcid_to_users.rb +0 -5
- data/sufia-models/lib/generators/sufia/models/templates/migrations/add_social_to_users.rb +0 -13
- data/sufia-models/lib/generators/sufia/models/templates/migrations/change_audit_log_pid_to_generic_file_id.rb +0 -5
- data/sufia-models/lib/generators/sufia/models/templates/migrations/change_proxy_deposit_request_pid_to_generic_file_id.rb +0 -5
- data/sufia-models/lib/generators/sufia/models/templates/migrations/create_checksum_audit_logs.rb +0 -19
- data/sufia-models/lib/generators/sufia/models/templates/migrations/create_content_blocks.rb +0 -10
- data/sufia-models/lib/generators/sufia/models/templates/migrations/create_featured_works.rb +0 -12
- data/sufia-models/lib/generators/sufia/models/templates/migrations/create_file_download_stats.rb +0 -12
- data/sufia-models/lib/generators/sufia/models/templates/migrations/create_file_view_stats.rb +0 -12
- data/sufia-models/lib/generators/sufia/models/templates/migrations/create_local_authorities.rb +0 -50
- data/sufia-models/lib/generators/sufia/models/templates/migrations/create_proxy_deposit_requests.rb +0 -16
- data/sufia-models/lib/generators/sufia/models/templates/migrations/create_proxy_deposit_rights.rb +0 -11
- data/sufia-models/lib/generators/sufia/models/templates/migrations/create_single_use_links.rb +0 -12
- data/sufia-models/lib/generators/sufia/models/templates/migrations/create_tinymce_assets.rb +0 -8
- data/sufia-models/lib/generators/sufia/models/templates/migrations/create_trophies.rb +0 -10
- data/sufia-models/lib/generators/sufia/models/templates/migrations/create_user_stats.rb +0 -19
- data/sufia-models/lib/generators/sufia/models/templates/migrations/create_version_committers.rb +0 -15
- data/sufia-models/lib/generators/sufia/models/update_content_blocks_generator.rb +0 -18
- data/sufia-models/lib/generators/sufia/models/upgrade400_generator.rb +0 -54
- data/sufia-models/lib/generators/sufia/models/upgrade600_generator.rb +0 -21
- data/sufia-models/lib/generators/sufia/models/usagestats_generator.rb +0 -19
- data/sufia-models/lib/generators/sufia/models/user_stats_generator.rb +0 -31
- data/sufia-models/lib/sufia/messages.rb +0 -66
- data/sufia-models/lib/sufia/models.rb +0 -34
- data/sufia-models/lib/sufia/models/active_fedora/redis.rb +0 -43
- data/sufia-models/lib/sufia/models/active_record/redis.rb +0 -56
- data/sufia-models/lib/sufia/models/engine.rb +0 -79
- data/sufia-models/lib/sufia/models/file_content.rb +0 -6
- data/sufia-models/lib/sufia/models/file_content/versions.rb +0 -21
- data/sufia-models/lib/sufia/models/resque.rb +0 -36
- data/sufia-models/lib/sufia/models/stats/user_stat_importer.rb +0 -108
- data/sufia-models/lib/sufia/models/user_local_directory_behavior.rb +0 -29
- data/sufia-models/lib/sufia/models/utils.rb +0 -22
- data/sufia-models/lib/sufia/models/version.rb +0 -5
- data/sufia-models/lib/sufia/models/virus_found_error.rb +0 -4
- data/sufia-models/lib/sufia/permissions.rb +0 -9
- data/sufia-models/lib/sufia/permissions/readable.rb +0 -20
- data/sufia-models/lib/sufia/permissions/writable.rb +0 -74
- data/sufia-models/lib/tasks/batch_cleanup.rake +0 -19
- data/sufia-models/lib/tasks/migrate.rake +0 -21
- data/sufia-models/lib/tasks/resque.rake +0 -13
- data/sufia-models/lib/tasks/stats_tasks.rake +0 -12
- data/sufia-models/lib/tasks/sufia-models_tasks.rake +0 -80
- data/sufia-models/sufia-models.gemspec +0 -52
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
module Sufia::UserUsageStats
|
|
2
|
-
|
|
3
|
-
def stats
|
|
4
|
-
@stats ||= UserStat.where(user_id: id).order(date: :asc)
|
|
5
|
-
end
|
|
6
|
-
|
|
7
|
-
def total_file_views
|
|
8
|
-
stats.reduce(0) { |total, stat| total + stat.file_views }
|
|
9
|
-
end
|
|
10
|
-
|
|
11
|
-
def total_file_downloads
|
|
12
|
-
stats.reduce(0) { |total, stat| total + stat.file_downloads }
|
|
13
|
-
end
|
|
14
|
-
|
|
15
|
-
end
|
|
@@ -1,152 +0,0 @@
|
|
|
1
|
-
class FitsDatastream < ActiveFedora::OmDatastream
|
|
2
|
-
include OM::XML::Document
|
|
3
|
-
|
|
4
|
-
def prefix(_)
|
|
5
|
-
""
|
|
6
|
-
end
|
|
7
|
-
|
|
8
|
-
set_terminology do |t|
|
|
9
|
-
t.root(path: "fits",
|
|
10
|
-
xmlns: "http://hul.harvard.edu/ois/xml/ns/fits/fits_output",
|
|
11
|
-
schema: "http://hul.harvard.edu/ois/xml/xsd/fits/fits_output.xsd")
|
|
12
|
-
t.identification {
|
|
13
|
-
t.identity {
|
|
14
|
-
t.format_label(path: {attribute: "format"})
|
|
15
|
-
t.mime_type(path: {attribute: "mimetype"}, index_as: [:stored_searchable])
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
t.fileinfo {
|
|
19
|
-
t.file_size(path: "size")
|
|
20
|
-
t.last_modified(path: "lastmodified")
|
|
21
|
-
t.filename(path: "filename")
|
|
22
|
-
t.original_checksum(path: "md5checksum")
|
|
23
|
-
t.rights_basis(path: "rightsBasis")
|
|
24
|
-
t.copyright_basis(path: "copyrightBasis")
|
|
25
|
-
t.copyright_note(path: "copyrightNote")
|
|
26
|
-
}
|
|
27
|
-
t.filestatus {
|
|
28
|
-
t.well_formed(path: "well-formed")
|
|
29
|
-
t.valid(path: "valid")
|
|
30
|
-
t.status_message(path: "message")
|
|
31
|
-
}
|
|
32
|
-
t.metadata {
|
|
33
|
-
t.document {
|
|
34
|
-
t.file_title(path: "title")
|
|
35
|
-
t.file_author(path: "author")
|
|
36
|
-
t.file_language(path: "language")
|
|
37
|
-
t.page_count(path: "pageCount")
|
|
38
|
-
t.word_count(path: "wordCount")
|
|
39
|
-
t.character_count(path: "characterCount")
|
|
40
|
-
t.paragraph_count(path: "paragraphCount")
|
|
41
|
-
t.line_count(path: "lineCount")
|
|
42
|
-
t.table_count(path: "tableCount")
|
|
43
|
-
t.graphics_count(path: "graphicsCount")
|
|
44
|
-
}
|
|
45
|
-
t.image {
|
|
46
|
-
t.byte_order(path: "byteOrder")
|
|
47
|
-
t.compression(path: "compressionScheme")
|
|
48
|
-
t.width(path: "imageWidth")
|
|
49
|
-
t.height(path: "imageHeight")
|
|
50
|
-
t.color_space(path: "colorSpace")
|
|
51
|
-
t.profile_name(path: "iccProfileName")
|
|
52
|
-
t.profile_version(path: "iccProfileVersion")
|
|
53
|
-
t.orientation(path: "orientation")
|
|
54
|
-
t.color_map(path: "colorMap")
|
|
55
|
-
t.image_producer(path: "imageProducer")
|
|
56
|
-
t.capture_device(path: "captureDevice")
|
|
57
|
-
t.scanning_software(path: "scanningSoftwareName")
|
|
58
|
-
t.exif_version(path: "exifVersion")
|
|
59
|
-
t.gps_timestamp(path: "gpsTimeStamp")
|
|
60
|
-
t.latitude(path: "gpsDestLatitude")
|
|
61
|
-
t.longitude(path: "gpsDestLongitude")
|
|
62
|
-
}
|
|
63
|
-
t.text {
|
|
64
|
-
t.character_set(path: "charset")
|
|
65
|
-
t.markup_basis(path: "markupBasis")
|
|
66
|
-
t.markup_language(path: "markupLanguage")
|
|
67
|
-
}
|
|
68
|
-
t.audio {
|
|
69
|
-
t.duration(path: "duration")
|
|
70
|
-
t.bit_depth(path: "bitDepth")
|
|
71
|
-
t.sample_rate(path: "sampleRate")
|
|
72
|
-
t.channels(path: "channels")
|
|
73
|
-
t.data_format(path: "dataFormatType")
|
|
74
|
-
t.offset(path: "offset")
|
|
75
|
-
}
|
|
76
|
-
t.video {
|
|
77
|
-
t.width(path: "imageWidth")
|
|
78
|
-
t.height(path: "imageHeight")
|
|
79
|
-
t.duration(path: "duration")
|
|
80
|
-
t.sample_rate(path: "sampleRate")
|
|
81
|
-
t.frame_rate(path: "frameRate")
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
t.format_label(proxy: [:identification, :identity, :format_label])
|
|
85
|
-
t.mime_type(proxy: [:identification, :identity, :mime_type])
|
|
86
|
-
t.file_size(proxy: [:fileinfo, :file_size])
|
|
87
|
-
t.last_modified(proxy: [:fileinfo, :last_modified])
|
|
88
|
-
t.filename(proxy: [:fileinfo, :filename])
|
|
89
|
-
t.original_checksum(proxy: [:fileinfo, :original_checksum])
|
|
90
|
-
t.rights_basis(proxy: [:fileinfo, :rights_basis])
|
|
91
|
-
t.copyright_basis(proxy: [:fileinfo, :copyright_basis])
|
|
92
|
-
t.copyright_note(proxy: [:fileinfo, :copyright_note])
|
|
93
|
-
t.well_formed(proxy: [:filestatus, :well_formed])
|
|
94
|
-
t.valid(proxy: [:filestatus, :valid])
|
|
95
|
-
t.status_message(proxy: [:filestatus, :status_message])
|
|
96
|
-
t.file_title(proxy: [:metadata, :document, :file_title])
|
|
97
|
-
t.file_author(proxy: [:metadata, :document, :file_author])
|
|
98
|
-
t.page_count(proxy: [:metadata, :document, :page_count])
|
|
99
|
-
t.file_language(proxy: [:metadata, :document, :file_language])
|
|
100
|
-
t.word_count(proxy: [:metadata, :document, :word_count])
|
|
101
|
-
t.character_count(proxy: [:metadata, :document, :character_count])
|
|
102
|
-
t.paragraph_count(proxy: [:metadata, :document, :paragraph_count])
|
|
103
|
-
t.line_count(proxy: [:metadata, :document, :line_count])
|
|
104
|
-
t.table_count(proxy: [:metadata, :document, :table_count])
|
|
105
|
-
t.graphics_count(proxy: [:metadata, :document, :graphics_count])
|
|
106
|
-
t.byte_order(proxy: [:metadata, :image, :byte_order])
|
|
107
|
-
t.compression(proxy: [:metadata, :image, :compression])
|
|
108
|
-
t.width(proxy: [:metadata, :image, :width])
|
|
109
|
-
t.video_width( proxy: [:metadata, :video, :width])
|
|
110
|
-
t.height(proxy: [:metadata, :image, :height])
|
|
111
|
-
t.video_height(proxy: [:metadata, :video, :height])
|
|
112
|
-
t.color_space(proxy: [:metadata, :image, :color_space])
|
|
113
|
-
t.profile_name(proxy: [:metadata, :image, :profile_name])
|
|
114
|
-
t.profile_version(proxy: [:metadata, :image, :profile_version])
|
|
115
|
-
t.orientation(proxy: [:metadata, :image, :orientation])
|
|
116
|
-
t.color_map(proxy: [:metadata, :image, :color_map])
|
|
117
|
-
t.image_producer(proxy: [:metadata, :image, :image_producer])
|
|
118
|
-
t.capture_device(proxy: [:metadata, :image, :capture_device])
|
|
119
|
-
t.scanning_software(proxy: [:metadata, :image, :scanning_software])
|
|
120
|
-
t.exif_version(proxy: [:metadata, :image, :exif_version])
|
|
121
|
-
t.gps_timestamp(proxy: [:metadata, :image, :gps_timestamp])
|
|
122
|
-
t.latitude(proxy: [:metadata, :image, :latitude])
|
|
123
|
-
t.longitude(proxy: [:metadata, :image, :longitude])
|
|
124
|
-
t.character_set(proxy: [:metadata, :text, :character_set])
|
|
125
|
-
t.markup_basis(proxy: [:metadata, :text, :markup_basis])
|
|
126
|
-
t.markup_language(proxy: [:metadata, :text, :markup_language])
|
|
127
|
-
t.duration(proxy: [:metadata, :audio, :duration])
|
|
128
|
-
t.video_duration(proxy: [:metadata, :video, :duration])
|
|
129
|
-
t.bit_depth(proxy: [:metadata, :audio, :bit_depth])
|
|
130
|
-
t.sample_rate(proxy: [:metadata, :audio, :sample_rate])
|
|
131
|
-
t.video_sample_rate(proxy: [:metadata, :video, :sample_rate])
|
|
132
|
-
t.channels(proxy: [:metadata, :audio, :channels])
|
|
133
|
-
t.data_format(proxy: [:metadata, :audio, :data_format])
|
|
134
|
-
t.offset(proxy: [:metadata, :audio, :offset])
|
|
135
|
-
t.frame_rate(proxy: [:metadata, :video, :frame_rate])
|
|
136
|
-
end
|
|
137
|
-
|
|
138
|
-
def self.xml_template
|
|
139
|
-
builder = Nokogiri::XML::Builder.new do |xml|
|
|
140
|
-
xml.fits(xmlns: 'http://hul.harvard.edu/ois/xml/ns/fits/fits_output',
|
|
141
|
-
'xmlns:xsi' => 'http://www.w3.org/2001/XMLSchema-instance',
|
|
142
|
-
'xsi:schemaLocation' =>
|
|
143
|
-
"http://hul.harvard.edu/ois/xml/ns/fits/fits_output
|
|
144
|
-
http://hul.harvard.edu/ois/xml/xsd/fits/fits_output.xsd",
|
|
145
|
-
version: "0.6.0",
|
|
146
|
-
timestamp: "1/25/12 11:04 AM") {
|
|
147
|
-
xml.identification { xml.identity(toolname: 'FITS') }
|
|
148
|
-
}
|
|
149
|
-
end
|
|
150
|
-
builder.doc
|
|
151
|
-
end
|
|
152
|
-
end
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
class FeaturedWork < ActiveRecord::Base
|
|
2
|
-
FEATURE_LIMIT = 5
|
|
3
|
-
validate :count_within_limit, on: :create
|
|
4
|
-
validates :order, inclusion: { in: Proc.new{ 0..FEATURE_LIMIT } }
|
|
5
|
-
|
|
6
|
-
default_scope { order(:order) }
|
|
7
|
-
|
|
8
|
-
def count_within_limit
|
|
9
|
-
unless FeaturedWork.can_create_another?
|
|
10
|
-
errors.add(:base, "Limited to #{FEATURE_LIMIT} featured works.")
|
|
11
|
-
end
|
|
12
|
-
end
|
|
13
|
-
|
|
14
|
-
attr_accessor :generic_file_solr_document
|
|
15
|
-
|
|
16
|
-
class << self
|
|
17
|
-
def can_create_another?
|
|
18
|
-
FeaturedWork.count < FEATURE_LIMIT
|
|
19
|
-
end
|
|
20
|
-
end
|
|
21
|
-
end
|
|
22
|
-
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
class FileDownloadStat < ActiveRecord::Base
|
|
2
|
-
extend Sufia::FileStatUtils
|
|
3
|
-
|
|
4
|
-
def to_flot
|
|
5
|
-
[ self.class.convert_date(date), downloads ]
|
|
6
|
-
end
|
|
7
|
-
|
|
8
|
-
def self.statistics file_id, start_date, user_id=nil
|
|
9
|
-
combined_stats file_id, start_date, :downloads, :totalEvents, user_id
|
|
10
|
-
end
|
|
11
|
-
|
|
12
|
-
# Sufia::Download is sent to Sufia::Analytics.profile as #sufia__download
|
|
13
|
-
# see Legato::ProfileMethods.method_name_from_klass
|
|
14
|
-
def self.ga_statistics start_date, file_id
|
|
15
|
-
Sufia::Analytics.profile.sufia__download(sort: 'date', start_date: start_date, end_date: Date.yesterday).for_file(file_id)
|
|
16
|
-
end
|
|
17
|
-
|
|
18
|
-
end
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
class FileUsage
|
|
2
|
-
|
|
3
|
-
attr_accessor :id, :created, :path, :downloads, :pageviews
|
|
4
|
-
|
|
5
|
-
def initialize id
|
|
6
|
-
file = ::GenericFile.find(id)
|
|
7
|
-
user = User.where(email: file.depositor).first
|
|
8
|
-
user_id = user ? user.id : nil
|
|
9
|
-
|
|
10
|
-
self.id = id
|
|
11
|
-
self.path = Sufia::Engine.routes.url_helpers.generic_file_path(id)
|
|
12
|
-
earliest = Sufia.config.analytic_start_date
|
|
13
|
-
self.created = ::GenericFile.find(id).create_date
|
|
14
|
-
self.created = earliest > created ? earliest : created unless earliest.blank?
|
|
15
|
-
self.downloads = FileDownloadStat.to_flots FileDownloadStat.statistics(id, created, user_id)
|
|
16
|
-
self.pageviews = FileViewStat.to_flots FileViewStat.statistics(id, created, user_id)
|
|
17
|
-
end
|
|
18
|
-
|
|
19
|
-
def total_downloads
|
|
20
|
-
self.downloads.reduce(0) { |total, result| total + result[1].to_i }
|
|
21
|
-
end
|
|
22
|
-
|
|
23
|
-
def total_pageviews
|
|
24
|
-
self.pageviews.reduce(0) { |total, result| total + result[1].to_i }
|
|
25
|
-
end
|
|
26
|
-
|
|
27
|
-
# Package data for visualization using JQuery Flot
|
|
28
|
-
def to_flot
|
|
29
|
-
[
|
|
30
|
-
{ label: "Pageviews", data: pageviews },
|
|
31
|
-
{ label: "Downloads", data: downloads }
|
|
32
|
-
]
|
|
33
|
-
end
|
|
34
|
-
end
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
class FileViewStat < ActiveRecord::Base
|
|
2
|
-
extend Sufia::FileStatUtils
|
|
3
|
-
|
|
4
|
-
def to_flot
|
|
5
|
-
[ self.class.convert_date(date), views ]
|
|
6
|
-
end
|
|
7
|
-
|
|
8
|
-
def self.statistics file_id, start_date, user_id=nil
|
|
9
|
-
combined_stats file_id, start_date, :views, :pageviews, user_id
|
|
10
|
-
end
|
|
11
|
-
|
|
12
|
-
# Sufia::Download is sent to Sufia::Analytics.profile as #sufia__download
|
|
13
|
-
# see Legato::ProfileMethods.method_name_from_klass
|
|
14
|
-
def self.ga_statistics start_date, file_id
|
|
15
|
-
path = Sufia::Engine.routes.url_helpers.generic_file_path(file_id)
|
|
16
|
-
Sufia::Analytics.profile.sufia__pageview(sort: 'date', start_date: start_date).for_path(path)
|
|
17
|
-
end
|
|
18
|
-
end
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
class Follow < ActiveRecord::Base
|
|
2
|
-
extend ActsAsFollower::FollowerLib
|
|
3
|
-
extend ActsAsFollower::FollowScopes
|
|
4
|
-
|
|
5
|
-
# NOTE: Follows belong to the "followable" interface, and also to followers
|
|
6
|
-
belongs_to :followable, polymorphic: true
|
|
7
|
-
belongs_to :follower, polymorphic: true
|
|
8
|
-
|
|
9
|
-
def block!
|
|
10
|
-
self.update_attribute(:blocked, true)
|
|
11
|
-
end
|
|
12
|
-
end
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
class GeoNamesResource < ActiveResource::Base
|
|
2
|
-
self.site = "http://api.geonames.org/"
|
|
3
|
-
self.element_name = "searchJSON"
|
|
4
|
-
self.collection_name = "searchJSON"
|
|
5
|
-
|
|
6
|
-
def self.collection_path(prefix_options = {}, query_options = nil)
|
|
7
|
-
super(prefix_options, query_options).gsub(/\.json|\.xml/, "")
|
|
8
|
-
end
|
|
9
|
-
|
|
10
|
-
def self.instantiate_collection(collection, original_params = {}, prefix_options = {})
|
|
11
|
-
col = super(collection["geonames"], original_params, prefix_options)
|
|
12
|
-
col.map! { |item| { label: item.name + (item.adminName1 ? ", " + item.adminName1 : "") + ", " + item.countryName, value: item.name + (item.adminName1 ? ", " + item.adminName1 : "") + ", " + item.countryName} }
|
|
13
|
-
end
|
|
14
|
-
|
|
15
|
-
def self.find_location(location)
|
|
16
|
-
return GeoNamesResource.find(:all, params: { q: location, username: "cam156", maxRows: 10})
|
|
17
|
-
end
|
|
18
|
-
end
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
class LocalAuthority < ActiveRecord::Base
|
|
2
|
-
|
|
3
|
-
# TODO we should add an index on this join table and remove the uniq query
|
|
4
|
-
has_and_belongs_to_many :domain_terms, -> { uniq }
|
|
5
|
-
|
|
6
|
-
has_many :local_authority_entries
|
|
7
|
-
|
|
8
|
-
def self.harvest_rdf(name, sources, opts = {})
|
|
9
|
-
return unless self.where(name: name).empty?
|
|
10
|
-
authority = self.create(name: name)
|
|
11
|
-
format = opts.fetch(:format, :ntriples)
|
|
12
|
-
predicate = opts.fetch(:predicate, ::RDF::SKOS.prefLabel)
|
|
13
|
-
entries = []
|
|
14
|
-
sources.each do |uri|
|
|
15
|
-
::RDF::Reader.open(uri, format: format) do |reader|
|
|
16
|
-
reader.each_statement do |statement|
|
|
17
|
-
if statement.predicate == predicate
|
|
18
|
-
entries << LocalAuthorityEntry.new(local_authority: authority,
|
|
19
|
-
label: statement.object.to_s,
|
|
20
|
-
uri: statement.subject.to_s)
|
|
21
|
-
end
|
|
22
|
-
end
|
|
23
|
-
end
|
|
24
|
-
end
|
|
25
|
-
if LocalAuthorityEntry.respond_to? :import
|
|
26
|
-
LocalAuthorityEntry.import entries
|
|
27
|
-
else
|
|
28
|
-
entries.each { |e| e.save! }
|
|
29
|
-
end
|
|
30
|
-
end
|
|
31
|
-
|
|
32
|
-
def self.harvest_tsv(name, sources, opts = {})
|
|
33
|
-
return unless self.where(name: name).empty?
|
|
34
|
-
authority = self.create(name: name)
|
|
35
|
-
prefix = opts.fetch(:prefix, "")
|
|
36
|
-
entries = []
|
|
37
|
-
sources.each do |uri|
|
|
38
|
-
open(uri) do |f|
|
|
39
|
-
f.each_line do |tsv|
|
|
40
|
-
fields = tsv.split(/\t/)
|
|
41
|
-
entries << LocalAuthorityEntry.new(local_authority: authority,
|
|
42
|
-
uri: "#{prefix}#{fields[0]}/",
|
|
43
|
-
label: fields[2])
|
|
44
|
-
end
|
|
45
|
-
end
|
|
46
|
-
end
|
|
47
|
-
if LocalAuthorityEntry.respond_to? :import
|
|
48
|
-
LocalAuthorityEntry.import entries
|
|
49
|
-
else
|
|
50
|
-
entries.each { |e| e.save! }
|
|
51
|
-
end
|
|
52
|
-
end
|
|
53
|
-
|
|
54
|
-
def self.register_vocabulary(model, term, name)
|
|
55
|
-
authority = self.find_by_name(name)
|
|
56
|
-
return if authority.blank?
|
|
57
|
-
model = model.to_s.sub(/RdfDatastream$/, '').underscore.pluralize
|
|
58
|
-
domain_term = DomainTerm.find_or_create_by(model: model, term: term)
|
|
59
|
-
return if domain_term.local_authorities.include? authority
|
|
60
|
-
domain_term.local_authorities << authority
|
|
61
|
-
end
|
|
62
|
-
|
|
63
|
-
def self.entries_by_term(model, term, query)
|
|
64
|
-
return if query.empty?
|
|
65
|
-
lowQuery = query.downcase
|
|
66
|
-
hits = []
|
|
67
|
-
# move lc_subject into it's own table since being part of the usual structure caused it to be too slow.
|
|
68
|
-
# When/if we move to having multiple dictionaries for subject we will need to also do a check for the appropriate dictionary.
|
|
69
|
-
if (term == 'subject' && model == 'generic_files') # and local_authoritiy = lc_subject
|
|
70
|
-
sql = SubjectLocalAuthorityEntry.where("lowerLabel like ?", "#{lowQuery}%").select("label, uri").limit(25).to_sql
|
|
71
|
-
SubjectLocalAuthorityEntry.find_by_sql(sql).each do |hit|
|
|
72
|
-
hits << {uri: hit.uri, label: hit.label}
|
|
73
|
-
end
|
|
74
|
-
else
|
|
75
|
-
dterm = DomainTerm.where(model: model, term: term).first
|
|
76
|
-
if dterm
|
|
77
|
-
authorities = dterm.local_authorities.collect(&:id).uniq
|
|
78
|
-
sql = LocalAuthorityEntry.where("local_authority_id in (?)", authorities).where("lower(label) like ?", "#{lowQuery}%").select("label, uri").limit(25).to_sql
|
|
79
|
-
LocalAuthorityEntry.find_by_sql(sql).each do |hit|
|
|
80
|
-
hits << {uri: hit.uri, label: hit.label}
|
|
81
|
-
end
|
|
82
|
-
end
|
|
83
|
-
end
|
|
84
|
-
return hits
|
|
85
|
-
end
|
|
86
|
-
end
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
class ProxyDepositRequest < ActiveRecord::Base
|
|
2
|
-
include Blacklight::SearchHelper
|
|
3
|
-
include ActionView::Helpers::UrlHelper
|
|
4
|
-
|
|
5
|
-
belongs_to :receiving_user, class_name: 'User'
|
|
6
|
-
belongs_to :sending_user, class_name: 'User'
|
|
7
|
-
|
|
8
|
-
validates :sending_user, :generic_file_id, presence: true
|
|
9
|
-
validate :transfer_to_should_be_a_valid_username
|
|
10
|
-
validate :sending_user_should_not_be_receiving_user
|
|
11
|
-
validate :should_not_be_already_part_of_a_transfer
|
|
12
|
-
|
|
13
|
-
after_save :send_request_transfer_message
|
|
14
|
-
|
|
15
|
-
attr_reader :transfer_to
|
|
16
|
-
|
|
17
|
-
def transfer_to=(key)
|
|
18
|
-
@transfer_to = key
|
|
19
|
-
self.receiving_user = User.find_by_user_key(key)
|
|
20
|
-
end
|
|
21
|
-
|
|
22
|
-
def transfer_to_should_be_a_valid_username
|
|
23
|
-
errors.add(:transfer_to, "must be an existing user") unless receiving_user
|
|
24
|
-
end
|
|
25
|
-
|
|
26
|
-
def sending_user_should_not_be_receiving_user
|
|
27
|
-
errors.add(:sending_user, 'must specify another user to receive the file') if receiving_user and receiving_user.user_key == sending_user.user_key
|
|
28
|
-
end
|
|
29
|
-
|
|
30
|
-
def should_not_be_already_part_of_a_transfer
|
|
31
|
-
transfers = ProxyDepositRequest.where(generic_file_id: generic_file_id, status: 'pending')
|
|
32
|
-
errors.add(:open_transfer, 'must close open transfer on the file before creating a new one') unless transfers.blank? || ( transfers.count == 1 && transfers[0].id == self.id)
|
|
33
|
-
end
|
|
34
|
-
|
|
35
|
-
def send_request_transfer_message
|
|
36
|
-
if self.updated_at == self.created_at
|
|
37
|
-
message = "#{link_to(sending_user.name, Sufia::Engine.routes.url_helpers.profile_path(sending_user.user_key))} wants to transfer a file to you. Review all <a href='#{Sufia::Engine.routes.url_helpers.transfers_path}'>transfer requests</a>"
|
|
38
|
-
User.batchuser.send_message(receiving_user, message, "Ownership Change Request")
|
|
39
|
-
else
|
|
40
|
-
message = "Your transfer request was #{status}."
|
|
41
|
-
message = message + " Comments: #{receiver_comment}" if !receiver_comment.blank?
|
|
42
|
-
User.batchuser.send_message(sending_user, message, "Ownership Change #{status}")
|
|
43
|
-
end
|
|
44
|
-
end
|
|
45
|
-
|
|
46
|
-
def pending?
|
|
47
|
-
self.status == 'pending'
|
|
48
|
-
end
|
|
49
|
-
|
|
50
|
-
def accepted?
|
|
51
|
-
self.status == 'accepted'
|
|
52
|
-
end
|
|
53
|
-
|
|
54
|
-
# @param [Boolean] reset (false) should the access controls be reset. This means revoking edit access from the depositor
|
|
55
|
-
def transfer!(reset = false)
|
|
56
|
-
Sufia.queue.push(ContentDepositorChangeEventJob.new(generic_file_id, receiving_user.user_key, reset))
|
|
57
|
-
self.status = 'accepted'
|
|
58
|
-
self.fulfillment_date = Time.now
|
|
59
|
-
save!
|
|
60
|
-
end
|
|
61
|
-
|
|
62
|
-
def reject!(comment = nil)
|
|
63
|
-
self.receiver_comment = comment if comment
|
|
64
|
-
self.status = 'rejected'
|
|
65
|
-
self.fulfillment_date = Time.now
|
|
66
|
-
save!
|
|
67
|
-
end
|
|
68
|
-
|
|
69
|
-
def cancel!
|
|
70
|
-
self.status = 'canceled'
|
|
71
|
-
self.fulfillment_date = Time.now
|
|
72
|
-
save!
|
|
73
|
-
end
|
|
74
|
-
|
|
75
|
-
def deleted_file?
|
|
76
|
-
!GenericFile.exists?(generic_file_id)
|
|
77
|
-
end
|
|
78
|
-
|
|
79
|
-
def title
|
|
80
|
-
return 'file not found' if deleted_file?
|
|
81
|
-
query = ActiveFedora::SolrQueryBuilder.construct_query_for_ids([generic_file_id])
|
|
82
|
-
solr_response = ActiveFedora::SolrService.query(query, raw: true)
|
|
83
|
-
SolrDocument.new(solr_response['response']['docs'].first, solr_response).title
|
|
84
|
-
end
|
|
85
|
-
end
|