class Blacklight::Install
Public Instance Methods
add_default_catalog_route()
click to toggle source
# File lib/generators/blacklight/install_generator.rb, line 75 def add_default_catalog_route route("root to: \"#{controller_name}#index\"") end
add_routes()
click to toggle source
# File lib/generators/blacklight/install_generator.rb, line 94 def add_routes route "mount Blacklight::Engine => '/'" end
add_solr_wrapper()
click to toggle source
# File lib/generators/blacklight/install_generator.rb, line 29 def add_solr_wrapper generate 'blacklight:solr' unless options[:'skip-solr'] end
bundle_install()
click to toggle source
# File lib/generators/blacklight/install_generator.rb, line 42 def bundle_install inside destination_root do Bundler.with_clean_env do run "bundle install" end end end
copy_public_assets()
click to toggle source
Copy all files in templates/public/ directory to public/ Call external generator in AssetsGenerator, so we can leave that callable seperately too.
# File lib/generators/blacklight/install_generator.rb, line 36 def copy_public_assets generated_options = "--bootstrap-version #{options[:'bootstrap-version']}" if options[:'bootstrap-version'] generate "blacklight:assets", generated_options unless options[:'skip-assets'] end
generate_blacklight_document()
click to toggle source
# File lib/generators/blacklight/install_generator.rb, line 50 def generate_blacklight_document generate 'blacklight:document', document_name end
generate_blacklight_marc_demo()
click to toggle source
# File lib/generators/blacklight/install_generator.rb, line 83 def generate_blacklight_marc_demo return unless options[:marc] blacklight_marc = String.new('blacklight-marc') gem blacklight_marc, '>= 7.0.0.rc1', '< 8' bundle_install generate 'blacklight:marc:install' end
generate_blacklight_models()
click to toggle source
# File lib/generators/blacklight/install_generator.rb, line 58 def generate_blacklight_models generate 'blacklight:models' end
generate_blacklight_user()
click to toggle source
# File lib/generators/blacklight/install_generator.rb, line 62 def generate_blacklight_user generator_args = [model_name] if options[:devise] generator_args << "--devise #{options[:devise]}" end generate 'blacklight:user', generator_args.join(" ") end
generate_controller()
click to toggle source
# File lib/generators/blacklight/install_generator.rb, line 71 def generate_controller generate 'blacklight:controller', controller_name end
generate_search_builder()
click to toggle source
# File lib/generators/blacklight/install_generator.rb, line 54 def generate_search_builder generate 'blacklight:search_builder', search_builder_name end
inject_blacklight_i18n_strings()
click to toggle source
# File lib/generators/blacklight/install_generator.rb, line 79 def inject_blacklight_i18n_strings copy_file "blacklight.en.yml", "config/locales/blacklight.en.yml" end