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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fb72d76eeaf1096033720553f29bd890acda0277
4
- data.tar.gz: b06af5a034bdd0d9247c13207de8ee774e42e141
3
+ metadata.gz: 4f0cb09d7197f79846b9c0c0f387315bd2ddd31c
4
+ data.tar.gz: 4fee08aa4567e890f4564910abe3698ea0d49c63
5
5
  SHA512:
6
- metadata.gz: 89fc49c820db11353b9c2d31344f1e6831499badc3fb5397202157c3bcbd644d99a77ac4e660859d51571ae3f3f0a06b5e05206e54fa204b2135e8cb86b5820f
7
- data.tar.gz: e18d60931ed9650696320b9c3e282cdabb2e5a34800017d49cc0212e3a15bf1660ef672f3ba6e8c33ac35a40f07aef78129b504c4f33820f087fea18543f54f4
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?
@@ -1,3 +1,3 @@
1
1
  module Spotlight
2
- VERSION = '2.2.0'.freeze
2
+ VERSION = '2.2.1'.freeze
3
3
  end
@@ -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.05324 seconds |
702
- ./spec/models/spotlight/blacklight_configuration_spec.rb[1:2] | passed | 0.05849 seconds |
703
- ./spec/models/spotlight/blacklight_configuration_spec.rb[1:3] | passed | 0.05235 seconds |
704
- ./spec/models/spotlight/blacklight_configuration_spec.rb[1:4:1] | passed | 0.05302 seconds |
705
- ./spec/models/spotlight/blacklight_configuration_spec.rb[1:4:2] | passed | 0.05306 seconds |
706
- ./spec/models/spotlight/blacklight_configuration_spec.rb[1:4:3] | passed | 0.05741 seconds |
707
- ./spec/models/spotlight/blacklight_configuration_spec.rb[1:4:4] | passed | 0.05574 seconds |
708
- ./spec/models/spotlight/blacklight_configuration_spec.rb[1:4:5] | passed | 0.05635 seconds |
709
- ./spec/models/spotlight/blacklight_configuration_spec.rb[1:4:6] | passed | 0.05296 seconds |
710
- ./spec/models/spotlight/blacklight_configuration_spec.rb[1:4:7:1] | passed | 0.05429 seconds |
711
- ./spec/models/spotlight/blacklight_configuration_spec.rb[1:4:7:2] | passed | 0.05758 seconds |
712
- ./spec/models/spotlight/blacklight_configuration_spec.rb[1:4:7:3] | passed | 0.05949 seconds |
713
- ./spec/models/spotlight/blacklight_configuration_spec.rb[1:4:8:1] | passed | 0.05772 seconds |
714
- ./spec/models/spotlight/blacklight_configuration_spec.rb[1:5:1] | passed | 0.05341 seconds |
715
- ./spec/models/spotlight/blacklight_configuration_spec.rb[1:5:2] | passed | 0.0546 seconds |
716
- ./spec/models/spotlight/blacklight_configuration_spec.rb[1:5:3] | passed | 0.05366 seconds |
717
- ./spec/models/spotlight/blacklight_configuration_spec.rb[1:5:4] | passed | 0.05458 seconds |
718
- ./spec/models/spotlight/blacklight_configuration_spec.rb[1:5:5] | passed | 0.05096 seconds |
719
- ./spec/models/spotlight/blacklight_configuration_spec.rb[1:5:6] | passed | 0.0563 seconds |
720
- ./spec/models/spotlight/blacklight_configuration_spec.rb[1:5:7] | passed | 0.05674 seconds |
721
- ./spec/models/spotlight/blacklight_configuration_spec.rb[1:5:8] | passed | 0.05414 seconds |
722
- ./spec/models/spotlight/blacklight_configuration_spec.rb[1:5:9] | passed | 0.05374 seconds |
723
- ./spec/models/spotlight/blacklight_configuration_spec.rb[1:5:10] | passed | 0.05611 seconds |
724
- ./spec/models/spotlight/blacklight_configuration_spec.rb[1:5:11:1] | passed | 0.06028 seconds |
725
- ./spec/models/spotlight/blacklight_configuration_spec.rb[1:5:11:2] | passed | 0.07236 seconds |
726
- ./spec/models/spotlight/blacklight_configuration_spec.rb[1:5:11:3] | passed | 1.69 seconds |
727
- ./spec/models/spotlight/blacklight_configuration_spec.rb[1:5:12] | passed | 0.0557 seconds |
728
- ./spec/models/spotlight/blacklight_configuration_spec.rb[1:5:13] | passed | 0.05474 seconds |
729
- ./spec/models/spotlight/blacklight_configuration_spec.rb[1:5:14] | passed | 0.0538 seconds |
730
- ./spec/models/spotlight/blacklight_configuration_spec.rb[1:5:15] | passed | 0.05188 seconds |
731
- ./spec/models/spotlight/blacklight_configuration_spec.rb[1:5:16] | passed | 0.05574 seconds |
732
- ./spec/models/spotlight/blacklight_configuration_spec.rb[1:5:17] | passed | 0.05494 seconds |
733
- ./spec/models/spotlight/blacklight_configuration_spec.rb[1:5:18:1] | passed | 0.06691 seconds |
734
- ./spec/models/spotlight/blacklight_configuration_spec.rb[1:6:1:1:1] | passed | 0.06381 seconds |
735
- ./spec/models/spotlight/blacklight_configuration_spec.rb[1:6:1:2:1] | passed | 0.06916 seconds |
736
- ./spec/models/spotlight/blacklight_configuration_spec.rb[1:6:1:3:1] | passed | 0.06597 seconds |
737
- ./spec/models/spotlight/blacklight_configuration_spec.rb[1:6:1:4:1] | passed | 0.06764 seconds |
738
- ./spec/models/spotlight/blacklight_configuration_spec.rb[1:7:1] | passed | 0.05972 seconds |
739
- ./spec/models/spotlight/blacklight_configuration_spec.rb[1:7:2] | passed | 0.06056 seconds |
740
- ./spec/models/spotlight/blacklight_configuration_spec.rb[1:7:3] | passed | 0.05944 seconds |
741
- ./spec/models/spotlight/blacklight_configuration_spec.rb[1:7:4] | passed | 0.06609 seconds |
742
- ./spec/models/spotlight/blacklight_configuration_spec.rb[1:8:1] | passed | 0.62521 seconds |
743
- ./spec/models/spotlight/blacklight_configuration_spec.rb[1:8:2] | passed | 0.06248 seconds |
744
- ./spec/models/spotlight/blacklight_configuration_spec.rb[1:8:3] | passed | 0.08012 seconds |
745
- ./spec/models/spotlight/blacklight_configuration_spec.rb[1:8:4] | passed | 0.07094 seconds |
746
- ./spec/models/spotlight/blacklight_configuration_spec.rb[1:8:5] | passed | 0.06391 seconds |
747
- ./spec/models/spotlight/blacklight_configuration_spec.rb[1:9:1] | passed | 0.06142 seconds |
748
- ./spec/models/spotlight/blacklight_configuration_spec.rb[1:9:2] | passed | 0.05964 seconds |
749
- ./spec/models/spotlight/blacklight_configuration_spec.rb[1:9:3] | passed | 0.06288 seconds |
750
- ./spec/models/spotlight/blacklight_configuration_spec.rb[1:9:4] | passed | 0.06598 seconds |
751
- ./spec/models/spotlight/blacklight_configuration_spec.rb[1:10:1] | passed | 0.07878 seconds |
752
- ./spec/models/spotlight/blacklight_configuration_spec.rb[1:10:2] | passed | 0.06736 seconds |
753
- ./spec/models/spotlight/blacklight_configuration_spec.rb[1:10:3] | passed | 0.09029 seconds |
754
- ./spec/models/spotlight/blacklight_configuration_spec.rb[1:10:4] | passed | 0.08559 seconds |
755
- ./spec/models/spotlight/blacklight_configuration_spec.rb[1:11:1] | passed | 0.07878 seconds |
756
- ./spec/models/spotlight/blacklight_configuration_spec.rb[1:11:2] | passed | 0.07284 seconds |
757
- ./spec/models/spotlight/blacklight_configuration_spec.rb[1:12:1] | passed | 0.07209 seconds |
758
- ./spec/models/spotlight/blacklight_configuration_spec.rb[1:12:2] | passed | 0.07329 seconds |
759
- ./spec/models/spotlight/blacklight_configuration_spec.rb[1:13:1] | passed | 0.08214 seconds |
760
- ./spec/models/spotlight/blacklight_configuration_spec.rb[1:13:2] | passed | 0.07851 seconds |
761
- ./spec/models/spotlight/blacklight_configuration_spec.rb[1:14:1] | passed | 0.10168 seconds |
762
- ./spec/models/spotlight/blacklight_configuration_spec.rb[1:15:1] | passed | 0.08899 seconds |
763
- ./spec/models/spotlight/blacklight_configuration_spec.rb[1:16:1:1] | passed | 0.07515 seconds |
764
- ./spec/models/spotlight/blacklight_configuration_spec.rb[1:16:1:2] | passed | 0.06705 seconds |
765
- ./spec/models/spotlight/blacklight_configuration_spec.rb[1:16:1:3] | passed | 0.06643 seconds |
766
- ./spec/models/spotlight/blacklight_configuration_spec.rb[1:17:1] | passed | 0.06086 seconds |
767
- ./spec/models/spotlight/blacklight_configuration_spec.rb[1:17:2] | passed | 0.06623 seconds |
768
- ./spec/models/spotlight/blacklight_configuration_spec.rb[1:18:1] | passed | 0.06788 seconds |
769
- ./spec/models/spotlight/blacklight_configuration_spec.rb[1:18:2] | passed | 0.05679 seconds |
770
- ./spec/models/spotlight/blacklight_configuration_spec.rb[1:18:3] | passed | 0.06594 seconds |
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_email, class: Spotlight::ContactEmail do
3
- email 'exhibit_contact@example.com'
3
+ email { 'exhibit_contact@example.com' }
4
4
  exhibit
