mapbox/node-pre-gyp — pull request #115 by taavo (2014-09-20 15:06:30+00:00)
Title: Allow dots in s3 buckets

Sadly, an s3 bucket I have to use has dots in it, e.g. "foo.bar.baz". Currently node-pre-gyp interprets this as meaning my bucket is "foo", and it is unable to detect my s3 region.

This pull request parses my s3 host correctly, and the one used by your test apps. I'd include test coverage, but I don't have an s3 bucket I can donate to the project. Without unit tests to guide me, I tested my changes manually with the following script:

```javascript
var s3_setup = require('./lib/util/s3_setup.js');

var url_with_dots = "https://bucket.with.dots.s3.amazonaws.com/prefix";
var url_without_dots = "https://node-pre-gyp-tests.s3-us-west-1.amazonaws.com";

dots_result = {};
no_dots_result = {};

s3_setup.detect(url_with_dots, dots_result);
s3_setup.detect(url_without_dots, no_dots_result);

console.log(url_with_dots, dots_result);
console.log(url_without_dots, no_dots_result);
```

Please let me know if there's anything I can do to help get this merged. Currently I have to specify my bucket in a `~/.node-pre-gyp` file, which is unsatisfying.