Monkeypatch to fix #91 with current twitter gem

This commit is contained in:
Jaiden Mispy 2016-01-12 23:36:21 -08:00
parent 25e3724f4d
commit 554aa2654c
2 changed files with 9 additions and 3 deletions

View file

@ -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

View file

@ -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'