Sha256: 7cffa4155457111212837f7caa34430e372d0beaa7c93e09504a8ec30d9c1691

Contents?: true

Size: 916 Bytes

Versions: 13

Compression:

Stored size: 916 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 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

13 entries across 13 versions & 1 rubygems

Version Path
hydra-core-5.0.0.pre14 spec/support/lib/generators/test_app_generator.rb
hydra-core-5.0.0.pre13 spec/support/lib/generators/test_app_generator.rb
hydra-core-5.0.0.pre12 spec/support/lib/generators/test_app_generator.rb
hydra-core-5.0.0.pre11 spec/support/lib/generators/test_app_generator.rb
hydra-core-5.0.0.pre10 spec/support/lib/generators/test_app_generator.rb
hydra-core-5.0.0.pre9 spec/support/lib/generators/test_app_generator.rb
hydra-core-5.0.0.pre8 spec/support/lib/generators/test_app_generator.rb
hydra-core-5.0.0.pre7 spec/support/lib/generators/test_app_generator.rb
hydra-core-5.0.0.pre6 spec/support/lib/generators/test_app_generator.rb
hydra-core-5.0.0.pre4 spec/support/lib/generators/test_app_generator.rb
hydra-core-5.0.0.pre3 spec/support/lib/generators/test_app_generator.rb
hydra-core-5.0.0.pre2 spec/support/lib/generators/test_app_generator.rb
hydra-core-5.0.0.pre1 spec/support/lib/generators/test_app_generator.rb