Skip to content

Commit

Permalink
Address bug in default template install process (Solr4Generator).
Browse files Browse the repository at this point in the history
Don't require the jettywrapper option to be passed to the generator to install jettywrapper (it is already checked before running that generator).

Add the templates directory as a source_root so the generator can access to jetty.yml
  • Loading branch information
jkeck committed Mar 18, 2016
1 parent e3c72d5 commit bc4dd35
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/generators/blacklight/solr4_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,18 @@

module Blacklight
class Solr4Generator < Rails::Generators::Base

source_root File.expand_path('../templates', __FILE__)

desc <<-EOS
This generator makes the following changes to your application:
1. Installs jettywrapper into your application
2. Adds rsolr to your Gemfile
EOS

def install_jettywrapper
return unless options[:jettywrapper]
gem "jettywrapper".dup, ">= 2.0"

copy_file "config/jetty.yml"
copy_file "config/jetty.yml", "config/jetty.yml"

append_to_file "Rakefile",
"\nZIP_URL = \"https://github.com/projectblacklight/blacklight-jetty/archive/v4.10.4.zip\"\n" \
Expand Down

0 comments on commit bc4dd35

Please sign in to comment.