From 23d27756b836d6a9c0e01a5c44fef01437a15a7f Mon Sep 17 00:00:00 2001 From: Gregory Eremin Date: Fri, 6 Jul 2012 19:24:50 +0400 Subject: [PATCH] Missing models --- lib/deprecated.rb | 4 ++-- lib/musicbrainz.rb | 1 + lib/tools/proxy.rb | 4 ++++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/deprecated.rb b/lib/deprecated.rb index 28aa1ea..18f6774 100644 --- a/lib/deprecated.rb +++ b/lib/deprecated.rb @@ -2,11 +2,11 @@ module MusicBrainz def self.query_interval=(sec) MusicBrainz::Tools::Proxy.query_interval = sec - puts "WARNING! MusicBrainz.query_interval is deprecated. Use MusicBrainz::Tools::Proxy.query_interval" + STDOUT.send :puts, "WARNING! MusicBrainz.query_interval is deprecated. Use MusicBrainz::Tools::Proxy.query_interval" end def self.cache_path=(path) MusicBrainz::Tools::Cache.cache_path = path - puts "WARNING! MusicBrainz.cache_path is deprecated. Use MusicBrainz::Tools::Cache.cache_path" + $stdout.send :puts, "WARNING! MusicBrainz.cache_path is deprecated. Use MusicBrainz::Tools::Cache.cache_path" end end diff --git a/lib/musicbrainz.rb b/lib/musicbrainz.rb index 7d87ac7..1f962fe 100644 --- a/lib/musicbrainz.rb +++ b/lib/musicbrainz.rb @@ -5,6 +5,7 @@ require "nokogiri" require "cgi" require "version" +require "deprecated" module MusicBrainz autoload :Base, "musicbrainz/base" diff --git a/lib/tools/proxy.rb b/lib/tools/proxy.rb index 4b23d05..941d540 100644 --- a/lib/tools/proxy.rb +++ b/lib/tools/proxy.rb @@ -13,6 +13,10 @@ module MusicBrainz @@query_interval = sec.to_f end + def self.query_interval + @@query_interval + end + def self.tries_limit=(num) @@tries_limit = num.to_i end