lib/qonfig/loaders/json.rb in qonfig-0.25.0 vs lib/qonfig/loaders/json.rb in qonfig-0.26.0

- old
+ new

@@ -9,11 +9,12 @@ # # @raise [Qonfig::JSONLoaderParseError] # # @api private # @since 0.5.0 + # @version 0.26.0 def load(data) - ::JSON.parse(data, max_nesting: false, allow_nan: true) + ::JSON.parse(ERB.new(data).result, max_nesting: false, allow_nan: true) rescue ::JSON::ParserError => error raise(Qonfig::JSONLoaderParseError.new(error.message).tap do |exception| exception.set_backtrace(error.backtrace) end) end