Broken docs page for shoulda-matchers

's Avatar

whitley

06 Jan, 2015 05:59 PM

The following docs detail page for shoulda-matchers (and other detail pages spot-checked from same) are returning a 404 ("Oops, We Couldn't Find That Page") when they in fact have associated doc'ed source files in the upstream repo:

http://www.rubydoc.info/github/thoughtbot/shoulda-matchers/master/l...

The associated source file on GitHub:

https://github.com/thoughtbot/shoulda-matchers/blob/master/lib/shou...

It's unclear whether this is related to the recent site updates mentioned at the top of the page, but this page was fully functional as recently as yesterday (2015-Jan-5).

Cheers,
John Whitley

  1. Support Staff 1 Posted by lsegal on 06 Jan, 2015 07:30 PM

    lsegal's Avatar

    Where did you get the .rb link from?

    http://www.rubydoc.info/github/thoughtbot/shoulda-matchers/master/l...

    Rubydoc should not be generating these links (we don't index Ruby source files). If you're looking for the class HaveDbIndexMatcher, then it's not available because it's marked private:

    https://github.com/thoughtbot/shoulda-matchers/blob/master/lib/shou...

    What exactly are you looking for in the docs?

  2. 2 Posted by John Whitley on 06 Jan, 2015 07:57 PM

    John Whitley's Avatar

    Sorry, I forgot to include the originating link. The top-level shoulda-matchers page[1] has a link "have_db_index", which should lead to the docs for that method. Note that all of the method links on that page end in ".rb".

    [1] http://www.rubydoc.info/github/thoughtbot/shoulda-matchers/master/frames

  3. Support Staff 3 Posted by lsegal on 06 Jan, 2015 09:43 PM

    lsegal's Avatar

    I see now.

    The links on that page are hardcoded links from the shoulda-matchers documentation, so if they're pointing to the wrong thing that's something that has to be fixed in that repository.

    It looks like the links are setup to point to relative URLs, which is not guaranteed to work:

    https://raw.githubusercontent.com/thoughtbot/shoulda-matchers/maste...

    FWIW, it does work from http://www.rubydoc.info/github/thoughtbot/shoulda-matchers/file/REA...

    But that's only because the /file/ part is already in the URL. That won't work from the index page, and never should have (I'm surprised it ever did).

    The correct way to link to embedded files is to use the {file:FILENAME} syntax in YARD.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac