diff --git a/acts_as_follower.gemspec b/acts_as_follower.gemspec index 2049971..249f3e8 100644 --- a/acts_as_follower.gemspec +++ b/acts_as_follower.gemspec @@ -7,7 +7,7 @@ Gem::Specification.new do |s| s.version = ActsAsFollower::VERSION s.authors = ["Tom Cocca"] s.email = ["tom dot cocca at gmail dot com"] - s.homepage = "https://github.com/tcocca/acts_as_follower" + s.homepage = "https://github.com/EBWiki/acts_as_follower" s.summary = %q{A Rubygem to add Follow functionality for ActiveRecord models} s.description = %q{acts_as_follower is a Rubygem to allow any model to follow any other model. This is accomplished through a double polymorphic relationship on the Follow model. There is also built in support for blocking/un-blocking follow records. Main uses would be for Users to follow other Users or for Users to follow Books, etc… (Basically, to develop the type of follow system that GitHub has)} s.license = 'MIT' @@ -21,7 +21,7 @@ Gem::Specification.new do |s| s.add_dependency 'activerecord', '>= 4.0' - s.add_development_dependency "sqlite3" + s.add_development_dependency "sqlite3", "1.7.3" s.add_development_dependency "shoulda_create" s.add_development_dependency "shoulda", ">= 3.5.0" s.add_development_dependency "factory_girl", ">= 4.2.0" diff --git a/lib/acts_as_follower.rb b/lib/acts_as_follower.rb index 040db64..947030d 100644 --- a/lib/acts_as_follower.rb +++ b/lib/acts_as_follower.rb @@ -6,15 +6,20 @@ module ActsAsFollower autoload :FollowerLib, 'acts_as_follower/follower_lib' autoload :FollowScopes, 'acts_as_follower/follow_scopes' + module MyCustomDeprecation + def self.warn(message, callstack = caller) + # Log the message to a file, or handle it however you need + Rails.logger.warn("Deprecation Warning: #{message}") + Rails.logger.warn("Called from: #{callstack.join("\n")}") + end + end + def self.setup @configuration ||= Configuration.new yield @configuration if block_given? end def self.method_missing(method_name, *args, &block) - if method_name == :custom_parent_classes= - ActiveSupport::Deprecation.warn("Setting custom parent classes is deprecated and will be removed in future versions.") - end @configuration.respond_to?(method_name) ? @configuration.send(method_name, *args, &block) : super end diff --git a/lib/acts_as_follower/follower_lib.rb b/lib/acts_as_follower/follower_lib.rb index fa40023..fbf6a4a 100644 --- a/lib/acts_as_follower/follower_lib.rb +++ b/lib/acts_as_follower/follower_lib.rb @@ -35,7 +35,7 @@ def apply_options_to_scope(scope, options = {}) def parent_classes return DEFAULT_PARENTS unless ActsAsFollower.custom_parent_classes - ActiveSupport::Deprecation.warn("Setting custom parent classes is deprecated and will be removed in future versions.") + ActsAsFollower::MyCustomDeprecation.warn("Setting custom parent classes is deprecated and will be removed in future versions.") ActsAsFollower.custom_parent_classes + DEFAULT_PARENTS end end