diff --git a/lib/twitter_ebooks/bot.rb b/lib/twitter_ebooks/bot.rb index 9526cac..b7596e8 100644 --- a/lib/twitter_ebooks/bot.rb +++ b/lib/twitter_ebooks/bot.rb @@ -2,6 +2,14 @@ require 'twitter' require 'rufus/scheduler' +# Monkeypatch hack to fix upstream dependency issue +# https://github.com/sferik/twitter/issues/709 +class HTTP::URI + def port + 443 if self.https? + end +end + module Ebooks class ConfigurationError < Exception end @@ -267,8 +275,6 @@ module Ebooks if blacklisted?(ev.user.screen_name) log "Blocking blacklisted user @#{ev.user.screen_name}" @twitter.block(ev.user.screen_name) - # we don't want to reply to blacklisted users, so return - return end # Avoid responding to duplicate tweets diff --git a/twitter_ebooks.gemspec b/twitter_ebooks.gemspec index 40ea64e..3d7ea22 100644 --- a/twitter_ebooks.gemspec +++ b/twitter_ebooks.gemspec @@ -22,7 +22,7 @@ Gem::Specification.new do |gem| gem.add_development_dependency 'pry-byebug' gem.add_development_dependency 'yard' - gem.add_runtime_dependency 'twitter', '= 5.14' + gem.add_runtime_dependency 'twitter', '~> 5.15' gem.add_runtime_dependency 'rufus-scheduler' gem.add_runtime_dependency 'gingerice' gem.add_runtime_dependency 'htmlentities'