lib/reap/projectinfo.rb in reap-4.0 vs lib/reap/projectinfo.rb in reap-4.0.0
- old
+ new
@@ -1,30 +1,24 @@
require 'yaml'
require 'facet/hash/traverse'
require 'facet/string/tabto'
-require 'facet/dir/self/ascend'
+
module ProjectInfo
extend self
INFO_FILES = [ 'ProjectInfo', 'ReapFile', 'projectinfo', 'reapfile' ]
def add_info_file( f )
INFO_FILES.unshift( f )
end
def info_stream
- dir = Dir.pwd
unless @info_stream
- Dir.ascend(Dir.pwd) do |d|
- Dir.chdir(d)
- info_file = INFO_FILES.find{ |f| File.file?( f ) }
- if info_file
- @info_stream = File.read( info_file )
- puts "(in #{d})" unless dir == Dir.pwd
- break
- end
+ info_file = INFO_FILES.find{ |f| File.file?( f ) }
+ if info_file
+ @info_stream = File.read( info_file )
end
end
@info_stream
end