Skip to content
Browse files

Changing instructions for when there is no config file to use rake ta…

…sk. Requiring rubytree version
  • Loading branch information...
1 parent 86ce97f commit 606d346fefe1933bd03cf21aad5249199878585f @jkeck jkeck committed Apr 30, 2010
Showing with 8 additions and 2 deletions.
  1. +5 −0 README
  2. +3 −2 init.rb
View
5 README
@@ -1,6 +1,11 @@
This is an advanced search plugin for Blacklight ( http://www.projectblacklight.org ). It is meant to be installed alongside the Blacklight plugin in your application's vendor/plugins directory.
This plugin is currently in an ALPHA release and is experimental. Better installation instructions, more tests, and documentation will be coming soon. There are also a few very minor changes that will be made in the Blacklight plugin which will be needed to make this work properly.
+== Pre-requisites:
+The Blacklight plugin ( http://github.com/projectblacklight/blacklight )
+RubyTree gem ( http://rubytree.rubyforge.org/ )
+An appropriate solr request handler for advanced search.
+-- See advanced_search request handler in blacklight-jetty ( http://github.com/projectblacklight/blacklight-jetty ) for an example.
== Installation:
Clone the advanced search plugin from github into your application's vendor/plugins directory
View
5 init.rb
@@ -2,17 +2,18 @@
config.plugins = 'blacklight'
# Require the RubyTree gem which is needed for query parsing
-config.gem 'rubytree', :lib => 'tree'
+config.gem 'rubytree', :lib => 'tree', :version => '0.5.2'
config.after_initialize do
BlacklightAdvancedSearch.init
Blacklight.config[:search_fields] << {:display_label => 'Advanced', :qt => BlacklightAdvancedSearch.config[:advanced][:search_field], :include_in_simple_select => false} if defined? :Blacklight
end
unless File.exists? File.join(Rails.root, 'config', 'initializers', 'blacklight_advanced_search_config.rb')
- raise "The Blacklight Advanced Search plugin requires a config/initializers/blacklight_advanced_search_config.rb file. You may need to run template.rb from the plugin."
+ raise "The Blacklight Advanced Search plugin requires a config/initializers/blacklight_advanced_search_config.rb file. You may need to run the rake task to install the plugin from your app. rake rails:template LOCATION=vendor/plugins/blacklight_advanced_search/template.rb "
end
unless File.read(File.join(Rails.root,'app','helpers','application_helper.rb')).scan("require 'vendor/plugins/blacklight_advanced_search/app/helpers/application_helper.rb'")
puts "WARNING: Your ApplicationHelper is not requiring the blacklight_advanced_search ApplicationHelper\nWARNING: Please add the line require 'vendor/plugins/blacklight_advanced_search/app/helpers/application_helper.rb' to your ApplicationHelper in order for the BlacklightAdvancedSearch plugin to work as intended"
end
+
require 'blacklight_advanced_search'

0 comments on commit 606d346

Please sign in to comment.
Something went wrong with that request. Please try again.