Sha256: cf460fc7044e45e561a7779244c04ef0fecd40a51ddf0357b6aac5f1a4e1b125

Contents?: true

Size: 716 Bytes

Versions: 5

Compression:

Stored size: 716 Bytes

Contents

#######################################################################
# test_yml.rb
#
# Simple test script that uses the DBRC::YML 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

5 entries across 5 versions & 1 rubygems

Version Path
dbi-dbrc-1.7.0 examples/yml/test_yml.rb
dbi-dbrc-1.6.0 examples/yml/test_yml.rb
dbi-dbrc-1.5.0 examples/yml/test_yml.rb
dbi-dbrc-1.4.1 examples/yml/test_yml.rb
dbi-dbrc-1.4.0 examples/yml/test_yml.rb