Browse files

Fix postgres URL to work with common gems

Change-Id: I8d7d80b3f2b425c7978238574e5b609194429904
  • Loading branch information...
1 parent 011d005 commit 6d989ebc8963dc8a195eaf2a5e272112ff81fc2a Jennifer Hickey committed Oct 4, 2012
View
2 cfruntime/lib/cfruntime/parser/postgresql_parser.rb
@@ -11,7 +11,7 @@ def self.parse(svc)
serviceopts[to] = svc["credentials"][from.to_s]
end
serviceopts[:url] = svc["credentials"]["url"] ||
- "postgresql://#{serviceopts[:username]}:#{serviceopts[:password]}@" +
+ "postgres://#{serviceopts[:username]}:#{serviceopts[:password]}@" +
"#{serviceopts[:host]}:#{serviceopts[:port]}/#{serviceopts[:database]}"
serviceopts
end
View
2 cfruntime/spec/parser/postgresql_parser_spec.rb
@@ -15,7 +15,7 @@
:host => SOME_SERVER,
:port => SOME_SERVICE_PORT,
:database => "pgdatabase",
- :url => "postgresql://testuser:testpw@#{SOME_SERVER}:#{SOME_SERVICE_PORT}/pgdatabase"
+ :url => "postgres://testuser:testpw@#{SOME_SERVER}:#{SOME_SERVICE_PORT}/pgdatabase"
}
CFRuntime::CloudApp.service_props('postgresql').should == expected
end

0 comments on commit 6d989eb

Please sign in to comment.