mobiledefense/google_safe_browsing — pull request #16 by chrismar035 (2014-04-25 03:14:12+00:00)
Title: Lookup certain domains raises NoMethodError: undefined method `split' for nil:NilClass

GoogleSafeBrowsing::APIv2.lookup("qinbei.com")

```
2.0.0-p195 :010 > GoogleSafeBrowsing::APIv2.lookup("qinbei.com")

`GoogleSafeBrowsing::FullHash Load (7.4ms) SELECT 'gsb_full_hashes'.* FROM 'gsb_full_hashes' WHERE 'gsb_full_hashes'.'full_hash' IN ('1b72c2beeb9fddcd1e4298bcc5e40bac63bf92361e3792c7f4a6c7c53addf753', '748cc0bee87f27d35a875afad7edc6fa0ff078be89b4e816ac44b16295ac4078') ORDER BY 'gsb_full_hashes'.'id' ASC LIMIT 1
GoogleSafeBrowsing::AddShavar Load (13.2ms) SELECT 'gsb_add_shavars'.* FROM 'gsb_add_shavars' WHERE 'gsb_add_shavars'.'prefix' IN ('1b72c2be', '748cc0be')
GoogleSafeBrowsing::SubShavar Load (1.2ms) SELECT 'gsb_sub_shavars'.* FROM 'gsb_sub_shavars' WHERE 'gsb_sub_shavars'.'prefix' IN ('1b72c2be', '748cc0be')
NoMethodError: undefined method 'split' for nil:NilClass
from /.rvm/gems/ruby-2.1.0@orion_workers/bundler/gems/google_safe_browsing-26e1a155379b/lib/google_safe_browsing/http_helper.rb:113:in 'please_rekey?'
from /.rvm/gems/ruby-2.1.0@orion_workers/bundler/gems/google_safe_browsing-26e1a155379b/lib/google_safe_browsing/http_helper.rb:81:in 'with_keys'
from /.rvm/gems/ruby-2.1.0@orion_workers/bundler/gems/google_safe_browsing-26e1a155379b/lib/google_safe_browsing/http_helper.rb:104:in 'post_data'
from /.rvm/gems/ruby-2.1.0@orion_workers/bundler/gems/google_safe_browsing-26e1a155379b/lib/google_safe_browsing/http_helper.rb:16:in 'request_full_hashes'
from /.rvm/gems/ruby-2.1.0@orion_workers/bundler/gems/google_safe_browsing-26e1a155379b/lib/google_safe_browsing/api_v2.rb:44:in 'lookup'
from (irb):10
from /.rvm/gems/ruby-2.1.0@orion_workers/gems/railties-4.0.3/lib/rails/commands/console.rb:90:in 'start'
from /.rvm/gems/ruby-2.1.0@orion_workers/gems/railties-4.0.3/lib/rails/commands/console.rb:9:in 'start'
from /.rvm/gems/ruby-2.1.0@orion_workers/gems/railties-4.0.3/lib/rails/commands.rb:62:in ''
from bin/rails:4:in 'require'
from bin/rails:4:in '

' `
```