Commit 34835cc9760eda90b9009d6a369a2ea1d86d43bb
1 parent
3a43f458
Exists in
theme-brasil-digital-from-staging
and in
9 other branches
twitter restored
Showing
3 changed files
with
4 additions
and
4 deletions
Show diff stats
plugins/community_hub/lib/community_hub_plugin/hub.rb
| ... | ... | @@ -38,7 +38,7 @@ class CommunityHubPlugin::Hub < Folder |
| 38 | 38 | if action==:start |
| 39 | 39 | thread = Thread.new { |
| 40 | 40 | Twurl::Stream.run(page, author_id,'torrent', File.dirname(__FILE__) + '/../../tweeter_stream/config/twurlrc') |
| 41 | - } unless@@twitter_thread_started | |
| 41 | + } unless@@twitter_thread_started | |
| 42 | 42 | @@twitter_thread_started = true |
| 43 | 43 | end |
| 44 | 44 | end | ... | ... |
plugins/community_hub/tweeter_stream/lib/twurl/request_controller.rb
| ... | ... | @@ -14,17 +14,18 @@ module Twurl |
| 14 | 14 | def perform_request |
| 15 | 15 | client.perform_request_from_options(options) { |response| |
| 16 | 16 | response.read_body { |chunk| |
| 17 | -# print "#{chunk}\n" | |
| 17 | +# print "#{chunk}\n" | |
| 18 | 18 | #unless chunk.to_i.length = 0 |
| 19 | 19 | begin |
| 20 | 20 | parsed = JSON.parse(chunk) |
| 21 | -# print "@#{parsed["user"]["name"]} said: #{parsed["text"]} \n" | |
| 21 | + print "@#{parsed["user"]["name"]} said: #{parsed["text"]} \n" | |
| 22 | 22 | comment = Comment.new |
| 23 | 23 | comment.source_id = Stream.page.id |
| 24 | 24 | comment.body = parsed["text"] |
| 25 | 25 | comment.author_id = Stream.author_id |
| 26 | 26 | comment.save! |
| 27 | 27 | rescue |
| 28 | + print "Erro gravando comentário twitter\n" | |
| 28 | 29 | end |
| 29 | 30 | #raise comment.inspect |
| 30 | 31 | # rescue | ... | ... |
plugins/community_hub/tweeter_stream/lib/twurl/stream.rb
| ... | ... | @@ -17,7 +17,6 @@ module Twurl |
| 17 | 17 | @page = page # maybe should not be a class variable |
| 18 | 18 | @author_id = author_id |
| 19 | 19 | @@file_path = config_file_path |
| 20 | - raise page.inspect | |
| 21 | 20 | Twurl.options = Options.new |
| 22 | 21 | Twurl.options.command = 'request' # Not necessary anymore |
| 23 | 22 | Twurl.options.data = {"track"=>tags} | ... | ... |