blacklight 6.1.0 → 6.2.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 +4 -4
- data/.travis.yml +13 -14
- data/Gemfile +2 -0
- data/VERSION +1 -1
- data/app/controllers/concerns/blacklight/search_helper.rb +1 -1
- data/blacklight.gemspec +2 -2
- data/db/migrate/20140202020201_create_searches.rb +1 -3
- data/db/migrate/20140202020202_create_bookmarks.rb +3 -2
- data/db/migrate/20140320000000_add_polymorphic_type_to_bookmarks.rb +2 -2
- data/lib/blacklight.rb +14 -5
- data/lib/blacklight/runtime_registry.rb +9 -0
- data/lib/generators/blacklight/install_generator.rb +1 -1
- data/solr/conf/schema.xml +1 -0
- data/spec/models/blacklight/document/active_model_shim_spec.rb +1 -1
- data/spec/models/blacklight/document_spec.rb +1 -1
- data/spec/views/catalog/_facet_index_navigation.html.erb_spec.rb +1 -0
- data/spec/views/catalog/_paginate_compact.html.erb_spec.rb +4 -0
- data/spec/views/catalog/_view_type_group.html.erb_spec.rb +2 -0
- data/template.demo.rb +1 -1
- metadata +18 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 56c35c6ca23b02b1ca6e11d7ba4eca20e6e98765
|
4
|
+
data.tar.gz: e84c2c02337bd0ff644922c8007b8aa700b1a0bc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9e78806fd48f0861fba67936341782d9411b45719688c9fc1fe08cd4e3cc1a8e5675ab3496c185ae16ad2b0a8019a9d2b0b535d36f6284e5a2d2c21623424064
|
7
|
+
data.tar.gz: 2e72ce5c749e044c9c60383341ef872ba427feeb4da4172adbf3bd257e41ea5cd7eb6d653d0a6fc0ee57cdee2fb70d5e0e2d55df2ae85b3045584a27eea819f1
|
data/.travis.yml
CHANGED
@@ -1,34 +1,31 @@
|
|
1
1
|
language: ruby
|
2
2
|
sudo: false
|
3
|
-
cache:
|
4
|
-
directories:
|
5
|
-
- /tmp/solr-5.3.0
|
6
3
|
|
7
4
|
notifications:
|
8
5
|
email: false
|
9
6
|
|
10
7
|
rvm:
|
11
|
-
- 2.3.
|
8
|
+
- 2.3.1
|
12
9
|
|
13
10
|
matrix:
|
14
11
|
include:
|
15
|
-
- rvm: 2.1.
|
16
|
-
env: "RAILS_VERSION=4.2.
|
17
|
-
- rvm: 2.2.
|
18
|
-
env: "RAILS_VERSION=4.2.
|
19
|
-
- rvm: 2.3.
|
20
|
-
env: "RAILS_VERSION=5.0.0.
|
21
|
-
- rvm: jruby-9.0.
|
22
|
-
env: "RAILS_VERSION=4.2.
|
12
|
+
- rvm: 2.1.9
|
13
|
+
env: "RAILS_VERSION=4.2.6"
|
14
|
+
- rvm: 2.2.5
|
15
|
+
env: "RAILS_VERSION=4.2.6"
|
16
|
+
- rvm: 2.3.1
|
17
|
+
env: "RAILS_VERSION=5.0.0.rc1"
|
18
|
+
- rvm: jruby-9.0.5.0
|
19
|
+
env: "RAILS_VERSION=4.2.6 JRUBY_OPTS=\"-J-Xms512m -J-Xmx1024m\""
|
23
20
|
allow_failures:
|
24
|
-
- rvm: jruby-9.0.
|
21
|
+
- rvm: jruby-9.0.5.0
|
25
22
|
fast_finish: true
|
26
23
|
|
27
24
|
before_install:
|
28
25
|
- gem install bundler
|
29
26
|
|
30
27
|
env:
|
31
|
-
- "RAILS_VERSION=4.2.
|
28
|
+
- "RAILS_VERSION=4.2.6"
|
32
29
|
|
33
30
|
notifications:
|
34
31
|
irc: "irc.freenode.org#blacklight"
|
@@ -37,3 +34,5 @@ notifications:
|
|
37
34
|
|
38
35
|
global_env:
|
39
36
|
- NOKOGIRI_USE_SYSTEM_LIBRARIES=true
|
37
|
+
|
38
|
+
jdk: oraclejdk8
|
data/Gemfile
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
6.
|
1
|
+
6.2.0
|
data/blacklight.gemspec
CHANGED
@@ -35,10 +35,10 @@ Gem::Specification.new do |s|
|
|
35
35
|
s.add_dependency "twitter-typeahead-rails", '~> 0.11'
|
36
36
|
|
37
37
|
s.add_development_dependency "solr_wrapper"
|
38
|
-
s.add_development_dependency "rspec-rails", "
|
38
|
+
s.add_development_dependency "rspec-rails", ">= 3.4", "< 4"
|
39
39
|
s.add_development_dependency "rspec-its"
|
40
40
|
s.add_development_dependency "rspec-collection_matchers", ">= 1.0"
|
41
|
-
s.add_development_dependency "capybara"
|
41
|
+
s.add_development_dependency "capybara", '~> 2.6.0'
|
42
42
|
s.add_development_dependency "poltergeist"
|
43
43
|
s.add_development_dependency 'engine_cart', '~> 0.8.0'
|
44
44
|
s.add_development_dependency "equivalent-xml"
|
@@ -3,13 +3,11 @@ class CreateSearches < ActiveRecord::Migration
|
|
3
3
|
def self.up
|
4
4
|
create_table :searches do |t|
|
5
5
|
t.text :query_params
|
6
|
-
t.integer :user_id
|
6
|
+
t.integer :user_id, index: true
|
7
7
|
t.string :user_type
|
8
8
|
|
9
9
|
t.timestamps null: false
|
10
10
|
end
|
11
|
-
|
12
|
-
add_index :searches, :user_id
|
13
11
|
end
|
14
12
|
|
15
13
|
def self.down
|
@@ -2,9 +2,10 @@
|
|
2
2
|
class CreateBookmarks < ActiveRecord::Migration
|
3
3
|
def self.up
|
4
4
|
create_table :bookmarks do |t|
|
5
|
-
t.integer :user_id, :null
|
5
|
+
t.integer :user_id, index: true, null: false
|
6
6
|
t.string :user_type
|
7
|
-
t.string :document_id
|
7
|
+
t.string :document_id, index: true
|
8
|
+
t.string :document_type
|
8
9
|
t.string :title
|
9
10
|
t.timestamps null: false
|
10
11
|
end
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
class AddPolymorphicTypeToBookmarks < ActiveRecord::Migration
|
3
3
|
def change
|
4
|
-
add_column(:bookmarks, :document_type, :string)
|
4
|
+
add_column(:bookmarks, :document_type, :string) unless Bookmark.connection.column_exists? :bookmarks, :document_type
|
5
5
|
|
6
|
-
add_index :bookmarks, :user_id
|
6
|
+
add_index :bookmarks, :user_id unless Bookmark.connection.index_exists? :bookmarks, :user_id
|
7
7
|
end
|
8
8
|
end
|
data/lib/blacklight.rb
CHANGED
@@ -10,6 +10,7 @@ module Blacklight
|
|
10
10
|
autoload :Exceptions, 'blacklight/exceptions'
|
11
11
|
autoload :Parameters, 'blacklight/parameters'
|
12
12
|
autoload :Routes, 'blacklight/routes'
|
13
|
+
autoload :RuntimeRegistry, 'blacklight/runtime_registry'
|
13
14
|
autoload :SearchBuilder, 'blacklight/search_builder'
|
14
15
|
autoload :SearchState, 'blacklight/search_state'
|
15
16
|
autoload :Solr, 'blacklight/solr'
|
@@ -26,7 +27,11 @@ module Blacklight
|
|
26
27
|
##
|
27
28
|
# The default index connection for the search index
|
28
29
|
def self.default_index
|
29
|
-
|
30
|
+
Blacklight::RuntimeRegistry.connection ||= repository_class.new(default_configuration)
|
31
|
+
end
|
32
|
+
|
33
|
+
def self.default_index=(repository)
|
34
|
+
Blacklight::RuntimeRegistry.connection = repository
|
30
35
|
end
|
31
36
|
|
32
37
|
##
|
@@ -52,10 +57,14 @@ module Blacklight
|
|
52
57
|
end
|
53
58
|
|
54
59
|
def self.connection_config
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
60
|
+
Blacklight::RuntimeRegistry.connection_config ||= begin
|
61
|
+
raise "The #{::Rails.env} environment settings were not found in the blacklight.yml config" unless blacklight_yml[::Rails.env]
|
62
|
+
blacklight_yml[::Rails.env].symbolize_keys
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
def self.connection_config=(value)
|
67
|
+
Blacklight::RuntimeRegistry.connection_config = value
|
59
68
|
end
|
60
69
|
|
61
70
|
def self.blacklight_yml
|
data/solr/conf/schema.xml
CHANGED
@@ -459,6 +459,7 @@
|
|
459
459
|
|
460
460
|
<!-- NOTE: this is not a full list of fields in the index; dynamic fields are also used -->
|
461
461
|
<field name="id" type="string" indexed="true" stored="true" required="true" />
|
462
|
+
<field name="_version_" type="long" indexed="true" stored="true" multiValued="false" />
|
462
463
|
<field name="timestamp" type="date" indexed="true" stored="true" default="NOW" multiValued="false"/>
|
463
464
|
<!-- default, catch all search field -->
|
464
465
|
<field name="text" type="text" indexed="true" stored="false" multiValued="true"/>
|
@@ -22,7 +22,7 @@ describe 'Blacklight::Document::ActiveModelShim' do
|
|
22
22
|
end
|
23
23
|
|
24
24
|
before do
|
25
|
-
allow(MockDocument
|
25
|
+
allow(MockDocument).to receive(:repository).and_return(double(find: MockResponse.new([{id: 1}], {})))
|
26
26
|
end
|
27
27
|
|
28
28
|
describe "#find" do
|
@@ -81,7 +81,7 @@ describe Blacklight::Document do
|
|
81
81
|
end
|
82
82
|
|
83
83
|
before do
|
84
|
-
allow(MockDocument
|
84
|
+
allow(MockDocument).to receive(:repository).and_return(double(find: MockResponse.new([{id: 1}], {})))
|
85
85
|
end
|
86
86
|
|
87
87
|
it "should have a globalid" do
|
@@ -10,6 +10,7 @@ describe 'catalog/_facet_index_navigation.html.erb', type: :view do
|
|
10
10
|
assign(:pagination, pagination)
|
11
11
|
assign(:facet, facet)
|
12
12
|
allow(view).to receive(:blacklight_config).and_return(blacklight_config)
|
13
|
+
controller.request.path_parameters[:action] = 'index'
|
13
14
|
end
|
14
15
|
|
15
16
|
it 'renders the facet index navigation range' do
|
@@ -3,6 +3,10 @@ require 'spec_helper'
|
|
3
3
|
|
4
4
|
describe "catalog/_paginate_compact.html.erb" do
|
5
5
|
let(:user) { User.new.tap { |u| u.save(validate: false) } }
|
6
|
+
|
7
|
+
before do
|
8
|
+
controller.request.path_parameters[:action] = 'index'
|
9
|
+
end
|
6
10
|
|
7
11
|
describe "with a real solr response", :integration => true do
|
8
12
|
def blacklight_config
|
@@ -13,6 +13,8 @@ describe "catalog/_view_type_group" do
|
|
13
13
|
end
|
14
14
|
|
15
15
|
allow(view).to receive_messages(how_sort_and_per_page?: true, blacklight_config: blacklight_config)
|
16
|
+
|
17
|
+
controller.request.path_parameters[:action] = 'index'
|
16
18
|
end
|
17
19
|
|
18
20
|
it "should not display the group when there's only one option" do
|
data/template.demo.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blacklight
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.
|
4
|
+
version: 6.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonathan Rochkind
|
@@ -17,7 +17,7 @@ authors:
|
|
17
17
|
autorequire:
|
18
18
|
bindir: exe
|
19
19
|
cert_chain: []
|
20
|
-
date: 2016-
|
20
|
+
date: 2016-05-10 00:00:00.000000000 Z
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|
23
23
|
name: rails
|
@@ -161,16 +161,22 @@ dependencies:
|
|
161
161
|
name: rspec-rails
|
162
162
|
requirement: !ruby/object:Gem::Requirement
|
163
163
|
requirements:
|
164
|
-
- - "
|
164
|
+
- - ">="
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '3.4'
|
167
|
+
- - "<"
|
165
168
|
- !ruby/object:Gem::Version
|
166
|
-
version: '
|
169
|
+
version: '4'
|
167
170
|
type: :development
|
168
171
|
prerelease: false
|
169
172
|
version_requirements: !ruby/object:Gem::Requirement
|
170
173
|
requirements:
|
171
|
-
- - "
|
174
|
+
- - ">="
|
175
|
+
- !ruby/object:Gem::Version
|
176
|
+
version: '3.4'
|
177
|
+
- - "<"
|
172
178
|
- !ruby/object:Gem::Version
|
173
|
-
version: '
|
179
|
+
version: '4'
|
174
180
|
- !ruby/object:Gem::Dependency
|
175
181
|
name: rspec-its
|
176
182
|
requirement: !ruby/object:Gem::Requirement
|
@@ -203,16 +209,16 @@ dependencies:
|
|
203
209
|
name: capybara
|
204
210
|
requirement: !ruby/object:Gem::Requirement
|
205
211
|
requirements:
|
206
|
-
- - "
|
212
|
+
- - "~>"
|
207
213
|
- !ruby/object:Gem::Version
|
208
|
-
version:
|
214
|
+
version: 2.6.0
|
209
215
|
type: :development
|
210
216
|
prerelease: false
|
211
217
|
version_requirements: !ruby/object:Gem::Requirement
|
212
218
|
requirements:
|
213
|
-
- - "
|
219
|
+
- - "~>"
|
214
220
|
- !ruby/object:Gem::Version
|
215
|
-
version:
|
221
|
+
version: 2.6.0
|
216
222
|
- !ruby/object:Gem::Dependency
|
217
223
|
name: poltergeist
|
218
224
|
requirement: !ruby/object:Gem::Requirement
|
@@ -491,6 +497,7 @@ files:
|
|
491
497
|
- lib/blacklight/routes.rb
|
492
498
|
- lib/blacklight/routes/exportable.rb
|
493
499
|
- lib/blacklight/routes/searchable.rb
|
500
|
+
- lib/blacklight/runtime_registry.rb
|
494
501
|
- lib/blacklight/search_builder.rb
|
495
502
|
- lib/blacklight/search_state.rb
|
496
503
|
- lib/blacklight/solr.rb
|
@@ -671,7 +678,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
671
678
|
version: '0'
|
672
679
|
requirements: []
|
673
680
|
rubyforge_project:
|
674
|
-
rubygems_version: 2.5.1
|
681
|
+
rubygems_version: 2.4.5.1
|
675
682
|
signing_key:
|
676
683
|
specification_version: 4
|
677
684
|
summary: Blacklight provides a discovery interface for any Solr (http://lucene.apache.org/solr)
|