Commit ec4e7b4a authored by Jan Berdajs's avatar Jan Berdajs Committed by Dennis Schubert

upgrade Twitter gem - fixes Faraday deprecation warning

parent aa2297a8
......@@ -140,7 +140,7 @@ gem "omniauth", "1.2.2"
gem "omniauth-facebook", "2.0.1"
gem "omniauth-tumblr", "1.1"
gem "omniauth-twitter", "1.2.0"
gem "twitter", "4.8.1"
gem "twitter", "5.14.0"
gem "omniauth-wordpress", "0.2.2"
# Serializers
......
......@@ -72,6 +72,7 @@ GEM
bcrypt (3.1.10)
bootstrap-sass (2.3.2.2)
sass (~> 3.2)
buftok (0.2.0)
builder (3.2.2)
byebug (4.0.5)
columnize (= 0.9.0)
......@@ -171,6 +172,7 @@ GEM
hiredis (~> 0.5.0)
entypo-rails (2.2.3)
railties (>= 3.1, <= 5)
equalizer (0.0.11)
erubis (2.7.0)
ethon (0.7.3)
ffi (>= 1.3.0)
......@@ -348,6 +350,8 @@ GEM
hike (1.2.3)
hiredis (0.5.2)
hitimes (1.2.2)
http (0.6.4)
http_parser.rb (~> 0.6.0)
http-cookie (1.0.2)
domain_name (~> 0.5)
http_accept_language (2.0.5)
......@@ -409,6 +413,8 @@ GEM
mime-types (>= 1.16, < 3)
markerb (1.0.2)
redcarpet (>= 2.0)
memoizable (0.4.2)
thread_safe (~> 0.3, >= 0.3.1)
messagebus_ruby_api (1.0.3)
method_source (0.8.2)
mime-types (2.5)
......@@ -423,6 +429,7 @@ GEM
multi_xml (0.5.5)
multipart-post (2.0.0)
mysql2 (0.3.18)
naught (1.0.0)
nenv (0.2.0)
nested_form (0.3.2)
net-scp (1.2.1)
......@@ -694,10 +701,17 @@ GEM
timecop (0.7.3)
timers (4.0.1)
hitimes
twitter (4.8.1)
faraday (~> 0.8, < 0.10)
multi_json (~> 1.0)
simple_oauth (~> 0.2)
twitter (5.14.0)
addressable (~> 2.3)
buftok (~> 0.2.0)
equalizer (~> 0.0.9)
faraday (~> 0.9.0)
http (~> 0.6.0)
http_parser.rb (~> 0.6.0)
json (~> 1.8)
memoizable (~> 0.4.0)
naught (~> 1.0)
simple_oauth (~> 0.3.0)
twitter-text (1.12.0)
unf (~> 0.1.0)
typhoeus (0.7.1)
......@@ -851,7 +865,7 @@ DEPENDENCIES
spring-commands-rspec (= 1.0.4)
test_after_commit (= 0.4.1)
timecop (= 0.7.3)
twitter (= 4.8.1)
twitter (= 5.14.0)
twitter-text (= 1.12.0)
typhoeus (= 0.7.1)
uglifier (= 2.7.1)
......
......@@ -30,10 +30,12 @@ class Services::Twitter < Service
private
def client
@client ||= Twitter::Client.new(
oauth_token: self.access_token,
oauth_token_secret: self.access_secret
)
@client ||= Twitter::REST::Client.new do |config|
config.consumer_key = AppConfig.services.twitter.key
config.consumer_secret = AppConfig.services.twitter.secret
config.access_token = access_token
config.access_token_secret = access_secret
end
end
def attempt_post post, retry_count=0
......
......@@ -5,16 +5,12 @@
Rails.application.config.middleware.use OmniAuth::Builder do
if AppConfig.services.twitter.enable?
provider :twitter, AppConfig.services.twitter.key, AppConfig.services.twitter.secret
Twitter.configure do |config|
config.consumer_key = AppConfig.services.twitter.key
config.consumer_secret = AppConfig.services.twitter.secret
end
end
if AppConfig.services.tumblr.enable?
provider :tumblr, AppConfig.services.tumblr.key, AppConfig.services.tumblr.secret
end
if AppConfig.services.facebook.enable?
provider :facebook, AppConfig.services.facebook.app_id, AppConfig.services.facebook.secret, {
display: "popup",
......@@ -24,9 +20,9 @@ Rails.application.config.middleware.use OmniAuth::Builder do
ca_file: AppConfig.environment.certificate_authorities
}
}
}
}
end
if AppConfig.services.wordpress.enable?
provider :wordpress, AppConfig.services.wordpress.client_id, AppConfig.services.wordpress.secret
end
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment