Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate SearchBuilder into the host application #1152

Merged
merged 1 commit into from
Mar 20, 2015

Conversation

jcoyne
Copy link
Member

@jcoyne jcoyne commented Mar 19, 2015

This gives plugins a place to add additional search methods without
having an complex inheritance hierarchy.

@@ -1,140 +1,6 @@
module Blacklight
class SearchBuilder
extend Deprecation
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still don't understand why this can't be a class, and have ::SearchBuilder extend it if it needs to.. especially because the behavior defines #initialize, which screams class to me.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would be fine with me. I can rework it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks.

This gives plugins a place to add additional search methods without
having an complex inheritance hierarchy.
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.03%) to 90.56% when pulling d870405 on generate_search_builder into 8ef2355 on master.

def locate_search_builder_class
::SearchBuilder
rescue NameError
Deprecation.warn(Configuration, "Your application is missing the SearchBuilder. Have you run `rails generate blacklight:search_builder`? Falling back to Blacklight::Solr::SearchBuilder")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really need to deprecation Blacklight::Solr::SearchBuilder? It seems like it works fine as-is for common uses..

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm for removing as much code as possible, so I think that deprecating it is the thing to do.

cbeer added a commit that referenced this pull request Mar 20, 2015
Generate SearchBuilder into the host application
@cbeer cbeer merged commit dfea85e into master Mar 20, 2015
@cbeer cbeer deleted the generate_search_builder branch March 20, 2015 20:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants