Skip to content

Commit

Permalink
Merge pull request #525 from mamhoff/require-deprecator-in-railtie
Browse files Browse the repository at this point in the history
Require sprockets deprecator in Railtie
  • Loading branch information
byroot authored Jun 7, 2024
2 parents 5f6d88d + d34e89c commit d3f1806
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
10 changes: 1 addition & 9 deletions lib/sprockets/rails.rb
Original file line number Diff line number Diff line change
@@ -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'
11 changes: 11 additions & 0 deletions lib/sprockets/rails/deprecator.rb
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions lib/sprockets/railtie.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit d3f1806

Please sign in to comment.