blacklight-spotlight 2.3.3 → 2.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3ccde701f48bc966351939e06234a369b421b2a0589e45e549468b2d5a04ba30
4
- data.tar.gz: 7bff42bbc7cec714fe7154d5d391980525610cc2aa766b8b3a0e8558d48b8be6
3
+ metadata.gz: 4590fbda9990663841c1c207c0b30d85c78f5bd8c0f334cd7095d7f4c1790204
4
+ data.tar.gz: 92babceecf344f8070106c2d246c49b3b041d2bfa8cb533fe974e47b07d0319f
5
5
  SHA512:
6
- metadata.gz: 02f38cd394863b086f6c625daf36b5dd906964890d81a29cb694d4f0d37ed5dc6041a971668ebad84e2d7e5a487b5bbc051008952e2038bcf5520882d7168a6c
7
- data.tar.gz: 7043d15fd7fa20b84dfaa01844e34a413a946463bec59f28522b36dffd89163b31e3d724bc6bd0da9dda3182f9f157ef35de885c213efa7c7a4ae2ab10bc25c7
6
+ metadata.gz: 13732cde141a4a6acebdaa35c2587d06d006f667c8f634898a97cb3c11636b7ca0c56eab7035ffdbc72660d5f9761e4326cd694aa0e63b626a885ba9f944b2b2
7
+ data.tar.gz: 6760e833d1a15f00fcf1903245c0016ab34822b5e32cd6017b8618192515f0a38a042870e8068de84aab531500ae4269d211a2806dbbf8a9761fac9c2e67c48c
data/config/routes.rb CHANGED
@@ -51,7 +51,11 @@ Spotlight::Engine.routes.draw do
51
51
 
52
52
  concern :exportable, Blacklight::Routes::Exportable.new
53
53
 
54
- resources :solr_documents, except: [:index], path: '/catalog', controller: 'catalog' do
54
+ resources :solr_documents,
55
+ except: [:index],
56
+ path: '/catalog',
57
+ controller: 'catalog',
58
+ id: Blacklight::Engine.config.routes.identifier_constraint do
55
59
  concerns :exportable
56
60
 
57
61
  member do
@@ -1,3 +1,3 @@
1
1
  module Spotlight
2
- VERSION = '2.3.3'.freeze
2
+ VERSION = '2.4.0'.freeze
3
3
  end
data/spec/examples.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  example_id | status | run_time |
2
2
  --------------------------------------------------------- | ------ | --------------- |
3
- ./spec/routing/spotlight/exhibit_catalog_spec.rb[1:1:1:1] | passed | 0.10341 seconds |
4
- ./spec/routing/spotlight/exhibit_catalog_spec.rb[1:1:2] | passed | 0.11454 seconds |
5
- ./spec/routing/spotlight/exhibit_catalog_spec.rb[1:1:3] | passed | 0.01218 seconds |
6
- ./spec/routing/spotlight/exhibit_catalog_spec.rb[1:1:4] | passed | 0.00964 seconds |
3
+ ./spec/routing/spotlight/exhibit_catalog_spec.rb[1:1:1:1] | passed | 0.13301 seconds |
4
+ ./spec/routing/spotlight/exhibit_catalog_spec.rb[1:1:2] | passed | 0.25586 seconds |
5
+ ./spec/routing/spotlight/exhibit_catalog_spec.rb[1:1:3] | passed | 0.00944 seconds |
6
+ ./spec/routing/spotlight/exhibit_catalog_spec.rb[1:1:4] | passed | 0.01002 seconds |
@@ -1,7 +1,22 @@
1
- describe 'Catalog controller', type: :routing do
1
+ RSpec.describe 'Catalog controller', type: :routing do
2
2
  describe 'routing' do
3
3
  routes { Spotlight::Engine.routes }
4
4
 
5
+ context 'when the routing constraint is set to allow periods' do
6
+ before do
7
+ allow(Blacklight::Engine.config.routes).to receive(:identifier_constraint).and_return(%r{[^/]+})
8
+ Rails.application.reload_routes!
9
+ end
10
+
11
+ it 'routes to #show' do
12
+ expect(get('/1/catalog/gallica.bnf.fr')).to route_to('spotlight/catalog#show', exhibit_id: '1', id: 'gallica.bnf.fr')
13
+ end
14
+ end
15
+
16
+ it 'routes to #show with a format' do
17
+ expect(get('/1/catalog/dq287tq6352.xml')).to route_to('spotlight/catalog#show', exhibit_id: '1', id: 'dq287tq6352', format: 'xml')
18
+ end
19
+
5
20
  it 'routes to #edit' do
6
21
  expect(get('/1/catalog/dq287tq6352/edit')).to route_to('spotlight/catalog#edit', exhibit_id: '1', id: 'dq287tq6352')
7
22
  end
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.3.3
4
+ version: 2.4.0
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: 2019-03-07 00:00:00.000000000 Z
14
+ date: 2019-03-11 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: rails
@@ -33,14 +33,14 @@ dependencies:
33
33
  requirements:
34
34
  - - "~>"
35
35
  - !ruby/object:Gem::Version
36
- version: '6.3'
36
+ version: '6.20'
37
37
  type: :runtime
38
38
  prerelease: false
39
39
  version_requirements: !ruby/object:Gem::Requirement
40
40
  requirements:
41
41
  - - "~>"
42
42
  - !ruby/object:Gem::Version
43
- version: '6.3'
43
+ version: '6.20'
44
44
  - !ruby/object:Gem::Dependency
45
45
  name: autoprefixer-rails
46
46
  requirement: !ruby/object:Gem::Requirement