acts_as_follower icon indicating copy to clipboard operation
acts_as_follower copied to clipboard

The gem is spamming deprecation warnings in tests

Open mdesantis opened this issue 7 years ago • 8 comments

ruby 2.4.0 rails 5.0.1 acts_as_follower master@c5ac7b9 rspec 3.5.0

When I run rspec I get a lot of these deprecation warnings (a lot is one per test):

DEPRECATION WARNING: Setting custom parent classes is deprecated and will be removed in future versions. (called from parent_class_name at /home/maurizio/.asdf/installs/ruby/2.4.0/lib/ruby/gems/2.4.0/bundler/gems/acts_as_follower-c5ac7b9601c4/lib/acts_as_follower/follower_lib.rb:10)

mdesantis avatar Mar 07 '17 16:03 mdesantis

@mdesantis I believe #89 should address this.

brchristian avatar Mar 23 '17 21:03 brchristian

Hi everyone! Not sure if this issue is solved...

ruby 2.4.0 rails 5.0.1 acts_as_follower master@c5ac7b9 rspec 3.5.0

I get the following when runing rspec:

DEPRECATION WARNING: Setting custom parent classes is deprecated and will be removed in future versions. (called from parent_class_name at /usr/local/opt/rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/bundler/gems/acts_as_follower-c5ac7b9601c4/lib/acts_as_follower/follower_lib.rb:10)

georgestam avatar Jul 03 '17 11:07 georgestam

i've been getting this error in both rails 5.1.3 and 5.2 projects. attached is the current error it's always the same lines and same error about the deprecated custom parent class name.

ruby 2.4.1 rails 5.1.3 error code:

DEPRECATION WARNING: Setting custom parent classes is deprecated and will be removed in future versions. (called from parent_class_name at /home/azeem/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/bundler/gems/acts_as_follower-c5ac7b9601c4/lib/acts_as_follower/follower_lib.rb:10) DEPRECATION WARNING: Setting custom parent classes is deprecated and will be removed in future versions. (called from parent_class_name at /home/azeem/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/bundler/gems/acts_as_follower-c5ac7b9601c4/lib/acts_as_follower/follower_lib.rb:10)

azeemh avatar Aug 04 '18 19:08 azeemh

@azeemh I believe #89 should address this.

brchristian avatar Aug 05 '18 22:08 brchristian

Did anyone find a way to get rid of the deprecation warnings, still having the same issues.

ruby '2.3.7'
rails '5.0.0'
rspec '3.5.4' 
acts_as_follower '0.2.1'

Between, I believe my deprecation warning is caused by this I think it should be return DEFAULT_PARENTS if ActsAsFollower.custom_parent_classes.empty?

theterminalguy avatar Jan 08 '19 19:01 theterminalguy

@theterminalguy You are correct and I submitted #93 containing this fix. Unfortunately we are still waiting after almost 2 years for #93 to be merged.

brchristian avatar Jan 08 '19 20:01 brchristian

@theterminalguy You are correct and I submitted #93 containing this fix. Unfortunately we are still waiting after almost 2 years for #93 to be merged.

Can someone fork this gem and merge your fix into their fork? Then we simply re-release the gem under a new name?

ughstudios avatar Aug 15 '19 16:08 ughstudios