ms-ati / docile

Docile keeps your Ruby DSLs tame and well-behaved
http://ms-ati.github.com/docile/
MIT License
419 stars 34 forks source link

method_missing': [DEPRECATION] #load_adapter is deprecated. Use #load_profile instead #20

Closed srghma closed 8 years ago

srghma commented 8 years ago
/usr/lib/ruby/gems/2.3.0/gems/docile-1.1.5/lib/docile/fallback_context_proxy.rb:57:in `method_missing': [DEPRECATION] #load_adapter is deprecated. Use #load_profile instead.
ms-ati commented 8 years ago

Hi, @BjornMelgaard, as you can see in fallback_context_proxy.rb:57, there is no call to any #load_adapter method. Rather, the deprecation warning is probably for whatever code is being called as a DSL via the Docile library.

Does that help? Do you know what code is actually calling this deprecated #load_adapter method?

srghma commented 8 years ago

I think this called from simplecov But why line from your gem? Maybe I disturb you in vain :confused:

ms-ati commented 8 years ago

Hi @BjornMelgaard -- yes, you've tracked down where it is coming from, inside SimpleCov. In your simplecov configuration, you are using Docile for the DSL as that is used by SimpleCov. So when you call the method #load_adapter, the DEPRECATED message is being reported at the place it's called in the DSL, instead of where the DSL call is made

ms-ati commented 8 years ago

In other words, search your code for load_adapter ;)

ms-ati commented 8 years ago

I don't know if it's possible to improve this situation. But I will research of Docile could cause the Kernel.caller to report the original call site instead

ms-ati commented 8 years ago

Closing this in favor of fixing in SimpleCov: https://github.com/colszowka/simplecov/issues/504