Skip to content
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

Closed

Conversation

Andrew8xx8
Copy link

But this solution not worked with ruby 2.0.0

@coveralls
Copy link

Coverage Status

Coverage increased (+0.55%) when pulling 040e2e8 on Andrew8xx8:updating_twitter_gem_to_5_0 into 949f5ea on tweetstream:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.56%) when pulling c1fe8f3 on Andrew8xx8:updating_twitter_gem_to_5_0 into 949f5ea on tweetstream:master.

spec.add_dependency 'em-twitter', '~> 0.3'
spec.add_dependency 'twitter', '~> 4.8'
spec.add_dependency 'em-http-request'
spec.add_dependency 'yajl-ruby'
Copy link
Member

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?

Copy link
Author

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.

Copy link
Member

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'

Copy link
Author

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.

Copy link
Member

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

Copy link
Member

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.

@stve
Copy link
Member

stve commented Nov 22, 2013

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:

But this solution not worked with ruby 2.0.0

Thanks!

spec.add_dependency 'twitter', '~> 4.8'
spec.add_dependency 'em-http-request'
spec.add_dependency 'yajl-ruby'
spec.add_dependency 'em-twitter'
Copy link
Member

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.

@stve
Copy link
Member

stve commented Jan 17, 2014

@sferik has just updated this to twitter gem version 5.5 (b83ae2a)

@stve stve closed this Jan 17, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants