lib/dbi.rb in rails-dbi-0.1.0 vs lib/dbi.rb in rails-dbi-0.1.1

- old
+ new

@@ -35,19 +35,19 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # begin require "rubygems" - gem "deprecated", "= 2.0.1" + #gem "deprecated", "= 2.0.1" rescue LoadError end # # NOTE see the end of the file for requires that live in the DBI namespace. # -require "deprecated" +#require "deprecated" require "dbi/row" require "dbi/utils" require "dbi/sql" require "dbi/columninfo" require 'dbi/types' @@ -67,27 +67,27 @@ def inherits_from?(klass) self.ancestors.include?(klass) end end -Deprecate.set_action( - proc do |call| - klass, meth = call.split(/[#.]/) - klass = klass.split(/::/).inject(Module) { |a,x| a.const_get(x) } - - case klass - when DBI::Date, DBI::Time, DBI::Timestamp - warn "DBI::Date/Time/Timestamp are deprecated and will eventually be removed." - end - - if klass.inherits_from?(DBI::ColumnInfo) - warn "ColumnInfo methods that do not match a component are deprecated and will eventually be removed" - end - - warn "You may change the result of calling deprecated code via Deprecate.set_action; Trace follows:" - warn caller[2..-1].join("\n") - end -) +#Deprecate.set_action( +# proc do |call| +# klass, meth = call.split(/[#.]/) +# klass = klass.split(/::/).inject(Module) { |a,x| a.const_get(x) } +# +# case klass +# when DBI::Date, DBI::Time, DBI::Timestamp +# warn "DBI::Date/Time/Timestamp are deprecated and will eventually be removed." +# end +# +# if klass.inherits_from?(DBI::ColumnInfo) +# warn "ColumnInfo methods that do not match a component are deprecated and will eventually be removed" +# end +# +# warn "You may change the result of calling deprecated code via Deprecate.set_action; Trace follows:" +# warn caller[2..-1].join("\n") +# end +#) #++ module DBI VERSION = "0.4.5"