From 4059443ca5af7c407d60466391ffebc04ee3fae0 Mon Sep 17 00:00:00 2001 From: Matt Zumwalt Date: Thu, 19 May 2011 12:05:42 -0500 Subject: [PATCH] HYDRA-455 updating paths in rakefiles to accommodate move --- Rakefile | 3 +-- lib/tasks/active_fedora_dev.rake | 12 +++++++----- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/Rakefile b/Rakefile index 1f0f90914..8c99952a8 100644 --- a/Rakefile +++ b/Rakefile @@ -1,7 +1,6 @@ require 'rake/clean' require 'rubygems' -load 'tasks/rspec.rake' -load 'tasks/active_fedora.rake' +load 'lib/tasks/rspec.rake' $: << 'lib' diff --git a/lib/tasks/active_fedora_dev.rake b/lib/tasks/active_fedora_dev.rake index e441dbd9a..ff5c5af02 100644 --- a/lib/tasks/active_fedora_dev.rake +++ b/lib/tasks/active_fedora_dev.rake @@ -3,15 +3,17 @@ $: << 'lib' desc "Hudson build" task :hudson do require 'jettywrapper' + project_root = File.expand_path("#{File.dirname(__FILE__)}/../../") + if (ENV['RAILS_ENV'] == "test") Rake::Task["active_fedora:doc"].invoke Rake::Task["active_fedora:configure_jetty"].invoke jetty_params = { :quiet => false, - :jetty_home => File.join(File.dirname(__FILE__),'..','jetty'), + :jetty_home => File.join(project_root,'jetty'), :jetty_port => 8983, - :solr_home => File.expand_path(File.join(File.dirname(__FILE__),'..','jetty','solr')), - :fedora_home => File.expand_path(File.join(File.dirname(__FILE__),'..','jetty','fedora','default')), + :solr_home => File.expand_path(File.join(project_root,'jetty','solr')), + :fedora_home => File.expand_path(File.join(project_root,'jetty','fedora','default')), :startup_wait=>30 } error = Jettywrapper.wrap(jetty_params) do @@ -35,7 +37,7 @@ namespace :active_fedora do begin require 'yard' require 'yard/rake/yardoc_task' - project_root = File.expand_path("#{File.dirname(__FILE__)}/../") + project_root = File.expand_path("#{File.dirname(__FILE__)}/../../") doc_destination = File.join(project_root, 'doc') YARD::Rake::YardocTask.new(:doc) do |yt| @@ -86,7 +88,7 @@ namespace :active_fedora do require 'solrizer' require 'solrizer-fedora' require 'spec/samples/models/hydrangea_article' - ENV["FEDORA_HOME"]=File.expand_path(File.join(File.dirname(__FILE__),'..','jetty','fedora','default')) + ENV["FEDORA_HOME"]=File.expand_path(File.join(File.dirname(__FILE__),'..','..','jetty','fedora','default')) retval = `$FEDORA_HOME/client/bin/fedora-ingest-demos.sh localhost 8983 fedoraAdmin fedoraAdmin http` puts "loaded demo objects #{retval}" ActiveFedora.init unless Thread.current[:repo]