capistrano-db-tasks icon indicating copy to clipboard operation
capistrano-db-tasks copied to clipboard

Strip adapter check?

Open gordonbisnor opened this issue 6 years ago • 2 comments

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.

gordonbisnor avatar Apr 09 '19 17:04 gordonbisnor

sure!

sgruhier avatar Apr 17 '19 07:04 sgruhier

I think so.

lanzhiheng avatar Mar 14 '20 03:03 lanzhiheng