sbusso/serp — pull request #1 by swombat (2013-01-07 15:23:54+00:00)
Title: Search engine url setting

This enables people to use localised search engine URLs, e.g. http://www.google.co.uk, instead of just http://www.google.com.

This is useful because google.com and google.co.uk give vastly different results. For example:

Loading development environment (Rails 3.2.9)
1.9.2-p320 :001 > Serp.rank("R&D Tax Credits", 'en', 2)
=> ["hmrc.gov.uk", "en.wikipedia.org", "revenue.ie", "journalofaccountancy.com", "ato.gov.au", "ausindustry.gov.au", "irs.gov", "cra-arc.gc.ca", "louisianaeconomicdevelopment.com", "scottish-enterprise.com", "gov.mb.ca", "positivelyminnesota.com", "accountingtoday.com", "granttree.co.uk", "businessweek.com", "choosemaryland.org", "revenue.ie", "azcommerce.com", "equinoxinnovations.com", "leyton.com"]
1.9.2-p320 :002 > Serp.search_engine = "http://www.google.co.uk"
=> "http://www.google.co.uk"
1.9.2-p320 :003 > Serp.rank("R&D Tax Credits", 'en', 2)
=> ["hmrc.gov.uk", "out-law.com", "scottish-enterprise.com", "granttree.co.uk", "research-and-development-tax-credits.com", "equinoxinnovations.com", "leyton.com", "smeweb.com", "hm-treasury.gov.uk", "startups.co.uk", "rdtaxcredit.co.uk", "ec1capital.com", "rdtaxclaims.co.uk", "jumpstartuk.co.uk", "architecture.com", "managementtoday.co.uk", "hmrc.gov.uk", "bradshawgrice.co.uk", "telegraph.co.uk", "pwc.co.uk"]

Hope this helps someone!