Skip to content

Commit 81d345c

Browse files
committed
7.0.1
1 parent 7c1cf17 commit 81d345c

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

lib/angular_rails_csrf.rb

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
11
# frozen_string_literal: true
22

33
require 'angular_rails_csrf/railtie'
4+
5+
module AngularRailsCsrf
6+
def self.deprecator
7+
@deprecator ||= ActiveSupport::Deprecation.new('7.0', 'angular_rails_csrf')
8+
end
9+
end

lib/angular_rails_csrf/railtie.rb

+4-2
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,11 @@ class Railtie < ::Rails::Railtie
1212

1313
initializer 'angular-rails-csrf.deprecation_notice' do |_app|
1414
unless Rails.env.test? || ENV['ANGULAR_RAILS_CSRF_SILENCE']
15-
ActiveSupport::Deprecation.warn(
15+
AngularRailsCsrf.deprecator.warn(
1616
'[angular_rails_csrf] This gem is under passive maintenance and may be sunset in the future. ' \
17-
'Open an issue if you rely on it and want it to live on: https://github.com/bodrovis/angular_rails_csrf/issues'
17+
'Open an issue if you rely on it and want it to live on: ' \
18+
'https://github.com/bodrovis/angular_rails_csrf/issues. ' \
19+
'Set ANGULAR_RAILS_CSRF_SILENCE to silence this warning.'
1820
)
1921
end
2022
end

0 commit comments

Comments
 (0)