summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel DeLeo <dan@opscode.com>2010-05-27 11:26:37 -0700
committerDaniel DeLeo <dan@opscode.com>2010-06-03 12:22:10 -0700
commitc453db96d8c470b6b0e739b32aa01727c2f787f6 (patch)
tree6e32301d90a1f06ce20a4f7d3bcde8dbd9a94e12
parent90939e7bf95eba85f09e40f6bde05aeaabc02441 (diff)
downloadchef-c453db96d8c470b6b0e739b32aa01727c2f787f6.tar.gz
fix loadpath futzing to really load chef from current source tree
-rwxr-xr-xchef-server-api/bin/chef-server2
-rw-r--r--features/support/env.rb11
2 files changed, 8 insertions, 5 deletions
diff --git a/chef-server-api/bin/chef-server b/chef-server-api/bin/chef-server
index 173d29080f..bbc8cacdb0 100755
--- a/chef-server-api/bin/chef-server
+++ b/chef-server-api/bin/chef-server
@@ -24,7 +24,7 @@ require "rubygems"
require "merb-core"
# Load chef and chef-server-api from source rather than gem, if present
-$:.unshift(File.expand_path(File.dirname(__FILE__) + '/../../chef/lib/chef'))
+$:.unshift(File.expand_path(File.dirname(__FILE__) + '/../../chef/lib/'))
$:.unshift(File.expand_path(File.dirname(__FILE__) + '/../lib'))
require 'chef'
diff --git a/features/support/env.rb b/features/support/env.rb
index ffe9e2e17f..e0e50c6bc3 100644
--- a/features/support/env.rb
+++ b/features/support/env.rb
@@ -14,14 +14,17 @@
# limitations under the License.
#
-%w{chef chef-server chef-server-slice chef-solr}.each do |inc_dir|
- $: << File.join(File.dirname(__FILE__), '..', '..', inc_dir, 'lib')
-end
-
Thread.abort_on_exception = true
require 'rubygems'
require 'spec/expectations'
+
+CHEF_PROJECT_ROOT = File.expand_path(File.dirname(__FILE__) + '/../../')
+$:.unshift(CHEF_PROJECT_ROOT + '/chef/lib')
+$:.unshift(CHEF_PROJECT_ROOT + '/chef-server-api/lib')
+$:.unshift(CHEF_PROJECT_ROOT + '/chef-server-webui/lib')
+$:.unshift(CHEF_PROJECT_ROOT + '/chef-solr/lib')
+
require 'chef'
require 'chef/config'
require 'chef/client'