peterbe / mincss

Tool for finding out which CSS selectors you're NOT using.
https://peterbe.github.io/mincss/
BSD 3-Clause "New" or "Revised" License
854 stars 92 forks source link

Fixes #10 #11

Closed erfaan closed 11 years ago

erfaan commented 11 years ago

There is no need to manually join the urls when we have urljoin

peterbe commented 11 years ago

Do all tests work with this?

I'm wondering if I didn't use urlparse.urljoin for a reason. I can't remember.

peterbe commented 11 years ago

I can't merge this without tests but I'll take a look if you don't have time to write some.

peterbe commented 11 years ago

I did find a flaw in the proxy/app.py script to do with script tags. Look at it now. http://cl.ly/Mqcb

erfaan commented 11 years ago

Yes all tests ran smoothly. Just tested it. The issue is not related to proxy/app.py but the processor.py What exactly did you change in proxy/app.py?

I am not sure how you managed to make it working. I tried the following code and it failed:

>>> from mincss.processor import Processor
>>> p = Processor()
>>> p.process_url('http://www.i.com.pk')
>>> p.process()

Regarding urljoin, I guess that is the proper way to join urls.

peterbe commented 11 years ago

Ok. Great I can reproduce that now.

I still can't merge your pull request if it doesn't have tests.

And lastly, please don't teach me about how urljoin works.

peterbe commented 11 years ago

You were right. It works with plain urljoin. I can no longer find any reason why it wouldn't work. And I added some unit tests too. https://github.com/peterbe/mincss/commit/2786c696977048e0333bd9cefde74cc6c16eed09