Links to ruby source from details page are not working #39
Description
Example:
http://www.docsdoctor.org/doc_methods/25285
the Source link points to
https://github.com/ruby/ruby/blob/master/ext/json/lib/json/add/regexp.rb/#L11
which returns 404
It would appear that the ruby project doesn't have a 'master' branch, but instead they have 'trunk'
so a link like this would work
https://github.com/ruby/ruby/blob/trunk/ext/json/lib/json/add/regexp.rb/#L11
This 404 result seemed consistent for all of the ruby methods I looked at (which would make sense)
Within docs_doctor, it looks like this code is responsible for building the link https://github.com/codetriage/docs_doctor/blob/master/app/models/github_url_from_base_path_line.rb
# https://github.com/rails/rails/blob/master/actionmailer/lib/action_mailer/collector.rb#L10
def to_github
File.join(@base, "blob/master", @path, "#L#{@line}")
end
I don't know the best way to resolve this, but perhaps something where you can specify the 'branch' url section to use for the repo. ("blob/master" would be the default, but 'blob/trunk' would be specified for the ruby repo.