rails-dbi 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/build/Rakefile.dbi.rb +2 -2
- data/lib/dbi/columninfo.rb +26 -26
- data/lib/dbi/utils/date.rb +1 -1
- data/lib/dbi/utils/time.rb +1 -1
- data/lib/dbi/utils/timestamp.rb +1 -1
- data/lib/dbi.rb +20 -20
- data/test/dbi/tc_date.rb +1 -1
- data/test/dbi/tc_time.rb +1 -1
- data/test/dbi/tc_timestamp.rb +1 -1
- metadata +6 -21
data/build/Rakefile.dbi.rb
CHANGED
@@ -38,14 +38,14 @@ namespace :dbi do
|
|
38
38
|
code_files = %w(examples/**/* bin/dbi build/Rakefile.dbi.rb lib/dbi.rb lib/dbi/**/*.rb test/ts_dbi.rb test/dbi/*)
|
39
39
|
|
40
40
|
spec = boilerplate_spec
|
41
|
-
spec.name = 'dbi'
|
41
|
+
spec.name = 'rails-dbi'
|
42
42
|
spec.version = DBI::VERSION
|
43
43
|
spec.test_file = 'test/ts_dbi.rb'
|
44
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'
|
48
|
-
spec.add_dependency 'deprecated', '= 2.0.1'
|
48
|
+
#spec.add_dependency 'deprecated', '= 2.0.1'
|
49
49
|
|
50
50
|
build_package_tasks(spec, code_files)
|
51
51
|
end
|
data/lib/dbi/columninfo.rb
CHANGED
@@ -2,11 +2,11 @@ require 'delegate'
|
|
2
2
|
|
3
3
|
begin
|
4
4
|
require 'rubygems'
|
5
|
-
gem 'deprecated', "= 2.0.1"
|
5
|
+
#gem 'deprecated', "= 2.0.1"
|
6
6
|
rescue LoadError => e
|
7
7
|
end
|
8
8
|
|
9
|
-
require 'deprecated'
|
9
|
+
#require 'deprecated'
|
10
10
|
|
11
11
|
module DBI
|
12
12
|
# This represents metadata for columns within a given table, such as the
|
@@ -79,29 +79,29 @@ module DBI
|
|
79
79
|
end
|
80
80
|
|
81
81
|
# Aliases - XXX soon to be deprecated
|
82
|
-
def self.deprecated_alias(target, source) # :nodoc:
|
83
|
-
|
84
|
-
|
85
|
-
end
|
86
|
-
|
87
|
-
deprecated_alias :is_nullable?, :nullable
|
88
|
-
deprecated_alias :can_be_null?, :nullable
|
89
|
-
|
90
|
-
deprecated_alias :is_indexed?, :indexed
|
91
|
-
|
92
|
-
deprecated_alias :is_primary?, :primary
|
93
|
-
|
94
|
-
deprecated_alias :is_unique, :unique
|
95
|
-
|
96
|
-
deprecated_alias :size, :precision
|
97
|
-
deprecated_alias :size=, :precision=
|
98
|
-
deprecated_alias :length, :precision
|
99
|
-
deprecated_alias :length=, :precision=
|
100
|
-
|
101
|
-
deprecated_alias :decimal_digits, :scale
|
102
|
-
deprecated_alias :decimal_digits=, :scale=
|
103
|
-
|
104
|
-
deprecated_alias :default_value, :default
|
105
|
-
deprecated_alias :default_value=, :default=
|
82
|
+
#def self.deprecated_alias(target, source) # :nodoc:
|
83
|
+
# define_method(target) { |*args| method_missing(source, *args) }
|
84
|
+
# deprecate target
|
85
|
+
#end
|
86
|
+
#
|
87
|
+
#deprecated_alias :is_nullable?, :nullable
|
88
|
+
#deprecated_alias :can_be_null?, :nullable
|
89
|
+
#
|
90
|
+
#deprecated_alias :is_indexed?, :indexed
|
91
|
+
#
|
92
|
+
#deprecated_alias :is_primary?, :primary
|
93
|
+
#
|
94
|
+
#deprecated_alias :is_unique, :unique
|
95
|
+
#
|
96
|
+
#deprecated_alias :size, :precision
|
97
|
+
#deprecated_alias :size=, :precision=
|
98
|
+
#deprecated_alias :length, :precision
|
99
|
+
#deprecated_alias :length=, :precision=
|
100
|
+
#
|
101
|
+
#deprecated_alias :decimal_digits, :scale
|
102
|
+
#deprecated_alias :decimal_digits=, :scale=
|
103
|
+
#
|
104
|
+
#deprecated_alias :default_value, :default
|
105
|
+
#deprecated_alias :default_value=, :default=
|
106
106
|
end
|
107
107
|
end
|
data/lib/dbi/utils/date.rb
CHANGED
data/lib/dbi/utils/time.rb
CHANGED
data/lib/dbi/utils/timestamp.rb
CHANGED
data/lib/dbi.rb
CHANGED
@@ -37,7 +37,7 @@ module DBI; end
|
|
37
37
|
|
38
38
|
begin
|
39
39
|
require "rubygems"
|
40
|
-
gem "deprecated", "= 2.0.1"
|
40
|
+
#gem "deprecated", "= 2.0.1"
|
41
41
|
rescue LoadError
|
42
42
|
end
|
43
43
|
|
@@ -45,7 +45,7 @@ end
|
|
45
45
|
# NOTE see the end of the file for requires that live in the DBI namespace.
|
46
46
|
#
|
47
47
|
|
48
|
-
require "deprecated"
|
48
|
+
#require "deprecated"
|
49
49
|
require "dbi/row"
|
50
50
|
require "dbi/utils"
|
51
51
|
require "dbi/sql"
|
@@ -69,24 +69,24 @@ class Class
|
|
69
69
|
end
|
70
70
|
end
|
71
71
|
|
72
|
-
Deprecate.set_action(
|
73
|
-
proc do |call|
|
74
|
-
klass, meth = call.split(/[#.]/)
|
75
|
-
klass = klass.split(/::/).inject(Module) { |a,x| a.const_get(x) }
|
76
|
-
|
77
|
-
case klass
|
78
|
-
when DBI::Date, DBI::Time, DBI::Timestamp
|
79
|
-
warn "DBI::Date/Time/Timestamp are deprecated and will eventually be removed."
|
80
|
-
end
|
81
|
-
|
82
|
-
if klass.inherits_from?(DBI::ColumnInfo)
|
83
|
-
warn "ColumnInfo methods that do not match a component are deprecated and will eventually be removed"
|
84
|
-
end
|
85
|
-
|
86
|
-
warn "You may change the result of calling deprecated code via Deprecate.set_action; Trace follows:"
|
87
|
-
warn caller[2..-1].join("\n")
|
88
|
-
end
|
89
|
-
)
|
72
|
+
#Deprecate.set_action(
|
73
|
+
# proc do |call|
|
74
|
+
# klass, meth = call.split(/[#.]/)
|
75
|
+
# klass = klass.split(/::/).inject(Module) { |a,x| a.const_get(x) }
|
76
|
+
#
|
77
|
+
# case klass
|
78
|
+
# when DBI::Date, DBI::Time, DBI::Timestamp
|
79
|
+
# warn "DBI::Date/Time/Timestamp are deprecated and will eventually be removed."
|
80
|
+
# end
|
81
|
+
#
|
82
|
+
# if klass.inherits_from?(DBI::ColumnInfo)
|
83
|
+
# warn "ColumnInfo methods that do not match a component are deprecated and will eventually be removed"
|
84
|
+
# end
|
85
|
+
#
|
86
|
+
# warn "You may change the result of calling deprecated code via Deprecate.set_action; Trace follows:"
|
87
|
+
# warn caller[2..-1].join("\n")
|
88
|
+
# end
|
89
|
+
#)
|
90
90
|
|
91
91
|
#++
|
92
92
|
module DBI
|
data/test/dbi/tc_date.rb
CHANGED
data/test/dbi/tc_time.rb
CHANGED
data/test/dbi/tc_timestamp.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails-dbi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 25
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 1
|
10
|
+
version: 0.1.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Raphael Costa
|
@@ -19,24 +19,9 @@ cert_chain: []
|
|
19
19
|
|
20
20
|
date: 2010-08-10 00:00:00 -03:00
|
21
21
|
default_executable:
|
22
|
-
dependencies:
|
23
|
-
|
24
|
-
|
25
|
-
prerelease: false
|
26
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
27
|
-
none: false
|
28
|
-
requirements:
|
29
|
-
- - "="
|
30
|
-
- !ruby/object:Gem::Version
|
31
|
-
hash: 13
|
32
|
-
segments:
|
33
|
-
- 2
|
34
|
-
- 0
|
35
|
-
- 1
|
36
|
-
version: 2.0.1
|
37
|
-
type: :runtime
|
38
|
-
version_requirements: *id001
|
39
|
-
description: A vendor independent interface for accessing databases, similar to Perl's DBI compatible with Rails 3
|
22
|
+
dependencies: []
|
23
|
+
|
24
|
+
description: A vendor independent interface for accessing databases, similar to Perl's DBI but compatible with Rails 3
|
40
25
|
email: ruby-dbi-users@rubyforge.org
|
41
26
|
executables:
|
42
27
|
- dbi
|