Sha256: b129b6dba4fa875c30426942e30caf9fc10013a8cafd18fe2f4e916e0fd40f46

Contents?: true

Size: 837 Bytes

Versions: 5

Compression:

Stored size: 837 Bytes

Contents

require 'rails/generators'

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

  def copy_test_fixtures
    copy_file "app/models/generic_content.rb"

    # Download controller
    copy_file "app/controllers/downloads_controller.rb"

    copy_file "spec/fixtures/hydrangea_fixture_mods_article1.foxml.xml" 

    # For testing Hydra::SubmissionWorkflow
    copy_file "spec/fixtures/hydra_test_generic_content.foxml.xml"
  end

  def copy_rspec_rake_task
    copy_file "lib/tasks/rspec.rake"
  end

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

    generate 'blacklight:install', '--devise'
  end

  def run_hydra_head_generator
    say_status("warning", "GENERATING HH", :yellow)       

    generate 'hydra:head', '-f'
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
hydra-core-7.0.2 spec/support/lib/generators/test_app_generator.rb
hydra-core-7.0.1 spec/support/lib/generators/test_app_generator.rb
hydra-core-7.0.0 spec/support/lib/generators/test_app_generator.rb
hydra-core-7.0.0.rc1 spec/support/lib/generators/test_app_generator.rb
hydra-core-7.0.0.pre3 spec/support/lib/generators/test_app_generator.rb