Sha256: 5341d04437ea2f8a2c1d519e1c675633299e53a046342754d9164a4fbde0efd5

Contents?: true

Size: 1.03 KB

Versions: 1

Compression:

Stored size: 1.03 KB

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 BatchEdit routes."
  #     "\n  Hydra::BatchEdit.add_routes(self)"
  #   end
  # 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

  def run_roles_generator
    say_status("warning", "GENERATING ROLES", :yellow)       

    generate 'roles', '-f'

  end

  # def copy_test_models
  #   copy_file "app/models/sample.rb"
  #   copy_file "app/models/solr_document.rb"
  #   copy_file "db/migrate/20111101221803_create_searches.rb"
  # end

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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
hydra-role-management-0.1.0 spec/support/lib/generators/test_app_generator.rb