Skip to content

Added uri option handling.#6

Open
rwz wants to merge 2 commits into
skinandbones:masterfrom
rwz:master
Open

Added uri option handling.#6
rwz wants to merge 2 commits into
skinandbones:masterfrom
rwz:master

Conversation

@rwz

@rwz rwz commented Dec 30, 2011

Copy link
Copy Markdown

Heroku usecase:

use Rack::GridFS, prefix: 'gridfs', uri: ENV['MONGOLAB_URI']

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Does from_uri also allow you to pass a URI without inline user/password included, and then call authenticate similarly to connection by enumerated options? If so it would be nice to support that here. That's my only feedback, otherwise I think this pull request looks good.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

My question was semi-rhetorical 😉 The answer is indeed "yes."

The value of the option also ought to default to ENV['MONGODB_URI'].

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

MONGODB_URI is not the only available key. For example if you use MongoLab addon on heroku, it'll be MONGOLAB_URI.

@ethnt

ethnt commented Sep 24, 2012

Copy link
Copy Markdown

Is this being pulled in at some point? This would be a nice feature to have.

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.

4 participants