Sha256: 398601ddb4461f80039cb904cd3611f65aa6278b6f98ef3d089afb7386e8278f

Contents?: true

Size: 987 Bytes

Versions: 22

Compression:

Stored size: 987 Bytes

Contents

require 'rails/generators'

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

  # Inject call to Hydra::BatchEdit.add_routes in config/routes.rb
  def inject_routes
    insert_into_file "config/routes.rb", :after => '.draw do' do
      "\n  # Add HydraHead routes."
      "\n  HydraHead.add_routes(self)"
    end
  end

  def copy_test_fixtures
    copy_file "app/models/generic_content.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', '--devise'
  end

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

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

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
hydra-core-5.4.1 spec/support/lib/generators/test_app_generator.rb
hydra-core-6.0.0.rc4 spec/support/lib/generators/test_app_generator.rb
hydra-core-6.0.0.rc3 spec/support/lib/generators/test_app_generator.rb
hydra-core-6.0.0.rc2 spec/support/lib/generators/test_app_generator.rb
hydra-core-6.0.0.rc1 spec/support/lib/generators/test_app_generator.rb
hydra-core-6.0.0.pre8 spec/support/lib/generators/test_app_generator.rb
hydra-core-5.4.0 spec/support/lib/generators/test_app_generator.rb
hydra-core-6.0.0.pre7 spec/support/lib/generators/test_app_generator.rb
hydra-core-6.0.0.pre6 spec/support/lib/generators/test_app_generator.rb
hydra-core-6.0.0.pre5 spec/support/lib/generators/test_app_generator.rb
hydra-core-6.0.0.pre4 spec/support/lib/generators/test_app_generator.rb
hydra-core-6.0.0.pre3 spec/support/lib/generators/test_app_generator.rb
hydra-core-6.0.0.pre2 spec/support/lib/generators/test_app_generator.rb
hydra-core-6.0.0.pre1 spec/support/lib/generators/test_app_generator.rb
hydra-core-5.4.0.pre1 spec/support/lib/generators/test_app_generator.rb
hydra-core-5.3.0 spec/support/lib/generators/test_app_generator.rb
hydra-core-5.2.0 spec/support/lib/generators/test_app_generator.rb
hydra-core-5.1.0 spec/support/lib/generators/test_app_generator.rb
hydra-core-5.0.1 spec/support/lib/generators/test_app_generator.rb
hydra-core-5.0.0 spec/support/lib/generators/test_app_generator.rb