blacklight-spotlight 3.0.2 → 3.0.3
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/spotlight/process_bulk_updates_csv_job.rb +1 -1
- data/app/models/spotlight/search.rb +3 -1
- data/lib/spotlight/version.rb +1 -1
- data/spec/examples.txt +2 -1
- data/spec/factories/bulk_updates.rb +6 -0
- data/spec/features/javascript/blocks/search_result_block_spec.rb +1 -1
- data/spec/fixtures/updated-bulk-update-template-no-cols.csv +4 -0
- data/spec/jobs/spotlight/process_bulk_updates_csv_job_spec.rb +8 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 931e772ae7165aea85c6664c6c1fcbb615d0397d42d2000b2bc4f7038288ff91
|
4
|
+
data.tar.gz: 5eac236663178ff5476f8b58213f8da5757bd7120108b801792247cc194392b4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 528286f83609189237af8feef3e40048357b37de3770fdf772bc2672c3b0a52230cb1ab9f2ddfb31b59932aba9a0fafdc44ef2d2f79a333db9618ccf34746acf
|
7
|
+
data.tar.gz: 16900b7cbc3278b6be875cb0e91441f33860dc13200c36898e36f545d236557eddada90fe99536ed2fecd72538c076f6dd0edadeea9e481b5d7d025b470b93b6
|
@@ -43,7 +43,7 @@ module Spotlight
|
|
43
43
|
needs_reindex = false
|
44
44
|
|
45
45
|
begin
|
46
|
-
if sidecar.public != to_bool(row[config.csv_visibility])
|
46
|
+
if row.headers.include?(config.csv_visibility) && sidecar.public != to_bool(row[config.csv_visibility])
|
47
47
|
sidecar.update(public: to_bool(row[config.csv_visibility]))
|
48
48
|
needs_reindex = true
|
49
49
|
end
|
data/lib/spotlight/version.rb
CHANGED
data/spec/examples.txt
CHANGED
@@ -650,7 +650,8 @@ example_id
|
|
650
650
|
./spec/jobs/spotlight/change_visibility_job_spec.rb[1:1] | passed | 2.86 seconds |
|
651
651
|
./spec/jobs/spotlight/default_thumbnail_job_spec.rb[1:1] | passed | 0.00146 seconds |
|
652
652
|
./spec/jobs/spotlight/process_bulk_updates_csv_job_spec.rb[1:1:1] | passed | 0.2189 seconds |
|
653
|
-
./spec/jobs/spotlight/process_bulk_updates_csv_job_spec.rb[1:1:2:1] |
|
653
|
+
./spec/jobs/spotlight/process_bulk_updates_csv_job_spec.rb[1:1:2:1] | failed | 0.62594 seconds |
|
654
|
+
./spec/jobs/spotlight/process_bulk_updates_csv_job_spec.rb[1:1:3:1] | passed | 0.57342 seconds |
|
654
655
|
./spec/jobs/spotlight/process_bulk_updates_csv_job_spec.rb[1:2:1] | passed | 0.40446 seconds |
|
655
656
|
./spec/jobs/spotlight/process_bulk_updates_csv_job_spec.rb[1:2:2:1] | passed | 0.49212 seconds |
|
656
657
|
./spec/jobs/spotlight/reindex_exhibit_job_spec.rb[1:1:1] | passed | 0.05834 seconds |
|
@@ -7,6 +7,12 @@ FactoryBot.define do
|
|
7
7
|
exhibit
|
8
8
|
end
|
9
9
|
|
10
|
+
factory :bulk_update_no_cols, class: 'Spotlight::BulkUpdate' do
|
11
|
+
file { Rack::Test::UploadedFile.new(File.expand_path(File.join('..', 'fixtures', 'updated-bulk-update-template-no-cols.csv'), __dir__)) }
|
12
|
+
|
13
|
+
exhibit
|
14
|
+
end
|
15
|
+
|
10
16
|
factory :tagged_bulk_update, class: 'Spotlight::BulkUpdate' do
|
11
17
|
file { Rack::Test::UploadedFile.new(File.expand_path(File.join('..', 'fixtures', 'updated-bulk-update-template-w-tags.csv'), __dir__)) }
|
12
18
|
|
@@ -36,6 +36,14 @@ describe Spotlight::ProcessBulkUpdatesCsvJob do
|
|
36
36
|
expect(SolrDocument.index.connection).not_to have_received(:update)
|
37
37
|
end
|
38
38
|
end
|
39
|
+
|
40
|
+
context 'without a visibility column' do
|
41
|
+
let(:bulk_update) { FactoryBot.create(:bulk_update_no_cols, exhibit: exhibit) }
|
42
|
+
|
43
|
+
it 'does nothing with the data' do
|
44
|
+
expect { subject.perform_now }.not_to(change { exhibit.reload.solr_document_sidecars.where(public: false).count })
|
45
|
+
end
|
46
|
+
end
|
39
47
|
end
|
40
48
|
|
41
49
|
describe 'tags' do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blacklight-spotlight
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Beer
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2021-05-
|
14
|
+
date: 2021-05-27 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: activejob-status
|
@@ -1609,6 +1609,7 @@ files:
|
|
1609
1609
|
- spec/fixtures/iiif_responses.rb
|
1610
1610
|
- spec/fixtures/json-upload-fixture.json
|
1611
1611
|
- spec/fixtures/sample_solr_documents.yml
|
1612
|
+
- spec/fixtures/updated-bulk-update-template-no-cols.csv
|
1612
1613
|
- spec/fixtures/updated-bulk-update-template-w-tags.csv
|
1613
1614
|
- spec/fixtures/updated-bulk-update-template.csv
|
1614
1615
|
- spec/helpers/spotlight/application_helper_spec.rb
|
@@ -1968,6 +1969,7 @@ test_files:
|
|
1968
1969
|
- spec/fixtures/iiif_responses.rb
|
1969
1970
|
- spec/fixtures/json-upload-fixture.json
|
1970
1971
|
- spec/fixtures/sample_solr_documents.yml
|
1972
|
+
- spec/fixtures/updated-bulk-update-template-no-cols.csv
|
1971
1973
|
- spec/fixtures/updated-bulk-update-template-w-tags.csv
|
1972
1974
|
- spec/fixtures/updated-bulk-update-template.csv
|
1973
1975
|
- spec/helpers/spotlight/application_helper_spec.rb
|