lib/yard/cli/server.rb in yard-0.7.1 vs lib/yard/cli/server.rb in yard-0.7.2

- old
+ new

@@ -66,10 +66,11 @@ def add_libraries(args) (0...args.size).step(2) do |index| library, yardoc = args[index], args[index + 1] yardoc ||= '.yardoc' + yardoc = File.expand_path(yardoc) if File.exist?(yardoc) libraries[library] ||= [] libraries[library] << YARD::Server::LibraryVersion.new(library, nil, yardoc) else log.warn "Cannot find yardoc db for #{library}: #{yardoc}" @@ -140,20 +141,20 @@ self.scripts << file end parse_options(opts, args) if args.empty? && libraries.empty? - if !File.exist?('.yardoc') + if !File.exist? File.expand_path('.yardoc') log.enter_level(Logger::INFO) do log.info "No .yardoc file found in current directory, parsing source before starting server..." end Yardoc.run('-n') end - add_libraries([File.basename(Dir.pwd), '.yardoc']) + add_libraries([File.basename(Dir.pwd), File.expand_path('.yardoc')]) else add_libraries(args) options[:single_library] = false if libraries.size > 1 end end end end -end \ No newline at end of file +end