diff --git a/huginn_epic_store_new_free_game_agent.gemspec b/huginn_epic_store_new_free_game_agent.gemspec index ce43af5..f8a5dd3 100644 --- a/huginn_epic_store_new_free_game_agent.gemspec +++ b/huginn_epic_store_new_free_game_agent.gemspec @@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) Gem::Specification.new do |spec| spec.name = "huginn_epic_store_new_free_game_agent" - spec.version = '0.2.0' + spec.version = '0.2.1' spec.authors = ["Nicolas Germain"] spec.email = ["ngermain@hihouhou.com"] diff --git a/lib/huginn_epic_store_new_free_game_agent/epic_store_new_free_game_agent.rb b/lib/huginn_epic_store_new_free_game_agent/epic_store_new_free_game_agent.rb index bf187b2..d8260c8 100644 --- a/lib/huginn_epic_store_new_free_game_agent/epic_store_new_free_game_agent.rb +++ b/lib/huginn_epic_store_new_free_game_agent/epic_store_new_free_game_agent.rb @@ -301,7 +301,7 @@ def fetch log "event not created" end end - if !Time.now.to_i.between?(Time.parse(start_date).to_i, Time.parse(end_date).to_i) + if !start_date.nil? && !end_date.nil? && !Time.now.to_i.between?(Time.parse(start_date).to_i, Time.parse(end_date).to_i) if interpolated['debug'] == 'true' log "removing #{item['id']} to triggered list" end