Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Require sprockets deprecator in Railtie #525

Merged
merged 1 commit into from
Jun 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions lib/sprockets/rails.rb
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we remove "require 'active_support'" from this file?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

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
Loading