Sha256: ffb48632799e1b562dfdc4a686049a7f7e86969d310916d670214c966fa4a295

Contents?: true

Size: 919 Bytes

Versions: 23

Compression:

Stored size: 919 Bytes

Contents

# frozen_string_literal: true
require 'rails/generators'

module Blacklight
  class Solr4Generator < Rails::Generators::Base
    source_root File.expand_path('../templates', __FILE__)

    class_option :jettywrapper, type: :boolean, default: false, desc: "Use jettywrapper to download and control Jetty"

    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", "config/jetty.yml"

      append_to_file "Rakefile",
        "\nZIP_URL = \"https://github.com/projectblacklight/blacklight-jetty/archive/v4.10.4.zip\"\n" \
        "require 'jettywrapper'\n"
    end

    def add_rsolr_gem
      gem "rsolr".dup, '>= 1.0', '< 3'
    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
blacklight-6.25.0 lib/generators/blacklight/solr4_generator.rb
blacklight-6.24.0 lib/generators/blacklight/solr4_generator.rb
blacklight-6.23.0 lib/generators/blacklight/solr4_generator.rb
blacklight-6.22.0 lib/generators/blacklight/solr4_generator.rb
blacklight-6.21.0 lib/generators/blacklight/solr4_generator.rb
blacklight-6.20.0 lib/generators/blacklight/solr4_generator.rb
blacklight-6.19.2 lib/generators/blacklight/solr4_generator.rb
blacklight-6.19.1 lib/generators/blacklight/solr4_generator.rb
blacklight-6.19.0 lib/generators/blacklight/solr4_generator.rb
blacklight-6.18.0 lib/generators/blacklight/solr4_generator.rb
blacklight-6.17.0 lib/generators/blacklight/solr4_generator.rb
blacklight-6.16.0 lib/generators/blacklight/solr4_generator.rb
blacklight-6.15.0 lib/generators/blacklight/solr4_generator.rb
blacklight-6.14.1 lib/generators/blacklight/solr4_generator.rb
blacklight-6.14.0 lib/generators/blacklight/solr4_generator.rb
blacklight-6.13.0 lib/generators/blacklight/solr4_generator.rb
blacklight-6.12.0 lib/generators/blacklight/solr4_generator.rb
blacklight-6.11.2 lib/generators/blacklight/solr4_generator.rb
blacklight-6.11.1 lib/generators/blacklight/solr4_generator.rb
blacklight-6.11.0 lib/generators/blacklight/solr4_generator.rb