blacklight-spotlight 2.2.0 → 2.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/spotlight/blacklight_configuration.rb +4 -1
- data/lib/spotlight/version.rb +1 -1
- data/spec/examples.txt +70 -70
- data/spec/factories/contact_emails.rb +1 -1
- data/spec/factories/contact_images.rb +1 -1
- data/spec/factories/custom_fields.rb +2 -2
- data/spec/factories/exhibit_thumbnails.rb +1 -1
- data/spec/factories/exhibits.rb +1 -1
- data/spec/factories/featured_images.rb +1 -1
- data/spec/factories/language.rb +1 -1
- data/spec/factories/main_navigation.rb +2 -2
- data/spec/factories/pages.rb +6 -6
- data/spec/factories/reindexing_log_entries.rb +12 -12
- data/spec/factories/resources.rb +3 -3
- data/spec/factories/roles.rb +1 -1
- data/spec/factories/searches.rb +3 -3
- data/spec/factories/tags.rb +1 -1
- data/spec/factories/translation.rb +1 -1
- data/spec/factories/users.rb +1 -1
- data/spec/models/spotlight/blacklight_configuration_spec.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4f0cb09d7197f79846b9c0c0f387315bd2ddd31c
|
4
|
+
data.tar.gz: 4fee08aa4567e890f4564910abe3698ea0d49c63
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1e425de62fb43001490219e0491af698e7ed2b8859f428cab318cc3ea9d80d7d688aac7bdd1d63ec741972c7c6060508e908bb39623c342284fe89837db737cb
|
7
|
+
data.tar.gz: e22ae4e68081e94b126abd715990a15ae06735dd86ef627af971cdc7454efa2903d22776bbc4547d9609ddc2578b309d8b268f8013129aa36351f99ad630590e
|
@@ -85,7 +85,6 @@ module Spotlight
|
|
85
85
|
|
86
86
|
# Add any custom fields
|
87
87
|
config.index_fields.merge! custom_index_fields(config)
|
88
|
-
config.index_fields = Hash[config.index_fields.sort_by { |k, _v| field_weight(index_fields, k) }]
|
89
88
|
config.index_fields.reject! { |_k, v| v.if == false }
|
90
89
|
|
91
90
|
# Update with customizations
|
@@ -129,6 +128,10 @@ module Spotlight
|
|
129
128
|
v.validate!
|
130
129
|
end
|
131
130
|
|
131
|
+
##
|
132
|
+
# Sort after the show fields have also been added
|
133
|
+
config.index_fields = Hash[config.index_fields.sort_by { |k, _v| field_weight(index_fields, k) }]
|
134
|
+
|
132
135
|
config.show_fields = config.index_fields
|
133
136
|
|
134
137
|
unless search_fields.blank?
|
data/lib/spotlight/version.rb
CHANGED
data/spec/examples.txt
CHANGED
@@ -698,76 +698,76 @@ example_id
|
|
698
698
|
./spec/models/spotlight/access_controls_enforcement_search_builder_spec.rb[1:2:1:1] | passed | 0.05949 seconds |
|
699
699
|
./spec/models/spotlight/access_controls_enforcement_search_builder_spec.rb[1:2:2:1] | passed | 0.0586 seconds |
|
700
700
|
./spec/models/spotlight/analytics/ga_spec.rb[1:1] | passed | 0.03605 seconds |
|
701
|
-
./spec/models/spotlight/blacklight_configuration_spec.rb[1:1] | passed | 0.
|
702
|
-
./spec/models/spotlight/blacklight_configuration_spec.rb[1:2] | passed | 0.
|
703
|
-
./spec/models/spotlight/blacklight_configuration_spec.rb[1:3] | passed | 0.
|
704
|
-
./spec/models/spotlight/blacklight_configuration_spec.rb[1:4:1] | passed | 0.
|
705
|
-
./spec/models/spotlight/blacklight_configuration_spec.rb[1:4:2] | passed | 0.
|
706
|
-
./spec/models/spotlight/blacklight_configuration_spec.rb[1:4:3] | passed | 0.
|
707
|
-
./spec/models/spotlight/blacklight_configuration_spec.rb[1:4:4] | passed | 0.
|
708
|
-
./spec/models/spotlight/blacklight_configuration_spec.rb[1:4:5] | passed | 0.
|
709
|
-
./spec/models/spotlight/blacklight_configuration_spec.rb[1:4:6] | passed | 0.
|
710
|
-
./spec/models/spotlight/blacklight_configuration_spec.rb[1:4:7:1] | passed | 0.
|
711
|
-
./spec/models/spotlight/blacklight_configuration_spec.rb[1:4:7:2] | passed | 0.
|
712
|
-
./spec/models/spotlight/blacklight_configuration_spec.rb[1:4:7:3] | passed | 0.
|
713
|
-
./spec/models/spotlight/blacklight_configuration_spec.rb[1:4:8:1] | passed | 0.
|
714
|
-
./spec/models/spotlight/blacklight_configuration_spec.rb[1:5:1] | passed | 0.
|
715
|
-
./spec/models/spotlight/blacklight_configuration_spec.rb[1:5:2] | passed | 0.
|
716
|
-
./spec/models/spotlight/blacklight_configuration_spec.rb[1:5:3] | passed | 0.
|
717
|
-
./spec/models/spotlight/blacklight_configuration_spec.rb[1:5:4] | passed | 0.
|
718
|
-
./spec/models/spotlight/blacklight_configuration_spec.rb[1:5:5] | passed | 0.
|
719
|
-
./spec/models/spotlight/blacklight_configuration_spec.rb[1:5:6] | passed | 0.
|
720
|
-
./spec/models/spotlight/blacklight_configuration_spec.rb[1:5:7] | passed | 0.
|
721
|
-
./spec/models/spotlight/blacklight_configuration_spec.rb[1:5:8] | passed | 0.
|
722
|
-
./spec/models/spotlight/blacklight_configuration_spec.rb[1:5:9] | passed | 0.
|
723
|
-
./spec/models/spotlight/blacklight_configuration_spec.rb[1:5:10] | passed | 0.
|
724
|
-
./spec/models/spotlight/blacklight_configuration_spec.rb[1:5:11:1] | passed | 0.
|
725
|
-
./spec/models/spotlight/blacklight_configuration_spec.rb[1:5:11:2] | passed | 0.
|
726
|
-
./spec/models/spotlight/blacklight_configuration_spec.rb[1:5:11:3] | passed |
|
727
|
-
./spec/models/spotlight/blacklight_configuration_spec.rb[1:5:12] | passed | 0.
|
728
|
-
./spec/models/spotlight/blacklight_configuration_spec.rb[1:5:13] | passed | 0.
|
729
|
-
./spec/models/spotlight/blacklight_configuration_spec.rb[1:5:14] | passed | 0.
|
730
|
-
./spec/models/spotlight/blacklight_configuration_spec.rb[1:5:15] | passed | 0.
|
731
|
-
./spec/models/spotlight/blacklight_configuration_spec.rb[1:5:16] | passed | 0.
|
732
|
-
./spec/models/spotlight/blacklight_configuration_spec.rb[1:5:17] | passed | 0.
|
733
|
-
./spec/models/spotlight/blacklight_configuration_spec.rb[1:5:18:1] | passed | 0.
|
734
|
-
./spec/models/spotlight/blacklight_configuration_spec.rb[1:6:1:1:1] | passed | 0.
|
735
|
-
./spec/models/spotlight/blacklight_configuration_spec.rb[1:6:1:2:1] | passed | 0.
|
736
|
-
./spec/models/spotlight/blacklight_configuration_spec.rb[1:6:1:3:1] | passed | 0.
|
737
|
-
./spec/models/spotlight/blacklight_configuration_spec.rb[1:6:1:4:1] | passed | 0.
|
738
|
-
./spec/models/spotlight/blacklight_configuration_spec.rb[1:7:1] | passed | 0.
|
739
|
-
./spec/models/spotlight/blacklight_configuration_spec.rb[1:7:2] | passed | 0.
|
740
|
-
./spec/models/spotlight/blacklight_configuration_spec.rb[1:7:3] | passed | 0.
|
741
|
-
./spec/models/spotlight/blacklight_configuration_spec.rb[1:7:4] | passed | 0.
|
742
|
-
./spec/models/spotlight/blacklight_configuration_spec.rb[1:8:1] | passed | 0.
|
743
|
-
./spec/models/spotlight/blacklight_configuration_spec.rb[1:8:2] | passed | 0.
|
744
|
-
./spec/models/spotlight/blacklight_configuration_spec.rb[1:8:3] | passed | 0.
|
745
|
-
./spec/models/spotlight/blacklight_configuration_spec.rb[1:8:4] | passed | 0.
|
746
|
-
./spec/models/spotlight/blacklight_configuration_spec.rb[1:8:5] | passed | 0.
|
747
|
-
./spec/models/spotlight/blacklight_configuration_spec.rb[1:9:1] | passed | 0.
|
748
|
-
./spec/models/spotlight/blacklight_configuration_spec.rb[1:9:2] | passed | 0.
|
749
|
-
./spec/models/spotlight/blacklight_configuration_spec.rb[1:9:3] | passed | 0.
|
750
|
-
./spec/models/spotlight/blacklight_configuration_spec.rb[1:9:4] | passed | 0.
|
751
|
-
./spec/models/spotlight/blacklight_configuration_spec.rb[1:10:1] | passed | 0.
|
752
|
-
./spec/models/spotlight/blacklight_configuration_spec.rb[1:10:2] | passed | 0.
|
753
|
-
./spec/models/spotlight/blacklight_configuration_spec.rb[1:10:3] | passed | 0.
|
754
|
-
./spec/models/spotlight/blacklight_configuration_spec.rb[1:10:4] | passed | 0.
|
755
|
-
./spec/models/spotlight/blacklight_configuration_spec.rb[1:11:1] | passed | 0.
|
756
|
-
./spec/models/spotlight/blacklight_configuration_spec.rb[1:11:2] | passed | 0.
|
757
|
-
./spec/models/spotlight/blacklight_configuration_spec.rb[1:12:1] | passed | 0.
|
758
|
-
./spec/models/spotlight/blacklight_configuration_spec.rb[1:12:2] | passed | 0.
|
759
|
-
./spec/models/spotlight/blacklight_configuration_spec.rb[1:13:1] | passed | 0.
|
760
|
-
./spec/models/spotlight/blacklight_configuration_spec.rb[1:13:2] | passed | 0.
|
761
|
-
./spec/models/spotlight/blacklight_configuration_spec.rb[1:14:1] | passed | 0.
|
762
|
-
./spec/models/spotlight/blacklight_configuration_spec.rb[1:15:1] | passed | 0.
|
763
|
-
./spec/models/spotlight/blacklight_configuration_spec.rb[1:16:1:1] | passed | 0.
|
764
|
-
./spec/models/spotlight/blacklight_configuration_spec.rb[1:16:1:2] | passed | 0.
|
765
|
-
./spec/models/spotlight/blacklight_configuration_spec.rb[1:16:1:3] | passed | 0.
|
766
|
-
./spec/models/spotlight/blacklight_configuration_spec.rb[1:17:1] | passed | 0.
|
767
|
-
./spec/models/spotlight/blacklight_configuration_spec.rb[1:17:2] | passed | 0.
|
768
|
-
./spec/models/spotlight/blacklight_configuration_spec.rb[1:18:1] | passed | 0.
|
769
|
-
./spec/models/spotlight/blacklight_configuration_spec.rb[1:18:2] | passed | 0.
|
770
|
-
./spec/models/spotlight/blacklight_configuration_spec.rb[1:18:3] | passed | 0.
|
701
|
+
./spec/models/spotlight/blacklight_configuration_spec.rb[1:1] | passed | 0.29753 seconds |
|
702
|
+
./spec/models/spotlight/blacklight_configuration_spec.rb[1:2] | passed | 0.05536 seconds |
|
703
|
+
./spec/models/spotlight/blacklight_configuration_spec.rb[1:3] | passed | 0.06398 seconds |
|
704
|
+
./spec/models/spotlight/blacklight_configuration_spec.rb[1:4:1] | passed | 0.04816 seconds |
|
705
|
+
./spec/models/spotlight/blacklight_configuration_spec.rb[1:4:2] | passed | 0.04857 seconds |
|
706
|
+
./spec/models/spotlight/blacklight_configuration_spec.rb[1:4:3] | passed | 0.05337 seconds |
|
707
|
+
./spec/models/spotlight/blacklight_configuration_spec.rb[1:4:4] | passed | 0.05034 seconds |
|
708
|
+
./spec/models/spotlight/blacklight_configuration_spec.rb[1:4:5] | passed | 0.05064 seconds |
|
709
|
+
./spec/models/spotlight/blacklight_configuration_spec.rb[1:4:6] | passed | 0.05874 seconds |
|
710
|
+
./spec/models/spotlight/blacklight_configuration_spec.rb[1:4:7:1] | passed | 0.04856 seconds |
|
711
|
+
./spec/models/spotlight/blacklight_configuration_spec.rb[1:4:7:2] | passed | 0.05008 seconds |
|
712
|
+
./spec/models/spotlight/blacklight_configuration_spec.rb[1:4:7:3] | passed | 0.06061 seconds |
|
713
|
+
./spec/models/spotlight/blacklight_configuration_spec.rb[1:4:8:1] | passed | 0.05716 seconds |
|
714
|
+
./spec/models/spotlight/blacklight_configuration_spec.rb[1:5:1] | passed | 0.04704 seconds |
|
715
|
+
./spec/models/spotlight/blacklight_configuration_spec.rb[1:5:2] | passed | 0.05179 seconds |
|
716
|
+
./spec/models/spotlight/blacklight_configuration_spec.rb[1:5:3] | passed | 0.04886 seconds |
|
717
|
+
./spec/models/spotlight/blacklight_configuration_spec.rb[1:5:4] | passed | 0.05208 seconds |
|
718
|
+
./spec/models/spotlight/blacklight_configuration_spec.rb[1:5:5] | passed | 0.05173 seconds |
|
719
|
+
./spec/models/spotlight/blacklight_configuration_spec.rb[1:5:6] | passed | 0.05488 seconds |
|
720
|
+
./spec/models/spotlight/blacklight_configuration_spec.rb[1:5:7] | passed | 0.05047 seconds |
|
721
|
+
./spec/models/spotlight/blacklight_configuration_spec.rb[1:5:8] | passed | 0.05016 seconds |
|
722
|
+
./spec/models/spotlight/blacklight_configuration_spec.rb[1:5:9] | passed | 0.05136 seconds |
|
723
|
+
./spec/models/spotlight/blacklight_configuration_spec.rb[1:5:10] | passed | 0.0517 seconds |
|
724
|
+
./spec/models/spotlight/blacklight_configuration_spec.rb[1:5:11:1] | passed | 0.05253 seconds |
|
725
|
+
./spec/models/spotlight/blacklight_configuration_spec.rb[1:5:11:2] | passed | 0.05019 seconds |
|
726
|
+
./spec/models/spotlight/blacklight_configuration_spec.rb[1:5:11:3] | passed | 0.05011 seconds |
|
727
|
+
./spec/models/spotlight/blacklight_configuration_spec.rb[1:5:12] | passed | 0.05352 seconds |
|
728
|
+
./spec/models/spotlight/blacklight_configuration_spec.rb[1:5:13] | passed | 0.05167 seconds |
|
729
|
+
./spec/models/spotlight/blacklight_configuration_spec.rb[1:5:14] | passed | 0.05086 seconds |
|
730
|
+
./spec/models/spotlight/blacklight_configuration_spec.rb[1:5:15] | passed | 0.05116 seconds |
|
731
|
+
./spec/models/spotlight/blacklight_configuration_spec.rb[1:5:16] | passed | 0.05151 seconds |
|
732
|
+
./spec/models/spotlight/blacklight_configuration_spec.rb[1:5:17] | passed | 0.05445 seconds |
|
733
|
+
./spec/models/spotlight/blacklight_configuration_spec.rb[1:5:18:1] | passed | 0.0524 seconds |
|
734
|
+
./spec/models/spotlight/blacklight_configuration_spec.rb[1:6:1:1:1] | passed | 0.05698 seconds |
|
735
|
+
./spec/models/spotlight/blacklight_configuration_spec.rb[1:6:1:2:1] | passed | 0.05264 seconds |
|
736
|
+
./spec/models/spotlight/blacklight_configuration_spec.rb[1:6:1:3:1] | passed | 0.05393 seconds |
|
737
|
+
./spec/models/spotlight/blacklight_configuration_spec.rb[1:6:1:4:1] | passed | 0.05321 seconds |
|
738
|
+
./spec/models/spotlight/blacklight_configuration_spec.rb[1:7:1] | passed | 0.05379 seconds |
|
739
|
+
./spec/models/spotlight/blacklight_configuration_spec.rb[1:7:2] | passed | 0.04848 seconds |
|
740
|
+
./spec/models/spotlight/blacklight_configuration_spec.rb[1:7:3] | passed | 0.05159 seconds |
|
741
|
+
./spec/models/spotlight/blacklight_configuration_spec.rb[1:7:4] | passed | 0.04884 seconds |
|
742
|
+
./spec/models/spotlight/blacklight_configuration_spec.rb[1:8:1] | passed | 0.04822 seconds |
|
743
|
+
./spec/models/spotlight/blacklight_configuration_spec.rb[1:8:2] | passed | 0.05396 seconds |
|
744
|
+
./spec/models/spotlight/blacklight_configuration_spec.rb[1:8:3] | passed | 0.05063 seconds |
|
745
|
+
./spec/models/spotlight/blacklight_configuration_spec.rb[1:8:4] | passed | 0.05 seconds |
|
746
|
+
./spec/models/spotlight/blacklight_configuration_spec.rb[1:8:5] | passed | 0.04891 seconds |
|
747
|
+
./spec/models/spotlight/blacklight_configuration_spec.rb[1:9:1] | passed | 0.04854 seconds |
|
748
|
+
./spec/models/spotlight/blacklight_configuration_spec.rb[1:9:2] | passed | 0.0525 seconds |
|
749
|
+
./spec/models/spotlight/blacklight_configuration_spec.rb[1:9:3] | passed | 0.05015 seconds |
|
750
|
+
./spec/models/spotlight/blacklight_configuration_spec.rb[1:9:4] | passed | 0.05088 seconds |
|
751
|
+
./spec/models/spotlight/blacklight_configuration_spec.rb[1:10:1] | passed | 0.04866 seconds |
|
752
|
+
./spec/models/spotlight/blacklight_configuration_spec.rb[1:10:2] | passed | 0.05119 seconds |
|
753
|
+
./spec/models/spotlight/blacklight_configuration_spec.rb[1:10:3] | passed | 0.05271 seconds |
|
754
|
+
./spec/models/spotlight/blacklight_configuration_spec.rb[1:10:4] | passed | 0.04982 seconds |
|
755
|
+
./spec/models/spotlight/blacklight_configuration_spec.rb[1:11:1] | passed | 0.04845 seconds |
|
756
|
+
./spec/models/spotlight/blacklight_configuration_spec.rb[1:11:2] | passed | 0.05041 seconds |
|
757
|
+
./spec/models/spotlight/blacklight_configuration_spec.rb[1:12:1] | passed | 0.05097 seconds |
|
758
|
+
./spec/models/spotlight/blacklight_configuration_spec.rb[1:12:2] | passed | 0.05499 seconds |
|
759
|
+
./spec/models/spotlight/blacklight_configuration_spec.rb[1:13:1] | passed | 0.0511 seconds |
|
760
|
+
./spec/models/spotlight/blacklight_configuration_spec.rb[1:13:2] | passed | 0.071 seconds |
|
761
|
+
./spec/models/spotlight/blacklight_configuration_spec.rb[1:14:1] | passed | 0.07851 seconds |
|
762
|
+
./spec/models/spotlight/blacklight_configuration_spec.rb[1:15:1] | passed | 0.07444 seconds |
|
763
|
+
./spec/models/spotlight/blacklight_configuration_spec.rb[1:16:1:1] | passed | 0.05261 seconds |
|
764
|
+
./spec/models/spotlight/blacklight_configuration_spec.rb[1:16:1:2] | passed | 0.053 seconds |
|
765
|
+
./spec/models/spotlight/blacklight_configuration_spec.rb[1:16:1:3] | passed | 0.05524 seconds |
|
766
|
+
./spec/models/spotlight/blacklight_configuration_spec.rb[1:17:1] | passed | 0.05055 seconds |
|
767
|
+
./spec/models/spotlight/blacklight_configuration_spec.rb[1:17:2] | passed | 0.05505 seconds |
|
768
|
+
./spec/models/spotlight/blacklight_configuration_spec.rb[1:18:1] | passed | 0.04785 seconds |
|
769
|
+
./spec/models/spotlight/blacklight_configuration_spec.rb[1:18:2] | passed | 0.04769 seconds |
|
770
|
+
./spec/models/spotlight/blacklight_configuration_spec.rb[1:18:3] | passed | 0.04941 seconds |
|
771
771
|
./spec/models/spotlight/contact_email_spec.rb[1:1] | passed | 0.01362 seconds |
|
772
772
|
./spec/models/spotlight/contact_email_spec.rb[1:2:1] | passed | 0.01178 seconds |
|
773
773
|
./spec/models/spotlight/contact_email_spec.rb[1:3:1] | passed | 0.01028 seconds |
|
@@ -1,6 +1,6 @@
|
|
1
1
|
FactoryBot.define do
|
2
2
|
factory :contact_image, class: Spotlight::ContactImage do
|
3
3
|
image { Rack::Test::UploadedFile.new(File.expand_path(File.join('..', 'fixtures', 'avatar.png'), __dir__)) }
|
4
|
-
iiif_tilesource 'https://exhibits-stage.stanford.edu/images/78'
|
4
|
+
iiif_tilesource { 'https://exhibits-stage.stanford.edu/images/78' }
|
5
5
|
end
|
6
6
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
FactoryBot.define do
|
2
2
|
factory :exhibit_thumbnail, class: Spotlight::ExhibitThumbnail do
|
3
3
|
image { Rack::Test::UploadedFile.new(File.expand_path(File.join('..', 'fixtures', 'avatar.png'), __dir__)) }
|
4
|
-
iiif_tilesource 'https://exhibits-stage.stanford.edu/images/78'
|
4
|
+
iiif_tilesource { 'https://exhibits-stage.stanford.edu/images/78' }
|
5
5
|
end
|
6
6
|
end
|
data/spec/factories/exhibits.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
FactoryBot.define do
|
2
2
|
factory :exhibit, class: Spotlight::Exhibit do
|
3
3
|
sequence(:title) { |n| "Exhibit Title #{n}" }
|
4
|
-
published true
|
4
|
+
published { true }
|
5
5
|
after(:build) { |exhibit| exhibit.searches << FactoryBot.build(:default_search, exhibit: exhibit) }
|
6
6
|
|
7
7
|
trait :with_thumbnail do
|
@@ -1,7 +1,7 @@
|
|
1
1
|
FactoryBot.define do
|
2
2
|
factory :featured_image, class: Spotlight::FeaturedImage do
|
3
3
|
image { Rack::Test::UploadedFile.new(File.expand_path(File.join('..', 'fixtures', 'avatar.png'), __dir__)) }
|
4
|
-
iiif_tilesource 'https://exhibits-stage.stanford.edu/images/78'
|
4
|
+
iiif_tilesource { 'https://exhibits-stage.stanford.edu/images/78' }
|
5
5
|
end
|
6
6
|
|
7
7
|
factory :masthead, class: Spotlight::Masthead do
|
data/spec/factories/language.rb
CHANGED
data/spec/factories/pages.rb
CHANGED
@@ -2,22 +2,22 @@ FactoryBot.define do
|
|
2
2
|
factory :feature_page, class: 'Spotlight::FeaturePage' do
|
3
3
|
exhibit
|
4
4
|
sequence(:title) { |n| "FeaturePage#{n}" }
|
5
|
-
published true
|
6
|
-
content '[]'
|
5
|
+
published { true }
|
6
|
+
content { '[]' }
|
7
7
|
end
|
8
8
|
factory :feature_subpage, parent: :feature_page do
|
9
9
|
transient do
|
10
10
|
exhibit
|
11
11
|
end
|
12
|
-
title 'SubPage1'
|
13
|
-
content '[]'
|
12
|
+
title { 'SubPage1' }
|
13
|
+
content { '[]' }
|
14
14
|
after(:build) { |subpage, evaluator| subpage.parent_page = FactoryBot.create(:feature_page, exhibit: evaluator.exhibit) }
|
15
15
|
end
|
16
16
|
factory :about_page, class: 'Spotlight::AboutPage' do
|
17
17
|
exhibit
|
18
18
|
sequence(:title) { |n| "AboutPage#{n}" }
|
19
|
-
content '[]'
|
20
|
-
published true
|
19
|
+
content { '[]' }
|
20
|
+
published { true }
|
21
21
|
end
|
22
22
|
|
23
23
|
factory :home_page, class: 'Spotlight::HomePage' do
|
@@ -1,33 +1,33 @@
|
|
1
1
|
FactoryBot.define do
|
2
2
|
factory :unstarted_reindexing_log_entry, class: Spotlight::ReindexingLogEntry do
|
3
|
-
items_reindexed_count 15
|
4
|
-
job_status 'unstarted'
|
3
|
+
items_reindexed_count { 15 }
|
4
|
+
job_status { 'unstarted' }
|
5
5
|
exhibit
|
6
6
|
user
|
7
7
|
end
|
8
8
|
|
9
9
|
factory :reindexing_log_entry, class: Spotlight::ReindexingLogEntry do
|
10
|
-
items_reindexed_count 10
|
10
|
+
items_reindexed_count { 10 }
|
11
11
|
start_time { Time.zone.parse('2017-01-05 23:00:00') }
|
12
12
|
end_time { Time.zone.parse('2017-01-05 23:05:00') }
|
13
|
-
job_status 'succeeded'
|
13
|
+
job_status { 'succeeded' }
|
14
14
|
exhibit
|
15
15
|
user
|
16
16
|
end
|
17
17
|
|
18
18
|
factory :reindexing_log_entry_no_user, class: Spotlight::ReindexingLogEntry do
|
19
|
-
items_reindexed_count 10
|
19
|
+
items_reindexed_count { 10 }
|
20
20
|
start_time { Time.zone.parse('2017-01-05 23:00:00') }
|
21
21
|
end_time { Time.zone.parse('2017-01-05 23:05:00') }
|
22
|
-
job_status 'succeeded'
|
22
|
+
job_status { 'succeeded' }
|
23
23
|
exhibit
|
24
24
|
end
|
25
25
|
|
26
26
|
factory :in_progress_reindexing_log_entry, class: Spotlight::ReindexingLogEntry do
|
27
|
-
items_reindexed_count 100
|
27
|
+
items_reindexed_count { 100 }
|
28
28
|
start_time { Time.zone.now - 300 }
|
29
|
-
end_time nil
|
30
|
-
job_status 'in_progress'
|
29
|
+
end_time { nil }
|
30
|
+
job_status { 'in_progress' }
|
31
31
|
exhibit
|
32
32
|
user
|
33
33
|
end
|
@@ -36,16 +36,16 @@ FactoryBot.define do
|
|
36
36
|
sequence(:items_reindexed_count)
|
37
37
|
start_time { Time.zone.now - 86_400 }
|
38
38
|
end_time { Time.zone.now - 86_100 }
|
39
|
-
job_status 'succeeded'
|
39
|
+
job_status { 'succeeded' }
|
40
40
|
exhibit
|
41
41
|
user
|
42
42
|
end
|
43
43
|
|
44
44
|
factory :failed_reindexing_log_entry, class: Spotlight::ReindexingLogEntry do
|
45
|
-
items_reindexed_count 10
|
45
|
+
items_reindexed_count { 10 }
|
46
46
|
start_time { Time.zone.parse('2017-01-10 23:00:00') }
|
47
47
|
end_time { Time.zone.parse('2017-01-10 23:05:00') }
|
48
|
-
job_status 'failed'
|
48
|
+
job_status { 'failed' }
|
49
49
|
exhibit
|
50
50
|
user
|
51
51
|
end
|
data/spec/factories/resources.rb
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
FactoryBot.define do
|
2
2
|
factory :resource, class: Spotlight::Resource do
|
3
3
|
exhibit
|
4
|
-
type 'Spotlight::Resource'
|
5
|
-
url 'some url'
|
4
|
+
type { 'Spotlight::Resource' }
|
5
|
+
url { 'some url' }
|
6
6
|
end
|
7
7
|
factory :uploaded_resource, class: Spotlight::Resources::Upload, parent: :resource do
|
8
|
-
type 'Spotlight::Resources::Upload'
|
8
|
+
type { 'Spotlight::Resources::Upload' }
|
9
9
|
association :upload, factory: :featured_image
|
10
10
|
# url { Rack::Test::UploadedFile.new(File.expand_path(File.join('..', 'fixtures', 'avatar.png'), __dir__)) }
|
11
11
|
end
|
data/spec/factories/roles.rb
CHANGED
data/spec/factories/searches.rb
CHANGED
@@ -8,13 +8,13 @@ FactoryBot.define do
|
|
8
8
|
end
|
9
9
|
|
10
10
|
factory :published_search, parent: :search do
|
11
|
-
published true
|
11
|
+
published { true }
|
12
12
|
end
|
13
13
|
|
14
14
|
factory :default_search, class: Spotlight::Search do
|
15
15
|
exhibit
|
16
|
-
title 'All Exhibit Items'
|
17
|
-
long_description 'All items in this exhibit.'
|
16
|
+
title { 'All Exhibit Items' }
|
17
|
+
long_description { 'All items in this exhibit.' }
|
18
18
|
|
19
19
|
after(:build) { |search| search.thumbnail = FactoryBot.create(:featured_image) }
|
20
20
|
end
|
data/spec/factories/tags.rb
CHANGED
data/spec/factories/users.rb
CHANGED
@@ -291,7 +291,7 @@ describe Spotlight::BlacklightConfiguration, type: :model do
|
|
291
291
|
subject.index_fields['b'] = { enabled: true, weight: 5, list: true }
|
292
292
|
subject.index_fields['c'] = { enabled: true, weight: 1, list: true }
|
293
293
|
|
294
|
-
blacklight_config.
|
294
|
+
blacklight_config.add_show_field 'a'
|
295
295
|
blacklight_config.add_index_field 'b'
|
296
296
|
blacklight_config.add_index_field 'c'
|
297
297
|
|
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: 2.2.
|
4
|
+
version: 2.2.1
|
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: 2018-08-
|
14
|
+
date: 2018-08-20 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: rails
|