New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Twitter gem updated to 5.0 #151
Twitter gem updated to 5.0 #151
Conversation
spec.add_dependency 'em-twitter', '~> 0.3' | ||
spec.add_dependency 'twitter', '~> 4.8' | ||
spec.add_dependency 'em-http-request' | ||
spec.add_dependency 'yajl-ruby' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why did you add yajl as a dependency?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because i have a error without this dependency.
$ rspec spec
/Users/8xx8/.rvm/gems/ruby-1.9.3-p448/gems/em-http-request-1.0.3/lib/em-http/middleware/json_response.rb:1:in `require': cannot load such file -- yajl (LoadError)
from /Users/8xx8/.rvm/gems/ruby-1.9.3-p448/gems/em-http-request-1.0.3/lib/em-http/middleware/json_response.rb:1:in `<top (required)>'
from /Users/8xx8/projects/tweetstream/lib/tweetstream/site_stream_client.rb:3:in `require'
from /Users/8xx8/projects/tweetstream/lib/tweetstream/site_stream_client.rb:3:in `<top (required)>'
from /Users/8xx8/projects/tweetstream/spec/tweetstream/site_stream_client_spec.rb:3:in `<top (required)>'
from /Users/8xx8/.rvm/gems/ruby-1.9.3-p448/gems/rspec-core-2.14.7/lib/rspec/core/configuration.rb:896:in `load'
from /Users/8xx8/.rvm/gems/ruby-1.9.3-p448/gems/rspec-core-2.14.7/lib/rspec/core/configuration.rb:896:in `block in load_spec_files'
from /Users/8xx8/.rvm/gems/ruby-1.9.3-p448/gems/rspec-core-2.14.7/lib/rspec/core/configuration.rb:896:in `each'
from /Users/8xx8/.rvm/gems/ruby-1.9.3-p448/gems/rspec-core-2.14.7/lib/rspec/core/configuration.rb:896:in `load_spec_files'
from /Users/8xx8/.rvm/gems/ruby-1.9.3-p448/gems/rspec-core-2.14.7/lib/rspec/core/command_line.rb:22:in `run'
from /Users/8xx8/.rvm/gems/ruby-1.9.3-p448/gems/rspec-core-2.14.7/lib/rspec/core/runner.rb:80:in `run'
from /Users/8xx8/.rvm/gems/ruby-1.9.3-p448/gems/rspec-core-2.14.7/lib/rspec/core/runner.rb:17:in `block in autorun'
Coverage report generated for RSpec to /Users/8xx8/projects/tweetstream/coverage. 232 / 839 LOC (27.65%) covered.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, you are using an older version of em-http-request
. em-http-request 1.1.1 switched to multi_json whereas previous versions used yajl-ruby. TweetStream did the same in 2.6. Both were efforts to enable use with non-cruby implementations. That's actually the reasoning behind 'em-http-request', '>= 1.1.1'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could not use 1.1.1. I wrote this comment about this situation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. I see the problem now. Loosening the dependencies allowed bundler to resolve versions that would allow twitter 5.0 to be included in the bundle. But in the process, introduces several other regressions.
@sferik, what are your feelings on changing twitter
's dependency on http_parser.rb
to ~0.6.0.beta.2
? That will allow it to be compatible with the latest em-http-request
and em-twitter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’m reluctant to push a non-pre-release gem that depends on a beta. Happy to bump the twitter
dependency on http_parser.rb
to ~> 0.6 once 0.6.0
final is released.
@tmm1 What’s standing in the way of a 0.6.0 release of http_parser.rb
? It looks like there are currently 12 open issues. Which, if any, of these are blockers? What can we do to help push this release forward? It looks like the last beta was cut 6 months ago.
Thanks for your efforts here. I was just thinking about how to support the newly minted twitter gem 5.0. I think for the time being, I'd like to support both 4 and 5 of the gem allowing time for people to cut-over. That being said, there's probably not too much that impacts TweetStream and it should be possible to support both. The identity_map would be conditionally disabled. Also, can you clarify what's meant by this comment:
Thanks! |
spec.add_dependency 'twitter', '~> 4.8' | ||
spec.add_dependency 'em-http-request' | ||
spec.add_dependency 'yajl-ruby' | ||
spec.add_dependency 'em-twitter' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to keep the tighter dependency on em-twitter as pre-0.3.0 versions were not compatible with Ruby 2.0.
But this solution not worked with ruby 2.0.0