- Responsive web application built to look out single/combined deals in New Zealand.
- Allows importing deals/events from BookMe and EventFinda websites.
- Events filtered by Price and Keywords ("tours", "hotels", "food", "drinks", "beaches" and "fun").
- Results returned from API cached within the application. Expiration time: 1 hour.
Clone repository:
git clone git@github.com:juanroldan1989/my-budget-app.git
Install gems:
bundle install
Setup DB:
rake db:create db:migrate db:test:prepare
1.1 Import deals from BookMe.co.nz:
Scrapping events is the only way, there's no API available:
rake get:deals:from:book_me
1.2 Import deals from EventFinda.co.nz:
-
Get a developer account (free) first: http://www.eventfinda.co.nz/api/v2/index
-
Setup credentials into
config/application.yml
file:
cp config/application.sample.yml config/application.yml
Run import task (implemented with event_finda_ruby gem):
rake get:deals:from:event_finda
rake deals:set:combined
Validate test suite:
rspec spec
Launch app:
foreman start
Having Redis setup, start looking for events. Stored keys can be checked like this:
$ redis-cli
127.0.0.1:6379> select "0"
OK
127.0.0.1:6379> keys **
1) "/v1/deals/by_price/0/by_price_lower_than/2"
2) "/v1/deals/by_price/0/keywords_search/82"
3) "/v1/deals/by_price/0/by_price_lower_than/3/keywords_search/126"
4) "/v1/deals/by_price/0/by_price_lower_than/2/keywords_search/209"
5) "/v1/deals/by_price/0/keywords_search/75"
6) "/v1/deals/by_price/0/by_price_lower_than/2/keywords_search/75"
7) "/v1/deals/by_price/0/keywords_search/285"
8) "/v1/deals/by_price/0/by_price_lower_than/3/keywords_search/82"
9) "/v1/deals/by_price/0/by_price_lower_than/3/keywords_search/209"
10) "/v1/deals/by_price/0/by_price_lower_than/3"
11) "/v1/deals/by_price/0/by_price_lower_than/3/keywords_search/285"
12) "/v1/deals/by_price/0/keywords_search/158"
13) "/v1/deals/by_price/0/by_price_lower_than/2/keywords_search/285"
14) "/v1/deals/by_price/0/by_price_lower_than/2/keywords_search/82"
15) "/v1/deals/by_price/0/by_price_lower_than/2/keywords_search/158"
16) "/v1/deals/by_price/0/by_price_lower_than/2/keywords_search/126"
17) "/v1/deals/by_price/0"
Heroku's Redis addon displaying stored keys in live app:
- Display deal's locations within Deal page: https://jsfiddle.net/_tomorro/yhrmL5zz/
Questions or problems? Please post them on the issue tracker. You can contribute changes by forking the project and submitting a pull request. You can ensure the tests are passing by running rspec spec
.