class BlacklightIiifSearch::InstallGenerator

Public Instance Methods

add_solr_config() click to toggle source
# File lib/generators/blacklight_iiif_search/install_generator.rb, line 43
def add_solr_config
  generate 'blacklight_iiif_search:solr' unless options[:'skip-solr']
end
bundle_install() click to toggle source
# File lib/generators/blacklight_iiif_search/install_generator.rb, line 47
def bundle_install
  Bundler.with_clean_env do
    run 'bundle install'
  end
end
insert_to_controllers() click to toggle source
# File lib/generators/blacklight_iiif_search/install_generator.rb, line 31
def insert_to_controllers
  generate 'blacklight_iiif_search:controller', controller_name
end
insert_to_models() click to toggle source
# File lib/generators/blacklight_iiif_search/install_generator.rb, line 35
def insert_to_models
  generate 'blacklight_iiif_search:model', search_builder_name
end
insert_to_routes() click to toggle source
# File lib/generators/blacklight_iiif_search/install_generator.rb, line 39
def insert_to_routes
  generate 'blacklight_iiif_search:routes'
end
verify_blacklight_installed() click to toggle source
# File lib/generators/blacklight_iiif_search/install_generator.rb, line 25
def verify_blacklight_installed
  return if IO.read('app/controllers/application_controller.rb').include?('include Blacklight::Controller')
  say_status('info', 'BLACKLIGHT NOT INSTALLED; GENERATING BLACKLIGHT', :blue)
  generate 'blacklight:install'
end