From cf83b36c7deeaf2cd36015d656e810f5d99b517c Mon Sep 17 00:00:00 2001 From: ziprandom Date: Mon, 4 Sep 2017 23:48:13 +0000 Subject: [PATCH] small cleanup --- spec/support/custom_context_schema.cr | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/spec/support/custom_context_schema.cr b/spec/support/custom_context_schema.cr index 1034236..6a46900 100644 --- a/spec/support/custom_context_schema.cr +++ b/spec/support/custom_context_schema.cr @@ -1,5 +1,4 @@ require "json" -require "tempfile" class CustomContext < GraphQL::Schema::Context @@ -48,7 +47,7 @@ module LogStore `touch #{TEMPFILENAME}`; def read_logs - raw_content = File.read(TEMPFILENAME, nil, "[]l") + raw_content = File.read(TEMPFILENAME) Array(LogType).from_json raw_content rescue [] of LogType