Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions acts_as_follower.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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"
Expand Down
11 changes: 8 additions & 3 deletions lib/acts_as_follower.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/acts_as_follower/follower_lib.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down