Skip to content

Commit

Permalink
Silence internal deprecation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
cbeer committed Feb 23, 2015
1 parent 0fdd53c commit 1adf9f4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
5 changes: 4 additions & 1 deletion lib/blacklight/search_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,10 @@ def fetch_many(ids=[], *args)
# given a field name and array of values, get the matching SOLR documents
# @return [Blacklight::SolrResponse, Array<Blacklight::SolrDocument>] the solr response object and a list of solr documents
def get_solr_response_for_field_values(field, values, extra_controller_params = {})
query = search_builder.with(params).query(extra_controller_params.merge(solr_documents_by_field_values_params(field, values)))
query = Deprecation.silence(Blacklight::RequestBuilders) do
search_builder.with(params).query(extra_controller_params.merge(solr_documents_by_field_values_params(field, values)))
end

solr_response = repository.search(query)


Expand Down
6 changes: 5 additions & 1 deletion spec/lib/blacklight/solr/search_builder_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,11 @@

# SPECS for actual search parameter generation
describe "#processed_parameters" do
subject { search_builder.with(user_params).processed_parameters }
subject do
Deprecation.silence(Blacklight::SearchBuilder) do
search_builder.with(user_params).processed_parameters
end
end

context "when search_params_logic is customized" do
let(:method_chain) { [:add_foo_to_solr_params] }
Expand Down

0 comments on commit 1adf9f4

Please sign in to comment.