From d999a5ba4d0bf50b1e8fe2ab377d11e65bea5677 Mon Sep 17 00:00:00 2001 From: Kyle Banker Date: Thu, 25 Aug 2011 15:03:40 -0400 Subject: [PATCH] RUBY-315 deprecate BSON.max_bson_size and BSON.update_max_bson_size. --- lib/bson/bson_c.rb | 2 ++ lib/bson/bson_java.rb | 2 ++ lib/bson/bson_ruby.rb | 2 ++ 3 files changed, 6 insertions(+) diff --git a/lib/bson/bson_c.rb b/lib/bson/bson_c.rb index 977b6f7..17f3758 100644 --- a/lib/bson/bson_c.rb +++ b/lib/bson/bson_c.rb @@ -29,10 +29,12 @@ module BSON end def self.max_bson_size + warn "BSON::BSON_CODER.max_bson_size is deprecated and will be removed in v2.0." CBson.max_bson_size end def self.update_max_bson_size(connection) + warn "BSON::BSON_CODER.update_max_bson_size is deprecated and now a no-op. It will be removed in v2.0." CBson.update_max_bson_size(connection) end end diff --git a/lib/bson/bson_java.rb b/lib/bson/bson_java.rb index 7a1eb0d..aaea901 100644 --- a/lib/bson/bson_java.rb +++ b/lib/bson/bson_java.rb @@ -18,10 +18,12 @@ module BSON end def self.max_bson_size + warn "BSON::BSON_CODER.max_bson_size is deprecated and will be removed in v2.0." Java::OrgJbson::RubyBSONEncoder.max_bson_size(self) end def self.update_max_bson_size(connection) + warn "BSON::BSON_CODER.update_max_bson_size is deprecated and now a no-op. It will be removed in v2.0." Java::OrgJbson::RubyBSONEncoder.update_max_bson_size(self, connection) end end diff --git a/lib/bson/bson_ruby.rb b/lib/bson/bson_ruby.rb index 08f96a9..223bda5 100644 --- a/lib/bson/bson_ruby.rb +++ b/lib/bson/bson_ruby.rb @@ -78,10 +78,12 @@ module BSON end def self.update_max_bson_size(connection) + warn "BSON::BSON_CODER.update_max_bson_size is deprecated and now a no-op. It will be removed in v2.0." @@max_bson_size = connection.max_bson_size end def self.max_bson_size + warn "BSON::BSON_CODER.max_bson_size is deprecated and will be removed in v2.0." @@max_bson_size end