Sha256: 3bf74bc28ae0b24e67f16e4b11922c5eb8616262d13d716b6723072e9b22077e

Contents?: true

Size: 747 Bytes

Versions: 9

Compression:

Stored size: 747 Bytes

Contents

#######################################################################
# test_xml.rb
#
# Simple test script that uses the DBRC::XML subclass.
#######################################################################
if File.basename(Dir.pwd) == "yml"
   Dir.chdir "../.."
   $LOAD_PATH.unshift Dir.pwd + "/lib"
   Dir.chdir "examples/yml"
end

require "dbi/dbrc"
require "pp"
include DBI

puts "VERSION: " + DBRC::YML::VERSION

# Use the .dbrc file in this directory
db1 = DBRC::YML.new("foo",nil,Dir.pwd) # Get first entry found for 'foo'
db2 = DBRC::YML.new("foo","user1",Dir.pwd) # Specify user

puts "First entry found for 'foo': "
pp db1
puts "=" * 20

puts "Entry for 'foo' with user 'bar': "
pp db2
puts "=" * 20

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
dbi-dbrc-1.3.0-x86-mingw32 examples/yml/test_yml.rb
dbi-dbrc-1.1.9-x86-mingw32 examples/yml/test_yml.rb
dbi-dbrc-1.1.8-x86-mingw32 examples/yml/test_yml.rb
dbi-dbrc-1.1.7-x86-mingw32 examples/yml/test_yml.rb
dbi-dbrc-1.1.6-x86-mswin32-60 examples/yml/test_yml.rb
dbi-dbrc-1.1.2 examples/yml/test_yml.rb
dbi-dbrc-1.1.3-x86-mswin32-60 examples/yml/test_yml.rb
dbi-dbrc-1.1.3 examples/yml/test_yml.rb
dbi-dbrc-1.1.2-x86-mswin32-60 examples/yml/test_yml.rb