lib/i18n-json/cli/export_command.rb in i18n-json-0.0.1 vs lib/i18n-json/cli/export_command.rb in i18n-json-0.0.2

- old
+ new

@@ -43,11 +43,20 @@ if require_file && !File.file?(require_file) ui.fail_with("ERROR: require file doesn't exist at #{require_file}") end - require require_file if require_file + require_without_warnings(require_file) if require_file I18nJSON.call(config_file: config_file) + end + + private def require_without_warnings(path) + old_verbose = $VERBOSE + $VERBOSE = nil + + require path + ensure + $VERBOSE = old_verbose end end end end