ibruby 0.5.4-i586-linux → 0.5.5-i586-linux

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/lib/ibmeta.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  #-------------------------------------------------------------------------------
2
2
  # ibmeta.rb
3
3
  #-------------------------------------------------------------------------------
4
- # Copyright � Peter Wood, 2005; Richard Vowles, 2006
4
+ # Copyright � Peter Wood, 2005; Richard Vowles, 2006
5
5
  #
6
6
  # The contents of this file are subject to the Mozilla Public License Version
7
7
  # 1.1 (the "License"); you may not use this file except in compliance with the
@@ -287,7 +287,7 @@ module IBRuby
287
287
 
288
288
  def self.quote( value, column_meta_data )
289
289
  if column_meta_data.expects_quoting
290
- '#{value}'
290
+ "\'#{value}\'"
291
291
  elsif ((column_meta_data.type == InterBaseColumn::BLOB) && (column_meta_data.sub_type != 1 ) )
292
292
  raise IBRubyException.new("'#{value}' is not a valid default for this column #{column_meta_data.name}.")
293
293
  else
@@ -504,7 +504,7 @@ module IBRuby
504
504
  # allow these to be overriden
505
505
  @@default_precision = 10
506
506
  @@default_scale = 2
507
- @@default_length = 255
507
+ @@default_length = 252 #so string indexes work by default
508
508
 
509
509
  # A definition for a base SQL type.
510
510
  BOOLEAN = :BOOLEAN
@@ -50,12 +50,10 @@ class GeneratorTest < Test::Unit::TestCase
50
50
 
51
51
  def test02
52
52
  4.times() do
53
- @connections[0].execute_immediate( 'create table sample(a integer not null)' )
54
- @connections[0].execute_immediate( 'alter table sample add primary key (a)' )
55
53
  assert(Generator::exists?('SAMPLE_GEN', @connections[0]) == false)
56
54
  g = Generator::create('SAMPLE_GEN', @connections[0])
57
55
  g.drop
58
- @connections[0].execute_immediate( 'drop table sample' )
56
+ trans.commit
59
57
  end
60
58
  end
61
59
  end
data/test/KeyTest.rb CHANGED
@@ -9,7 +9,7 @@ include IBRuby
9
9
 
10
10
  class KeyTest < Test::Unit::TestCase
11
11
  CURDIR = "#{Dir.getwd}"
12
- DB_FILE = "#{CURDIR}#{File::SEPARATOR}key_unit_test.fdb"
12
+ DB_FILE = "#{CURDIR}#{File::SEPARATOR}key_unit_test.ib"
13
13
 
14
14
  def setup
15
15
  puts "#{self.class.name} started." if TEST_LOGGING
data/test/MetaTest.rb CHANGED
@@ -40,9 +40,9 @@ class MetaTest < Test::Unit::TestCase
40
40
  def teardown
41
41
  @connection.close
42
42
 
43
- # if File::exist?(DB_FILE)
44
- # Database.new(DB_FILE).drop(DB_USER_NAME, DB_PASSWORD)
45
- # end
43
+ if File::exist?(DB_FILE)
44
+ Database.new(DB_FILE).drop(DB_USER_NAME, DB_PASSWORD)
45
+ end
46
46
  puts "#{self.class.name} finished." if TEST_LOGGING
47
47
  end
48
48
 
data/test/RoleTest.rb CHANGED
@@ -71,10 +71,10 @@ class DatabaseTest < Test::Unit::TestCase
71
71
  dropRole
72
72
  dropUser
73
73
 
74
- #~ if File::exist?(DB_FILE)
75
- #~ db = Database.new(DB_FILE)
76
- #~ db.drop(DB_USER_NAME, DB_PASSWORD)
77
- #~ end
74
+ if File::exist?(DB_FILE)
75
+ db = Database.new(DB_FILE)
76
+ db.drop(DB_USER_NAME, DB_PASSWORD)
77
+ end
78
78
  puts "#{self.class.name} finished." if TEST_LOGGING
79
79
  end
80
80
 
data/test/SQLTypeTest.rb CHANGED
@@ -9,7 +9,7 @@ include IBRuby
9
9
 
10
10
  class SQLTypeTest < Test::Unit::TestCase
11
11
  CURDIR = "#{Dir.getwd}"
12
- DB_FILE = "#{CURDIR}#{File::SEPARATOR}sql_type_test.fdb"
12
+ DB_FILE = "#{CURDIR}#{File::SEPARATOR}sql_type_test.ib"
13
13
 
14
14
  def setup
15
15
  puts "#{self.class.name} started." if TEST_LOGGING
@@ -9,7 +9,7 @@ include IBRuby
9
9
 
10
10
  class StatementTest < Test::Unit::TestCase
11
11
  CURDIR = "#{Dir.getwd}"
12
- DB_FILE = "#{CURDIR}#{File::SEPARATOR}stmt_unit_test.fdb"
12
+ DB_FILE = "#{CURDIR}#{File::SEPARATOR}stmt_unit_test.ib"
13
13
 
14
14
  def setup
15
15
  puts "#{self.class.name} started." if TEST_LOGGING
data/test/TypeTest.rb CHANGED
@@ -53,8 +53,8 @@ class TypeTest < Test::Unit::TestCase
53
53
  row = rows.fetch
54
54
  assert(row[0].kind_of?(Integer))
55
55
  assert(row[1].instance_of?(Float))
56
- assert(row[2].instance_of?(Float))
57
- assert(row[3].instance_of?(Float))
56
+ assert(row[2].kind_of?(Numeric))
57
+ assert(row[3].kind_of?(Numeric))
58
58
  assert(row[4].instance_of?(Date))
59
59
  assert(row[5].instance_of?(Time))
60
60
  assert(row[6].instance_of?(String))
@@ -75,8 +75,8 @@ class TypeTest < Test::Unit::TestCase
75
75
  row = rows.fetch
76
76
  assert(row[0].kind_of?(Integer))
77
77
  assert(row[1].instance_of?(Float))
78
- assert(row[2].instance_of?(Float))
79
- assert(row[3].instance_of?(Float))
78
+ assert(row[2].kind_of?(Numeric))
79
+ assert(row[3].kind_of?(Numeric))
80
80
  assert(row[4].instance_of?(Time))
81
81
  assert(row[5].instance_of?(Time))
82
82
  assert(row[6].instance_of?(String))
data/test/UnitTest.rb CHANGED
@@ -32,8 +32,8 @@
32
32
  #require 'TypeTest'
33
33
  #require 'SQLTypeTest'
34
34
  #if PLATFORM.include?('powerpc-darwin') == false
35
- # require 'BackupRestoreTest'
36
- # require 'AddRemoveUserTest'
35
+ #require 'BackupRestoreTest'
36
+ #require 'AddRemoveUserTest'
37
37
  #end
38
38
  #-------------------------------------------------------------------------------
39
39
  SPECIALS = ['AddRemoveUserTest',
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.0
3
3
  specification_version: 1
4
4
  name: ibruby
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.5.4
7
- date: 2007-01-12 00:00:00 +13:00
6
+ version: 0.5.5
7
+ date: 2007-04-01 00:00:00 +12:00
8
8
  summary: Ruby interface library for the InterBase database.
9
9
  require_paths:
10
10
  - lib