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

Why does is_valid_html? work without internet connection, and is_valid_css? doesn't? #12

Open
jmuheim opened this issue Jan 2, 2014 · 2 comments

Comments

@jmuheim
Copy link

jmuheim commented Jan 2, 2014

It seems that is_valid_css? has to connect to the internet to work, while is_valid_html? doesn't. At least on my machine it's like this.

What's the explanation? Does is_valid_html? connect to some local utility? Maybe tidy? I can't remember that I ever installed the validator.nu service locally...?!

Thanks for explanation, Josh.

@h-lame
Copy link
Contributor

h-lame commented Jan 3, 2014

There's no local tool fallback, but the gem does cache responses so it's possible your tests ran once hitting the net and then each test run after that has used the on-disk cached response.

Try disabling caching and seeing if the tests start hitting the internet again.

BeValidAsset::Configuration.enable_caching = false

I don't know why the css validator is definitely hitting the network though as it should also be cached. Are you using cachebusting on the css file urls and thus between test runs the url for the css files is not static so it doesn't hit the cache?

@jmuheim
Copy link
Author

jmuheim commented Jan 4, 2014

Hey, thank you for your answer. Disabling the cache indead results in 2 errors.

How do I check whether I am using cachebusting?

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

No branches or pull requests

2 participants