Navigation Menu

Skip to content

Commit

Permalink
1.8.7 compatybility
Browse files Browse the repository at this point in the history
  • Loading branch information
martinciu committed Nov 9, 2011
1 parent 201bc92 commit 58ee537
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/nanosearch/config.rb
@@ -1,14 +1,14 @@
module Nanosearch module Nanosearch
def self.config def self.config
{db: db_config} {:db => db_config}
end end


private private
def self.db_config def self.db_config
uri = URI.parse(ENV['DATABASE_URL'] || 'postgres://localhost/nanosearch_development') uri = URI.parse(ENV['DATABASE_URL'] || 'postgres://localhost/nanosearch_development')
config = {host: uri.host, dbname: uri.path[1..-1]} config = {:host => uri.host, :dbname => uri.path[1..-1]}
config.merge!(user: uri.user) if uri.user config.merge!(:user => uri.user) if uri.user
config.merge!(password: uri.password) if uri.password config.merge!(:password => uri.password) if uri.password
config config
end end
end end

0 comments on commit 58ee537

Please sign in to comment.