Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strip adapter check? #127

Open
gordonbisnor opened this issue Apr 9, 2019 · 2 comments
Open

Strip adapter check? #127

gordonbisnor opened this issue Apr 9, 2019 · 2 comments

Comments

@gordonbisnor
Copy link

I noticed that the gem was failing for me with a particular application and I found that stripping whitespace from the adapter check fixed it for me:

    def mysql?
      @config['adapter'].strip =~ /^mysql/
    end

    def postgresql?
      adapter = @config['adapter'].strip
       %{postgresql pg}.include? adapter
    end

Wondering if you thought that this was something worth considering as a PR.

Love the gem by the way, use it on pretty much every Rails application.

@sgruhier
Copy link
Owner

sure!

@lanzhiheng
Copy link

I think so.

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

No branches or pull requests

3 participants