TalentBox / sequel-rails

A gem for using Sequel with Rails 5.x, 6.x, 7.x, 8.x
http://talentbox.github.io/sequel-rails/
MIT License
326 stars 81 forks source link

Support specifying 'url' in configuration files #106

Closed lfittl closed 8 years ago

lfittl commented 8 years ago

Right now this works fine for all Sequel connections, but breaks for all rake tasks since the URL isn't parsed. This ends up being a deal breaker when using sequel-rails with a config/database.yml that looks like this:

...
development:
  url:  <%= ENV['DATABASE_URL'] %>
...

This adds support to the Storage helpers, which fixes the rake tasks.

lfittl commented 8 years ago

@JonathanTron Sorry to bug you directly, but: any feedback on this one?

Would be great to see full url/DATABASE_URL support when using Sequel+Rails :)

JonathanTron commented 8 years ago

Hi @lfittl, thanks for the PR and sorry for the delayed response.

It is indeed not handled properly in the current code and you PR fix this. I'm not fan of using try, but this is only nitpicking that I can update after merging.

Thanks a lot for your work.

lfittl commented 8 years ago

@JonathanTron Yay, thanks for merging - happy that I don't have to keep a fork around :-)

JonathanTron commented 8 years ago

@lfittl You're welcome.