mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Warn about deprecation via ActiveSupport
This commit is contained in:
@@ -316,15 +316,22 @@ namespace :ofn do
|
||||
if EnterpriseRole.count < 1
|
||||
EnterpriseRole.create!(user: Spree::User.first, enterprise: enterprise2)
|
||||
end
|
||||
puts <<WARNING
|
||||
display_deprecation_warning
|
||||
end
|
||||
|
||||
Warning: This task is going to be replaced by:
|
||||
def display_deprecation_warning
|
||||
behaviour = ActiveSupport::Deprecation.behavior = :stderr
|
||||
ActiveSupport::Deprecation.behavior = :stderr
|
||||
ActiveSupport::Deprecation.warn(<<WARNING)
|
||||
|
||||
|
||||
This task is going to be replaced by:
|
||||
|
||||
$ bundle exec rake openfoodnetwork:sample_data
|
||||
|
||||
It contains more sample data.
|
||||
|
||||
WARNING
|
||||
ActiveSupport::Deprecation.behavior = behaviour
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user