While 1.3.1 fixed the problem where the rooms method returned an empty array, I'm now getting an undefined method 'map' for nil::NilClass when I call the rooms method. Here's some irb output to illustrate the issue:
irb(main):001:0> require 'rubygems'
=> true
irb(main):002:0> require 'tinder'
=> true
irb(main):003:0> campfire = Tinder::Campfire.new 'domain', :ssl => true
=> #<Tinder::Campfire:0x5cc41d8 @cookie=nil, @logged_in=false, @connection=#<Tinder::Connection:0x5cc40c0>, @http=Net::HTTP, @uri=#<URI::HTTPS:0x5cbf048 URL:https://domain.campfirenow.com>, @subdomain="domain">
irb(main):004:0> campfire.login 'myusername', 'mypass'
=> true
irb(main):005:0> campfire.rooms
NoMethodError: undefined method `map' for nil:NilClass
from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/tinder-1.3.1/lib/tinder/campfire.rb:62:in `rooms'
from (irb):5
from :0
I have tried this with both httparty 0.5.0 and 0.4.3 with the same result. Also note that I'm using enterprise ruby, if that makes a difference.
Thanks, and I definitely concede that this could be due to operator error :) But it has been working well for a long time. Just not of late.
Btw, I first noticed this when the 'rooms' method started returning an empty array:
irb(main):001:0> require 'rubygems'
=> true
irb(main):002:0> require 'tinder'
=> true
irb(main):003:0> @campfire = Tinder::Campfire.new('chowbaby')
=> #<Tinder::Campfire:0x176b230 @logged_in=false, @uri=#<URI::HTTP:0xbb5846 URL:http://chowbaby.campfirenow.com>, @http=Net::HTTP, @subdomain="chowbaby", @cookie=nil>
irb(main):004:0> @campfire.login 'myuser', 'mypass'
=> true
irb(main):005:0> @campfire.rooms
=> []
I see that the gemspec has been updated. Are you going to deploy it to gemcutter soon?
es de... como es?
sorry, I had a forked 2.0.0 version install which prevented me from upgrading to 1.3.1. I got it :)
a "quick" fix should be that you use the api key in your campfire account screen as username and a random string (for example 'x') as password. you will get the rooms then, but the room.listen functionality doesn't work.