Skip to content
This repository was archived by the owner on Mar 20, 2019. It is now read-only.

Updated httparty, rspec, implemented Object#blank? #10

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

ashmckenzie
Copy link

Hi John,

I've updated your gem so the specs run, blank? doesn't complain anymore and updated httparty which solves the "couldn't parse YAML" error.

Thanks,

Ash.

Ash McKenzie added 4 commits March 6, 2012 23:31
- Added gemspec dep httparty >= 0.8.1
- Added gemspec dev deps rspec >= 2.8.0, rdoc and pry
- Updated Rakefile to satisfy deprecation warnings
@andrewdsmith
Copy link

Hi @ashmckenzie! Just tried out your changes and I get the following stack dump when searching movies:

/home/andrew/.rvm/gems/ruby-1.9.2-p320@tmdb_party_test/bundler/gems/tmdb_party-33dc04d28709/lib/tmdb_party/extras/httparty_icebox.rb:210:in `dump': no marshal_dump is defined for class Proc (TypeError)
    from /home/andrew/.rvm/gems/ruby-1.9.2-p320@tmdb_party_test/bundler/gems/tmdb_party-33dc04d28709/lib/tmdb_party/extras/httparty_icebox.rb:210:in `block in set'
    from /home/andrew/.rvm/gems/ruby-1.9.2-p320@tmdb_party_test/bundler/gems/tmdb_party-33dc04d28709/lib/tmdb_party/extras/httparty_icebox.rb:210:in `open'
    from /home/andrew/.rvm/gems/ruby-1.9.2-p320@tmdb_party_test/bundler/gems/tmdb_party-33dc04d28709/lib/tmdb_party/extras/httparty_icebox.rb:210:in `set'
    from /home/andrew/.rvm/gems/ruby-1.9.2-p320@tmdb_party_test/bundler/gems/tmdb_party-33dc04d28709/lib/tmdb_party/extras/httparty_icebox.rb:120:in `set'
    from /home/andrew/.rvm/gems/ruby-1.9.2-p320@tmdb_party_test/bundler/gems/tmdb_party-33dc04d28709/lib/tmdb_party/extras/httparty_icebox.rb:93:in `get_with_caching'
    from /home/andrew/.rvm/gems/ruby-1.9.2-p320@tmdb_party_test/bundler/gems/tmdb_party-33dc04d28709/lib/tmdb_party/extras/httparty_icebox.rb:101:in `get'
    from /home/andrew/.rvm/gems/ruby-1.9.2-p320@tmdb_party_test/bundler/gems/tmdb_party-33dc04d28709/lib/tmdb_party.rb:70:in `handle_response'
    from /home/andrew/.rvm/gems/ruby-1.9.2-p320@tmdb_party_test/bundler/gems/tmdb_party-33dc04d28709/lib/tmdb_party.rb:36:in `search_person'
    from ./test.rb:8:in `<main>'

I'm using Ruby 1.9.2.

@andrewdsmith
Copy link

Forgot to mention, if I hack TMDb to cache in memory rather than to disk everything is fine. Here are the gem versions I'm using:

Gems included by the bundle:
  * bundler (1.1.3)
  * httparty (0.8.3)
  * multi_json (1.3.5)
  * multi_xml (0.5.1)
  * tmdb_party (0.9.0 33dc04d)

@ashmckenzie
Copy link
Author

Hi Andrew, not sure exactly what's going on there but if you could provide a github link to your code I can take a look. I don't think the error you are seeing above is as a result of my change but am happy to take a look.

@andrewdsmith
Copy link

#/usr/bin/env ruby
require "rubygems"
require "bundler/setup"
require "tmdb_party"
require "pp"

tmdb = TMDBParty::Base.new('6acf9a0fd5218efe8859413e8ace0aba')
#results = tmdb.search('transformers')
results = tmdb.search_person('tom cruise')

pp results

Ash, I don't think there's anything wrong with your code! :-) I suspect something has changed with httparty recently, so this is mainly just a heads-up. Anyway, considering going my own way with a v3 wrapper based on faraday.

@ashmckenzie
Copy link
Author

Hi @andrewdsmith

I've had a bit of a look and it's a curly one :( I think you're right, maybe the gemspec should require an older version of httparty ?

@ashmckenzie
Copy link
Author

Success! Installing v 0.7.8 of httparty and removing the s.add_dependency "httparty", ">= 0.8.1" requirement in the gemspec works correctly :)

@andrewdsmith
Copy link

Nice work @ashmckenzie! I've decided to scratch my own itch, though, and build something new on the v3 API, using faraday and vcr for testing: https://github.com/andrewdsmith/neo-tmdb. Still early days.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants