models/times_psql_models.rb in clevic-0.13.0.b3 vs models/times_psql_models.rb in clevic-0.13.0.b5
- old
+ new
@@ -1,10 +1,16 @@
$options ||= {}
require 'clevic.rb'
require 'sequel'
host = ENV['PGHOST'] || 'localhost'
-constring = "jdbc:postgresql://#{host}/times_test?user=#{$options[:username] || 'times'}&password=general"
-puts "constring: #{constring.inspect}"
-Sequel.connect( constring )
+
+constring =
+if RUBY_PLATFORM == 'java'
+ "jdbc:postgresql://#{host}/times_test"
+else
+ "postgres://#{host}/times_test"
+end
+
+Sequel.connect constring
require 'times_models.rb'