[BioRuby-cvs] bioruby/lib/bio/io sql.rb,1.8.2.1,1.8.2.2
Raoul Jean Pierre Bonnal
helios at dev.open-bio.org
Mon Apr 7 13:15:46 UTC 2008
Update of /home/repository/bioruby/bioruby/lib/bio/io
In directory dev.open-bio.org:/tmp/cvs-serv5466/lib/bio/io
Modified Files:
Tag: BRANCH-biohackathon2008
sql.rb
Log Message:
added "hostname" to valid_keys configurations
Index: sql.rb
===================================================================
RCS file: /home/repository/bioruby/bioruby/lib/bio/io/sql.rb,v
retrieving revision 1.8.2.1
retrieving revision 1.8.2.2
diff -C2 -d -r1.8.2.1 -r1.8.2.2
*** sql.rb 25 Mar 2008 15:46:32 -0000 1.8.2.1
--- sql.rb 7 Apr 2008 13:15:36 -0000 1.8.2.2
***************
*** 25,29 ****
#{:database=>"biorails_development", :adapter=>"postgresql", :username=>"rails", :password=>nil}
configurations.assert_valid_keys('development', 'production','test')
! configurations[env].assert_valid_keys('database','adapter','username','password')
DummyBase.configurations = configurations
DummyBase.establish_connection "#{env}"
--- 25,29 ----
#{:database=>"biorails_development", :adapter=>"postgresql", :username=>"rails", :password=>nil}
configurations.assert_valid_keys('development', 'production','test')
! configurations[env].assert_valid_keys('hostname','database','adapter','username','password')
DummyBase.configurations = configurations
DummyBase.establish_connection "#{env}"
***************
*** 43,46 ****
--- 43,50 ----
end
+ def self.exists_database(name)
+ Bio::SQL::Biodatabase.find_by_name(name).nil? ? false : true
+ end
+
def self.list_entries
Bio::SQL::Bioentry.find(:all).collect{|entry|
***************
*** 117,121 ****
pp connection = Bio::SQL.establish_connection({'development'=>{'database'=>"biorails_development", 'adapter'=>"postgresql", 'username'=>"rails", 'password'=>nil}},'development')
#pp YAML::load(ERB.new(IO.read('bio/io/biosql/config/database.yml')).result)
!
if nil
pp Bio::SQL.list_entries
--- 121,125 ----
pp connection = Bio::SQL.establish_connection({'development'=>{'database'=>"biorails_development", 'adapter'=>"postgresql", 'username'=>"rails", 'password'=>nil}},'development')
#pp YAML::load(ERB.new(IO.read('bio/io/biosql/config/database.yml')).result)
! pp Bio::SQL.list_entries
if nil
pp Bio::SQL.list_entries
More information about the bioruby-cvs
mailing list