aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib
diff options
context:
space:
mode:
Diffstat (limited to 'railties/lib')
-rw-r--r--railties/lib/rails/generators/actions.rb11
-rw-r--r--railties/lib/rails/generators/rails/app/app_generator.rb12
-rw-r--r--railties/lib/rails/generators/rails/plugin/plugin_generator.rb10
3 files changed, 12 insertions, 21 deletions
diff --git a/railties/lib/rails/generators/actions.rb b/railties/lib/rails/generators/actions.rb
index 5b056045b3..3856a74a39 100644
--- a/railties/lib/rails/generators/actions.rb
+++ b/railties/lib/rails/generators/actions.rb
@@ -8,7 +8,6 @@ module Rails
def initialize(*) # :nodoc:
super
@indentation = 0
- @after_bundle_callbacks = []
end
# Adds an entry into +Gemfile+ for the supplied gem.
@@ -267,16 +266,6 @@ module Rails
log File.read(find_in_source_paths(path))
end
- # Registers a callback to be executed after bundle and spring binstubs
- # have run.
- #
- # after_bundle do
- # git add: '.'
- # end
- def after_bundle(&block)
- @after_bundle_callbacks << block
- end
-
private
# Define log for backwards compatibility. If just one argument is sent,
diff --git a/railties/lib/rails/generators/rails/app/app_generator.rb b/railties/lib/rails/generators/rails/app/app_generator.rb
index 337a71ac06..f2f46d6e25 100644
--- a/railties/lib/rails/generators/rails/app/app_generator.rb
+++ b/railties/lib/rails/generators/rails/app/app_generator.rb
@@ -276,6 +276,8 @@ module Rails
if options[:api]
self.options = options.merge(skip_sprockets: true, skip_javascript: true).freeze
end
+
+ @after_bundle_callbacks = []
end
public_task :set_default_accessors!
@@ -497,6 +499,16 @@ module Rails
create_file(*args, &block)
end
+ # Registers a callback to be executed after bundle and spring binstubs
+ # have run.
+ #
+ # after_bundle do
+ # git add: '.'
+ # end
+ def after_bundle(&block) # :doc:
+ @after_bundle_callbacks << block
+ end
+
def get_builder_class
defined?(::AppBuilder) ? ::AppBuilder : Rails::AppBuilder
end
diff --git a/railties/lib/rails/generators/rails/plugin/plugin_generator.rb b/railties/lib/rails/generators/rails/plugin/plugin_generator.rb
index 294c8a2609..79a06648b5 100644
--- a/railties/lib/rails/generators/rails/plugin/plugin_generator.rb
+++ b/railties/lib/rails/generators/rails/plugin/plugin_generator.rb
@@ -263,16 +263,6 @@ task default: :test
public_task :apply_rails_template
- def run_after_bundle_callbacks
- unless @after_bundle_callbacks.empty?
- ActiveSupport::Deprecation.warn("`after_bundle` is deprecated and will be removed in the next version of Rails. ")
- end
-
- @after_bundle_callbacks.each do |callback|
- callback.call
- end
- end
-
def name
@name ||= begin
# same as ActiveSupport::Inflector#underscore except not replacing '-'