dbi 0.4.2 → 0.4.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,37 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ load_path = false
4
+ gems = false
5
+ redefined = false
6
+
7
+ # these clauses are for installations which have RUBYOPT=-rubygems, etc.
8
+ if Object.const_defined? "Gem"
9
+ redefined = true
10
+ module Kernel
11
+ alias gem_require require
12
+ alias require gem_original_require
13
+ end
14
+ end
15
+
16
+ begin
17
+ require 'dbi'
18
+ load_path = true
19
+ rescue LoadError => e
20
+ end
21
+
22
+ if Object.const_defined? "Gem" and redefined
23
+ module Kernel
24
+ alias gem_original_require require
25
+ alias require gem_require
26
+ end
27
+ end
28
+
29
+ begin
30
+ require 'rubygems'
31
+ gem 'dbi'
32
+ gems = true
33
+ rescue LoadError
34
+ rescue Gem::LoadError
35
+ end
36
+
37
+ puts "Your installation of DBI is broken" if gems and load_path
@@ -41,7 +41,7 @@ namespace :dbi do
41
41
  spec.name = 'dbi'
42
42
  spec.version = DBI::VERSION
43
43
  spec.test_file = 'test/ts_dbi.rb'
44
- spec.executables = ['dbi']
44
+ spec.executables = ['dbi', 'test_broken_dbi']
45
45
  spec.files = gem_files(code_files)
46
46
  spec.summary = 'A vendor independent interface for accessing databases, similar to Perl\'s DBI'
47
47
  spec.description = 'A vendor independent interface for accessing databases, similar to Perl\'s DBI'
data/lib/dbi.rb CHANGED
@@ -1,4 +1,4 @@
1
- $LOAD_PATH.unshift(File.dirname(__FILE__))
1
+ $LOAD_PATH.unshift(File.dirname(__FILE__)) unless $LOAD_PATH.include?(File.dirname(__FILE__))
2
2
  #
3
3
  # DBI - Database Interface for Ruby. Please see the files README, DBI_SPEC,
4
4
  # DBD_SPEC for more information.
@@ -90,7 +90,7 @@ Deprecate.set_action(
90
90
 
91
91
  #++
92
92
  module DBI
93
- VERSION = "0.4.2"
93
+ VERSION = "0.4.3"
94
94
 
95
95
  module DBD # :nodoc:
96
96
  API_VERSION = "0.3"
@@ -104,7 +104,7 @@ module DBI
104
104
  #
105
105
  # Roughly equivalent to:
106
106
  #
107
- # sth = dbh.prepare("my statement)
107
+ # sth = dbh.prepare("my statement")
108
108
  # sth.execute(my, bind, vars)
109
109
  # result = sth.rows
110
110
  # sth.finish
@@ -22,7 +22,7 @@ class TC_DBI < Test::Unit::TestCase
22
22
  end
23
23
 
24
24
  def test_dbi_version
25
- assert_equal("0.4.2", DBI::VERSION)
25
+ assert_equal("0.4.3", DBI::VERSION)
26
26
  end
27
27
 
28
28
  def test_dbd_module
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dbi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Erik Hollensbe
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2009-07-11 00:00:00 -04:00
13
+ date: 2009-09-13 00:00:00 -04:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
@@ -27,6 +27,7 @@ description: A vendor independent interface for accessing databases, similar to
27
27
  email: ruby-dbi-users@rubyforge.org
28
28
  executables:
29
29
  - dbi
30
+ - test_broken_dbi
30
31
  extensions: []
31
32
 
32
33
  extra_rdoc_files:
@@ -34,46 +35,46 @@ extra_rdoc_files:
34
35
  - LICENSE
35
36
  - ChangeLog
36
37
  files:
37
- - examples/test1.rb
38
- - examples/test1.pl
39
38
  - examples/xmltest.rb
39
+ - examples/test1.pl
40
+ - examples/test1.rb
40
41
  - bin/dbi
41
42
  - build/Rakefile.dbi.rb
42
43
  - lib/dbi.rb
44
+ - lib/dbi/typeutil.rb
45
+ - lib/dbi/handles.rb
46
+ - lib/dbi/sql_type_constants.rb
47
+ - lib/dbi/exceptions.rb
48
+ - lib/dbi/columninfo.rb
49
+ - lib/dbi/sql.rb
50
+ - lib/dbi/utils.rb
51
+ - lib/dbi/utils/tableformatter.rb
43
52
  - lib/dbi/utils/timestamp.rb
44
- - lib/dbi/utils/xmlformatter.rb
45
53
  - lib/dbi/utils/date.rb
54
+ - lib/dbi/utils/xmlformatter.rb
46
55
  - lib/dbi/utils/time.rb
47
- - lib/dbi/utils/tableformatter.rb
48
- - lib/dbi/handles/database.rb
56
+ - lib/dbi/base_classes.rb
57
+ - lib/dbi/sql/preparedstatement.rb
58
+ - lib/dbi/trace.rb
49
59
  - lib/dbi/handles/driver.rb
60
+ - lib/dbi/handles/database.rb
50
61
  - lib/dbi/handles/statement.rb
51
- - lib/dbi/handles.rb
52
- - lib/dbi/trace.rb
53
- - lib/dbi/exceptions.rb
54
- - lib/dbi/sql/preparedstatement.rb
55
- - lib/dbi/base_classes.rb
56
- - lib/dbi/base_classes/database.rb
57
62
  - lib/dbi/base_classes/driver.rb
63
+ - lib/dbi/base_classes/database.rb
58
64
  - lib/dbi/base_classes/statement.rb
59
- - lib/dbi/typeutil.rb
60
- - lib/dbi/sql_type_constants.rb
61
- - lib/dbi/row.rb
62
- - lib/dbi/types.rb
63
65
  - lib/dbi/binary.rb
64
- - lib/dbi/utils.rb
65
- - lib/dbi/columninfo.rb
66
- - lib/dbi/sql.rb
66
+ - lib/dbi/types.rb
67
+ - lib/dbi/row.rb
67
68
  - test/ts_dbi.rb
68
- - test/dbi/tc_date.rb
69
- - test/dbi/tc_time.rb
70
69
  - test/dbi/tc_sqlbind.rb
71
70
  - test/dbi/tc_dbi.rb
71
+ - test/dbi/tc_statementhandle.rb
72
72
  - test/dbi/tc_row.rb
73
73
  - test/dbi/tc_timestamp.rb
74
- - test/dbi/tc_statementhandle.rb
75
- - test/dbi/tc_types.rb
76
74
  - test/dbi/tc_columninfo.rb
75
+ - test/dbi/tc_types.rb
76
+ - test/dbi/tc_time.rb
77
+ - test/dbi/tc_date.rb
77
78
  - README
78
79
  - LICENSE
79
80
  - ChangeLog