blacklight_dynamic_sitemap 0.5.0 → 1.0.0

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
  SHA256:
3
- metadata.gz: 925e03d72bd9c0718e2352fa77f4086f06cded4a8f8583ac71c4c931145953cf
4
- data.tar.gz: 28964bc612bb4b365f1f65de70958d2d859b78f3efe18dcb06744d07f9f10071
3
+ metadata.gz: 19e5252f0d82795d55dee6783ecc266b9928a275add5b657d1f7e233e7ac14c3
4
+ data.tar.gz: 007c0fb399604348dfa31bcf588047add2a21d8ddce6a9c199bfb436febff3ba
5
5
  SHA512:
6
- metadata.gz: f98d1fe94a7ef4181af1d7857f9f503896953f22770f0af6ca6ecac1243cf69f81286a9de93da33bb9c5e76e007ce726afdb1d5bd11a1035455366d13645e9c6
7
- data.tar.gz: 8e32a029a7f312259ad327fdc5fcbf24aac84c0db967f26c57ba0478673397f336924a078ede87bad7672058d92f42bc7e3f158ab3cdc0c3d4fe07903b97f586
6
+ metadata.gz: 4b9dac19bd9feb82176eb1a900fa73d645eeb8b611e1f0f0aeb4927251b24a72858e435ccc6e82eb666ed46758d78857e9fca21f97f23b49412f7d538046fea1
7
+ data.tar.gz: eacd8eb93ab81964d4ab2dc42e2d883957a45cefc8a658259498a6cb9dd8ccf15b3132aa3eb2a721157cf5e596486a9b95ca454259c05f42e15ba05c3824b6b5
@@ -12,26 +12,28 @@ jobs:
12
12
  strategy:
13
13
  fail-fast: false
14
14
  matrix:
15
- rails: ['5.2.6', '6.0.3.7', '6.1.3.2']
16
-
15
+ blacklight_version: ['~> 8.0']
16
+ ruby_version: ['2.7', '3.0', '3.1']
17
+ rails_version: ['7.0.7.2']
18
+ include:
19
+ - ruby_version: '3.1'
20
+ rails_version: '7.0.7.2'
21
+ blacklight_version: '~> 7.0'
22
+ name: test (blacklight ${{ matrix.blacklight_version }} / ruby ${{ matrix.ruby_version }} / rails ${{ matrix.rails_version }})
23
+ env:
24
+ RAILS_VERSION: ${{ matrix.rails_version }}
25
+ BLACKLIGHT_VERSION: ${{ matrix.blacklight_version }}
26
+ ENGINE_CART_RAILS_OPTIONS: '--skip-git --skip-listen --skip-spring --skip-keeps --skip-action-cable --skip-coffee --skip-test'
17
27
  runs-on: ubuntu-latest
18
28
  steps:
19
29
  - uses: actions/checkout@v2
20
30
  - name: Set up Ruby
21
31
  uses: ruby/setup-ruby@v1
22
32
  with:
23
- ruby-version: 2.7
24
- - uses: actions/cache@v2
25
- with:
26
- path: vendor/bundle
27
- key: ${{ runner.os }}-gems20210506-${{ hashFiles('**/Gemfile.lock') }}
28
- restore-keys: |
29
- ${{ runner.os }}-gems20210506-
33
+ ruby-version: ${{ matrix.ruby_version }}
30
34
  - name: Bundle install
31
35
  env:
32
- RAILS_VERSION: ${{ matrix.rails }}
33
- run: |
34
- bundle config path vendor/bundle
35
- bundle install
36
+ RAILS_VERSION: ${{ matrix.rails_version }}
37
+ run: bundle install
36
38
  - name: Run tests
37
39
  run: bundle exec rake
data/.solr_wrapper CHANGED
@@ -1,5 +1,6 @@
1
1
  # Place any default configuration for solr_wrapper here
2
2
  # port: 8983
3
+ version: 8.11.2
3
4
  collection:
4
5
  dir: solr/conf/
5
6
  name: blacklight-core
data/Gemfile CHANGED
@@ -4,8 +4,8 @@ source 'https://rubygems.org'
4
4
  gemspec
5
5
 
6
6
  # BEGIN ENGINE_CART BLOCK
7
- # engine_cart: 2.3.0
8
- # engine_cart stanza: 0.10.0
7
+ # engine_cart: 2.4.0
8
+ # engine_cart stanza: 2.5.0
9
9
  # the below comes from engine_cart, a gem used to test this Rails engine gem in the context of a Rails app.
10
10
  file = File.expand_path('Gemfile', ENV['ENGINE_CART_DESTINATION'] || ENV['RAILS_ROOT'] || File.expand_path('.internal_test_app', File.dirname(__FILE__)))
11
11
  if File.exist?(file)
@@ -25,15 +25,16 @@ else
25
25
  else
26
26
  gem 'rails', ENV['RAILS_VERSION']
27
27
  end
28
- end
29
28
 
30
- case ENV['RAILS_VERSION']
31
- when /^4.2/
32
- gem 'responders', '~> 2.0'
33
- gem 'sass-rails', '>= 5.0'
34
- gem 'coffee-rails', '~> 4.1.0'
35
- when /^4.[01]/
36
- gem 'sass-rails', '< 5.0'
29
+ case ENV['RAILS_VERSION']
30
+ when /^6.0/
31
+ gem 'sass-rails', '>= 6'
32
+ gem 'webpacker', '~> 4.0'
33
+ when /^5.[12]/
34
+ gem 'sass-rails', '~> 5.0'
35
+ gem 'sprockets', '~> 3.7'
36
+ gem 'thor', '~> 0.20'
37
+ end
37
38
  end
38
39
  end
39
40
  # END ENGINE_CART BLOCK
@@ -4,22 +4,18 @@ module BlacklightDynamicSitemap
4
4
  ##
5
5
  #
6
6
  class Sitemap
7
- delegate :hashed_id_field, :unique_id_field, :last_modified_field, to: :engine_config
7
+ delegate :solr_endpoint, :hashed_id_field, :unique_id_field, :last_modified_field, to: :engine_config
8
8
 
9
9
  def get(id)
10
10
  # if someone's hacking URLs (in ways that could potentially generate enormous requests),
11
11
  # just return an empty response
12
12
  return [] if id.length != exponent
13
13
 
14
- index_connection.select(
15
- params: show_params(id, {
16
- q: '*:*',
14
+ index_connection.public_send(solr_endpoint,
15
+ params: show_params(id, engine_config.default_params.merge({
17
16
  fq: ["{!prefix f=#{hashed_id_field} v=#{id}}"],
18
- fl: [unique_id_field, last_modified_field].join(','),
19
- rows: 2_000_000, # Ensure that we do not page this result
20
- facet: false,
21
- defType: 'lucene'
22
- })
17
+ fl: [unique_id_field, last_modified_field].join(',')
18
+ }))
23
19
  ).dig('response', 'docs')
24
20
  end
25
21
 
@@ -24,11 +24,8 @@ Gem::Specification.new do |spec|
24
24
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
25
25
  spec.require_paths = ['lib']
26
26
 
27
- # Rails <5.0 is not covered by the automated test suite (see `.github/workflows/ruby.yml`).
28
- # Anecdotally demonstrated to work fine on Rails as low as 4.2, but any lower version
29
- # threshold would be arbitrary.
30
- spec.add_dependency 'rails', '<= 6.2'
31
- spec.add_dependency 'blacklight', '> 6.0'
27
+ spec.add_dependency 'rails'
28
+ spec.add_dependency 'blacklight', '> 7.0'
32
29
 
33
30
  spec.add_development_dependency 'capybara'
34
31
  spec.add_development_dependency 'engine_cart', '~> 2.0'
@@ -3,6 +3,14 @@
3
3
  module BlacklightDynamicSitemap
4
4
  class Engine < ::Rails::Engine
5
5
  isolate_namespace BlacklightDynamicSitemap
6
+ config.default_params = {
7
+ q: '*:*',
8
+ rows: 2_000_000, # Ensure that we do not page this result
9
+ facet: false,
10
+ defType: 'lucene',
11
+ sort: 'id asc'
12
+ }
13
+ config.solr_endpoint = :select
6
14
  config.max_documents_expiration = 1.day
7
15
  config.minimum_average_chunk = 10_000
8
16
  config.hashed_id_field = 'hashed_id_ssi'
@@ -1,3 +1,3 @@
1
1
  module BlacklightDynamicSitemap
2
- VERSION = '0.5.0'
2
+ VERSION = '1.0.0'
3
3
  end
data/solr/conf/schema.xml CHANGED
@@ -7,10 +7,10 @@
7
7
  <uniqueKey>id</uniqueKey>
8
8
 
9
9
  <fields>
10
- <field name="id" type="string" stored="true" indexed="true" multiValued="false" required="true"/>
10
+ <field name="id" type="string" stored="true" indexed="true" multiValued="false" required="true" docValues="true" />
11
11
  <field name="format" type="string" stored="true" indexed="true" multiValued="true" />
12
12
  <field name="_version_" type="long" indexed="true" stored="true"/>
13
- <field name="timestamp" type="date" indexed="true" stored="true" default="NOW" multiValued="false"/>
13
+ <field name="timestamp" type="date" indexed="true" stored="true" default="NOW" multiValued="false" docValues="true" />
14
14
 
15
15
  <field name="lat" type="tdouble" stored="true" indexed="true" multiValued="false"/>
16
16
  <field name="lng" type="tdouble" stored="true" indexed="true" multiValued="false"/>
@@ -55,7 +55,7 @@
55
55
 
56
56
  <dynamicField name="*_ss" type="string" stored="true" indexed="false" multiValued="false"/>
57
57
  <dynamicField name="*_ssm" type="string" stored="true" indexed="false" multiValued="true"/>
58
- <dynamicField name="*_ssi" type="string" stored="true" indexed="true" multiValued="false"/>
58
+ <dynamicField name="*_ssi" type="string" stored="true" indexed="true" multiValued="false" docValues="true" />
59
59
  <dynamicField name="*_ssim" type="string" stored="true" indexed="true" multiValued="true"/>
60
60
 
61
61
  <dynamicField name="*_ssort" type="alphaSort" stored="false" indexed="true" multiValued="false"/>
@@ -31,6 +31,7 @@
31
31
 
32
32
  <!-- solr lib dirs -->
33
33
  <lib dir="${solr.install.dir:../../../..}/contrib/analysis-extras/lib" />
34
+ <lib dir="${solr.install.dir:../../../..}/modules/analysis-extras/lib" />
34
35
  <lib dir="${solr.install.dir:../../../..}/contrib/analysis-extras/lucene-libs" />
35
36
 
36
37
  <dataDir>${solr.data.dir:}</dataDir>
metadata CHANGED
@@ -1,43 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blacklight_dynamic_sitemap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jack Reed
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-05-06 00:00:00.000000000 Z
11
+ date: 2023-09-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "<="
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '6.2'
19
+ version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "<="
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '6.2'
26
+ version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: blacklight
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ">"
32
32
  - !ruby/object:Gem::Version
33
- version: '6.0'
33
+ version: '7.0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - ">"
39
39
  - !ruby/object:Gem::Version
40
- version: '6.0'
40
+ version: '7.0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: capybara
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -158,7 +158,7 @@ licenses:
158
158
  metadata:
159
159
  homepage_uri: https://github.com/sul-dlss/blacklight_dynamic_sitemap
160
160
  source_code_uri: https://github.com/sul-dlss/blacklight_dynamic_sitemap
161
- post_install_message:
161
+ post_install_message:
162
162
  rdoc_options: []
163
163
  require_paths:
164
164
  - lib
@@ -173,8 +173,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
173
173
  - !ruby/object:Gem::Version
174
174
  version: '0'
175
175
  requirements: []
176
- rubygems_version: 3.2.16
177
- signing_key:
176
+ rubygems_version: 3.4.10
177
+ signing_key:
178
178
  specification_version: 4
179
179
  summary: Dynamic sitemap.xml for BLacklight
180
180
  test_files: []