The only one DATEV Export that doesn't suck
The app is build with Rails 3.2.1 on Ruby 1.9.3 and a mysql & postgres backend. It uses oAuth2 and has a canvas integration, so a user can use it inside SalesKing.
-
Register a new app to get an app-id & secret in your SalesKing account. Assuming the app runs at localhost:3000 set the following:
- Name:
- URL: http://localhost:3000/
- CANVAS SLUG: a unique app-slug
- CANVAS URL: http://localhost:3000/login (receives a POST when a user opens the app in salesking.eu/app/CANVAS-SLUG iframe)
-
Edit salesking_app.yml
- Set app ID and SECRET to the values from the registered app above
- Set CANVAS_SLUG to the value from above
- Check SK_URL pointing to our development instance by default https://*.dev.salesking.eu
-
Edit database.yml
bundle install bundle exec rake db:migrate bundle exec rails s
-
Browse to https://YOUR-SUB-DOMAIN.dev.salesking.eu/app/CANVAS-SLUG or click on the canvas slug inside the app-center
The app is deployed by us on Heroku and you can do it too. The only problem to be solved is the creation of the salesking_app.yml keeping the app key & secret. Instead of using Heroku's env_vars you should use a separate local git branch where you add the ignored salesking_app.yml file:
# create a new branch
git checkout production
[create salesking_app.yml, remove from .gitignore and commit]
git merge master
git push heroku production:master
# change back to master branch for normal edits .. DON'T merge production into master
git checkout master
DON'T FORGETT: never push production to your public branch, if you do you need to setup NEW app credentials
Run specs with
bundle exec rake spec
Test coverage report is created by simpleCov and available after running the specs
Copyright (c) 2012 Jan Kus, released under the MIT license