lib/i18n/tasks/configuration.rb in i18n-tasks-0.9.16 vs lib/i18n/tasks/configuration.rb in i18n-tasks-0.9.17
- old
+ new
@@ -19,10 +19,12 @@
i18n-tasks.yml i18n-tasks.yml.erb
].freeze
def file_config
file = CONFIG_FILES.detect { |f| File.exist?(f) }
- config = file && YAML.load(Erubis::Eruby.new(File.read(file, encoding: 'UTF-8')).result)
+ # rubocop:disable Security/Eval
+ config = file && YAML.load(eval(Erubi::Engine.new(File.read(file, encoding: 'UTF-8')).src))
+ # rubocop:enable Security/Eval
if config.present?
config.with_indifferent_access.tap do |c|
if c[:relative_roots]
warn_deprecated 'Please move relative_roots under search in config/i18n-tasks.yml.'
c[:search][:relative_roots] = c.delete(:relative_roots)