Skip to content

Commit

Permalink
Switch from erubius to erubi. Fixes #247
Browse files Browse the repository at this point in the history
  • Loading branch information
jcoyne authored and glebm committed Aug 10, 2017
1 parent ce97f70 commit b58b8e6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion i18n-tasks.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ TEXT
s.add_dependency 'activesupport', '>= 4.0.2'
s.add_dependency 'ast', '>= 2.1.0'
s.add_dependency 'easy_translate', '>= 0.5.0'
s.add_dependency 'erubis'
s.add_dependency 'erubi'
s.add_dependency 'highline', '>= 1.7.3'
s.add_dependency 'i18n'
s.add_dependency 'parser', '>= 2.2.3.0'
Expand Down
2 changes: 1 addition & 1 deletion lib/i18n/tasks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ module Data
require 'active_support/core_ext/try'
end
require 'rainbow'
require 'erubis'
require 'erubi'

require 'i18n/tasks/version'
require 'i18n/tasks/base_task'
Expand Down
4 changes: 3 additions & 1 deletion lib/i18n/tasks/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ def config

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]
Expand Down

0 comments on commit b58b8e6

Please sign in to comment.