Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specs for permanent redirect warnings #49

Merged
merged 6 commits into from
Jul 20, 2014
Merged

Specs for permanent redirect warnings #49

merged 6 commits into from
Jul 20, 2014

Conversation

doktorbro
Copy link

This is a draft for #48.

@doktorbro
Copy link
Author

I think the implementation is done. Let’s discuss it.

@gjtorikian
Copy link
Owner

I support the idea. I am about to head to vacation so I cannot really devote time to this at the moment, but will get to it as soon as I can!

@@ -39,6 +43,12 @@ def run
self.add_issue "internally linking to #{link.href}, which does not exist" unless link.exists?
end

# has the local directory a trailing slash?
if !@options[:followlocation] and !link.remote? and link.unslashed_directory?
self.add_issue("linking to a directory #{link.absolute_path} without trailing slash")
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know it's trivial but can you add the word "internal" in here somewhere? Like:

"internally linking to a directory #{link.absolute_path} without trailing slash"

@gjtorikian
Copy link
Owner

Made some comments, and don't forget to merge master! 😉

Anatol Broder added 6 commits July 20, 2014 09:48
Add fixture for internal redirection

Add spec for internal permanent redirections

Fix end

Add warn_redirect option

Rename option

Increase readability

Fix the hash

Add options to the test

Put the disappeared test back

Put the wrong apostrophe back

Simplify the internal test

Rename the option

Implement external check

Put back a whitespace

Use followlocation

Remove permanent_redirection

Add a test for not following redirects

Use should_not

Add expand path

Fix coding and wording

Speed up Nokogiri installation

Fix expand_path

Fix expand_path

Ruby-duby

Ruby-duby-duby

Remove expand path

Next if no html returns

It’s path

Try no href

Show the path

Puts path

Don’t put path

Don’t change the Proofer class

Implement it

Fix conditional

It’s a link

Downcase

Refactor

Rename fixture

Fix fixture name

Add path to error message
@doktorbro
Copy link
Author

Changed and rebased

gjtorikian added a commit that referenced this pull request Jul 20, 2014
Specs for permanent redirect warnings
@gjtorikian gjtorikian merged commit 863a474 into gjtorikian:master Jul 20, 2014
@gjtorikian
Copy link
Owner

Thanks!

@doktorbro doktorbro deleted the warn-301 branch July 20, 2014 08:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants