No description
Find a file
Blade Barringer 35b92f13a3 Webhook improvements (#7879)
* refactor: Move translate test utility to helpers directory

* Add kind property to webhooks

* feat: Add options to create webhook route

* refactor: Move webhook ops into single file

* refactor: Create webhook objects for specific webhook behavior

* chore(tests): Add default sleep helper value of 1 second

* feat(api): Add method for groups to send out webhook

* feat(api): Add taskCreated webhook task creation

* feat(api): Send chat webhooks after a chat is sent

* refactor: Move webhook routes to own controller

* lint: Correct linting errors

* fix(api): Correct taskCreated webhook method

* fix(api): Fix webhook logging to only log when there is an error

* fix: Update groupChatRecieved webhook creation

* chore: Add integration tests for webhooks

* fix: Set webhook creation response to 201

* fix: Correct how task scored webhook data is sent

* Revert group chat recieved webhook to only support one group

* Remove quest activity option for webhooks

* feat: Send webhook for each task created

* feat: Allow webhooks without a type to default to taskScored

* feat: Add logic for adding ids to webhook

* feat: optimize webhook url check by shortcircuiting if no url is passed

* refactor: Use full name for webhook variable

* feat: Add missing params to client webhook

* lint: Add missing semicolon

* chore(tests): Fix inccorect webhook tests

* chore: Add migration to update task scored webhooks

* feat: Allow default value of webhook add route to be enabled

* chore: Update webhook documentation

* chore: Remove special handling for v2

* refactor: adjust addComputedStatsToJSONObject to work for webhooks

* refactor: combine taskScored and taskActivity webhooks

* feat(api): Add task activity to task update and delete routes

* chore: Change references to taskScored to taskActivity

* fix: Correct stats object being passed in for transform

* chore: Remove extra line break

* fix: Pass in the language to use for the translations

* refactor(api): Move webhooks from user.preferences.webhooks to user.webhooks

* chore: Update migration to set webhook array

* lint: Correct brace spacing

* chore: convert webhook lib to use user.webhooks

* refactor(api): Consolidate filters

* chore: clarify migration instructions

* fix(test): Correct user creation in user anonymized tests

* chore: add test that webhooks cannot be updated via PUT /user

* refactor: Simplify default webhook id value

* refactor(client): Push newly created webhook instead of doing a sync

* chore(test): Add test file for webhook model

* refactor: Remove webhook validation

* refactor: Remove need for watch on webhooks

* refactor(client): Update webhooks object without syncing

* chore: update webhook documentation

* Fix migrations issues

* chore: remove v2 test helper

* fix(api): Provide webhook type in task scored webhook

* fix(client): Fix webhook deletion appearing to delete all webhooks

* feat(api): add optional label field for webhooks

* feat: provide empty string as default for webhook label

* chore: Update webhook migration

* chore: update webhook migration name
2016-10-02 09:16:22 -05:00
.ebextensions fix(EB): consolidate extensions (#7748) 2016-07-01 19:40:32 -05:00
.github fix: correct link in issue template 2016-05-29 07:34:59 -05:00
database_reports Merge remote-tracking branch 'remotes/Alys/eyewear1' into develop 2014-11-29 08:33:28 -07:00
debug-scripts feat: Add debug scripts to easilly get all pets/mounts/gear 2016-03-15 12:47:24 -05:00
gulp chore: add apidoc watch command 2016-09-30 11:27:08 -05:00
keys/google change Google iap-live for Android mobile app gem purchases, at negue's request 2015-12-03 06:22:59 +10:00
migrations Webhook improvements (#7879) 2016-10-02 09:16:22 -05:00
scripts API v3 [WIP] (#6144) 2016-05-23 13:58:31 +02:00
test Webhook improvements (#7879) 2016-10-02 09:16:22 -05:00
vagrant_scripts Change install_node.sh to install npm 3 instead. Default RAM for vagrant box is now 4 GB. (#7478) 2016-05-28 11:53:39 +10:00
webpack Vue Store (#8071) 2016-09-29 13:32:36 +02:00
website Webhook improvements (#7879) 2016-10-02 09:16:22 -05:00
.babelrc API v3 [WIP] (#6144) 2016-05-23 13:58:31 +02:00
.bowerrc rename website/client to website/client-old 2016-09-14 15:06:32 +02:00
.buildpacks refactor(tasks) improve UI consistency 2014-11-27 10:32:57 +00:00
.codeclimate.yml Only list javascript in .codeclimate.yml 2015-08-02 17:54:05 +02:00
.editorconfig Create .editorconfig 2016-09-07 08:44:57 -05:00
.eslintignore Vue Store (#8071) 2016-09-29 13:32:36 +02:00
.eslintrc Vue Project Setup (#8018) 2016-09-18 21:51:20 +02:00
.gitignore Vue Store (#8071) 2016-09-29 13:32:36 +02:00
.nodemonignore Vue Project Setup (#8018) 2016-09-18 21:51:20 +02:00
.nvmrc chore: Upgrade node 2016-03-05 09:17:31 -06:00
.travis.yml API v3 [WIP] (#6144) 2016-05-23 13:58:31 +02:00
apidoc.json chore: Remove versioning from apidoc 2016-05-25 11:11:39 -05:00
bower.json pusher: remove 1 tab limit, better disconnection 2016-09-27 15:25:07 +02:00
config.json.example Add Google Signin (#7969) 2016-09-28 12:11:10 +02:00
docker-compose.dev.yml docker maintenance 2016-01-11 05:04:22 +00:00
docker-compose.yml docker maintenance 2016-01-11 05:04:22 +00:00
Dockerfile Separate call to upgrade npm so that it occurs before any other installs 2016-06-17 00:53:08 -06:00
Gruntfile.js chore: fix sprite paths in prod (#8048) 2016-09-21 09:20:48 -05:00
gulpfile.js Add semantic-ui (#8076) 2016-09-27 09:34:45 +02:00
LICENSE Fix grammar mistakes in license file 2016-06-21 06:42:20 -05:00
npm-shrinkwrap.json 3.44.5 2016-09-30 13:01:36 -05:00
package.json 3.44.5 2016-09-30 13:01:36 -05:00
Procfile API v3 [WIP] (#6144) 2016-05-23 13:58:31 +02:00
README.md feat: Add debug scripts to easilly get all pets/mounts/gear 2016-03-15 12:47:24 -05:00
VAGRANT.md HabitRPG -> Habitica text changes 2015-07-31 18:05:10 +10:00
Vagrantfile.example Change install_node.sh to install npm 3 instead. Default RAM for vagrant box is now 4 GB. (#7478) 2016-05-28 11:53:39 +10:00

Habitica Build Status Code Climate Coverage Status Bountysource

Habitica is an open source habit building program which treats your life like a Role Playing Game. Level up as you succeed, lose HP as you fail, earn money to buy weapons and armor.

We need more programmers! Your assistance will be greatly appreciated.

For an introduction to the technologies used and how the software is organized, refer to Contributing to Habitica - "Coders (Web & Mobile)" section.

To set up a local install of Habitica for development and testing, see Setting up Habitica Locally, which contains instructions for Windows, *nix / Mac OS, and Vagrant.

Then read Guidance for Blacksmiths for additional instructions and useful tips.

Debug Scripts

In the ./debug-scripts/ folder, there are a few files. Here's a sample:

grant-all-equipment.js
grant-all-mounts.js
grant-all-pets.js

You can run them by doing:

node debug-scripts/name-of-script.js

If there are more arguments required to make the script work, it will print out the usage and an explanation of what the script does.