blacklight 6.3.1 → 6.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 +4 -4
- data/.rspec +2 -1
- data/README.md +2 -2
- data/VERSION +1 -1
- data/app/assets/stylesheets/blacklight/_twitter_typeahead.scss +4 -4
- data/app/controllers/concerns/blacklight/facet.rb +12 -5
- data/app/views/catalog/_bookmark_control.html.erb +2 -2
- data/app/views/layouts/blacklight.html.erb +0 -6
- data/blacklight.gemspec +1 -1
- data/lib/blacklight/configuration/field.rb +2 -0
- data/lib/generators/blacklight/solr5_generator.rb +1 -1
- data/lib/generators/blacklight/user_generator.rb +2 -2
- data/spec/controllers/alternate_controller_spec.rb +0 -1
- data/spec/controllers/application_controller_spec.rb +0 -1
- data/spec/controllers/blacklight/base_spec.rb +0 -1
- data/spec/controllers/blacklight/catalog/component_configuration_spec.rb +0 -1
- data/spec/controllers/blacklight/facet_spec.rb +0 -1
- data/spec/controllers/blacklight/search_fields_spec.rb +0 -1
- data/spec/controllers/blacklight/search_helper_spec.rb +0 -1
- data/spec/controllers/blacklight/suggest_search_spec.rb +0 -1
- data/spec/controllers/bookmarks_controller_spec.rb +0 -1
- data/spec/controllers/catalog_controller_spec.rb +0 -1
- data/spec/controllers/saved_searches_controller_spec.rb +0 -1
- data/spec/controllers/search_history_controller_spec.rb +0 -1
- data/spec/controllers/suggest_controller_spec.rb +0 -1
- data/spec/features/alternate_controller_spec.rb +0 -1
- data/spec/features/bookmarks_spec.rb +0 -1
- data/spec/features/did_you_mean_spec.rb +0 -1
- data/spec/features/facets_spec.rb +0 -1
- data/spec/features/record_view_spec.rb +0 -1
- data/spec/features/saved_searches_spec.rb +0 -1
- data/spec/features/search_context_spec.rb +0 -1
- data/spec/features/search_filters_spec.rb +0 -1
- data/spec/features/search_formats_spec.rb +0 -1
- data/spec/features/search_history_spec.rb +0 -1
- data/spec/features/search_pagination_spec.rb +0 -1
- data/spec/features/search_results_spec.rb +0 -1
- data/spec/features/search_sort_spec.rb +0 -1
- data/spec/features/search_spec.rb +0 -1
- data/spec/features/sitelinks_search_box.rb +0 -1
- data/spec/helpers/blacklight_helper_spec.rb +95 -153
- data/spec/helpers/catalog_helper_spec.rb +0 -1
- data/spec/helpers/configuration_helper_spec.rb +0 -1
- data/spec/helpers/deprecated_url_helper_behavior_spec.rb +0 -1
- data/spec/helpers/facets_helper_spec.rb +83 -117
- data/spec/helpers/hash_as_hidden_fields_spec.rb +0 -1
- data/spec/helpers/layout_helper_spec.rb +0 -1
- data/spec/helpers/render_constraints_helper_spec.rb +0 -1
- data/spec/helpers/search_history_constraints_helper_spec.rb +0 -1
- data/spec/helpers/suggest_helper_spec.rb +0 -1
- data/spec/helpers/url_helper_spec.rb +0 -1
- data/spec/lib/blacklight/parameters_spec.rb +0 -1
- data/spec/lib/blacklight/search_state_spec.rb +0 -1
- data/spec/lib/blacklight/utils_spec.rb +0 -1
- data/spec/lib/blacklight_spec.rb +0 -1
- data/spec/lib/tasks/blacklight_task_spec.rb +0 -1
- data/spec/models/blacklight/configurable_spec.rb +0 -1
- data/spec/models/blacklight/configuration/context_spec.rb +0 -1
- data/spec/models/blacklight/configuration_spec.rb +0 -1
- data/spec/models/blacklight/document/active_model_shim_spec.rb +0 -1
- data/spec/models/blacklight/document/cache_key_spec.rb +0 -1
- data/spec/models/blacklight/document/dublin_core_spec.rb +0 -1
- data/spec/models/blacklight/document/email_spec.rb +0 -1
- data/spec/models/blacklight/document/sms_spec.rb +0 -1
- data/spec/models/blacklight/document_spec.rb +0 -1
- data/spec/models/blacklight/facet_paginator_spec.rb +0 -1
- data/spec/models/blacklight/search_builder_spec.rb +0 -1
- data/spec/models/blacklight/solr/document/more_like_this_spec.rb +0 -1
- data/spec/models/blacklight/solr/document_spec.rb +0 -1
- data/spec/models/blacklight/solr/facet_paginator_spec.rb +0 -1
- data/spec/models/blacklight/solr/repository_spec.rb +0 -1
- data/spec/models/blacklight/solr/request_spec.rb +0 -1
- data/spec/models/blacklight/solr/response/facets_spec.rb +0 -1
- data/spec/models/blacklight/solr/response_spec.rb +0 -1
- data/spec/models/blacklight/solr/search_builder_spec.rb +0 -1
- data/spec/models/blacklight/suggest/response_spec.rb +0 -1
- data/spec/models/blacklight/user_spec.rb +0 -1
- data/spec/models/bookmark_spec.rb +0 -1
- data/spec/models/record_mailer_spec.rb +0 -1
- data/spec/models/search_spec.rb +0 -1
- data/spec/models/solr_document_spec.rb +0 -1
- data/spec/presenters/document_presenter_spec.rb +0 -1
- data/spec/presenters/index_presenter_spec.rb +0 -1
- data/spec/presenters/pipeline_spec.rb +0 -1
- data/spec/presenters/show_presenter_spec.rb +0 -1
- data/spec/spec_helper.rb +5 -8
- data/spec/test_app_templates/Gemfile.extra +1 -1
- data/spec/views/_user_util_links.html.erb_spec.rb +0 -1
- data/spec/views/catalog/_constraints.html.erb_spec.rb +0 -1
- data/spec/views/catalog/_constraints_element.html.erb_spec.rb +0 -5
- data/spec/views/catalog/_document.html.erb_spec.rb +3 -14
- data/spec/views/catalog/_document_list.html.erb_spec.rb +1 -4
- data/spec/views/catalog/_facet_index_navigation.html.erb_spec.rb +0 -3
- data/spec/views/catalog/_facet_layout.html.erb_spec.rb +2 -7
- data/spec/views/catalog/_facets.html.erb_spec.rb +6 -14
- data/spec/views/catalog/_index_default.erb_spec.rb +4 -7
- data/spec/views/catalog/_index_header_default.html.erb_spec.rb +2 -5
- data/spec/views/catalog/_paginate_compact.html.erb_spec.rb +3 -5
- data/spec/views/catalog/_search_header.erb_spec.rb +0 -2
- data/spec/views/catalog/_show_default.erb_spec.rb +7 -11
- data/spec/views/catalog/_show_sidebar.erb_spec.rb +0 -1
- data/spec/views/catalog/_show_tools.html.erb_spec.rb +3 -13
- data/spec/views/catalog/_sort_and_per_page.html.erb_spec.rb +1 -5
- data/spec/views/catalog/_thumbnail_default.erb_spec.rb +0 -1
- data/spec/views/catalog/_view_type_group.html.erb_spec.rb +3 -11
- data/spec/views/catalog/facet.html.erb_spec.rb +0 -1
- data/spec/views/catalog/facet.json.jbuilder_spec.rb +0 -1
- data/spec/views/catalog/index.atom.builder_spec.rb +21 -36
- data/spec/views/catalog/index.html.erb_spec.rb +0 -3
- data/spec/views/catalog/index.json.jbuilder_spec.rb +0 -1
- data/spec/views/catalog/opensearch.xml.builder_spec.rb +0 -1
- data/spec/views/catalog/show.html.erb_spec.rb +2 -13
- metadata +6 -8
- data/spec/spec.opts +0 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 08a32b124f67c2eee4651aa298a0c04c6cc1b0a3
|
|
4
|
+
data.tar.gz: 99eb3c4e5a513755c0b44572d3f59e43ad46ae84
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 36debbcf121bb69692fd23a4f3183fa11a463cf33d754e2dd25589ef3fed03b2d89ef8c12a695bbc6666f42ecb67b2d6cc00600fbec0eeb1e2d2bd12970c993c
|
|
7
|
+
data.tar.gz: 4efcffee2bac9324aa344f2671a987e5628f1be7444c3517c4f8b63ea6917a7b8fee38dc796d616fb5a637dfca961382d89e6e0bca6512c49733f60a7c891874
|
data/.rspec
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
--
|
|
1
|
+
--color
|
|
2
|
+
--require spec_helper
|
data/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Blacklight
|
|
2
2
|
|
|
3
|
-
[](https://travis-ci.org/projectblacklight/blacklight) [](http://badge.fury.io/rb/blacklight)
|
|
3
|
+
[](https://travis-ci.org/projectblacklight/blacklight) [](http://badge.fury.io/rb/blacklight) [](https://coveralls.io/github/projectblacklight/blacklight?branch=master)
|
|
4
4
|
|
|
5
5
|
Blacklight is an open source Solr user interface discovery platform.
|
|
6
6
|
You can use Blacklight to enable searching and browsing of your collections.
|
|
@@ -19,7 +19,7 @@ gem "blacklight"
|
|
|
19
19
|
|
|
20
20
|
Run the install generator which will copy over some initial templates, migrations, routes, and configuration:
|
|
21
21
|
|
|
22
|
-
```
|
|
22
|
+
```bash
|
|
23
23
|
rails generate blacklight:install
|
|
24
24
|
```
|
|
25
25
|
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
6.
|
|
1
|
+
6.4.0
|
|
@@ -19,21 +19,28 @@ module Blacklight
|
|
|
19
19
|
end
|
|
20
20
|
|
|
21
21
|
def facet_field_names
|
|
22
|
-
blacklight_config.facet_fields.
|
|
22
|
+
blacklight_config.facet_fields.values.map(&:field)
|
|
23
23
|
end
|
|
24
24
|
|
|
25
|
+
# @param [String] field Solr facet name
|
|
26
|
+
# @return [Blacklight::Configuration::FacetField] Blacklight facet configuration for the solr field
|
|
25
27
|
def facet_configuration_for_field(field)
|
|
26
|
-
|
|
27
|
-
|
|
28
|
+
# short-circuit on the common case, where the solr field name and the blacklight field name are the same.
|
|
29
|
+
return blacklight_config.facet_fields[field] if blacklight_config.facet_fields[field] && blacklight_config.facet_fields[field].field == field
|
|
30
|
+
|
|
31
|
+
# Find the facet field configuration for the solr field, or provide a default.
|
|
32
|
+
blacklight_config.facet_fields.values.find { |v| v.field.to_s == field.to_s } ||
|
|
28
33
|
Blacklight::Configuration::FacetField.new(field: field).normalize!
|
|
29
34
|
end
|
|
30
35
|
|
|
31
36
|
# Get a FacetField object from the @response
|
|
32
37
|
def facet_by_field_name(field_or_field_name)
|
|
33
38
|
case field_or_field_name
|
|
34
|
-
when String, Symbol
|
|
39
|
+
when String, Symbol
|
|
35
40
|
facet_field = facet_configuration_for_field(field_or_field_name)
|
|
36
|
-
@response.aggregations[facet_field.
|
|
41
|
+
@response.aggregations[facet_field.field]
|
|
42
|
+
when Blacklight::Configuration::FacetField
|
|
43
|
+
@response.aggregations[field_or_field_name.field]
|
|
37
44
|
else
|
|
38
45
|
# is this really a useful case?
|
|
39
46
|
field_or_field_name
|
|
@@ -7,13 +7,13 @@
|
|
|
7
7
|
<% unless bookmarked? document %>
|
|
8
8
|
|
|
9
9
|
<%= form_tag( bookmark_path( document ), :method => :put, :class => "bookmark_toggle", "data-doc-id" => document.id, :'data-present' => t('blacklight.search.bookmarks.present'), :'data-absent' => t('blacklight.search.bookmarks.absent'), :'data-inprogress' => t('blacklight.search.bookmarks.inprogress')) do %>
|
|
10
|
-
<%= submit_tag(t('blacklight.bookmarks.add.button'), :id => "bookmark_toggle_#{document.id.to_s.parameterize}", :class => "bookmark_add") %>
|
|
10
|
+
<%= submit_tag(t('blacklight.bookmarks.add.button'), :id => "bookmark_toggle_#{document.id.to_s.parameterize}", :class => "bookmark_add btn btn-default") %>
|
|
11
11
|
<% end %>
|
|
12
12
|
|
|
13
13
|
<% else %>
|
|
14
14
|
|
|
15
15
|
<%= form_tag( bookmark_path( document ), :method => :delete, :class => "bookmark_toggle", "data-doc-id" => document.id, :'data-present' => t('blacklight.search.bookmarks.present'), :'data-absent' => t('blacklight.search.bookmarks.absent'), :'data-inprogress' => t('blacklight.search.bookmarks.inprogress')) do %>
|
|
16
|
-
<%= submit_tag(t('blacklight.bookmarks.remove.button'), :id => "bookmark_toggle_#{document.id.to_s.parameterize}", :class => "bookmark_remove") %>
|
|
16
|
+
<%= submit_tag(t('blacklight.bookmarks.remove.button'), :id => "bookmark_toggle_#{document.id.to_s.parameterize}", :class => "bookmark_remove btn btn-default") %>
|
|
17
17
|
<% end %>
|
|
18
18
|
|
|
19
19
|
<% end %>
|
|
@@ -23,12 +23,6 @@
|
|
|
23
23
|
<%= javascript_include_tag "application" %>
|
|
24
24
|
<%= csrf_meta_tags %>
|
|
25
25
|
<%= content_for(:head) %>
|
|
26
|
-
|
|
27
|
-
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
|
|
28
|
-
<!--[if lt IE 9]>
|
|
29
|
-
<script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
|
|
30
|
-
<![endif]-->
|
|
31
|
-
|
|
32
26
|
</head>
|
|
33
27
|
<body class="<%= render_body_class %>">
|
|
34
28
|
<%= render :partial => 'shared/header_navbar' %>
|
data/blacklight.gemspec
CHANGED
|
@@ -32,7 +32,7 @@ Gem::Specification.new do |s|
|
|
|
32
32
|
s.add_dependency "rsolr", "~> 1.0", ">= 1.0.6" # Library for interacting with rSolr.
|
|
33
33
|
s.add_dependency "bootstrap-sass", "~> 3.2"
|
|
34
34
|
s.add_dependency "deprecation"
|
|
35
|
-
s.add_dependency "twitter-typeahead-rails", '
|
|
35
|
+
s.add_dependency "twitter-typeahead-rails", '0.11.1.pre.corejavascript'
|
|
36
36
|
|
|
37
37
|
s.add_development_dependency "solr_wrapper"
|
|
38
38
|
s.add_development_dependency "rspec-rails", "~> 3.5"
|
|
@@ -23,7 +23,7 @@ module Blacklight
|
|
|
23
23
|
else
|
|
24
24
|
gem "devise"
|
|
25
25
|
end
|
|
26
|
-
gem "devise-guests", "~> 0.
|
|
26
|
+
gem "devise-guests", "~> 0.5"
|
|
27
27
|
|
|
28
28
|
Bundler.with_clean_env do
|
|
29
29
|
run "bundle install"
|
|
@@ -58,7 +58,7 @@ module Blacklight
|
|
|
58
58
|
"\n include Blacklight::User\n"
|
|
59
59
|
end
|
|
60
60
|
else
|
|
61
|
-
say_status "warning", <<-EOS.
|
|
61
|
+
say_status "warning", <<-EOS.strip_heredoc, :yellow
|
|
62
62
|
Blacklight authenticated user functionality not installed, as a user model
|
|
63
63
|
could not be found at /app/models/user.rb. If you used a different name,
|
|
64
64
|
please re-run the migration and provide that name as an argument. E.g.:
|