Sha256: 3c10f631332ebf0603eeb8de01cd6c18cbf27d1d0e4bde1548d2ad7dab8b2ace
Contents?: true
Size: 1.14 KB
Versions: 10
Compression:
Stored size: 1.14 KB
Contents
require 'rails/generators' class TestAppGenerator < Rails::Generators::Base source_root File.expand_path("../../../../spec/test_app_templates", __FILE__) # This is only necessary for Rails 3 def remove_index remove_file "public/index.html" end def run_blacklight_generator say_status("warning", "GENERATING BL", :yellow) generate 'blacklight:install', '--devise' end def run_blacklight_range_limit_generator say_status("warning", "GENERATING BL", :yellow) generate 'blacklight_range_limit:install' end def fixtures FileUtils.mkdir_p 'spec/fixtures/solr_documents' directory '../fixtures/solr_documents', 'spec/fixtures/solr_documents' end def inject_into_catalog_controller inject_into_file 'app/controllers/catalog_controller.rb', after: /config.add_facet_field 'format'.*$/ do "\n config.add_facet_field 'pub_date_si', label: 'Publication Date Sort', range: true" end end def assets return if !defined?(Sprockets::VERSION) || Sprockets::VERSION < '4' append_to_file 'app/assets/config/manifest.js', "\n//= link application.js" empty_directory 'app/assets/images' end end
Version data entries
10 entries across 10 versions & 1 rubygems