Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
test:
strategy:
fail-fast: false
matrix:
ruby_version: ['3.3.8', '3.2.8']
rails_version: ['7.2.2.1', '7.1.5.1']

runs-on: ubuntu-latest
name: ruby ${{ matrix.ruby_version }} | rails ${{ matrix.rails_version }}
env:
RAILS_VERSION: ${{ matrix.rails_version }}
ENGINE_CART_RAILS_OPTIONS: "--skip-git --skip-listen --skip-spring --skip-keeps --skip-kamal --skip-solid --skip-coffee --skip-test"
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
bundler: "latest"
ruby-version: ${{ matrix.ruby_version }}
- name: Install dependencies
run: bundle install
- name: Run tests
run: bundle exec rake ci
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Metrics/BlockLength:
Exclude:
- 'spec/**/*'

Metrics/LineLength:
Layout/LineLength:
Max: 185

Naming/FileName:
Expand Down
2 changes: 1 addition & 1 deletion .rubocop_todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ RSpec/ExampleLength:

# Offense count: 3
# Configuration parameters: CustomTransform, IgnoreMethods.
RSpec/FilePath:
RSpec/SpecFilePathFormat:
Exclude:
- 'spec/unit/catalog_spec.rb'
- 'spec/unit/config_spec.rb'
Expand Down
2 changes: 2 additions & 0 deletions .solr_wrapper.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Place any default configuration for solr_wrapper here
# port: 8983
env:
SOLR_MODULES: analysis-extras
collection:
dir: solr_conf/conf/
name: blacklight-core
18 changes: 0 additions & 18 deletions .travis.yml

This file was deleted.

74 changes: 70 additions & 4 deletions solr_conf/conf/solrconfig.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
</updateLog>
</updateHandler>

<!-- solr lib dirs -->
<!-- solr lib dirs, which are needed for Solr 8 compatibility but ignored in solr 9.8 and above -->
<lib dir="${solr.install.dir:../../../..}/modules/analysis-extras/lib" />
<lib dir="${solr.install.dir:../../../..}/contrib/analysis-extras/lib" />
<lib dir="${solr.install.dir:../../../..}/contrib/analysis-extras/lucene-libs" />

Expand Down Expand Up @@ -46,9 +47,75 @@
full_title_tsim
short_title_tsim
alternative_title_tsim
active_fedora_model_ssi
title_tsim
author_tsimesim
author_tsim
subject_tsim
all_text_timv
</str>
<str name="pf">
all_text_timv^10
</str>

<str name="author_qf">
author_tsim
</str>
<str name="author_pf">
</str>
<str name="title_qf">
title_tsim
full_title_tsim
short_title_tsim
alternative_title_tsim
</str>
<str name="title_pf">
</str>
<str name="subject_qf">
subject_tsim
</str>
<str name="subject_pf">
</str>

<str name="fl">
*,
score
</str>

<str name="facet">true</str>
<str name="facet.mincount">1</str>
<str name="facet.limit">10</str>
<str name="facet.field">subject_ssim</str>

<str name="spellcheck">true</str>
<str name="spellcheck.dictionary">default</str>
<str name="spellcheck.onlyMorePopular">true</str>
<str name="spellcheck.extendedResults">true</str>
<str name="spellcheck.collate">false</str>
<str name="spellcheck.count">5</str>

</lst>
<arr name="last-components">
<str>spellcheck</str>
</arr>
</requestHandler>

<requestHandler name="/advanced" class="solr.SearchHandler">
<!-- a lucene request handler for using the JSON Query DSL,
specifically for advanced search.
Using a separate requestHandler is a workaround to
https://issues.apache.org/jira/browse/SOLR-16916, although
it could be desirable for other reasons as well.
-->
<lst name="defaults">
<str name="defType">lucene</str>
<str name="echoParams">explicit</str>
<str name="df">title_tsim</str>
<str name="qf">
id
full_title_tsim
short_title_tsim
alternative_title_tsim
title_tsim
author_tsim
subject_tsim
all_text_timv
</str>
Expand Down Expand Up @@ -83,7 +150,6 @@
<str name="facet">true</str>
<str name="facet.mincount">1</str>
<str name="facet.limit">10</str>
<str name="facet.field">active_fedora_model_ssi</str>
<str name="facet.field">subject_ssim</str>

<str name="spellcheck">true</str>
Expand Down
2 changes: 1 addition & 1 deletion spec/factories/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
FactoryBot.define do
factory :user do
sequence(:email) { |n| "user_#{n}@example.com" }
password 'password'
password { 'password' }
end
end
8 changes: 3 additions & 5 deletions spec/unit/blacklight/access_controls/search_builder_spec.rb
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
# frozen_string_literal: true

RSpec.describe Blacklight::AccessControls::SearchBuilder do
subject { search_builder }
subject(:search_builder) { described_class.new scope, ability: ability }

let(:search_builder) do
described_class.new(controller, ability: ability)
end
let(:controller) { double }
let(:blacklight_config) { Blacklight::Configuration.new }
let(:scope) { double blacklight_config: blacklight_config, search_state_class: nil }
let(:user) { User.new }
let(:ability) { Ability.new(user) }

Expand Down