Sha256: 7abbcc785034ddcbf30223b6d28cae7c282c40c30fe5e36c861d66f4d0f72b39

Contents?: true

Size: 719 Bytes

Versions: 17

Compression:

Stored size: 719 Bytes

Contents

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

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

puts "VERSION: " + DBRC::XML::VERSION

# Use the .dbrc file in this directory
db1 = DBRC::XML.new("foo",nil,Dir.pwd) # Get first entry found for 'foo'
db2 = DBRC::XML.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

17 entries across 17 versions & 1 rubygems

Version Path
dbi-dbrc-1.7.0 examples/xml/test_xml.rb
dbi-dbrc-1.6.0 examples/xml/test_xml.rb
dbi-dbrc-1.5.0 examples/xml/test_xml.rb
dbi-dbrc-1.4.1 examples/xml/test_xml.rb
dbi-dbrc-1.4.0 examples/xml/test_xml.rb
dbi-dbrc-1.3.0 examples/xml/test_xml.rb
dbi-dbrc-1.2.0 examples/xml/test_xml.rb
dbi-dbrc-1.1.9 examples/xml/test_xml.rb
dbi-dbrc-1.1.8 examples/xml/test_xml.rb
dbi-dbrc-1.1.7 examples/xml/test_xml.rb
dbi-dbrc-1.1.6 examples/xml/test_xml.rb
dbi-dbrc-1.1.5 examples/xml/test_xml.rb
dbi-dbrc-1.0.0 examples/xml/test_xml.rb
dbi-dbrc-1.1.4 examples/xml/test_xml.rb
dbi-dbrc-1.1.0 examples/xml/test_xml.rb
dbi-dbrc-1.0.1 examples/xml/test_xml.rb
dbi-dbrc-1.1.1 examples/xml/test_xml.rb