diff --git a/lib/sprockets/rails.rb b/lib/sprockets/rails.rb index 89975886..ee9eea00 100644 --- a/lib/sprockets/rails.rb +++ b/lib/sprockets/rails.rb @@ -1,13 +1,5 @@ require 'sprockets/rails/version' -require 'active_support' if defined? Rails::Railtie require 'sprockets/railtie' end - -module Sprockets - module Rails - def self.deprecator - @deprecator ||= ActiveSupport::Deprecation.new("4.0", "Sprockets::Rails") - end - end -end +require 'sprockets/rails/deprecator' diff --git a/lib/sprockets/rails/deprecator.rb b/lib/sprockets/rails/deprecator.rb new file mode 100644 index 00000000..def5eb7a --- /dev/null +++ b/lib/sprockets/rails/deprecator.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +require "active_support" + +module Sprockets + module Rails + def self.deprecator + @deprecator ||= ActiveSupport::Deprecation.new("4.0", "Sprockets::Rails") + end + end +end diff --git a/lib/sprockets/railtie.rb b/lib/sprockets/railtie.rb index 798ceb51..7058a19a 100644 --- a/lib/sprockets/railtie.rb +++ b/lib/sprockets/railtie.rb @@ -6,6 +6,7 @@ require 'sprockets' require 'sprockets/rails/asset_url_processor' +require 'sprockets/rails/deprecator' require 'sprockets/rails/sourcemapping_url_processor' require 'sprockets/rails/context' require 'sprockets/rails/helper'