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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8330c2299c06f65449dfb7ce36e3d011667d4c2f
4
- data.tar.gz: cd37e02c1d1d2be11c039430332a5bf103b2f6ff
3
+ metadata.gz: cb23478c793f2a811406c6a0300325276c116bb8
4
+ data.tar.gz: 671a29122bf7e91f98cbf19907ff40d10865ed41
5
5
  SHA512:
6
- metadata.gz: 5021bfd98929e7fcbbc1619274308ca853343fc38f974623d809242aa8c6b45d2cfd7897f9cba4df5eb986fc51e060c742c3a0f94a0c63afaa8034dc94bb285e
7
- data.tar.gz: 8cbbefc5ff16a747880dea64437c343b7420bc103d50db813e632f6288d51d4d8098a2876c9cffacaa6f8c930b4812817b9ba91f4c0ee76016836e2055d04206
6
+ metadata.gz: e51fb60eba9f67dcff1df790fa046fe9d1d7aa30f0bdcc0fbfd2a1019ccc0ae9996591ea45d568c75d1810cfebbaa8ba17dbc9be95c7ee788c613afc93db0f92
7
+ data.tar.gz: 10ec3b2d84b8e8b78541070b2702a0f237bad8958f1ae696e3d638364b3313bdfcd95316a588e4045a6dbbd859bb45137931571fcc0943283e079070a08ae563
@@ -0,0 +1,9 @@
1
+ class ResolrizeGenericFileJob < ActiveFedoraIdBasedJob
2
+ def queue_name
3
+ :resolrize_generic_file
4
+ end
5
+
6
+ def run
7
+ generic_file.update_index
8
+ end
9
+ end
@@ -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
@@ -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
@@ -1,5 +1,5 @@
1
1
  module Sufia
2
2
  module Models
3
- VERSION = "6.4.0"
3
+ VERSION = "6.5.0"
4
4
  end
5
5
  end
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.0
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-12 00:00:00.000000000 Z
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.8
503
+ rubygems_version: 2.4.5
502
504
  signing_key:
503
505
  specification_version: 4
504
506
  summary: Models and services for sufia