From e9a8318dc42146209e4acecc93c4ff62ab6feb7c Mon Sep 17 00:00:00 2001 From: elijah Date: Thu, 28 Feb 2013 19:50:53 -0800 Subject: clean up include paths, require newer rake version. --- lib/leap_cli/load_paths.rb | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 lib/leap_cli/load_paths.rb (limited to 'lib/leap_cli/load_paths.rb') diff --git a/lib/leap_cli/load_paths.rb b/lib/leap_cli/load_paths.rb new file mode 100644 index 0000000..265a644 --- /dev/null +++ b/lib/leap_cli/load_paths.rb @@ -0,0 +1,15 @@ +# +# Bundle and rubygems each have their own way of modifying $LOAD_PATH. +# +# We want to make sure that the right paths are loaded, including the +# vendored gems, regardless of how leap is run. +# +# + +require File.expand_path('../version', __FILE__) + +base_leap_dir = File.expand_path('../../..', __FILE__) +LeapCli::LOAD_PATHS.each do |path| + path = File.expand_path(path, base_leap_dir) + $LOAD_PATH.unshift(path) unless $LOAD_PATH.include?(path) +end \ No newline at end of file -- cgit v1.2.3