Monkeypatch to fix #91 with current twitter gem
This commit is contained in:
parent
25e3724f4d
commit
554aa2654c
2 changed files with 9 additions and 3 deletions
|
|
@ -2,6 +2,14 @@
|
||||||
require 'twitter'
|
require 'twitter'
|
||||||
require 'rufus/scheduler'
|
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
|
module Ebooks
|
||||||
class ConfigurationError < Exception
|
class ConfigurationError < Exception
|
||||||
end
|
end
|
||||||
|
|
@ -267,8 +275,6 @@ module Ebooks
|
||||||
if blacklisted?(ev.user.screen_name)
|
if blacklisted?(ev.user.screen_name)
|
||||||
log "Blocking blacklisted user @#{ev.user.screen_name}"
|
log "Blocking blacklisted user @#{ev.user.screen_name}"
|
||||||
@twitter.block(ev.user.screen_name)
|
@twitter.block(ev.user.screen_name)
|
||||||
# we don't want to reply to blacklisted users, so return
|
|
||||||
return
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# Avoid responding to duplicate tweets
|
# Avoid responding to duplicate tweets
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ Gem::Specification.new do |gem|
|
||||||
gem.add_development_dependency 'pry-byebug'
|
gem.add_development_dependency 'pry-byebug'
|
||||||
gem.add_development_dependency 'yard'
|
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 'rufus-scheduler'
|
||||||
gem.add_runtime_dependency 'gingerice'
|
gem.add_runtime_dependency 'gingerice'
|
||||||
gem.add_runtime_dependency 'htmlentities'
|
gem.add_runtime_dependency 'htmlentities'
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue