blacklight_dynamic_sitemap 0.6.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: 44231f5414713681e54dddaf7024e14489b518153160fc12d9b8f0ea6afc5fd9
4
- data.tar.gz: 3d3f645e3b37cee0d16a5301a8a7afb47bf334b2270daa495d10efc633aa7fa9
3
+ metadata.gz: 19e5252f0d82795d55dee6783ecc266b9928a275add5b657d1f7e233e7ac14c3
4
+ data.tar.gz: 007c0fb399604348dfa31bcf588047add2a21d8ddce6a9c199bfb436febff3ba
5
5
  SHA512:
6
- metadata.gz: ec836640c85ae903245d3de6217eed3e23bdb7f9aa808b6b23357a423e11866b5ea59ad883b6304e724538efc23ea91da992b76f2cd5e2b97dd8e782e40e8b7a
7
- data.tar.gz: 1808f19193c2f9a8130b8e7f4daf38f0e8a6499fa77467699e34a970da9e78eb215bff1883fc4508b9275ecf8deddcd90e725c8be4e9d0eb6054bc152d6f605a
6
+ metadata.gz: 4b9dac19bd9feb82176eb1a900fa73d645eeb8b611e1f0f0aeb4927251b24a72858e435ccc6e82eb666ed46758d78857e9fca21f97f23b49412f7d538046fea1
7
+ data.tar.gz: eacd8eb93ab81964d4ab2dc42e2d883957a45cefc8a658259498a6cb9dd8ccf15b3132aa3eb2a721157cf5e596486a9b95ca454259c05f42e15ba05c3824b6b5
@@ -12,30 +12,28 @@ jobs:
12
12
  strategy:
13
13
  fail-fast: false
14
14
  matrix:
15
- ruby: ['2.7']
16
- rails: ['6.0.3.7', '6.1.3.2', '7.0.3']
15
+ blacklight_version: ['~> 8.0']
16
+ ruby_version: ['2.7', '3.0', '3.1']
17
+ rails_version: ['7.0.7.2']
17
18
  include:
18
- - rails: '7.0.3'
19
- ruby: '3.0'
20
-
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'
21
27
  runs-on: ubuntu-latest
22
28
  steps:
23
29
  - uses: actions/checkout@v2
24
30
  - name: Set up Ruby
25
31
  uses: ruby/setup-ruby@v1
26
32
  with:
27
- ruby-version: ${{ matrix.ruby }}
28
- - uses: actions/cache@v2
29
- with:
30
- path: vendor/bundle
31
- key: ${{ runner.os }}-gems20210506-${{ hashFiles('**/Gemfile.lock') }}
32
- restore-keys: |
33
- ${{ runner.os }}-gems20210506-
33
+ ruby-version: ${{ matrix.ruby_version }}
34
34
  - name: Bundle install
35
35
  env:
36
- RAILS_VERSION: ${{ matrix.rails }}
37
- run: |
38
- bundle config path vendor/bundle
39
- bundle install
36
+ RAILS_VERSION: ${{ matrix.rails_version }}
37
+ run: bundle install
40
38
  - name: Run tests
41
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
@@ -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
 
@@ -25,7 +25,7 @@ Gem::Specification.new do |spec|
25
25
  spec.require_paths = ['lib']
26
26
 
27
27
  spec.add_dependency 'rails'
28
- spec.add_dependency 'blacklight', '> 6.0'
28
+ spec.add_dependency 'blacklight', '> 7.0'
29
29
 
30
30
  spec.add_development_dependency 'capybara'
31
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.6.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"/>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blacklight_dynamic_sitemap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jack Reed
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-06-13 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
@@ -30,14 +30,14 @@ dependencies:
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
@@ -173,7 +173,7 @@ 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.32
176
+ rubygems_version: 3.4.10
177
177
  signing_key:
178
178
  specification_version: 4
179
179
  summary: Dynamic sitemap.xml for BLacklight