This is an example rails application that uses the Groopbuyr Gem. The application provides rake tasks to pull new/updated deals from Groopbuy.com and pull the cities that Groopbuy.com has deals for.
This rails applications allows you to determine if you are interested in seeing deals or not interested and uses this information to train the app to determine if new deals would be interesting to you or not. The way I was using it was to identify health related deals.
This was built to be internal application that is called by other web apps to pull in deals to enhance page content through API calls.
-
download and extract
-
Setup database.yml, app_config.yml and gmaps_api_key.yml by using the “.sample” files provided in config/
-
rake db:setup
-
rake cities:fetch
-
rake deals:fetch
-
start the web server:
script/server
(run with –help for options) -
Go to localhost:3000/
-
Mark deals that you are interested in.
-
After future runs of
rake deals:fetch
, then runrake deals:relevance
.
-
will_paginate
-
geokit
-
chronic
-
classifier
-
groopbuyr
-
rake cities:fetch
-
rake deals:fetch
-
rake deals:relevance
-
Copy config/app_config.yml.sample to config/app_config.yml
-
Open config/app_config.yml
-
Then modify report_recipient, report_sender, smtp_settings and domain for each environment as necessary.
-
localhost:3000/cities/hou/random_deal.[xml|json] => This will return a single random active deal from the city code (hou).
-
localhost:3000/deals/near.[xml|json]?lat=&lng= => This will return a single random active deal near a given latitude and longitude.
Released under the MIT license.
My name is Dave Elkins. You contact me at [email protected] or check out my web site at daveelkins.com/.