lib/translate_self.rb in translate_self-1.0.1 vs lib/translate_self.rb in translate_self-2.0.1
- old
+ new
@@ -1,12 +1,15 @@
require_relative 'translate_self/version'
require_relative 'translate_self/translation'
require_relative 'translate_self/translatable_string'
require 'ext/string'
require 'deepl'
+require 'dry-configurable'
# Dangerously include translation methods to strings!
module TranslateSelf
+ extend Dry::Configurable
+ setting :defrosting, default: false
DeepL.configure do |config|
config.auth_key = ENV['DEEPL_AUTH_KEY']
config.host = ENV['DEEPL_HOST'] || 'https://api-free.deepl.com' # Default value is 'https://api.deepl.com'
end
end