From 66e9af11c22a15a8378c460128996f5ea5b2f49c Mon Sep 17 00:00:00 2001 From: Yannis Weishaupt Date: Tue, 27 Aug 2019 15:04:34 +0200 Subject: [PATCH] Igor's review. --- lib/zenaton/services/graphql.rb | 1 - lib/zenaton/traits/zenatonable.rb | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/zenaton/services/graphql.rb b/lib/zenaton/services/graphql.rb index 3581495..dd52df4 100644 --- a/lib/zenaton/services/graphql.rb +++ b/lib/zenaton/services/graphql.rb @@ -1,6 +1,5 @@ # frozen_string_literal: true -require 'net/http' require 'zenaton/exceptions' module Zenaton diff --git a/lib/zenaton/traits/zenatonable.rb b/lib/zenaton/traits/zenatonable.rb index 0834b7b..28b1900 100644 --- a/lib/zenaton/traits/zenatonable.rb +++ b/lib/zenaton/traits/zenatonable.rb @@ -23,7 +23,7 @@ def dispatch end def schedule(cron) - if cron.blank? || !cron.is_a?(String) + if !cron.is_a?(String) || cron.blank? raise InvalidArgumentError, "The cron passed to 'schedule' must be a non empty string" end