Skip to content
This repository
Browse code

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

…sk. Requiring rubytree version
  • Loading branch information...
commit 606d346fefe1933bd03cf21aad5249199878585f 1 parent 86ce97f
Jessie Keck jkeck authored

Showing 2 changed files with 8 additions and 2 deletions. Show diff stats Hide diff stats

  1. +5 0 README
  2. +3 2 init.rb
5 README
... ... @@ -1,6 +1,11 @@
1 1 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.
2 2 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.
3 3
  4 +== Pre-requisites:
  5 +The Blacklight plugin ( http://github.com/projectblacklight/blacklight )
  6 +RubyTree gem ( http://rubytree.rubyforge.org/ )
  7 +An appropriate solr request handler for advanced search.
  8 +-- See advanced_search request handler in blacklight-jetty ( http://github.com/projectblacklight/blacklight-jetty ) for an example.
4 9
5 10 == Installation:
6 11 Clone the advanced search plugin from github into your application's vendor/plugins directory
5 init.rb
@@ -2,7 +2,7 @@
2 2 config.plugins = 'blacklight'
3 3
4 4 # Require the RubyTree gem which is needed for query parsing
5   -config.gem 'rubytree', :lib => 'tree'
  5 +config.gem 'rubytree', :lib => 'tree', :version => '0.5.2'
6 6
7 7 config.after_initialize do
8 8 BlacklightAdvancedSearch.init
@@ -10,9 +10,10 @@
10 10 end
11 11
12 12 unless File.exists? File.join(Rails.root, 'config', 'initializers', 'blacklight_advanced_search_config.rb')
13   - 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."
  13 + 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 "
14 14 end
15 15 unless File.read(File.join(Rails.root,'app','helpers','application_helper.rb')).scan("require 'vendor/plugins/blacklight_advanced_search/app/helpers/application_helper.rb'")
16 16 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"
17 17 end
  18 +
18 19 require 'blacklight_advanced_search'

0 comments on commit 606d346

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