lib/reap/projectinfo.rb in reap-4.3.1 vs lib/reap/projectinfo.rb in reap-4.3.2
- old
+ new
@@ -17,27 +17,31 @@
#def self.[](name)
# @self ||= self.new
# @self[name]
#end
- attr_reader :info, :info_stream
+ attr_reader :info, :info_stream, :info_dir
def initialize( info_file=nil )
unless info_file
Dir.ascend(Dir.pwd) do |d|
Dir.chdir(d)
info_file = INFO_FILES.find{ |f| File.file?( f ) }
- break if info_file
+ if info_file
+ @info_dir = d; break
+ end
end
end
if info_file
@info_stream = File.read( info_file )
@info = YAML::load( @info_stream ).traverse{ |k,v| [k.downcase, v] }
puts "(in #{Dir.pwd})" #unless dir == Dir.pwd
else
- @info_stream = ""
- @info = {}
- puts "(without a project information file)"
+ puts "Aborted. No project information file found."
+ exit 1
+ #@info_stream = ""
+ #@info = {}
+ #puts "(without a project information file)"
end
end
# def info_stream
# dir = Dir.pwd