Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
public
views
.gitignore
Gemfile
Gemfile.lock
Procfile
README.md
Rakefile
app.rb
config.ru
env.rb
start-development.sh

README.md

Before you start

Move the web folder out of the DinoDeals folder and execute the following commands

  • git init

You should also download and install the Heroku Toolbelt before proceeding - https://toolbelt.heroku.com/

Install

  • heroku create
  • bundle install

Take node of the url generated by Heroku you will use this as the baseURL when you configure the DinoDeals App

Setup Config Variables

  • heroku config:add geoloqi_client_id=YOUR_GEOLOQI_CLIENT_ID
  • heroku config:add geoloqi_client_secret=YOUR_GEOLOQI_CLIENT_SECRET
  • heroku config:add geoloqi_application_token=YOUR_GEOLOQI_APPLICATION_ACCESS_TOKEN
  • heroku config:add sqoot_affiliate_token=YOUR_SQOOT_AFFILIATE_TOKEN

Squoot is a paid service with a 30 day free trial. If you do not want to pay for Sqoot use Geoloqis affiliate token 3c5gx9

Launch on Heroku

  • git add .
  • git commit -am"Deploy DinoDeals Server"
  • git push heroku master
  • heroku scale web=1
  • heroku restart

Import Deals

Create the categories that deals will be sorted into

bundle exec rake categories:create

At this point you should install a build of the DinoDeals app on your phone to start generating location data. Once the Geoloqi API has location data in it you can run the import task. The task relies on locations of users to import only deals that are near your users.

bundle exec rake deals:import

Setup the Heroku Scheduler Addon

  • heroku addons:add scheduler:standard
  • heroku addons:open scheduler

In the scheduler add the rake deals:import task. You can run it daily or hourly. The Heroku Scheduler addon will bill your for the hours you use running the import script. You will need to verify your credit card with Heroku to use the scheduler.

You can also run the import script with

  • bundle exec rake deals:import