blacklight-spotlight 4.6.1 → 4.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +37 -7
- data/app/assets/javascripts/spotlight/spotlight.esm.js +1 -1
- data/app/assets/javascripts/spotlight/spotlight.esm.js.map +1 -1
- data/app/assets/javascripts/spotlight/spotlight.js +1 -1
- data/app/assets/javascripts/spotlight/spotlight.js.map +1 -1
- 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/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 +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 051b1798794393c2afeb19a83437d9d0bde7c2bd5861a1684b08bb89fe948a51
|
4
|
+
data.tar.gz: '058d356020bd76fccf4124dee494114640ecb514ecabe06220a3ad2628ce9510'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2489cb7dd18bcd3369a41e0991349617ed3a49adedb9859d79eb9b0938f70f712cf6325c2e9eb48754d2b691f1a1ae6c32e7f3c8393a2083f3984248d166dd6c
|
7
|
+
data.tar.gz: a636d0dabffd8633a2a293c8433dada5c3df367512df0232ea366b193300e2828d6e973cc38bc31f7279cf486e1505c77cea8c6c7f5c181adec80dbd6f97f40d
|
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: {
|