Sha256: a793112816be14e44e026a5eea4338d41e48068d4681933841997a605c9b1b04

Contents?: true

Size: 860 Bytes

Versions: 4

Compression:

Stored size: 860 Bytes

Contents

require 'rails/generators'

class TestAppGenerator < Rails::Generators::Base
  source_root File.expand_path("../../../../test_app_templates", __FILE__)

  def copy_blacklight_test_app_rake_task
    copy_file "lib/tasks/blacklight_test_app.rake"
  end

  def remove_index 
    remove_file "public/index.html"
    remove_file 'app/assets/images/rails.png'
  end

  def run_blacklight_generator
    say_status("warning", "GENERATING BL", :yellow)       

    generate 'blacklight:install'
  end

  def run_blacklight_advanced_search
    generate 'blacklight_advanced_search', '--force'
  end

  def run_test_support_generator
    say_status("warning", "GENERATING test_support", :yellow)       

    generate 'blacklight:test_support'
  end

  def copy_blacklight_catalog_controller
    copy_file "app/controllers/catalog_controller.rb", :force => true
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
blacklight_advanced_search-5.1.1 spec/test_app_templates/lib/generators/test_app_generator.rb
blacklight_advanced_search-5.1.0 spec/test_app_templates/lib/generators/test_app_generator.rb
blacklight_advanced_search-5.0.1 spec/test_app_templates/lib/generators/test_app_generator.rb
blacklight_advanced_search-5.0.0 spec/test_app_templates/lib/generators/test_app_generator.rb