Sha256: 4631472eb29a1c04899f2e4242b01ee0c874d559c8bddb18bc9aa25e4d86fdae
Contents?: true
Size: 1.52 KB
Versions: 18
Compression:
Stored size: 1.52 KB
Contents
require 'rails/generators' class TestAppGenerator < Rails::Generators::Base source_root '../spec/test_app_templates' def add_gems gem 'blacklight', '~> 6.0' gem 'blacklight-gallery', '>= 0.3.0' Bundler.with_clean_env do run 'bundle install' end end def run_blacklight_generator say_status('warning', 'GENERATING BL', :yellow) generate 'blacklight:install', '--devise' end def run_spotlight_migrations rake 'spotlight:install:migrations' rake 'db:migrate' end def add_spotlight_routes_and_assets generate 'spotlight:install', '-f --mailer_default_url_host=localhost:3000' end def install_test_catalog_controller copy_file 'catalog_controller.rb', 'app/controllers/catalog_controller.rb', force: true end def add_rake_tasks_to_app rakefile 'spotlight_test.rake', File.read(find_in_source_paths('spotlight_test.rake')) end def disable_carrierwave_processing copy_file 'carrierwave.rb', 'config/initializers/carrierwave.rb' end def disable_filter_resources_by_exhibit initializer 'disable_filter_resources_by_exhibit.rb' do <<-EOF # Setting this to false when running tests so that we don't have to set up # exhibit specific solr documents for tests that don't use the default exhibit. Spotlight::Engine.config.filter_resources_by_exhibit = false EOF end end def disable_papertrail_associations initializer 'paper_trail.rb' do <<-EOF PaperTrail.config.track_associations = false EOF end end end
Version data entries
18 entries across 18 versions & 1 rubygems