summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2013-06-17 18:11:04 -0700
committerelijah <elijah@riseup.net>2013-06-17 18:11:04 -0700
commita722c739945cb83f85340e4a31b717b0f4af64a0 (patch)
tree2952561c808101ca6e120acf670a8689af9e1892 /lib
parent638642f464823a2cbc263c97014e737ed528b790 (diff)
fixed tests
Diffstat (limited to 'lib')
-rw-r--r--lib/leap_cli/leapfile.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/leap_cli/leapfile.rb b/lib/leap_cli/leapfile.rb
index e37cd4e..f517620 100644
--- a/lib/leap_cli/leapfile.rb
+++ b/lib/leap_cli/leapfile.rb
@@ -23,8 +23,8 @@ module LeapCli
@vagrant_network = '10.5.5.0/24'
end
- def load
- directory = File.expand_path(find_in_directory_tree('Leapfile'))
+ def load(search_directory=nil)
+ directory = File.expand_path(find_in_directory_tree('Leapfile', search_directory))
if directory == '/'
return nil
else
@@ -66,8 +66,8 @@ module LeapCli
end
end
- def find_in_directory_tree(filename)
- search_dir = Dir.pwd
+ def find_in_directory_tree(filename, directory_tree=nil)
+ search_dir = directory_tree || Dir.pwd
while search_dir != "/"
Dir.foreach(search_dir) do |f|
return search_dir if f == filename