1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Remove deprecated SOURCE_ANNOTATION_DIRECTORIES ENV

This commit is contained in:
Rafael Mendonça França 2020-10-29 19:09:19 +00:00
parent 8513769ad6
commit 6204651412
No known key found for this signature in database
GPG key ID: FC23B6D0F1EEE948
3 changed files with 7 additions and 11 deletions

View file

@ -37,6 +37,8 @@ Please refer to the [Changelog][railties] for detailed changes.
* Remove deprecated `connection` option in the `rails dbconsole` command.
* Remove deprecated `SOURCE_ANNOTATION_DIRECTORIES` environment variable support from `rails notes`.
### Deprecations
### Notable changes

View file

@ -1,3 +1,7 @@
* Remove deprecated `SOURCE_ANNOTATION_DIRECTORIES` environment variable support from `rails notes`.
*Rafael Mendonça França*
* Remove deprecated `connection` option in the `rails dbconsole` command.
*Rafael Mendonça França*

View file

@ -10,7 +10,6 @@ module Rails
def perform(*)
require_application_and_environment!
deprecation_warning
display_annotations
end
@ -23,16 +22,7 @@ module Rails
end
def directories
Rails::SourceAnnotationExtractor::Annotation.directories + source_annotation_directories
end
def deprecation_warning
return if source_annotation_directories.empty?
ActiveSupport::Deprecation.warn("`SOURCE_ANNOTATION_DIRECTORIES` is deprecated and will be removed in Rails 6.1. You can add default directories by using config.annotations.register_directories instead.")
end
def source_annotation_directories
ENV["SOURCE_ANNOTATION_DIRECTORIES"].to_s.split(",")
Rails::SourceAnnotationExtractor::Annotation.directories
end
end
end