5
5
  end
6
6
  end
@@ -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,7 +1,7 @@
1
1
  FactoryBot.define do
2
2
  factory :custom_field, class: Spotlight::CustomField do
3
3
  exhibit
4
- field 'field_name_tesim'
5
- configuration('label' => 'Some Field')
4
+ field { 'field_name_tesim' }
5
+ configuration { { 'label' => 'Some Field' } }
6
6
  end
7
7
  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
@@ -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
@@ -1,6 +1,6 @@
1
1
  FactoryBot.define do
2
2
  factory :language, class: Spotlight::Language do
3
3
  exhibit
4
- locale 'es'
4
+ locale { 'es' }
5
5
  end
6
6
  end
@@ -1,7 +1,7 @@
1
1
  FactoryBot.define do
2
2
  factory :main_navigation, class: Spotlight::MainNavigation do
3
3
  exhibit
4
- nav_type 'browse'
5
- display true
4
+ nav_type { 'browse' }
5
+ display { true }
6
6
  end
7
7
  end
@@ -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
@@ -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
@@ -1,7 +1,7 @@
1
1
  FactoryBot.define do
2
2
  factory :role, class: Spotlight::Role do
3
3
  resource { FactoryBot.build(:exhibit) }
4
- role 'curator'
4
+ role { 'curator' }
5
5
  user
6
6
  end
7
7
  end
@@ -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
@@ -7,6 +7,6 @@ FactoryBot.define do
7
7
  sequence(:tag) { |n| FactoryBot.create(:tag, name: "tagging#{n}") }
8
8
  tagger { FactoryBot.create(:exhibit) }
9
9
  taggable { FactoryBot.create(:exhibit) }
10
- context :tags
10
+ context { :tags }
11
11
  end
12
12
  end
@@ -1,6 +1,6 @@
1
1
  FactoryBot.define do
2
2
  factory :translation do
3
- locale 'en'
3
+ locale { 'en' }
4
4
  exhibit
5
5
  end
6
6
  end
@@ -4,7 +4,7 @@ FactoryBot.define do
4
4
  exhibit { FactoryBot.create(:exhibit) }
5
5
  end
6
6
  sequence(:email) { |n| "user#{n}@example.com" }
7
- password 'insecure'
7
+ password { 'insecure' }
8
8
 
9
9
  factory :site_admin do
10
10
  after(:create) do |user, _evaluator|
@@ -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.add_index_field 'a'
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.0
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-15 00:00:00.000000000 Z
14
+ date: 2018-08-20 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: rails