sufia-models 6.4.0 → 6.5.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/app/jobs/resolrize_generic_file_job.rb +9 -0
- data/app/services/sufia/generic_file_indexing_service.rb +1 -0
- data/lib/generators/sufia/models/collection_facet_config_generator.rb +24 -0
- data/lib/generators/sufia/models/templates/config/sufia.rb +6 -0
- data/lib/sufia/models/engine.rb +1 -0
- data/lib/sufia/models/version.rb +1 -1
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cb23478c793f2a811406c6a0300325276c116bb8
|
4
|
+
data.tar.gz: 671a29122bf7e91f98cbf19907ff40d10865ed41
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e51fb60eba9f67dcff1df790fa046fe9d1d7aa30f0bdcc0fbfd2a1019ccc0ae9996591ea45d568c75d1810cfebbaa8ba17dbc9be95c7ee788c613afc93db0f92
|
7
|
+
data.tar.gz: 10ec3b2d84b8e8b78541070b2702a0f237bad8958f1ae696e3d638364b3313bdfcd95316a588e4045a6dbbd859bb45137931571fcc0943283e079070a08ae563
|
@@ -13,6 +13,7 @@ module Sufia
|
|
13
13
|
# between files on disk (in fcrepo.binary-store-path) and objects
|
14
14
|
# in the repository.
|
15
15
|
solr_doc[Solrizer.solr_name('digest', :symbol)] = digest_from_content
|
16
|
+
object.index_collection_ids(solr_doc) unless Sufia.config.collection_facet.nil?
|
16
17
|
end
|
17
18
|
end
|
18
19
|
|
@@ -0,0 +1,24 @@
|
|
1
|
+
require 'rails/generators'
|
2
|
+
|
3
|
+
class Sufia::Models::CollectionFacetConfigGenerator < Rails::Generators::Base
|
4
|
+
source_root File.expand_path('../templates', __FILE__)
|
5
|
+
|
6
|
+
desc """
|
7
|
+
This Generator makes the following changes to your application:
|
8
|
+
1. Updates existing sufia.rb initializer to include a collection_facet configuration
|
9
|
+
"""
|
10
|
+
|
11
|
+
def banner
|
12
|
+
say_status("info", "ADDING COLLECTION_FACET OPTION TO SUFIA CONFIG", :blue)
|
13
|
+
end
|
14
|
+
|
15
|
+
def inject_config_initializer
|
16
|
+
inject_into_file 'config/initializers/sufia.rb', before: "# Where to store tempfiles, leave blank for the system temp directory (e.g. /tmp)" do
|
17
|
+
" # Add a collection facet to search results. Possible values are...\n" +
|
18
|
+
" # nil (default) - do not include collection facet\n" +
|
19
|
+
" # :user - show for logged in users\n" +
|
20
|
+
" # :public - show for everyone (e.g. logged in and non-logged in users)\n" +
|
21
|
+
" # config.collection_facet = nil\n"
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -95,6 +95,12 @@ Sufia.config do |config|
|
|
95
95
|
# Default is false
|
96
96
|
# config.citations = false
|
97
97
|
|
98
|
+
# Add a collection facet to search results. Possible values are...
|
99
|
+
# nil (default) - do not include collection facet
|
100
|
+
# :user - show for logged in users
|
101
|
+
# :public - show for everyone (e.g. logged in and non-logged in users)
|
102
|
+
# config.collection_facet = nil
|
103
|
+
|
98
104
|
# Enables a select menu on the batch upload page to select a collection into which to add newly uploaded files.
|
99
105
|
# Default is false
|
100
106
|
# config.upload_to_collection = false
|
data/lib/sufia/models/engine.rb
CHANGED
@@ -25,6 +25,7 @@ module Sufia
|
|
25
25
|
config.enable_local_ingest = nil
|
26
26
|
config.analytics = false
|
27
27
|
config.citations = false
|
28
|
+
config.collection_facet = nil
|
28
29
|
config.upload_to_collection = false
|
29
30
|
config.lock_retry_count = 600 # Up to 2 minutes of trying at intervals up to 200ms
|
30
31
|
config.lock_time_to_live = 60_000 # milliseconds
|
data/lib/sufia/models/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sufia-models
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.
|
4
|
+
version: 6.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeremy Friesen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-12-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -337,6 +337,7 @@ files:
|
|
337
337
|
- app/jobs/create_derivatives_job.rb
|
338
338
|
- app/jobs/import_url_job.rb
|
339
339
|
- app/jobs/ingest_local_file_job.rb
|
340
|
+
- app/jobs/resolrize_generic_file_job.rb
|
340
341
|
- app/jobs/resolrize_job.rb
|
341
342
|
- app/models/batch.rb
|
342
343
|
- app/models/checksum_audit_log.rb
|
@@ -402,6 +403,7 @@ files:
|
|
402
403
|
- lib/generators/sufia/models/cached_stats_generator.rb
|
403
404
|
- lib/generators/sufia/models/citation_config_generator.rb
|
404
405
|
- lib/generators/sufia/models/clamav_generator.rb
|
406
|
+
- lib/generators/sufia/models/collection_facet_config_generator.rb
|
405
407
|
- lib/generators/sufia/models/fulltext_generator.rb
|
406
408
|
- lib/generators/sufia/models/geonames_username_config_generator.rb
|
407
409
|
- lib/generators/sufia/models/install_generator.rb
|
@@ -498,7 +500,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
498
500
|
version: '0'
|
499
501
|
requirements: []
|
500
502
|
rubyforge_project:
|
501
|
-
rubygems_version: 2.4.
|
503
|
+
rubygems_version: 2.4.5
|
502
504
|
signing_key:
|
503
505
|
specification_version: 4
|
504
506
|
summary: Models and services for sufia
|