blacklight-spotlight 4.6.1 → 4.7.1
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/Rakefile +37 -7
- data/app/assets/javascripts/spotlight/spotlight.esm.js +5 -5
- data/app/assets/javascripts/spotlight/spotlight.esm.js.map +1 -1
- data/app/assets/javascripts/spotlight/spotlight.js +5 -5
- data/app/assets/javascripts/spotlight/spotlight.js.map +1 -1
- data/app/assets/stylesheets/spotlight/#_accessibility.scss# +12 -0
- data/app/assets/stylesheets/spotlight/_browse.scss +10 -14
- data/app/assets/stylesheets/spotlight/_featured_browse_categories_block.scss +11 -2
- data/app/assets/stylesheets/spotlight/_header.scss +5 -24
- data/app/assets/stylesheets/spotlight/browse_group_categories_block.scss +0 -12
- data/app/javascript/spotlight/admin/blocks/browse_block.js +1 -1
- data/app/javascript/spotlight/admin/blocks/browse_group_categories_block.js +1 -1
- data/app/javascript/spotlight/admin/blocks/resources_block.js +1 -1
- data/app/javascript/spotlight/admin/blocks/uploaded_items_block.js +1 -1
- data/app/javascript/spotlight/admin/pages.js +1 -1
- data/app/jobs/concerns/spotlight/job_tracking.rb +1 -1
- data/app/views/shared/_masthead.html.erb +1 -1
- data/lib/generators/spotlight/install_generator.rb +25 -0
- data/lib/generators/spotlight/templates/solr/conf/solrconfig.xml +1 -1
- data/lib/spotlight/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ebea908eb8ae3ba884d61eb1b965f382443e87d479fd297f29c7f290f2bd5566
|
4
|
+
data.tar.gz: 2d73d341ada846d8870482711d63a020405185b3f3d75b8809f42ab67354790f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3d9909da016ef1d4ac572ad2e1306b4cfe8fb9ed85e6f737d33e2619fcc71c7e4b2398ef71d4a04ed6ec7978821d1bf97d650958dc7e407c1823e59ea04910d5
|
7
|
+
data.tar.gz: 0d05c74d317579c3981ca44a93668c432ff786db7ec215315849eec0a095fa8f0e69dd98b032bdd6c696438790439686a4fd2c0e4fbfe99fa037f1258305e18f
|
data/Rakefile
CHANGED
@@ -19,6 +19,7 @@ end
|
|
19
19
|
Bundler::GemHelper.install_tasks
|
20
20
|
|
21
21
|
require 'solr_wrapper'
|
22
|
+
require 'open3'
|
22
23
|
|
23
24
|
require 'rspec/core/rake_task'
|
24
25
|
RSpec::Core::RakeTask.new(:spec)
|
@@ -30,16 +31,45 @@ require 'engine_cart/rake_task'
|
|
30
31
|
|
31
32
|
require 'spotlight/version'
|
32
33
|
|
33
|
-
|
34
|
-
|
34
|
+
def system_with_error_handling(*args)
|
35
|
+
Open3.popen3(*args) do |_stdin, stdout, stderr, thread|
|
36
|
+
puts stdout.read
|
37
|
+
raise "Unable to run #{args.inspect}: #{stderr.read}" unless thread.value.success?
|
38
|
+
end
|
39
|
+
end
|
35
40
|
|
36
|
-
|
37
|
-
|
38
|
-
|
41
|
+
def with_solr(&block) # rubocop:disable Metrics/MethodLength
|
42
|
+
# We're being invoked by the app entrypoint script and solr is already up via docker compose
|
43
|
+
if ENV['SOLR_ENV'] == 'docker-compose'
|
44
|
+
yield
|
45
|
+
elsif system('docker compose version')
|
46
|
+
# We're not running `docker compose up' but still want to use a docker instance of solr.
|
47
|
+
begin
|
48
|
+
puts 'Starting Solr'
|
49
|
+
system_with_error_handling 'docker compose up -d solr'
|
50
|
+
yield
|
51
|
+
ensure
|
52
|
+
puts 'Stopping Solr'
|
53
|
+
system_with_error_handling 'docker compose stop solr'
|
54
|
+
end
|
55
|
+
else
|
56
|
+
SolrWrapper.wrap do |solr|
|
57
|
+
solr.with_collection(&block)
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
task :ci do
|
63
|
+
ENV['environment'] = 'test'
|
39
64
|
|
40
|
-
|
41
|
-
|
65
|
+
with_solr do
|
66
|
+
Rake::Task['spotlight:fixtures'].invoke
|
67
|
+
within_test_app do
|
68
|
+
system 'bin/rake spec:prepare'
|
42
69
|
end
|
70
|
+
|
71
|
+
# run the tests
|
72
|
+
Rake::Task['spec'].invoke
|
43
73
|
end
|
44
74
|
end
|
45
75
|
|
@@ -5137,7 +5137,7 @@ jQuery.fn.scrollStop = function(callback) {
|
|
5137
5137
|
class Pages {
|
5138
5138
|
connect(){
|
5139
5139
|
SirTrevor.setDefaults({
|
5140
|
-
iconUrl: Spotlight.sirTrevorIcon,
|
5140
|
+
iconUrl: Spotlight.sirTrevorIcon || window.sirTrevorIcon,
|
5141
5141
|
uploadUrl: $('[data-attachment-endpoint]').data('attachment-endpoint'),
|
5142
5142
|
ajaxOptions: {
|
5143
5143
|
headers: {
|
@@ -5990,7 +5990,7 @@ Spotlight$1.Block.Resources = (function(){
|
|
5990
5990
|
}
|
5991
5991
|
var resource_id = data.slug || data.id;
|
5992
5992
|
var markup = `
|
5993
|
-
<li class="field form-inline dd-item dd3-item" data-resource-id="${resource_id}" data-id="${index}" id="${this.formId(
|
5993
|
+
<li class="field form-inline dd-item dd3-item" data-resource-id="${resource_id}" data-id="${index}" id="${this.formId(index)}">
|
5994
5994
|
<input type="hidden" name="item[${index}][id]" value="${resource_id}" />
|
5995
5995
|
<input type="hidden" name="item[${index}][title]" value="${data.title}" />
|
5996
5996
|
${this._itemPanelIiifFields(index, data)}
|
@@ -6193,7 +6193,7 @@ SirTrevor.Blocks.Browse = (function(){
|
|
6193
6193
|
}
|
6194
6194
|
var resource_id = data.slug || data.id;
|
6195
6195
|
var markup = `
|
6196
|
-
<li class="field form-inline dd-item dd3-item" data-resource-id="${resource_id}" data-id="${index}" id="${this.formId(
|
6196
|
+
<li class="field form-inline dd-item dd3-item" data-resource-id="${resource_id}" data-id="${index}" id="${this.formId(index)}">
|
6197
6197
|
<input type="hidden" name="item[${index}][id]" value="${resource_id}" />
|
6198
6198
|
<input type="hidden" name="item[${index}][full_title]" value="${(data.full_title || data.title)}" />
|
6199
6199
|
<input data-property="weight" type="hidden" name="item[${index}][weight]" value="${data.weight}" />
|
@@ -6290,7 +6290,7 @@ SirTrevor.Blocks.BrowseGroupCategories = (function(){
|
|
6290
6290
|
}
|
6291
6291
|
var resource_id = data.slug || data.id;
|
6292
6292
|
var markup = `
|
6293
|
-
<li class="field form-inline dd-item dd3-item" data-resource-id="${resource_id}" data-id="${index}" id="${this.formId(
|
6293
|
+
<li class="field form-inline dd-item dd3-item" data-resource-id="${resource_id}" data-id="${index}" id="${this.formId(index)}">
|
6294
6294
|
<input type="hidden" name="item[${index}][id]" value="${resource_id}" />
|
6295
6295
|
<input type="hidden" name="item[${index}][title]" value="${data.title}" />
|
6296
6296
|
<input data-property="weight" type="hidden" name="item[${index}][weight]" value="${data.weight}" />
|
@@ -6902,7 +6902,7 @@ SirTrevor.Blocks.UploadedItems = (function(){
|
|
6902
6902
|
var dataUrl = data.url || data.file.url;
|
6903
6903
|
|
6904
6904
|
var markup = `
|
6905
|
-
<li class="field form-inline dd-item dd3-item" data-id="${index}" id="${this.formId(
|
6905
|
+
<li class="field form-inline dd-item dd3-item" data-id="${index}" id="${this.formId(index)}">
|
6906
6906
|
<input type="hidden" name="item[${index}][id]" value="${dataId}" />
|
6907
6907
|
<input type="hidden" name="item[${index}][title]" value="${dataTitle}" />
|
6908
6908
|
<input type="hidden" name="item[${index}][url]" data-item-grid-thumbnail="true" value="${dataUrl}"/>
|