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:
parent
8513769ad6
commit
6204651412
3 changed files with 7 additions and 11 deletions
|
@ -37,6 +37,8 @@ Please refer to the [Changelog][railties] for detailed changes.
|
||||||
|
|
||||||
* Remove deprecated `connection` option in the `rails dbconsole` command.
|
* Remove deprecated `connection` option in the `rails dbconsole` command.
|
||||||
|
|
||||||
|
* Remove deprecated `SOURCE_ANNOTATION_DIRECTORIES` environment variable support from `rails notes`.
|
||||||
|
|
||||||
### Deprecations
|
### Deprecations
|
||||||
|
|
||||||
### Notable changes
|
### Notable changes
|
||||||
|
|
|
@ -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.
|
* Remove deprecated `connection` option in the `rails dbconsole` command.
|
||||||
|
|
||||||
*Rafael Mendonça França*
|
*Rafael Mendonça França*
|
||||||
|
|
|
@ -10,7 +10,6 @@ module Rails
|
||||||
def perform(*)
|
def perform(*)
|
||||||
require_application_and_environment!
|
require_application_and_environment!
|
||||||
|
|
||||||
deprecation_warning
|
|
||||||
display_annotations
|
display_annotations
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -23,16 +22,7 @@ module Rails
|
||||||
end
|
end
|
||||||
|
|
||||||
def directories
|
def directories
|
||||||
Rails::SourceAnnotationExtractor::Annotation.directories + source_annotation_directories
|
Rails::SourceAnnotationExtractor::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(",")
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue