CocoaPods/CocoaPods — pull request #572 by croach (2012-10-04 20:53:06+00:00)
Title: More OS friendly fix for the clean paths issue 

Hi Fabio,

I was looking over the fix you added for the clean paths issue that I brought up in Issue #568 and I'm not totally sure that forcing a lower case on the directories is the right way to go about fixing the problem.

The problem as I see it is an inconsistency between the paths returned from a call to `Dir.glob` in the `clean_paths` method and a similar call to `Pathname.glob` in the `expanded_paths` method. In the latter, you add the `File::FNM_CASEFOLD` flag which is causing ruby to change the `Developer` directory name to lower case. To fix this you're lower casing the pathname by hand in the `clean_paths` method, but it would be better to let the OS work out the case of the directories on its own. So, a better fix would be to either add the `File::FNM_CASEFOLD` flag to the call to `Dir.glob` in the `clean_paths` method or remove it from the call to `Pathname.glob` in the `expanded_paths` method. I would suggest the latter since, according to the ruby [docs][glob], case insensitivity is an OS specific thing, so the `File::FNM_CASEFOLD` flag is ignored by the `glob` method. By this reasoning, you shouldn't use the `File::FNM_CASEFOLD` flag in your call to `glob`.

This pull request implements the fix I specify above. I've tested it out on my system and it worked for me, and I think this should the fix the problem in a way that will have the least amount of unforeseen side effects.

Hope this helps. Let me know if you have any questions.

[glob]: http://www.ruby-doc.org/core-1.9.3/Dir.html#method-c-glob