Compare commits

...

238 Commits

Author SHA1 Message Date
Sabe Jones
d4e20ee4aa 3.51.0 2016-10-25 21:56:09 +00:00
Sabe Jones
a751a367fc chore(sprites): compile 2016-10-25 21:55:40 +00:00
Sabe Jones
d323be19c6 Mystery Items 2016/10 (#8169)
* feat(content): mystery items 2016-10

* chore(news): Bailey 2016-10-25
Also ends the Enchanted Armoire A/B test.

* fix(armoire): failing tests from A/B conclusion
2016-10-25 16:16:00 -05:00
AccioBooks
be3f61a94b Remove cookies on clearing browser data (#8135)
* remove cookies

* update cookie removal

* Remove + and add link

* Fix tests

* Add condition

* update strings
2016-10-25 19:53:56 +10:00
Alys
f1bb2db73b fix wrong variable name in Polish questDamage string
The translators have been notified that it needs to be fixed in Transifex before the next migration of strings back to GitHub.
2016-10-23 09:54:18 +10:00
Matteo Pagliazzi
a622344d44 3.50.0 2016-10-22 18:12:09 +02:00
Blade Barringer
e279a3550b chore(travis): start API tests earlier 2016-10-22 08:14:10 -05:00
Blade Barringer
70aab3059c fix(client): bump version of ngInfinitScroll
v1.0.0 could not be found in bower registry
2016-10-22 08:14:09 -05:00
Blade Barringer
c264e37182 chore(travis): pend grunt build task
chore(travis): Move test prep to gulpfile
2016-10-22 08:14:07 -05:00
Blade Barringer
b31bc15493 chore(travis): Add grunt-cli pkg 2016-10-22 08:14:06 -05:00
Blade Barringer
ba19c00617 Setup up non-API tests to not need server and mongo running
chore(travis): Build files before running tests

chore(travis): require server for api tests
2016-10-22 08:14:00 -05:00
Blade Barringer
93aa92de7c chore(travis): Split up build tasks 2016-10-20 22:14:37 -05:00
Blade Barringer
d021680945 chore(travis): Remove grunt and mocha install step 2016-10-20 22:05:21 -05:00
Blade Barringer
f9595af8a5 Re-enable armoire tests 2016-10-20 22:04:24 -05:00
Alyssa Batula
d2756278c3 Only unequip Gen 1 pets/mounts when releasing pets/mounts, fixes #5366 (#8119)
* Only unequip Gen 1 pets/mounts when releasing pets/mounts

* Changed mount declaration to match releasePets

* Check if a pet/mount is a drop type instead of checking for its name in the list of pets

* Changed references to pet and mount to petInfo and mountInfo for consistency with releasePets and releaseMounts

* Test that releasePets, releaseMounts, and releaseBoth do not unequip quest pets

* Fixed test names, and tests verify that a pet/mount is/is not a drop pet/mount on release

* Removed unneeded comments
2016-10-20 22:00:15 -05:00
Blade Barringer
2e2dc179c4 chore: pend armoire test 2016-10-20 19:30:22 -05:00
Alys
acf7b811ab fix wrong variable name in French questTaskDamage string
The translators have been notified that it needs to be fixed in Transifex.
2016-10-21 08:24:36 +10:00
Blade Barringer
d5170251c0 fix: remove unneeded Math.random test 2016-10-20 17:11:28 -05:00
Sabe Jones
c9ba9054e3 chore(npm): shrinkwrap 2016-10-20 03:44:13 +00:00
MathWhiz
d4aac1ee4b Documentation - coupon
closes #8109
2016-10-19 21:31:07 -05:00
Blade Barringer
9615a332a5 fix(client): Allow member hp to be clickable
fixes #8016
closes #8155
2016-10-19 21:01:35 -05:00
Blade Barringer
417455e5ef Merge branch 'snyk-community-snyk-community-patch-1' into develop 2016-10-19 17:42:20 -05:00
Blade Barringer
136502a110 chore: update express 2016-10-19 17:41:58 -05:00
Blade Barringer
425887c1e4 chore(i18n): update locales 2016-10-19 17:40:26 -05:00
Sabe Jones
cfa8a5190f 3.49.0 2016-10-19 19:43:47 +00:00
Sabe Jones
df5be81706 chore(sprites): compile 2016-10-19 19:10:39 +00:00
Sabe Jones
08b3491047 Taskwoods Quest Line (#8156)
* feat(content): Gold Quest 2016-10

* chore(news): Bailey
2016-10-19 14:04:34 -05:00
Snyk Community
e73c3147c1 Fix for the ReDOS vulnerability
habitica is currently affected by the high-severity [ReDOS vulnerability](https://snyk.io/vuln/npm:tough-cookie:20160722). 

Vulnerable module: `tough-cookie`
Introduced through: ` request`

This PR fixes the ReDOS vulnerability by upgrading ` request` to version 2.74.0

Check out the [Snyk test report](https://snyk.io/test/github/HabitRPG/habitica) to review other vulnerabilities that affect this repo. 

[Watch the repo](https://snyk.io/add) to 
* get alerts if newly disclosed vulnerabilities affect this repo in the future. 
* generate pull requests with the fixes you want, or let us do the work: when a newly disclosed vulnerability affects you, we'll submit a fix to you right away. 

Stay secure, 
The Snyk team
2016-10-19 17:50:16 +03:00
Alys
a43254000e change Indulgence Armadillo to Indulgent Armadillo
reference for Habitica admins: https://habitica.slack.com/archives/general/p1476655925000002
2016-10-18 17:39:52 +10:00
Blade Barringer
4e3c984baf chore(i18n): update locales 2016-10-17 17:14:59 -05:00
Sabe Jones
c112e923f1 feat(content): Strings October 2016 2016-10-17 20:32:50 +00:00
Blade Barringer
540353f024 fix(client): Correct broken image on "how it works" page 2016-10-17 07:33:02 -05:00
AccioBooks
2b9b5e369e /static/features TLC (#8021)
* Fix grammatical errors / stylistical changes

* Apps and Extentions

* and

* Sections -> Sectors

* Grammatical / Stylistic Changes

* remove extraneous .row

* add breaks in final marketing para

* revert features.jade

* Move period
2016-10-17 07:32:25 -05:00
Thomas Gamble
cb38475765 delete unread messages when a user leaves a group
closes #7955
closes #7965
2016-10-16 22:01:34 -05:00
Kees Cook
8bb92577b0 quest progress reporting whitespace fixes (#8106)
Notifications of other things (HP, GP, etc) have a regular format of
"+/- NUM THING". For example:

  function gp(val, bonus) {
    _notify(_sign(val) + " " + coins(val - bonus), 'gp');
  }

However, the recent quest collection/damage notifications do not. This
attempts to regularize the reporting by adding in the "missing" space.

Signed-off-by: Kees Cook <kees@outflux.net>
2016-10-16 21:16:42 -05:00
Blade Barringer
fb26cbd26d Merge pull request #8110 from Hus274/7814
Removing links to outdated tutorials
2016-10-16 21:02:29 -05:00
Blade Barringer
a0de5cd8f8 Merge pull request #8139 from bcpletcher/develop
Cleaned up some CSS
2016-10-16 20:59:22 -05:00
Blade Barringer
9fe10b1818 Merge pull request #8143 from dumindux/Issue-8115
changed gemCost to include the amount of gems
2016-10-16 20:58:48 -05:00
Dumindu Karunathilaka
d8dd39422a changed gemCost to include the amount of gems 2016-10-15 18:10:22 +05:30
Benjamin Pletcher
3f9b710773 Cleaned up some CSS 2016-10-13 21:51:55 -04:00
Sabe Jones
8a8bab4be1 chore(npm): update shrinkwrap 2016-10-13 23:30:10 +00:00
Sabe Jones
2a0747ed72 3.48.0 2016-10-13 23:23:34 +00:00
Sabe Jones
a5196e94f6 chore(news): Bailey 2016-10-13 2016-10-13 23:04:32 +00:00
Sabe Jones
009ab26711 Add special spells to Seasonal Shop API (#8138)
* WIP(shops): add spells to Seasonal API

* refactor(shops): remove superfluous if

* feat(shops): handle spell purchasing

* fix(test): proper required fields check
Also corrects a linting error.

* refactor(shops): use constants
2016-10-13 17:53:02 -05:00
Blade Barringer
3fabf3391f chore(docs): Remove uneeded links in data export docs 2016-10-12 22:43:23 -05:00
Blade Barringer
8020990264 chore(i18n): update locales 2016-10-12 20:28:32 -05:00
Blade Barringer
a2cfeafc02 fix(client): ctrl-enter can be used to send chat
fixes #8122
2016-10-12 20:24:48 -05:00
Matteo Pagliazzi
d04a4fb1ed amazon: fix cancelling subscription: use correct path 2016-10-12 19:33:14 +02:00
Matteo Pagliazzi
aeb86db306 3.47.2 2016-10-12 18:45:00 +02:00
Matteo Pagliazzi
49960c0e32 amazon: fix cancelling subscription 2016-10-12 18:44:06 +02:00
Blade Barringer
932cb5cf6a 3.47.1 2016-10-12 08:07:47 -05:00
MathWhiz
74d6e77504 chore(docs): refine dataexport docs
closes #8120
2016-10-12 08:06:54 -05:00
Blade Barringer
8400f1786b Merge pull request #8125 from DrStrangepork/travis-ci
Changed travis-ci URL to https://travis-ci.org/HabitRPG/habitica
2016-10-12 07:37:11 -05:00
Blade Barringer
d7bd5dd9f8 chore(i18n): update locales 2016-10-12 07:36:50 -05:00
Rick Kasten
3288b0de33 Changed travis-ci URL to https://travis-ci.org/HabitRPG/habitica 2016-10-12 04:52:50 -04:00
Phillip Thelen
c025ffbd10 Fix wrong identifier for old android IAP (#8121) 2016-10-12 09:12:58 +02:00
Blade Barringer
afb5b473a3 chore(docs): Add global definitions for param types 2016-10-11 21:35:58 -05:00
Blade Barringer
aeee29f5fa chore(i18n): update locales 2016-10-11 18:04:25 -05:00
Sabe Jones
0cca2a07a2 fix(news): typo 2016-10-11 22:58:10 +00:00
Sabe Jones
55d94c129a 3.47.0 2016-10-11 21:19:41 +00:00
Sabe Jones
358e1aed22 chore(sprites): compile 2016-10-11 21:00:55 +00:00
Sabe Jones
36241f061f chore(news): Bailey 2016-10-11 2016-10-11 20:59:02 +00:00
Matteo Pagliazzi
b6201a3b75 amplitude: only log generic error message 2016-10-11 22:49:54 +02:00
Matteo Pagliazzi
005f74d918 Merge branch 'vIiRuS-iap' into develop 2016-10-11 21:29:52 +02:00
Matteo Pagliazzi
926e188017 fix eslint errors 2016-10-11 21:29:35 +02:00
Matteo Pagliazzi
94da808279 Merge branch 'iap' of https://github.com/vIiRuS/habitrpg into vIiRuS-iap 2016-10-11 21:28:37 +02:00
Phillip Thelen
7568dd52e9 Fix wrong if statements 2016-10-11 20:49:46 +02:00
Phillip Thelen
c6e2b78982 Make requested syntax changes 2016-10-11 20:47:01 +02:00
Matteo Pagliazzi
b6104c3ef3 remove dup dependency 2016-10-11 18:52:50 +02:00
Sabe Jones
56b5c960f0 feat(content): Beetle Pet Quest 2016-10-11 16:40:27 +00:00
Matteo Pagliazzi
528abf77af amazon: directly cancel subscription when already closed by amazon 2016-10-11 15:54:48 +02:00
Blade Barringer
8db6b7c6cb fix(api): Allow x-client to be set in cors middleware (#8117)
* fix(api): Allow x-client to be set in cors middleware

* chore: update cors middlware tests
2016-10-10 17:35:00 -05:00
Sabe Jones
578dee59bd feat(content): pet quest strings 2016-10-10 19:43:24 +00:00
Sabe Jones
d40c923e6e refactor(test): less clunky timestamp conv 2016-10-10 16:02:08 +00:00
Sabe Jones
3c4c64b023 fix(subscriptions): don't reset Gems midmonth 2016-10-10 15:52:33 +00:00
Phillip Thelen
c84d6ba141 fix linter errors 2016-10-10 14:27:51 +02:00
Phillip Thelen
5f3b147d2a refactor IAP handling 2016-10-10 10:07:10 +02:00
Keith Holliday
ff08e8b586 [WIP] Group tasks claim (#8099)
* Added initial group tasks ui

* Changed group compnent directory

* Added group task checklist support

* Added checklist support to ui

* Fixed delete tags route

* Added checklist routes to support new group tasks

* Added assign user tag input

* Added new group members autocomplete directive

* Linked assign ui to api

* Added styles

* Limited tag use

* Fixed line endings

* Updated to new file structure

* Fixed failing task tests

* Updatd with new checklist logic and fixed columns

* Updated add task function

* Added userid check back to tag routes

* Added back routes accidently deleted

* Added locale strings

* Moved common task function to task service

* Removed files from manifest

* Added initial group tasks ui

* Changed group compnent directory

* Added checklist support to ui

* Added assign user tag input

* Added assign user tag input

* Added new group members autocomplete directive

* Added new group members autocomplete directive

* Removed group get tasks until live

* Linked assign ui to api

* Added styles

* Added server code for claiming a task

* ADded group task meta and claim button

* Adjusted styles, added local, and added confirm

* Updated claim with new file structures

* Fixed merge issue

* Removed extra file

* Removed duplicate functions

* Removed extra directive

* Removed dev items
2016-10-09 19:23:34 +02:00
Phillip Thelen
cb2acbfefd add additional IAP price tiers 2016-10-09 15:20:45 +02:00
Travis Husman
b16da35585 chore(cleanup): removing links to outdated tutorials
closes #7814
2016-10-07 17:17:29 -07:00
Sabe Jones
826d7b85d7 Subscriptions Fixes (#8105)
* fix(subscriptions): round up months

* fix(subscriptions): resub improvements
Don't allow negative extraMonths; flatten new Dates to YYYYMMDD

* fix(subscriptions): remove resub Gems exploit
Also standardizes some uses of new Date() to remove potential race condition oddities.

* fix(subscriptions): bump consecutive months...
...even if the user didn't log in then, if subscription has been continuous through that period

* test(subscriptions): cover fix cases
Also refactor: use constant for YYYY-MM format

* refactor(subscriptions): don't stringify moments
2016-10-07 15:08:30 -05:00
Travis
6bcc6a15e2 Hitting enter no longer sends a chat message, instead inserts a new line (#8096)
* changing behavior so hitting enter in a chat box only now inserts a newline instead of submitting the form. closes #8066

* Adding a tooltip message
2016-10-06 21:55:00 -05:00
MathWhiz
b600eceb49 /v3/content documentation
closes #8098
2016-10-06 21:45:37 -05:00
Blade Barringer
b83ef872c9 Merge branch 'JTorr-develop' into develop 2016-10-06 20:54:25 -05:00
Blade Barringer
4ebc2e2175 chore(docs): Adjust invite route docs 2016-10-06 20:54:04 -05:00
Sabe Jones
2f4b8c569a 3.46.2 2016-10-06 23:20:55 +00:00
Sabe Jones
85b5b5a62d chore(event): enable & announce Spooky Sparkles 2016-10-06 22:49:56 +00:00
Julie Torres
e271e57f63 Improve API Docs for Invite to Group, Iss#8087 2016-10-06 14:23:07 -04:00
Blade Barringer
558fb145b5 chore: remove references to debug-scripts 2016-10-04 20:48:36 -05:00
Blade Barringer
fc30456b53 chore: remove unused debug scripts 2016-10-04 20:38:40 -05:00
Sabe Jones
68b2d19b04 3.46.1 2016-10-04 23:32:02 +00:00
Blade Barringer
6d33acccf4 fix(api) Allow revoked chat ussers to post in private guilds 2016-10-04 17:49:19 -05:00
Sabe Jones
acee4bad80 fix(sprites): add new spritesheet 2016-10-04 17:04:09 +00:00
Sabe Jones
30fe5088b8 3.46.0 2016-10-04 15:55:41 +00:00
Sabe Jones
69602f93e9 chore(sprites): compile 2016-10-04 15:54:55 +00:00
Sabe Jones
0109aa4250 feat(content): Armoire and BGs data (#8095) 2016-10-04 09:57:28 -05:00
Blade Barringer
2dc0958678 chore(docs): Define resource not found errors and permissions 2016-10-03 21:35:53 -05:00
Blade Barringer
52f4e5f37d chore(docs): Update webhook documentation 2016-10-03 17:20:11 -05:00
Blade Barringer
c014da297c chore(docs): remove unneeded apiVersion param 2016-10-03 17:11:59 -05:00
Keith Holliday
285041cdee Group tasks ui picked (#7996)
* Added initial group tasks ui

* Changed group compnent directory

* Added group task checklist support

* Added checklist support to ui

* Fixed delete tags route

* Added checklist routes to support new group tasks

* Added assign user tag input

* Added new group members autocomplete directive

* Linked assign ui to api

* Added styles

* Limited tag use

* Fixed line endings

* Updated to new file structure

* Fixed failing task tests

* Updatd with new checklist logic and fixed columns

* Added purchased info to group and prevented non purchased group from seeing new group tasks

* Updated add task function

* Added userid check back to tag routes

* Marked tag tests as pending

* Added comments to pending tests

* Added back routes accidently deleted

* Added locale strings

* Other clarity fixes

* Moved common task function to task service

* Removed files from manifest

* Fixed naming collision and remove logic

* Removed group get tasks until live

* Fixed test to check update task. Removed extra removeTask call. Synced updated checklists. Added purchased to noset

* Fixed delete group task
2016-10-03 22:12:20 +02:00
Sabe Jones
6a82206f81 feat(content): Armoire and BG sprites 2016-10-03 19:23:05 +00:00
Blade Barringer
8b6052a3ca fix(api): Prevent webhooks from having duplicate ids 2016-10-03 08:13:33 -05:00
Alys
04fd907a45 remove incorrect space from an Indonesian locales variable
The mis-formatting of the variable was causing an error when when a user tried to use the "forgot password" feature.

The Linguists have been informed of the need to fix the string in Transifex.
2016-10-03 07:56:30 +10:00
Blade Barringer
70343079f1 Merge branch 'develop' of github.com:HabitRPG/habitrpg into develop 2016-10-02 12:59:09 -05:00
Sabe Jones
df952eece5 chore(news): Take This Bailey 2016-10-02 16:03:50 +00:00
Blade Barringer
e3a619c7ff 3.45.0 2016-10-02 09:53:54 -05:00
Sabe Jones
23f531372b chore(event): Sept-Oct Take This migration 2016-10-02 14:38:16 +00:00
Blade Barringer
97b15006fd chore: adjust webhook migration to sort webhooks properly 2016-10-02 09:31:28 -05:00
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
Alys
556a7e5229 add new loading screen tip for The Bulletin Board guild, as discusssed in Aspiring Socialites 2016-10-02 16:23:17 +10:00
Alys
378625b4af clarify and correct instructions for changing login name and profile name 2016-10-02 16:00:22 +10:00
Blade Barringer
ee15e29ba4 3.44.5 2016-09-30 13:01:36 -05:00
Dumindu Buddhika
ed880a665a added balance to analytics (#8086)
* added balance to analytics

* removed if check
2016-09-30 11:52:14 -05:00
Blade Barringer
3c7f71d214 chore(i18n): update locales 2016-09-30 11:42:34 -05:00
Blade Barringer
edac06b0d1 chore(docs): Update group invite docs 2016-09-30 11:27:08 -05:00
Blade Barringer
24562f8d60 refactor: move total invitation errors to group invite validation method 2016-09-30 11:27:08 -05:00
Blade Barringer
97840ed732 chore: add apidoc watch command 2016-09-30 11:27:08 -05:00
Blade Barringer
76499412ed refactor(api): Move invitation validation to group static method 2016-09-30 11:27:07 -05:00
Julie Torres
9b10f348cc Prevent submission of blank invitation, fixes #7807 (#8080) 2016-09-30 11:25:57 -05:00
Blade Barringer
17b0329c43 chore(i18n): update locales 2016-09-30 08:54:34 -05:00
Blade Barringer
cda84a6d68 chore: move randomVal test to correct folder 2016-09-30 08:39:30 -05:00
Blade Barringer
306505ebab fix(api,client): Pass in predictable random to revive randomVal calls
closes #8085
2016-09-30 08:39:30 -05:00
Blade Barringer
2476cdd873 chore: Add test shells for revive 2016-09-30 08:16:04 -05:00
Blade Barringer
8465dd69be chore: Send author's email when sending flag notification to slack 2016-09-30 07:43:15 -05:00
Matteo Pagliazzi
461e7445c2 remove old server_side tests 2016-09-30 12:33:20 +02:00
Matteo Pagliazzi
24df8d8f2f pusher: sync user when reconnecting 2016-09-29 23:30:11 +02:00
Matteo Pagliazzi
2bca92b4d5 3.44.4 2016-09-29 23:22:30 +02:00
Matteo Pagliazzi
c3843cae80 client: fix bug that prevented drop notifications from showing up 2016-09-29 23:19:46 +02:00
Sabe Jones
816e4a2f19 3.44.3 2016-09-29 18:12:31 +00:00
Sabe Jones
d0d4927e59 fix(login): uncomment Google auth 2016-09-29 18:11:47 +00:00
Sabe Jones
023ff5789d 3.44.2 2016-09-29 17:13:16 +00:00
Blade Barringer
cc9be6f4a1 chore(i18n): update locales 2016-09-29 11:53:29 -05:00
Sabe Jones
145bcb6f7c 3.44.1 2016-09-29 16:46:26 +00:00
Sabe Jones
d7db599f88 chore(npm): update shrinkwrap 2016-09-29 16:22:44 +00:00
Sabe Jones
ca935670f7 chore(event): GaymerX armor & news 2016-09-29 16:16:43 +00:00
AccioBooks
c2eb113672 Make Wikia Links Translatable (#7036)
* Wikia Links

* Update contrib.json (Added comma)

* Implement @Alys's Suggestions

* conLearnLink -> conLearnURL

* add link to plans.jade

* Appended "URL" to locale strings with URLs

* Add 's'
2016-09-29 21:57:44 +10:00
Matteo Pagliazzi
257e932bc3 Vue Store (#8071)
* vue: use our own store in place of vuex

* vue store: add getters, watcher and use internal vue instance

* vue store: better state getter and credits to Vuex

* vue store: $watch -> watch

* vuex store: pass store to getters and fix typos

* add comments to store, start writing tests

* fix unit tests and add missing ones

* cleanup components, add less folder, fetch tassks

* use Vuex helpers

* pin vuex version

* move semantic-ui theme to assets/less, keep website/build empty but in git

* import helpers from vuex
2016-09-29 13:32:36 +02:00
Sabe Jones
50e2731811 chore(assets): remove unused promos 2016-09-28 18:47:04 +00:00
Matteo Pagliazzi
d67b9e5688 do not send welcome email if user already exists 2016-09-28 19:23:07 +02:00
Blade Barringer
bfc7b9d3e8 fix(client): allow admins to open flag modal regardless of flag status
fixes #8078
2016-09-28 08:16:06 -05:00
Blade Barringer
eb0e234afa chore(i18n): update locales 2016-09-28 07:44:30 -05:00
Matteo Pagliazzi
177f78cbb0 3.44.0 2016-09-28 12:49:30 +02:00
Phillip Thelen
e3b484b29a Add Google Signin (#7969)
* Start adding google login

* fix local js issue

* implement syntax suggestions

* fix delete social tests

* Add service for authentication alerts

* fix social login tests

* make suggested google sign in changes

* fix accidentally deleted code

* refactor social network sign in

* fix incorrect find

* implement suggested google sign in changes

* fix(tests): Inject fake Auth module for auth controller

* fix(test): prevent social service from causing page reload

* fix loading user info

* Use lodash's implimentation of find for IE compatibility

* chore: increase test coverage around deletion route

* chore: clean up social auth test

* chore: Fix social login tests

* remove profile from login scope

* fix(api): Allow social accounts to deregister as user has auth backup

* temporarily disable google login button
2016-09-28 12:11:10 +02:00
Sabe Jones
941000d737 3.43.2 2016-09-28 03:12:35 +00:00
Sabe Jones
63ce7c6034 chore(news): misc Bailey 2016-09-28 02:40:24 +00:00
Sabe Jones
921f9a65a3 feat(content): BG and Armoire strings 201610 2016-09-27 21:15:54 +00:00
Sabe Jones
d6bf30eff8 3.43.1 2016-09-27 14:43:34 +00:00
Matteo Pagliazzi
faed0dff20 pusher: remove 1 tab limit, better disconnection 2016-09-27 15:25:07 +02:00
Matteo Pagliazzi
7bb2f4a3fa fix semantic-ui site path 2016-09-27 10:09:46 +02:00
Matteo Pagliazzi
e3bcea4077 Add semantic-ui (#8076)
* client: add semantic-ui

* add README, disable google fonts

* karma: limit coverage to .vue and .js files

* add missing deps

* semantic-ui in assets folder
2016-09-27 09:34:45 +02:00
Sabe Jones
51ffe2c8c2 A/B Testing, Round 2 (#8077)
* feat(analytics): A/B test 2016-09-26

* feat(tutorial): A/B variant text
2016-09-26 17:10:43 -05:00
Blade Barringer
efc0469bef fix(docs): correct email route url in api docs 2016-09-26 14:56:53 -05:00
Sabe Jones
bda0617a23 chore(npm): update shrinkwrap 2016-09-26 17:32:33 +00:00
Blade Barringer
913cb16638 refactor: move randomVal to a lib 2016-09-26 11:55:07 -05:00
Blade Barringer
331993c1df refactor: remove seeding from randomVal 2016-09-26 11:55:07 -05:00
Blade Barringer
136e2de125 refactor: adjust randomDrop to use wrapped random function 2016-09-26 11:55:07 -05:00
Blade Barringer
966a50431f refactor: Move user argument to options in randomVal function 2016-09-26 11:55:07 -05:00
Blade Barringer
4df1601718 fix(api): Armoire actually works randomly 2016-09-26 11:55:07 -05:00
Thomas Gamble
4d5b6992be drops are randomly selected, not based on user values fixes #7929 2016-09-26 11:55:07 -05:00
Tom Gamble
b54441a637 Shows quest progress notification when completing task #7922 (#7951) 2016-09-23 20:41:31 -05:00
Matteo Pagliazzi
bccdf4e989 client: load user based on localStorage (only for testing) (#8055) 2016-09-23 22:39:06 +02:00
Matteo Pagliazzi
633da7ff73 Delete App.vue 2016-09-23 22:18:13 +02:00
Matteo Pagliazzi
d3371e323e Vuex Structure (#8054)
* wip: vuex structure

* add missing files

* client: do not fail dev build on eslint error

* eslint does not block compilation, mount app when data is ready

* eslintrc.js -> eslintrc
2016-09-23 19:49:11 +02:00
Sabe Jones
5480157977 fix(shops): 2h weapon pricing 2016-09-23 15:43:45 +00:00
Blade Barringer
c5888e3d21 fix(client): Allow backgrounds to be changed 2016-09-23 07:04:11 -05:00
Blade Barringer
2ca185474f fix(client): Advanced options not using preference when creating task
closes #8033
2016-09-22 21:41:42 -05:00
Kaitlin Hipkin
5f0c1687b5 Remove unused v2 code from /website/common/script (#8034)
* remove apiv2 behavior from ops

* remove apiv2 behavior from fns
2016-09-22 21:23:46 -05:00
Sabe Jones
8f9ed6e377 3.43.0 2016-09-22 20:02:48 +00:00
Blade Barringer
1a38546721 chore(i18n): update locales 2016-09-22 13:20:45 -05:00
Sabe Jones
359d9f8d3a fix(analytics): send user on social reg 2016-09-22 18:14:02 +00:00
Sabe Jones
ca97732f21 Cows and Ghosts (but no cow ghosts) (#8052)
* feat(content): Mystery Items and Ghost Potions

* fix(news): better cow position

* fix(test): update for season
2016-09-22 13:04:15 -05:00
Sabe Jones
e820b55080 fix(shops): open Seasonal Shop in API 2016-09-22 17:02:21 +00:00
Sabe Jones
3d2d01f647 chore(npm): update shrinkwrap 2016-09-22 16:25:45 +00:00
Matteo Pagliazzi
b907590bf2 rebuild npm-shrinkwrap 2016-09-22 17:54:40 +02:00
mleko
ec01388b5a Fix broken link (#8051)
* Fix broken link

* Update message
2016-09-22 17:24:21 +10:00
Blade Barringer
aff475b9c8 chore(i18n): update locales 2016-09-21 19:17:36 -05:00
Sabe Jones
476e06ab8b feat(content): Ghost Hatching Potion string 2016-09-21 19:19:18 +00:00
Sabe Jones
82b905514f feat(content): Subscriber Strings 201609 2016-09-21 19:08:41 +00:00
Sabe Jones
7f1e27f6e4 3.42.1 2016-09-21 14:55:05 +00:00
Matteo Pagliazzi
f5315a4f92 typo, correct prod check in build manifest 2016-09-21 16:33:38 +02:00
Blade Barringer
c244c3e797 chore(i18n): update locales 2016-09-21 09:27:13 -05:00
Blade Barringer
0102648f8a chore: fix sprite paths in prod (#8048) 2016-09-21 09:20:48 -05:00
Matteo Pagliazzi
ed4d955e3e remove console.log 2016-09-21 15:19:36 +02:00
Matteo Pagliazzi
6792e75c7f add dist-client to .eslintignore 2016-09-21 14:57:33 +02:00
Matteo Pagliazzi
62f004222b add .gitkeep to website/static so the build does not fail 2016-09-21 14:49:30 +02:00
Matteo Pagliazzi
ed1f0a04ae client: proxy requests to real api 2016-09-21 14:43:50 +02:00
Matteo Pagliazzi
bde01c30ad Merge branch 'develop' of github.com:HabitRPG/habitrpg into develop 2016-09-21 14:37:57 +02:00
Matteo Pagliazzi
12275cc174 build new client in production 2016-09-21 14:37:44 +02:00
Matteo Pagliazzi
f751ccacc5 expose new client at /new-app, can be enabled in prod setting a flag 2016-09-21 13:43:39 +02:00
Sabe Jones
d371297482 fix(migration): remove connect string 2016-09-21 03:20:28 +00:00
Sabe Jones
00b75b23bb chore(sprites): remove Stressbeast 2016-09-21 03:17:02 +00:00
Sabe Jones
589b2aaf3a 3.42.0 2016-09-21 01:34:33 +00:00
Sabe Jones
676d9aedf1 Begin Fall Festival 2016 (#8043)
* feat(event): begin Fall Festival 2016

* feat(event): Seasonal Shop Fall 2016

* fix(test): season specific food

* chore(news): add Bailey

* fix(season): correct Sorceress & timetrav
2016-09-20 20:11:32 -05:00
Sabe Jones
67febde1cb fix(analytics): send user on reg (#8044)
Also fixes an issue that could prevent item name data from being correctly sent to Amplitude.
2016-09-20 20:11:12 -05:00
Blade Barringer
019560df64 chore(i18n): update locales 2016-09-20 17:42:17 -05:00
Sabe Jones
8b1dd43e0a feat(event): Seasonal Shop strings Fall 2015 2016-09-20 19:35:26 +00:00
Matteo Pagliazzi
2f626c7875 Vuex (#8041)
* add vuex, cleanup client directory and create example components

* disale sample unit test

* disable import for non existing file

* correct regexp for unit tests, add simple test to avoid error, add babel-polyfill for Vuex

* add line wrongly removed, update regexp
2016-09-20 18:58:02 +02:00
Blade Barringer
381bea1e94 chore(i18n): update locales 2016-09-20 11:49:18 -05:00
Sabe Jones
c12b0890d5 feat(content): Fall 2016 strings 2016-09-20 16:46:24 +00:00
Blade Barringer
5ceb470464 Merge pull request #8031 from Ozzystrasza/challenges_select_all
Fix "All" button to select all guilds in the filter list
2016-09-20 08:08:31 -05:00
Blade Barringer
d5d27355da refactor(client): Only omit complex properties from task update object 2016-09-20 08:00:13 -05:00
Rebecca
190aa2c0e7 Updating a task now sends only data that's actually needed (Fixes #7846) (#8040)
* Updating a task now sends only data that's actually needed (Fixes #7846)

Updating a task with a huge history lead to 'request entity too large' errors since the client attempted to send all data associated with a task, regardless of whether that data could be changed or not. With this change, the post request is now omitting the following fields:

challenge
completed
createdAt
group
history
id
reminders
tags
type
updatedAt
userId

* Changes according to review (use _.omit)
2016-09-20 07:59:49 -05:00
Blade Barringer
fb8ec7677c chore(i18n): update locales 2016-09-20 07:49:20 -05:00
Blade Barringer
c4c70ba1bd fix: Clarify what toRequired string means 2016-09-20 07:46:54 -05:00
Blade Barringer
248fd1d912 chore(docs): Add documentation for valid skill ids 2016-09-19 21:54:02 -05:00
Blade Barringer
5fa76f6aeb feat(api): Add route to export pms as HTML
fixes #7939
closes #7999
2016-09-19 21:32:58 -05:00
Matteo Pagliazzi
f90a31b4be pusher: when disconnecting from tab because of inactivity, do not connect other tab 2016-09-19 16:16:13 +02:00
Blade Barringer
e3b9636c42 refactor(cient): Simplify char resize logic
closes #6836
2016-09-18 21:27:59 -05:00
Lucas Torroba
7f5d070ee6 Fixes issue #6679, which referred to the EXP chart getting cropped. 2016-09-18 21:26:59 -05:00
Alys
28bb543397 specify that Orb of Rebirth does not remove equipment (in Reset advice) 2016-09-19 08:00:42 +10:00
Matteo Pagliazzi
4f3a9802c1 Vue Project Setup (#8018)
* add files for new client side and reorg gulp tasks

* add deps and script for new client

* fix webpack paths so that building works

* fix static assets not copied into prod build

* fix linting

* add eslint deps and re-enable it in webpack

* add most missing deps for client side and split .babelrc for client

* reorganize .eslintignore

* update client tests paths and .gitignore

* uncomment code

* client: move App component

* client: update oaths in App component

* fix client tests and add more deps

* add client side tests to npm test

* fix typo in depencency name

* update more deps

* fix karma.conf.js and upgrade phantomjs

* fix dep and move karma.conf to subdirectory

* update karma.conf.js position in Gruntfile

* try downgrading phantomjs

* Fixup client tests (#8032)

* Use phantom 2

* fix(tests): Fix refresher test

* gitignore translation mock

* Update karma version

* disable e2e tests for new client from build

* write vue templates with pug

* add basic routing

* remove unnecessary Function.bind shim

* remove unused dependency
2016-09-18 21:51:20 +02:00
Blade Barringer
c615af82f8 Merge pull request #8030 from crookedneighbor/switch_serverside_markdown
Switch serverside markdown
2016-09-17 21:04:01 -05:00
Sabe Jones
4468c2ca2f 3.41.4 2016-09-17 03:49:23 +00:00
Sabe Jones
ff53552fd3 chore(news): Bailey 20160916
And compile in Beffymaroo promo sprite
2016-09-17 03:33:02 +00:00
Ozzystrasza
f3f4229e49 use groupsFilter for search.group 2016-09-17 00:23:16 -03:00
Blade Barringer
d782ed5d20 chore: compile sprites 2016-09-16 21:03:28 -05:00
Blade Barringer
31a6e89be9 Update shrinkwrap 2016-09-16 20:51:22 -05:00
Blade Barringer
b3f21421e5 chore: remove unused packages 2016-09-16 20:35:15 -05:00
Blade Barringer
a70b8bc82b Use markdown in faq locales where possible 2016-09-16 20:35:10 -05:00
Blade Barringer
de9644f126 chore: switch out markdown-it for habitica-markdown 2016-09-16 20:35:06 -05:00
Sabe Jones
8b83d8d4e9 fix(sprites): use correct URL in CSS 2016-09-16 22:54:52 +00:00
Sabe Jones
c7fd6701ae 3.41.3 2016-09-16 21:58:00 +00:00
AccioBooks
5d18640215 Pluralization (#8027) 2016-09-16 16:14:23 -05:00
Sabe Jones
bde6b7d6ce chore(contact): revert community manager links (#8028) 2016-09-16 16:09:57 -05:00
Blade Barringer
5393c3b6c0 chore(i18n): update locales 2016-09-16 15:49:15 -05:00
Blade Barringer
84136882d3 fix: Add back in missing translation string
closes #8026
2016-09-16 15:40:34 -05:00
Sabe Jones
86c9bddc09 Handle social auth in A/B testing (#8024)
* fix(AB-testing): handle social auth

* refactor(AB-testing): move to pre save hooks
2016-09-16 19:13:21 +02:00
Blade Barringer
81b7eeeb71 Common reorg (#8025)
* Re-organize common folder

* fix: Correct paths in tests

* fix: move new content to proper folder

* chore: Move audio folder to assets

* Move sprites to sprites assets directory

* Move css sprites to assets directory

* Split out readmes for common code and sprites

* Move images to assets directory

* Move destinatin of shared browserified file

* remove unused file

* move compiled js to client-old

* Fix karma tests

* fix: Correct paths for sprites
2016-09-16 17:18:07 +02:00
Matteo Pagliazzi
d971e673af fix typo 2016-09-16 15:28:57 +02:00
Matteo Pagliazzi
603226a084 make sure Pusher cannot get stuck 2016-09-16 15:12:32 +02:00
Matteo Pagliazzi
a38f524d62 sync user n party chat system message 2016-09-16 14:36:38 +02:00
Matteo Pagliazzi
3b0e6e138a better handling of pusher connection with logging 2016-09-16 13:09:59 +02:00
Blade Barringer
9c0998c29a refactor(client): extract find pet logic into function 2016-09-15 22:02:11 -05:00
Oziris Moreira
4ad50b9d30 Fix Magic Mount Spacing (#8015)
* fix magic mount spacing

* simplify functions

* function hasAPetOfPotion

* var premiumPotion
2016-09-15 22:01:31 -05:00
Matteo Pagliazzi
998037e0a1 update npm-shrinkwrap.json 2016-09-15 23:46:03 +02:00
Oziris Moreira
2539655932 make eyewear purchaseable (#8010) 2016-09-15 07:46:53 -05:00
Matteo Pagliazzi
3d72233d54 fix Gruntfile path to old client tests 2016-09-15 13:05:35 +02:00
Matteo Pagliazzi
ab84e88650 reorganize old client tests 2016-09-15 13:05:23 +02:00
6434 changed files with 48252 additions and 40217 deletions

View File

@@ -1,28 +1,27 @@
# Compiled and vendored files
common/dist/
common/transpiled-babel/
coverage/
database_reports/
website/build/
website/transpiled-babel/
website/common/transpiled-babel/
dist/
dist-client/
# Not linted
migrations/*
# The files in website/client-old/js should be moved out and browserified
website/client-old/
# Temporarilly disabled. These should be removed when the linting errors are fixed
common/script/content/index.js
debug-scripts/*
scripts/*
tasks/*.js
gulpfile.js
Gruntfile.js
newrelic.js
test/api-legacy/**/*
test/common/simulations/**/*
test/content/**/*
test/server_side/**/*
test/spec/**/*
test/client-old/spec/**/*
# Temporarilly disabled. These should be removed when the linting errors are fixed TODO
website/common/script/content/index.js
website/common/browserify.js
test/content/**/*
Gruntfile.js
gulpfile.js
gulp
webpack
test/client/e2e
test/client/unit/index.js
test/client/unit/karma.conf.js

View File

@@ -1,10 +1,10 @@
{
"root": true,
"env": {
"node": true,
},
"extends": [
"habitrpg/server",
"habitrpg/babel"
"habitrpg/es6",
"habitrpg"
],
"globals": {
"Promise": true,
"Set": false
}
}

13
.gitignore vendored
View File

@@ -2,8 +2,10 @@
website/client-old/gen
website/client-old/common
website/client-old/apidoc
website/client-old/js/habitrpg-shared.js*
website/client-old/css/habitrpg-shared.css
website/transpiled-babel/
common/transpiled-babel/
website/common/transpiled-babel/
node_modules
*.swp
.idea*
@@ -12,7 +14,6 @@ npm-debug.log*
lib
website/client-old/bower_components
website/client-old/new-stuff.html
website/build
newrelic_agent.log
.bower-tmp
.bower-registry
@@ -30,9 +31,11 @@ website/client-old/docs
coverage
coverage.html
common/dist/scripts/*
common/dist/sprites/habitrpg-shared.css
test/spec/mocks/translations.js
dist
dist-client
test/client/unit/coverage
test/client/e2e/reports
test/client-old/spec/mocks/translations.js
# Elastic Beanstalk Files
.elasticbeanstalk/*

View File

@@ -6,6 +6,7 @@ website/client-old/**
website/client/**
website/views/**
website/build/**
dist/**
test/**
.git/**
Gruntfile.js

View File

@@ -2,16 +2,21 @@ language: node_js
node_js:
- '4.3.1'
before_install:
- "npm install -g npm@3"
- "npm install -g gulp"
- "sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10"
- "echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list"
- "sudo apt-get update"
- "sudo apt-get install mongodb-org-server"
- npm install -g npm@3
- if [ $REQUIRES_SERVER ]; then sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10; echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list; sudo apt-get update; sudo apt-get install mongodb-org-server; fi
before_script:
- 'npm install -g grunt-cli mocha'
- npm run test:build
- cp config.json.example config.json
- "until nc -z localhost 27017; do echo Waiting for MongoDB; sleep 1; done"
- "export DISPLAY=:99"
- if [ $REQUIRES_SERVER ]; then until nc -z localhost 27017; do echo Waiting for MongoDB; sleep 1; done; export DISPLAY=:99; fi
after_script:
- "./node_modules/.bin/lcov-result-merger 'coverage/**/*.info' | ./node_modules/coveralls/bin/coveralls.js"
- ./node_modules/.bin/lcov-result-merger 'coverage/**/*.info' | ./node_modules/coveralls/bin/coveralls.js
script: npm run $TEST
env:
matrix:
- TEST="lint"
- TEST="test:api-v3" REQUIRES_SERVER=true
- TEST="test:sanity"
- TEST="test:content"
- TEST="test:common"
- TEST="test:karma"
- TEST="client:unit"

View File

@@ -9,10 +9,10 @@ module.exports = function(grunt) {
karma: {
unit: {
configFile: 'karma.conf.js'
configFile: 'test/client-old/spec/karma.conf.js'
},
continuous: {
configFile: 'karma.conf.js',
configFile: 'test/client-old/spec/karma.conf.js',
singleRun: true,
autoWatch: false
}
@@ -28,11 +28,11 @@ module.exports = function(grunt) {
report: 'gzip'
},
files:{
"common/dist/sprites/habitrpg-shared.css": [
"common/dist/sprites/spritesmith*.css",
"common/css/backer.css",
"common/css/Mounts.css",
"common/css/index.css"
"website/client-old/css/habitrpg-shared.css": [
"website/assets/sprites/dist/spritesmith*.css",
"website/assets/sprites/css/backer.css",
"website/assets/sprites/css/Mounts.css",
"website/assets/sprites/css/index.css"
]
}
}
@@ -57,10 +57,10 @@ module.exports = function(grunt) {
files: [
{expand: true, cwd: 'website/client-old/', src: 'favicon.ico', dest: 'website/build/'},
{expand: true, cwd: 'website/client-old/', src: 'favicon_192x192.png', dest: 'website/build/'},
{expand: true, cwd: '', src: 'common/dist/sprites/spritesmith*.png', dest: 'website/build/'},
{expand: true, cwd: '', src: 'common/img/sprites/backer-only/*.gif', dest: 'website/build/'},
{expand: true, cwd: '', src: 'common/img/sprites/npc_ian.gif', dest: 'website/build/'},
{expand: true, cwd: '', src: 'common/img/sprites/quest_*.gif', dest: 'website/build/'},
{expand: true, cwd: 'website/assets/sprites/dist/', src: 'spritesmith*.png', dest: 'website/build/'},
{expand: true, cwd: 'website/assets/sprites/', src: 'backer-only/*.gif', dest: 'website/build/'},
{expand: true, cwd: 'website/assets/sprites/', src: 'npc_ian.gif', dest: 'website/build/'},
{expand: true, cwd: 'website/assets/sprites/', src: 'quest_*.gif', dest: 'website/build/'},
{expand: true, cwd: 'website/client-old/', src: 'bower_components/bootstrap/dist/fonts/*', dest: 'website/build/'}
]
}
@@ -77,10 +77,8 @@ module.exports = function(grunt) {
'website/build/*.css',
'website/build/favicon.ico',
'website/build/favicon_192x192.png',
'website/build/common/dist/sprites/*.png',
'website/build/common/img/sprites/backer-only/*.gif',
'website/build/common/img/sprites/npc_ian.gif',
'website/build/common/img/sprites/quest_*.gif',
'website/build/*.png',
'website/build/*.gif',
'website/build/bower_components/bootstrap/dist/fonts/*'
],
dest: 'website/build/*.css'
@@ -128,15 +126,7 @@ module.exports = function(grunt) {
// Register tasks.
grunt.registerTask('build:prod', ['loadManifestFiles', 'clean:build', 'uglify', 'stylus', 'cssmin', 'copy:build', 'hashres']);
grunt.registerTask('build:dev', ['cssmin', 'stylus']);
grunt.registerTask('build:test', ['test:prepare:translations', 'build:dev']);
grunt.registerTask('test:prepare:translations', function() {
var i18n = require('./website/server/libs/i18n'),
fs = require('fs');
fs.writeFileSync('test/spec/mocks/translations.js',
"if(!window.env) window.env = {};\n" +
"window.env.translations = " + JSON.stringify(i18n.translations['en']) + ';');
});
grunt.registerTask('build:test', ['build:dev']);
// Load tasks
grunt.loadNpmTasks('grunt-contrib-uglify');
@@ -146,6 +136,6 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-hashres');
grunt.loadNpmTasks('grunt-karma');
if (process.env.NODE_ENV !== 'production') grunt.loadNpmTasks('grunt-karma');
};

View File

@@ -1,4 +1,4 @@
Habitica [![Build Status](https://travis-ci.org/HabitRPG/habitrpg.svg?branch=develop)](https://travis-ci.org/HabitRPG/habitrpg) [![Code Climate](https://codeclimate.com/github/HabitRPG/habitrpg.svg)](https://codeclimate.com/github/HabitRPG/habitrpg) [![Coverage Status](https://coveralls.io/repos/HabitRPG/habitrpg/badge.svg?branch=develop)](https://coveralls.io/r/HabitRPG/habitrpg?branch=develop) [![Bountysource](https://api.bountysource.com/badge/tracker?tracker_id=68393)](https://www.bountysource.com/trackers/68393-habitrpg?utm_source=68393&utm_medium=shield&utm_campaign=TRACKER_BADGE)
Habitica [![Build Status](https://travis-ci.org/HabitRPG/habitica.svg?branch=develop)](https://travis-ci.org/HabitRPG/habitica) [![Code Climate](https://codeclimate.com/github/HabitRPG/habitrpg.svg)](https://codeclimate.com/github/HabitRPG/habitrpg) [![Coverage Status](https://coveralls.io/repos/HabitRPG/habitrpg/badge.svg?branch=develop)](https://coveralls.io/r/HabitRPG/habitrpg?branch=develop) [![Bountysource](https://api.bountysource.com/badge/tracker?tracker_id=68393)](https://www.bountysource.com/trackers/68393-habitrpg?utm_source=68393&utm_medium=shield&utm_campaign=TRACKER_BADGE)
===============
[Habitica](https://habitica.com) 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.
@@ -10,21 +10,3 @@ For an introduction to the technologies used and how the software is organized,
To set up a local install of Habitica for development and testing, see [Setting up Habitica Locally](http://habitica.wikia.com/wiki/Setting_up_Habitica_Locally), which contains instructions for Windows, *nix / Mac OS, and Vagrant.
Then read [Guidance for Blacksmiths](http://habitica.wikia.com/wiki/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:
```bash
grant-all-equipment.js
grant-all-mounts.js
grant-all-pets.js
```
You can run them by doing:
```bash
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.

View File

@@ -36,14 +36,15 @@
"jquery-ui": "1.10.3",
"jquery.cookie": "1.4.0",
"js-emoji": "snicker/js-emoji#f25d8a303f",
"ngInfiniteScroll": "1.0.0",
"ngInfiniteScroll": "1.1.0",
"pnotify": "1.3.1",
"sticky": "1.0.3",
"swagger-ui": "wordnik/swagger-ui#v2.0.24",
"smart-app-banner": "78ef9c0679723b25be1a0ae04f7b4aef7cbced4f",
"habitica-markdown": "1.2.2",
"pusher-js-auth": "^2.0.0",
"pusher-websocket-iso": "pusher#^3.1.0"
"pusher-websocket-iso": "pusher#^3.2.0",
"taggle": "^1.11.1"
},
"devDependencies": {
"angular-mocks": "1.3.9"

View File

@@ -1,4 +0,0 @@
{
"extends": "habitrpg/browser"
}

View File

@@ -1,16 +0,0 @@
# Common
Shared resources useful for the multiple Habitica repositories, that way all the repositories remain in-sync with common characteristics. Includes things like:
* Assets - sprites, images, etc
* CSS - especially, esp. sprite-sheet mapping
* Algorithms - level up algorithm, scoring functions, etc
* View helper functions that may come in handy for multiple client MVCs
* Item definitions - weapons, armor, pets
## Compiling spritesheets
Because of some wonkiness with Heroku, the spritesheet compilation is not part of the production build process and must be done manually when new images are added by running:
``` bash
npm run sprites
```

View File

@@ -1,576 +0,0 @@
.2014_Fall_HealerPROMO2 {
background-image: url(spritesmith-largeSprites-0.png);
background-position: -1092px -1529px;
width: 90px;
height: 90px;
}
.2014_Fall_Mage_PROMO9 {
background-image: url(spritesmith-largeSprites-0.png);
background-position: -1513px -808px;
width: 120px;
height: 90px;
}
.2014_Fall_RoguePROMO3 {
background-image: url(spritesmith-largeSprites-0.png);
background-position: -769px -1378px;
width: 105px;
height: 90px;
}
.2014_Fall_Warrior_PROMO {
background-image: url(spritesmith-largeSprites-0.png);
background-position: -1433px -1378px;
width: 90px;
height: 90px;
}
.promo_android {
background-image: url(spritesmith-largeSprites-0.png);
background-position: -954px -151px;
width: 175px;
height: 175px;
}
.promo_backgrounds_armoire_201602 {
background-image: url(spritesmith-largeSprites-0.png);
background-position: -1135px -199px;
width: 141px;
height: 294px;
}
.promo_backgrounds_armoire_201603 {
background-image: url(spritesmith-largeSprites-0.png);
background-position: -1277px -199px;
width: 141px;
height: 294px;
}
.promo_backgrounds_armoire_201604 {
background-image: url(spritesmith-largeSprites-0.png);
background-position: -281px -525px;
width: 140px;
height: 441px;
}
.promo_backgrounds_armoire_201605 {
background-image: url(spritesmith-largeSprites-0.png);
background-position: -452px 0px;
width: 140px;
height: 441px;
}
.promo_backgrounds_armoire_201606 {
background-image: url(spritesmith-largeSprites-0.png);
background-position: -140px -525px;
width: 140px;
height: 447px;
}
.promo_backgrounds_armoire_201607 {
background-image: url(spritesmith-largeSprites-0.png);
background-position: 0px -525px;
width: 139px;
height: 588px;
}
.promo_backgrounds_armoire_201608 {
background-image: url(spritesmith-largeSprites-0.png);
background-position: -593px 0px;
width: 140px;
height: 439px;
}
.promo_backgrounds_armoire_201609 {
background-image: url(spritesmith-largeSprites-0.png);
background-position: -593px -440px;
width: 139px;
height: 438px;
}
.promo_backtoschool {
background-image: url(spritesmith-largeSprites-0.png);
background-position: -151px -1378px;
width: 150px;
height: 150px;
}
.promo_burnout {
background-image: url(spritesmith-largeSprites-0.png);
background-position: -734px -151px;
width: 219px;
height: 240px;
}
.promo_chairs_glasses {
background-image: url(spritesmith-largeSprites-0.png);
background-position: -1634px 0px;
width: 51px;
height: 210px;
}
.promo_classes_fall_2014 {
background-image: url(spritesmith-largeSprites-0.png);
background-position: -734px -684px;
width: 321px;
height: 100px;
}
.promo_classes_fall_2015 {
background-image: url(spritesmith-largeSprites-0.png);
background-position: -1135px -808px;
width: 377px;
height: 99px;
}
.promo_cow {
background-image: url(spritesmith-largeSprites-0.png);
background-position: -452px -442px;
width: 140px;
height: 441px;
}
.promo_dilatoryDistress {
background-image: url(spritesmith-largeSprites-0.png);
background-position: -546px -1529px;
width: 90px;
height: 90px;
}
.promo_egg_mounts {
background-image: url(spritesmith-largeSprites-0.png);
background-position: -1135px -494px;
width: 280px;
height: 147px;
}
.promo_enchanted_armoire {
background-image: url(spritesmith-largeSprites-0.png);
background-position: 0px -1114px;
width: 374px;
height: 76px;
}
.promo_enchanted_armoire_201507 {
background-image: url(spritesmith-largeSprites-0.png);
background-position: -250px -1275px;
width: 217px;
height: 90px;
}
.promo_enchanted_armoire_201508 {
background-image: url(spritesmith-largeSprites-0.png);
background-position: -468px -1275px;
width: 180px;
height: 90px;
}
.promo_enchanted_armoire_201509 {
background-image: url(spritesmith-largeSprites-0.png);
background-position: -728px -1529px;
width: 90px;
height: 90px;
}
.promo_enchanted_armoire_201511 {
background-image: url(spritesmith-largeSprites-0.png);
background-position: -1498px -908px;
width: 122px;
height: 90px;
}
.promo_enchanted_armoire_201601 {
background-image: url(spritesmith-largeSprites-0.png);
background-position: -910px -1529px;
width: 90px;
height: 90px;
}
.promo_floral_potions {
background-image: url(spritesmith-largeSprites-0.png);
background-position: -734px -785px;
width: 105px;
height: 273px;
}
.promo_habitica {
background-image: url(spritesmith-largeSprites-0.png);
background-position: -1419px -199px;
width: 175px;
height: 175px;
}
.promo_habitica_sticker {
background-image: url(spritesmith-largeSprites-0.png);
background-position: 0px -220px;
width: 305px;
height: 304px;
}
.promo_haunted_hair {
background-image: url(spritesmith-largeSprites-0.png);
background-position: -453px -1378px;
width: 100px;
height: 137px;
}
.promo_item_notif {
background-image: url(spritesmith-largeSprites-0.png);
background-position: 0px -1275px;
width: 249px;
height: 102px;
}
.promo_mystery_201405 {
background-image: url(spritesmith-largeSprites-0.png);
background-position: -1001px -1529px;
width: 90px;
height: 90px;
}
.promo_mystery_201406 {
background-image: url(spritesmith-largeSprites-0.png);
background-position: -182px -1529px;
width: 90px;
height: 96px;
}
.promo_mystery_201407 {
background-image: url(spritesmith-largeSprites-0.png);
background-position: -1634px -412px;
width: 42px;
height: 62px;
}
.promo_mystery_201408 {
background-image: url(spritesmith-largeSprites-0.png);
background-position: -1573px -494px;
width: 60px;
height: 71px;
}
.promo_mystery_201409 {
background-image: url(spritesmith-largeSprites-0.png);
background-position: -1183px -1529px;
width: 90px;
height: 90px;
}
.promo_mystery_201410 {
background-image: url(spritesmith-largeSprites-0.png);
background-position: -1060px -573px;
width: 72px;
height: 63px;
}
.promo_mystery_201411 {
background-image: url(spritesmith-largeSprites-0.png);
background-position: -1274px -1529px;
width: 90px;
height: 90px;
}
.promo_mystery_201412 {
background-image: url(spritesmith-largeSprites-0.png);
background-position: -1634px -345px;
width: 42px;
height: 66px;
}
.promo_mystery_201501 {
background-image: url(spritesmith-largeSprites-0.png);
background-position: -1634px -211px;
width: 48px;
height: 63px;
}
.promo_mystery_201502 {
background-image: url(spritesmith-largeSprites-0.png);
background-position: -1365px -1529px;
width: 90px;
height: 90px;
}
.promo_mystery_201503 {
background-image: url(spritesmith-largeSprites-0.png);
background-position: -819px -1529px;
width: 90px;
height: 90px;
}
.promo_mystery_201504 {
background-image: url(spritesmith-largeSprites-0.png);
background-position: -1573px -566px;
width: 60px;
height: 69px;
}
.promo_mystery_201505 {
background-image: url(spritesmith-largeSprites-0.png);
background-position: -637px -1529px;
width: 90px;
height: 90px;
}
.promo_mystery_201506 {
background-image: url(spritesmith-largeSprites-0.png);
background-position: -1634px -275px;
width: 42px;
height: 69px;
}
.promo_mystery_201507 {
background-image: url(spritesmith-largeSprites-0.png);
background-position: 0px -1529px;
width: 90px;
height: 105px;
}
.promo_mystery_201508 {
background-image: url(spritesmith-largeSprites-0.png);
background-position: -1157px -1378px;
width: 93px;
height: 90px;
}
.promo_mystery_201509 {
background-image: url(spritesmith-largeSprites-0.png);
background-position: -364px -1529px;
width: 90px;
height: 90px;
}
.promo_mystery_201510 {
background-image: url(spritesmith-largeSprites-0.png);
background-position: -1063px -1378px;
width: 93px;
height: 90px;
}
.promo_mystery_201511 {
background-image: url(spritesmith-largeSprites-0.png);
background-position: -1524px -1378px;
width: 90px;
height: 90px;
}
.promo_mystery_201512 {
background-image: url(spritesmith-largeSprites-0.png);
background-position: -1565px -96px;
width: 60px;
height: 81px;
}
.promo_mystery_201601 {
background-image: url(spritesmith-largeSprites-0.png);
background-position: -1496px -1011px;
width: 120px;
height: 90px;
}
.promo_mystery_201602 {
background-image: url(spritesmith-largeSprites-0.png);
background-position: -1342px -1378px;
width: 90px;
height: 90px;
}
.promo_mystery_201603 {
background-image: url(spritesmith-largeSprites-0.png);
background-position: -1251px -1378px;
width: 90px;
height: 90px;
}
.promo_mystery_201604 {
background-image: url(spritesmith-largeSprites-0.png);
background-position: -969px -1378px;
width: 93px;
height: 90px;
}
.promo_mystery_201605 {
background-image: url(spritesmith-largeSprites-0.png);
background-position: -455px -1529px;
width: 90px;
height: 90px;
}
.promo_mystery_201606 {
background-image: url(spritesmith-largeSprites-0.png);
background-position: -91px -1529px;
width: 90px;
height: 105px;
}
.promo_mystery_201607 {
background-image: url(spritesmith-largeSprites-0.png);
background-position: -273px -1529px;
width: 90px;
height: 90px;
}
.promo_mystery_201608 {
background-image: url(spritesmith-largeSprites-0.png);
background-position: -875px -1378px;
width: 93px;
height: 90px;
}
.promo_mystery_3014 {
background-image: url(spritesmith-largeSprites-0.png);
background-position: -840px -967px;
width: 217px;
height: 90px;
}
.promo_orca {
background-image: url(spritesmith-largeSprites-0.png);
background-position: -554px -1378px;
width: 105px;
height: 105px;
}
.promo_partyhats {
background-image: url(spritesmith-largeSprites-0.png);
background-position: -954px -327px;
width: 115px;
height: 47px;
}
.promo_pastel_skin {
background-image: url(spritesmith-largeSprites-0.png);
background-position: -331px -1191px;
width: 330px;
height: 83px;
}
.customize-option.promo_pastel_skin {
background-image: url(spritesmith-largeSprites-0.png);
background-position: -356px -1206px;
width: 60px;
height: 60px;
}
.promo_peppermint_flame {
background-image: url(spritesmith-largeSprites-0.png);
background-position: -593px -879px;
width: 140px;
height: 147px;
}
.promo_pet_skins {
background-image: url(spritesmith-largeSprites-0.png);
background-position: -452px -884px;
width: 140px;
height: 147px;
}
.customize-option.promo_pet_skins {
background-image: url(spritesmith-largeSprites-0.png);
background-position: -477px -899px;
width: 60px;
height: 60px;
}
.promo_shimmer_hair {
background-image: url(spritesmith-largeSprites-0.png);
background-position: 0px -1191px;
width: 330px;
height: 83px;
}
.promo_splashyskins {
background-image: url(spritesmith-largeSprites-0.png);
background-position: -1419px -375px;
width: 198px;
height: 91px;
}
.customize-option.promo_splashyskins {
background-image: url(spritesmith-largeSprites-0.png);
background-position: -1444px -390px;
width: 60px;
height: 60px;
}
.promo_spring_classes_2016 {
background-image: url(spritesmith-largeSprites-0.png);
background-position: -1135px -908px;
width: 362px;
height: 102px;
}
.promo_springclasses2014 {
background-image: url(spritesmith-largeSprites-0.png);
background-position: -840px -876px;
width: 288px;
height: 90px;
}
.promo_springclasses2015 {
background-image: url(spritesmith-largeSprites-0.png);
background-position: -840px -785px;
width: 288px;
height: 90px;
}
.promo_staff_spotlight_Lemoness {
background-image: url(spritesmith-largeSprites-0.png);
background-position: -306px -220px;
width: 102px;
height: 146px;
}
.promo_staff_spotlight_Viirus {
background-image: url(spritesmith-largeSprites-0.png);
background-position: -1005px -392px;
width: 119px;
height: 147px;
}
.promo_staff_spotlight_paglias {
background-image: url(spritesmith-largeSprites-0.png);
background-position: -306px -367px;
width: 99px;
height: 147px;
}
.promo_summer_classes_2014 {
background-image: url(spritesmith-largeSprites-0.png);
background-position: -1135px -96px;
width: 429px;
height: 102px;
}
.promo_summer_classes_2015 {
background-image: url(spritesmith-largeSprites-0.png);
background-position: -140px -973px;
width: 300px;
height: 88px;
}
.promo_summer_classes_2016 {
background-image: url(spritesmith-largeSprites-0.png);
background-position: -734px 0px;
width: 400px;
height: 150px;
}
.promo_takeThis_gear {
background-image: url(spritesmith-largeSprites-0.png);
background-position: -649px -1275px;
width: 114px;
height: 87px;
}
.promo_takethis_armor {
background-image: url(spritesmith-largeSprites-0.png);
background-position: -764px -1275px;
width: 114px;
height: 87px;
}
.promo_unconventional_armor {
background-image: url(spritesmith-largeSprites-0.png);
background-position: -1056px -684px;
width: 60px;
height: 60px;
}
.promo_updos {
background-image: url(spritesmith-largeSprites-0.png);
background-position: -1416px -494px;
width: 156px;
height: 147px;
}
.promo_veteran_pets {
background-image: url(spritesmith-largeSprites-0.png);
background-position: -528px -1114px;
width: 146px;
height: 75px;
}
.promo_winter_classes_2016 {
background-image: url(spritesmith-largeSprites-0.png);
background-position: -1135px -1011px;
width: 360px;
height: 90px;
}
.promo_winterclasses2015 {
background-image: url(spritesmith-largeSprites-0.png);
background-position: -734px -573px;
width: 325px;
height: 110px;
}
.promo_winteryhair {
background-image: url(spritesmith-largeSprites-0.png);
background-position: -375px -1114px;
width: 152px;
height: 75px;
}
.avatar_variety {
background-image: url(spritesmith-largeSprites-0.png);
background-position: -1135px 0px;
width: 498px;
height: 95px;
}
.npc_viirus {
background-image: url(spritesmith-largeSprites-0.png);
background-position: -660px -1378px;
width: 108px;
height: 90px;
}
.party_preview {
background-image: url(spritesmith-largeSprites-0.png);
background-position: 0px 0px;
width: 451px;
height: 219px;
}
.scene_coding {
background-image: url(spritesmith-largeSprites-0.png);
background-position: -302px -1378px;
width: 150px;
height: 150px;
}
.scene_phone_peek {
background-image: url(spritesmith-largeSprites-0.png);
background-position: 0px -1378px;
width: 150px;
height: 150px;
}
.welcome_basic_avatars {
background-image: url(spritesmith-largeSprites-0.png);
background-position: -1135px -642px;
width: 246px;
height: 165px;
}
.welcome_promo_party {
background-image: url(spritesmith-largeSprites-0.png);
background-position: -734px -392px;
width: 270px;
height: 180px;
}
.welcome_sample_tasks {
background-image: url(spritesmith-largeSprites-0.png);
background-position: -1382px -642px;
width: 246px;
height: 165px;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 483 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 418 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 65 KiB

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 143 KiB

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 149 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 175 KiB

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 138 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 128 KiB

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 136 KiB

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 143 KiB

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 404 KiB

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 151 KiB

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 136 KiB

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 153 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

View File

@@ -1,5 +0,0 @@
Do not edit any files in this directory!
For more information read:
https://github.com/HabitRPG/habitrpg/blob/develop/common/locales/README.md

View File

@@ -1,5 +0,0 @@
Do not edit any files in this directory!
For more information read:
https://github.com/HabitRPG/habitrpg/blob/develop/common/locales/README.md

View File

@@ -1,5 +0,0 @@
Do not edit any files in this directory!
For more information read:
https://github.com/HabitRPG/habitrpg/blob/develop/common/locales/README.md

View File

@@ -1,6 +0,0 @@
You may edit any files in this directory. Do not edit files in any
other locales directory.
For more information read:
https://github.com/HabitRPG/habitrpg/blob/develop/common/locales/README.md

View File

@@ -1,5 +0,0 @@
Do not edit any files in this directory!
For more information read:
https://github.com/HabitRPG/habitrpg/blob/develop/common/locales/README.md

View File

@@ -1,5 +0,0 @@
Do not edit any files in this directory!
For more information read:
https://github.com/HabitRPG/habitrpg/blob/develop/common/locales/README.md

View File

@@ -1,5 +0,0 @@
Do not edit any files in this directory!
For more information read:
https://github.com/HabitRPG/habitrpg/blob/develop/common/locales/README.md

View File

@@ -1,5 +0,0 @@
Do not edit any files in this directory!
For more information read:
https://github.com/HabitRPG/habitrpg/blob/develop/common/locales/README.md

View File

@@ -1,5 +0,0 @@
Do not edit any files in this directory!
For more information read:
https://github.com/HabitRPG/habitrpg/blob/develop/common/locales/README.md

View File

@@ -1,5 +0,0 @@
Do not edit any files in this directory!
For more information read:
https://github.com/HabitRPG/habitrpg/blob/develop/common/locales/README.md

View File

@@ -1,5 +0,0 @@
Do not edit any files in this directory!
For more information read:
https://github.com/HabitRPG/habitrpg/blob/develop/common/locales/README.md

View File

@@ -1,5 +0,0 @@
Do not edit any files in this directory!
For more information read:
https://github.com/HabitRPG/habitrpg/blob/develop/common/locales/README.md

View File

@@ -1,5 +0,0 @@
Do not edit any files in this directory!
For more information read:
https://github.com/HabitRPG/habitrpg/blob/develop/common/locales/README.md

View File

@@ -1,5 +0,0 @@
Do not edit any files in this directory!
For more information read:
https://github.com/HabitRPG/habitrpg/blob/develop/common/locales/README.md

View File

@@ -1,5 +0,0 @@
Do not edit any files in this directory!
For more information read:
https://github.com/HabitRPG/habitrpg/blob/develop/common/locales/README.md

View File

@@ -1,35 +0,0 @@
{
"tipTitle": "Tip #<%= tipNumber %>",
"tip1": "Houd je taken overal in de gaten met de Habitica mobiele app. ",
"tip2": "Bereik level 100 om de Bol der Hergeboorte gratis vrij te spelen en een nieuw avontuur te beginnen.",
"tip3": "Gebruik emoticons om snel onderscheid te maken tussen je taken.",
"tip4": "Gebruik het # teken voor de naam van een taak om het heel groot te maken!",
"tip5": "Het beste is het om versterkingen 's morgens uit te spreken, zodat ze zo lang mogelijk effectief zijn. ",
"tip6": "Herevalueer je taken van tijd tot tijd om te zorgen dat ze up-to-date zijn!",
"tip7": "Sommige achtergronden verbinden zich perfect met elkaar als groepsleden dezelfde achtergrond gebruiken. Bv: Bergmeer, Pagodas en Rollende heuvels.",
"tip8": "Stuur een Persoonlijk bericht naar iemand door te klikken op het envelopje bij de naam van diegene in de chat!",
"tip9": "Bezoek de Guild Leaders & Challenge Creators gilde voor advies over het starten van een gilde.",
"tip10": "Je kan edelstenen winnen door deel te nemen aan Uitdagingen. Dagelijks worden er nieuwe toegevoegd. ",
"tip11": "Als je het leuk vindt om je avatar aan te kleden, neem dan een kijkje in de Costume Carnival gilde.",
"tip12": "Word lid van de \"Challenge... Accepted\" gilde voor regelmatig geplande willekeurige uitdagingen.",
"tip13": "Meer dan vier groepsleden hebben verhoogt de verantwoordelijkheid!",
"tip14": "Je kan koplijnen of inspirationele uitspraken toevoegen aan je lijst van Gewoontes zonder (+/-).",
"tip15": "Voeg checklijsten aan jet To-do lijst toe om je beloningen te verhogen!",
"tip16": "Bekijk de Data knop voor waardevolle inzichten in jouw vooruitgang. ",
"tip17": "Het gebruik van labels kan een haast onmogelijke takenlijst toch handelbaar maken. ",
"tip18": "Gewoontes die gewoon positief of negatief zijn, \"vervagen\" langzaam en worden terug geel.",
"tip19": "Verhoog je Intelligentie-eigenschap om meer EP te krijgen wanneer je een taak volbrengt.",
"tip20": "Verhoog je Perceptie-eigenschap om meer vondsten en goud te krijgen.",
"tip21": "Verhoog je Kracht-eigenschap om meer schade toe te brengen aan eindbazen of om voltreffers te krijgen.",
"tip22": "Verhoog je Lichaam eigenschap om de schade van onvoltooide dagelijkse taken te minderen.",
"tip23": "klik op het histogram-grafiek icoon van jouw taak om de grafiek te zien van je vooruitgang.",
"tip24": "Habitica is een Open source! Vraag in de Aankomende Legendes Gilde als je wilt bijdragen",
"tip25": "De vier seizoengebonden Grote Gala's beginnen dicht bij de zonnewende's en de nachteveningen.",
"tip26": "Een pijltje links van iemand's level nummer betekent dat ze op het moment versterkt zijn. ",
"tip27": "Verwijs in je laatavond dagelijkse taken naar de vorige avond (zoals: \"gisterenavond geflost\") zodat je ze 's ochtends kan afvinken.",
"tip28": "Stel een aangepast dagbegin in onder Instellingen > Site om te bepalen wanneer een nieuwe dag begint.",
"tip29": "Voltooi al je dagelijkse taken om een 'perfecte dag versterking' te krijgen die je eigenschappen verhoogt!",
"tip30": "Je kan mensen uitnodigen voor gildes, niet enkel voor groepen. ",
"tip31": "Bekijk de voorgemaakte lijsten in de \"Library of Shared Lists\" gilde voor voorbeeldtaken.",
"tip32": "Veel van Habitica's code, afbeeldingen en teksten zijn gemaakt door vrijwilligers! Iedereen kan helpen."
}

View File

@@ -1,5 +0,0 @@
Do not edit any files in this directory!
For more information read:
https://github.com/HabitRPG/habitrpg/blob/develop/common/locales/README.md

View File

@@ -1,5 +0,0 @@
Do not edit any files in this directory!
For more information read:
https://github.com/HabitRPG/habitrpg/blob/develop/common/locales/README.md

View File

@@ -1,5 +0,0 @@
Do not edit any files in this directory!
For more information read:
https://github.com/HabitRPG/habitrpg/blob/develop/common/locales/README.md

View File

@@ -1,5 +0,0 @@
Do not edit any files in this directory!
For more information read:
https://github.com/HabitRPG/habitrpg/blob/develop/common/locales/README.md

View File

@@ -1,35 +0,0 @@
{
"tipTitle": "Совет #<%= tipNumber %>",
"tip1": "Проверьте задачи на ходу с помощью мобильных приложений Habitica.",
"tip2": "Достигните 100 уровня, чтобы бесплатно получить Шар Возрождения и начать новое приключение!",
"tip3": "Используйте emoji, чтобы быстро различать задачи.",
"tip4": "Используйте символ # перед названием задания, чтобы сделать его очень большим!",
"tip5": "Баффы, наложенные утром, продержатся дольше.",
"tip6": "Иногда переоценивайте свои задачи, чтобы удостовериться в их своевременности",
"tip7": "Некоторые фоны идеально соединяются друг с другом, если члены команды используют одно и то же изображение. Например, Горное Озеро, Пагода или Круглые Холмы.",
"tip8": "Чтобы отправить сообщение, просто щелкните по иконке конверта рядом с именем в чате.",
"tip9": "Visit the Guild Leaders & Challenge Creators Guild for advice on starting a Guild.",
"tip10": "Вы можете выиграть самоцветы, участвуя в испытаниях. Каждый день появляются новые!",
"tip11": "If you enjoy dressing up your avatar, check out the Costume Carnival Guild.",
"tip12": "Join the “Challenge... Accepted” Guild for regularly scheduled random challenges.",
"tip13": "Having more than four Party members increases accountability!",
"tip14": "You can add headers or inspirational quotes to your list as Habits with no (+/-).",
"tip15": "Add checklists to your To-Dos to increase your rewards!",
"tip16": "Check out the Data tab for valuable insights on your progress.",
"tip17": "Using Tags can make an unwieldy task list very manageable!",
"tip18": "Habits that are just positive or just negative gradually “fade” and return to yellow.",
"tip19": "Boost your Intelligence Stat to gain more XP when you complete a task.",
"tip20": "Повышайте Восприятие, чтобы получить больше добычи и золота.",
"tip21": "Повышайте свою Силу, чтобы наносить больше урона боссам или делать критические удары.",
"tip22": "Boost your Constitution Stat to lessen the damage from incomplete Dailies.",
"tip23": "Click the bar graph icon on your tasks to see a graph showing your progress.",
"tip24": "Habitica is Open Source! Ask in the Aspiring Legends Guild if you want to contribute.",
"tip25": "The four seasonal Grand Galas start near the solstices and equinoxes.",
"tip26": "An arrow to the left of someones level number means theyre currently buffed.",
"tip27": "Make late-night Dailies refer to the night before (such as “flossed last night”) so you can check them off in the morning.",
"tip28": "Set a Custom Day Start under Settings > Site to control when your day restarts.",
"tip29": "Complete all your Dailies to get a Perfect Day Buff that increases your stats!",
"tip30": "You can invite people to Guilds, not just Parties.",
"tip31": "Check out the pre-made lists in the Library of Shared Lists Guild for example tasks.",
"tip32": "Lots of Habiticas code, art, and writing is made by volunteer contributors! Anyone can help."
}

View File

@@ -1,5 +0,0 @@
Do not edit any files in this directory!
For more information read:
https://github.com/HabitRPG/habitrpg/blob/develop/common/locales/README.md

View File

@@ -1,5 +0,0 @@
Do not edit any files in this directory!
For more information read:
https://github.com/HabitRPG/habitrpg/blob/develop/common/locales/README.md

View File

@@ -1,5 +0,0 @@
Do not edit any files in this directory!
For more information read:
https://github.com/HabitRPG/habitrpg/blob/develop/common/locales/README.md

View File

@@ -1,5 +0,0 @@
Do not edit any files in this directory!
For more information read:
https://github.com/HabitRPG/habitrpg/blob/develop/common/locales/README.md

View File

@@ -1,17 +0,0 @@
{
"lostAllHealth": "У вас закінчилося здоров'я!",
"dontDespair": "Не занепадайте духом!",
"deathPenaltyDetails": "Ви втратили рівень, ваше золото, і одне обмундирування, але ви можете їх відпрацювати! Ви прекрасно справитеся, щасти!",
"refillHealthTryAgain": "Вилікуватися і спробувати знову",
"dyingOftenTips": "Часто вмираєте? <a href='http://habitica.wikia.com/wiki/Death_Mechanics#Strategies_for_Staying_Alive' target='_blank'>Ось кілька порад!</a>\n",
"losingHealthWarning": "Обережно - Ви втрачаєте здоров'я!",
"losingHealthWarning2": "Не дайте скінчитися здоров'ю! Втратите рівень, ваше золото, і одну річ з інвентаря.",
"toRegainHealth": "Щоб знову отримати Здоров'я:",
"lowHealthTips1": "Підвищіть рівень щоб повністю оздоровитися!",
"lowHealthTips2": "Купіть лікувальне зілля з колонки нагород щоб відновити 15 очків здоров'я.",
"losingHealthQuickly": "Швидко втрачаєте здоров'я?",
"lowHealthTips3": "Невиконані щоденні задачі приносять вам шкоду уночі, тож не додавайте забагато спочатку!",
"lowHealthTips4": "Ви можете вимкнути щоденне завдання, якщо воно не має терміну придатності.",
"goodLuck": "Удачі!",
"cannotRevive": "Не можливо оживити живого."
}

View File

@@ -1,35 +0,0 @@
{
"tipTitle": "Порада #<%= tipNumber %>",
"tip1": "Відмічайте завдання на ходу за допомогою мобільних додатків Habitica.",
"tip2": "Досягніть ріня 100, щоб безплатно розблокувати Сферу Переродження та почати пригоди заново!",
"tip3": "Використовуйте смайлики, щоб швидко розрізняти свої завдання.",
"tip4": "Використайте знак # перед назвою завдання, щоб зробити текст справді великим!",
"tip5": "Краще використовувати підсилюючі чари вранці, щоб вони тривали довше.",
"tip6": "Час від часу переоцінюйте свої завдання, щоб переконатися в їх актуальності!",
"tip7": "Some backgrounds connect perfectly if party members use the same background. Ex: Mountain Lake, Pagodas, and Rolling Hills.",
"tip8": "Надішліть комусь приватне повідомлення, натиснувши на конверт біля його імені в чаті!",
"tip9": "Visit the Guild Leaders & Challenge Creators Guild for advice on starting a Guild.",
"tip10": "Ви можете виграти самоцвіти, проходячи випробування. Вони з'являються кожен день!",
"tip11": "If you enjoy dressing up your avatar, check out the Costume Carnival Guild.",
"tip12": "Join the “Challenge... Accepted” Guild for regularly scheduled random challenges.",
"tip13": "Having more than four Party members increases accountability!",
"tip14": "Ви можете додати заголовки або надихаючі вас цитати в ваш список як звички без (+/-)",
"tip15": "Add checklists to your To-Dos to increase your rewards!",
"tip16": "Глянувши на вкладку з даними, ви отримаєте корисну інформацію щодо вашого прогресу.",
"tip17": "Громіздкий список щоденних справ можна значно спростити, розбивши його тегами.",
"tip18": "Звички, які є лише хорошими або лише поганими, з часом жовтіють самі.",
"tip19": "Підвищіть ваш інтелект щоб отримувати більше досвіду від завдань.",
"tip20": "Підвищіть вашу спостережливість щоб отримувати більше випадкових призів та золота.",
"tip21": "Підвищіть вашу силу щоб наносити більше ушкоджень босам та критичних ударів.",
"tip22": "Boost your Constitution Stat to lessen the damage from incomplete Dailies.",
"tip23": "Натисніть іконку \"графік\" на задачі щоб поглянути на графік, ілюструючий ваш прогрес.",
"tip24": "Habitica is Open Source! Ask in the Aspiring Legends Guild if you want to contribute.",
"tip25": "The four seasonal Grand Galas start near the solstices and equinoxes.",
"tip26": "Стрілка зліва від рівня персонажа означає, що він посилений.",
"tip27": "Make late-night Dailies refer to the night before (such as “flossed last night”) so you can check them off in the morning.",
"tip28": "В налаштуваннях можна змінити час початку доби.",
"tip29": "За завершення всіх щоденних завдань дається \"підсилення ідеального дня\", яке збільшує характеристики.",
"tip30": "Крім груп, людей можна запрошувати в гільдії.",
"tip31": "Check out the pre-made lists in the Library of Shared Lists Guild for example tasks.",
"tip32": "Багато коду, графіки і текстів сайту Habitica зроблено добровольцями. Кожен може допомогти."
}

View File

@@ -1,5 +0,0 @@
Do not edit any files in this directory!
For more information read:
https://github.com/HabitRPG/habitrpg/blob/develop/common/locales/README.md

View File

@@ -1,5 +0,0 @@
Do not edit any files in this directory!
For more information read:
https://github.com/HabitRPG/habitrpg/blob/develop/common/locales/README.md

View File

@@ -1,7 +0,0 @@
import _ from 'lodash';
// TODO remove completely, use _.get, only used in client
module.exports = function dotGet (user, path) {
return _.get(user, path);
};

View File

@@ -1,14 +0,0 @@
import _ from 'lodash';
/*
This allows you to set object properties by dot-path. Eg, you can run pathSet('stats.hp',50,user) which is the same as
user.stats.hp = 50. This is useful because in our habitrpg-shared functions we're returning changesets as {path:value},
so that different consumers can implement setters their own way. Derby needs model.set(path, value) for example, where
Angular sets object properties directly - in which case, this function will be used.
*/
// TODO use directly _.set and remove this fn, only used in client
module.exports = function dotSet (user, path, val) {
return _.set(user, path, val);
};

View File

@@ -1,7 +0,0 @@
// TODO remove once v2 is retired
module.exports = function nullify (user) {
user.ops = null;
user.fns = null;
user = null;
};

View File

@@ -1,12 +0,0 @@
import _ from 'lodash';
import predictableRandom from './predictableRandom';
// Get a random property from an object
// returns random property (the value)
module.exports = function randomVal (user, obj, options = {}) {
let array = options.key ? _.keys(obj) : _.values(obj);
let rand = predictableRandom(user, options.seed);
array.sort();
return array[Math.floor(rand * array.length)];
};

View File

@@ -1,27 +0,0 @@
import refPush from '../libs/refPush';
import validator from 'validator';
import i18n from '../i18n';
import {
BadRequest,
} from '../libs/errors';
import _ from 'lodash';
module.exports = function addWebhook (user, req = {}) {
let wh = user.preferences.webhooks;
if (!validator.isURL(_.get(req, 'body.url'))) throw new BadRequest(i18n.t('invalidUrl', req.language));
if (!validator.isBoolean(_.get(req, 'body.enabled'))) throw new BadRequest(i18n.t('invalidEnabled', req.language));
user.markModified('preferences.webhooks');
if (req.v2 === true) {
return user.preferences.webhooks;
} else {
return [
refPush(wh, {
url: req.body.url,
enabled: req.body.enabled,
}),
];
}
};

View File

@@ -1,15 +0,0 @@
import _ from 'lodash';
import autoAllocate from '../fns/autoAllocate';
module.exports = function allocateNow (user, req = {}) {
_.times(user.stats.points, () => autoAllocate(user));
user.stats.points = 0;
if (req.v2 === true) {
return _.pick(user, 'stats');
} else {
return [
user.stats,
];
}
};

View File

@@ -1,10 +0,0 @@
import _ from 'lodash';
module.exports = function deleteWebhook (user, req) {
delete user.preferences.webhooks[_.get(req, 'params.id')];
user.markModified('preferences.webhooks');
return [
user.preferences.webhooks,
];
};

View File

@@ -1,18 +0,0 @@
import _ from 'lodash';
import i18n from '../i18n';
import { NotFound } from '../libs/errors';
// TODO used only in client, move there?
module.exports = function getTag (user, req = {}) {
let tid = _.get(req, 'params.id');
let index = _.findIndex(user.tags, {
id: tid,
});
if (index === -1) {
throw new NotFound(i18n.t('messageTagNotFound', req.language));
}
return user.tags[index];
};

View File

@@ -1,5 +0,0 @@
// TODO used only in client, move there?
module.exports = function getTags (user) {
return user.tags;
};

View File

@@ -1,14 +0,0 @@
import i18n from '../i18n';
module.exports = function markPmsRead (user, req = {}) {
user.inbox.newMessages = 0;
if (req.v2 === true) {
return user;
} else {
return [
user.inbox.newMessages,
i18n.t('pmsMarkedRead'),
];
}
};

View File

@@ -1,9 +0,0 @@
module.exports = function sleep (user, req = {}) {
user.preferences.sleep = !user.preferences.sleep;
if (req.v2 === true) {
return {};
} else {
return [user.preferences.sleep];
}
};

View File

@@ -1,11 +0,0 @@
import _ from 'lodash';
// TODO used only in client, move there?
module.exports = function updateUser (user, req = {}) {
_.each(req.body, (val, key) => {
_.set(user, key, val);
});
return user;
};

View File

@@ -1,20 +0,0 @@
import validator from 'validator';
import i18n from '../i18n';
import {
BadRequest,
} from '../libs/errors';
module.exports = function updateWebhook (user, req) {
if (!validator.isURL(req.body.url)) throw new BadRequest(i18n.t('invalidUrl', req.language));
if (!validator.isBoolean(req.body.enabled)) throw new BadRequest(i18n.t('invalidEnabled', req.language));
user.markModified('preferences.webhooks');
user.preferences.webhooks[req.params.id].url = req.body.url;
user.preferences.webhooks[req.params.id].enabled = req.body.enabled;
if (req.v2 === true) {
return user.preferences.webhooks;
} else {
return [user.preferences.webhooks[req.params.id]];
}
};

View File

@@ -7,6 +7,8 @@
"FACEBOOK_ANALYTICS":"1234567890123456",
"FACEBOOK_KEY":"123456789012345",
"FACEBOOK_SECRET":"aaaabbbbccccddddeeeeffff00001111",
"GOOGLE_CLIENT_ID":"123456789012345",
"GOOGLE_CLIENT_SECRET":"aaaabbbbccccddddeeeeffff00001111",
"NODE_DB_URI":"mongodb://localhost/habitrpg",
"TEST_DB_URI":"mongodb://localhost/habitrpg_test",
"NODE_ENV":"development",

View File

@@ -1,19 +0,0 @@
import { MongoClient as mongo } from 'mongodb';
import config from '../config';
module.exports.updateUser = (_id, path, value) => {
mongo.connect(config.NODE_DB_URI, (err, db) => {
if (err) throw err;
let collection = db.collection('users');
collection.updateOne(
{ _id },
{ $set: { [`${path}`]: value } },
(updateErr, result) => {
if (updateErr) throw updateErr;
console.log('done updating', _id);
db.close();
}
);
});
}

View File

@@ -1,24 +0,0 @@
'use strict';
require('babel-register');
let _ = require('lodash');
let updateUser = require('./_helper').updateUser;
let userId = process.argv[2];
if (!userId) {
console.error('USAGE: node debug-scripts/grant-all-equipment.js <user_id>');
console.error('EFFECT: Adds all gear to specified user');
return;
}
let gearFlat = require('../common').content.gear.flat;
let userGear = {};
_.each(gearFlat, (piece, key) => {
userGear[key] = true;
});
updateUser(userId, 'items.gear.owned', userGear);

View File

@@ -1,28 +0,0 @@
'use strict';
require('babel-register');
let _ = require('lodash');
let updateUser = require('./_helper').updateUser;
let userId = process.argv[2];
if (!userId) {
console.error('USAGE: node debug-scripts/grant-all-mounts.js <user_id>');
console.error('EFFECT: Adds all mounts to specified user');
return;
}
let dropMounts = require('../common').content.mounts;
let questMounts = require('../common').content.questMounts;
let specialMounts = require('../common').content.specialMounts;
let premiumMounts = require('../common').content.premiumPets; // premium mounts isn't exposed on the content object
let userMounts = {};
_.each([ dropMounts, questMounts, specialMounts, premiumMounts ], (set) => {
_.each(set, (pet, key) => {
userMounts[key] = true;
});
})
updateUser(userId, 'items.mounts', userMounts);

View File

@@ -1,28 +0,0 @@
'use strict';
require('babel-register');
let _ = require('lodash');
let updateUser = require('./_helper').updateUser;
let userId = process.argv[2];
if (!userId) {
console.error('USAGE: node debug-scripts/grant-all-pets.js <user_id>');
console.error('EFFECT: Adds all pets to specified user');
return;
}
let dropPets = require('../common').content.pets;
let questPets = require('../common').content.questPets;
let specialPets = require('../common').content.specialPets;
let premiumPets = require('../common').content.premiumPets;
let userPets = {};
_.each([ dropPets, questPets, specialPets, premiumPets ], (set) => {
_.each(set, (pet, key) => {
userPets[key] = 95;
});
})
updateUser(userId, 'items.pets', userPets);

File diff suppressed because one or more lines are too long

10
gulp/.eslintrc Normal file
View File

@@ -0,0 +1,10 @@
{
"root": true,
"env": {
"node": true,
},
"extends": [
"habitrpg/server",
"habitrpg/babel"
],
}

View File

@@ -15,8 +15,12 @@ gulp.task('apidoc', ['apidoc:clean'], (done) => {
});
if (result === false) {
done(new Error('There was a problem generating apiDoc documentation.'))
done(new Error('There was a problem generating apiDoc documentation.'));
} else {
done();
}
});
gulp.task('apidoc:watch', ['apidoc'], () => {
return gulp.watch(APIDOC_SRC_PATH + '/**/*.js', ['apidoc']);
});

View File

@@ -8,7 +8,7 @@ import babel from 'babelify';
gulp.task('browserify', function () {
let bundler = browserify({
entries: './common/browserify.js',
entries: './website/common/browserify.js',
debug: true,
transform: [[babel, { compact: false }]],
});
@@ -23,9 +23,9 @@ gulp.task('browserify', function () {
this.emit('end');
})
.pipe(sourcemaps.write('./'))
.pipe(gulp.dest('./common/dist/scripts/'));
.pipe(gulp.dest('./website/client-old/js/'));
});
gulp.task('browserify:watch', () => {
gulp.watch('./common/script/**/*.js', ['browserify']);
gulp.watch('./website/common/script/**/*.js', ['browserify']);
});

View File

@@ -18,22 +18,22 @@ gulp.task('build:src', () => {
});
gulp.task('build:common', () => {
return gulp.src('common/script/**/*.js')
return gulp.src('website/common/script/**/*.js')
.pipe(babel())
.pipe(gulp.dest('common/transpiled-babel/'));
.pipe(gulp.dest('website/common/transpiled-babel/'));
});
gulp.task('build:server', ['build:src', 'build:common']);
gulp.task('build:dev', ['browserify', 'prepare:staticNewStuff'], (done) => {
gulp.task('build:dev', ['browserify', 'prepare:staticNewStuff', 'semantic-ui'], (done) => {
gulp.start('grunt-build:dev', done);
});
gulp.task('build:dev:watch', ['build:dev'], () => {
gulp.watch(['website/client-old/**/*.styl', 'common/script/*']);
gulp.watch(['website/client-old/**/*.styl', 'website/common/script/*']);
});
gulp.task('build:prod', ['browserify', 'build:server', 'prepare:staticNewStuff'], (done) => {
gulp.task('build:prod', ['browserify', 'build:server', 'prepare:staticNewStuff', 'semantic-ui'], (done) => {
runSequence(
'grunt-build:prod',
'apidoc',

View File

@@ -10,11 +10,11 @@ let improveRepl = (context) => {
// Let "exit" and "quit" terminate the console
['exit', 'quit'].forEach((term) => {
Object.defineProperty(context, term, { get() { process.exit(); }});
Object.defineProperty(context, term, { get () { process.exit(); }});
});
// "clear" clears the screen
Object.defineProperty(context, 'clear', { get() {
Object.defineProperty(context, 'clear', { get () {
process.stdout.write('\u001B[2J\u001B[0;0f');
}});
@@ -25,13 +25,13 @@ let improveRepl = (context) => {
var isProd = nconf.get('NODE_ENV') === 'production';
var mongooseOptions = !isProd ? {} : {
replset: { socketOptions: { keepAlive: 1, connectTimeoutMS: 30000 } },
server: { socketOptions: { keepAlive: 1, connectTimeoutMS: 30000 } }
server: { socketOptions: { keepAlive: 1, connectTimeoutMS: 30000 } },
};
autoinc.init(
mongoose.connect(
nconf.get('NODE_DB_URI'),
mongooseOptions,
function(err) {
function (err) {
if (err) throw err;
logger.info('Connected with Mongoose');
}
@@ -42,6 +42,6 @@ let improveRepl = (context) => {
gulp.task('console', (cb) => {
improveRepl(repl.start({
prompt: 'Habitica > '
prompt: 'Habitica > ',
}).context);
});

43
gulp/gulp-semanticui.js Normal file
View File

@@ -0,0 +1,43 @@
import gulp from 'gulp';
import fs from 'fs';
// Make semantic-ui-less work with a theme in a different folder
// Code taken from https://www.artembutusov.com/webpack-semantic-ui/
// Relative to node_modules/semantic-ui-less
const SEMANTIC_THEME_PATH = '../../website/client/assets/less/semantic-ui/theme.config';
// fix well known bug with default distribution
function fixFontPath (filename) {
return new Promise((resolve, reject) => {
fs.readFile(filename, 'utf8', (err, content) => {
if (err) return reject(err);
let newContent = content.replace(
'@fontPath : \'../../themes/',
'@fontPath : \'../../../themes/'
);
fs.writeFile(filename, newContent, 'utf8', (err1) => {
if (err) return reject(err1);
resolve();
});
});
});
}
gulp.task('semantic-ui', (done) => {
// relocate default config
fs.writeFile(
'node_modules/semantic-ui-less/theme.config',
`@import '${SEMANTIC_THEME_PATH}';\n`,
'utf8',
(err) => {
if (err) return done(err);
fixFontPath('node_modules/semantic-ui-less/themes/default/globals/site.variables')
.then(() => done())
.catch(done);
}
);
});

View File

@@ -10,17 +10,17 @@ import {each} from 'lodash';
// https://github.com/Ensighten/grunt-spritesmith/issues/67#issuecomment-34786248
const MAX_SPRITESHEET_SIZE = 1024 * 1024 * 3;
const DIST_PATH = 'common/dist/sprites/';
const DIST_PATH = 'website/assets/sprites/dist/';
gulp.task('sprites:compile', ['sprites:clean', 'sprites:main', 'sprites:largeSprites', 'sprites:checkCompiledDimensions']);
gulp.task('sprites:main', () => {
let mainSrc = sync('common/img/sprites/spritesmith/**/*.png');
let mainSrc = sync('website/assets/sprites/spritesmith/**/*.png');
return createSpritesStream('main', mainSrc);
});
gulp.task('sprites:largeSprites', () => {
let largeSrc = sync('common/img/sprites/spritesmith_large/**/*.png');
let largeSrc = sync('website/assets/sprites/spritesmith_large/**/*.png');
return createSpritesStream('largeSprites', largeSrc);
});
@@ -52,7 +52,7 @@ gulp.task('sprites:checkCompiledDimensions', ['sprites:main', 'sprites:largeSpri
}
});
function createSpritesStream(name, src) {
function createSpritesStream (name, src) {
let spritesheetSliceIndicies = calculateSpritesheetsSrcIndicies(src);
let stream = mergeStream();
@@ -65,7 +65,7 @@ function createSpritesStream(name, src) {
cssName: `spritesmith-${name}-${index}.css`,
algorithm: 'binary-tree',
padding: 1,
cssTemplate: 'common/css/css.template.handlebars',
cssTemplate: 'website/assets/sprites/css/css.template.handlebars',
cssVarMap: cssVarMap
}));
@@ -83,7 +83,7 @@ function createSpritesStream(name, src) {
return stream;
}
function calculateSpritesheetsSrcIndicies(src) {
function calculateSpritesheetsSrcIndicies (src) {
let totalPixels = 0;
let slices = [0];
@@ -100,7 +100,7 @@ function calculateSpritesheetsSrcIndicies(src) {
return slices;
}
function calculateImgDimensions(img, addPadding) {
function calculateImgDimensions (img, addPadding) {
let dims = sizeOf(img);
let requiresSpecialTreatment = checkForSpecialTreatment(img);
@@ -109,7 +109,7 @@ function calculateImgDimensions(img, addPadding) {
let newHeight = dims.height < 90 ? 90 : dims.height;
dims = {
width: newWidth,
height: newHeight
height: newHeight,
};
}
@@ -119,19 +119,19 @@ function calculateImgDimensions(img, addPadding) {
padding = (dims.width * 8) + (dims.height * 8);
}
if(!dims.width || !dims.height) console.error('MISSING DIMENSIONS:', dims);
if (!dims.width || !dims.height) console.error('MISSING DIMENSIONS:', dims);
let totalPixelSize = (dims.width * dims.height) + padding;
return totalPixelSize;
}
function checkForSpecialTreatment(name) {
function checkForSpecialTreatment (name) {
let regex = /^hair|skin|beard|mustach|shirt|flower|^headAccessory_special_\w+Ears|^eyewear_special_\w+TopFrame/;
return name.match(regex) || name === 'head_0';
}
function cssVarMap(sprite) {
function cssVarMap (sprite) {
// For hair, skins, beards, etc. we want to output a '.customize-options.WHATEVER' class, which works as a
// 60x60 image pointing at the proper part of the 90x90 sprite.
// We set up the custom info here, and the template makes use of it.
@@ -142,9 +142,9 @@ function cssVarMap(sprite) {
offset_x: `-${ sprite.x + 25 }px`,
offset_y: `-${ sprite.y + 15 }px`,
width: '60px',
height: '60px'
}
}
height: '60px',
},
};
}
if (~sprite.name.indexOf('shirt'))
sprite.custom.px.offset_y = `-${ sprite.y + 30 }px`; // even more for shirts

View File

@@ -12,6 +12,6 @@ gulp.task('nodemon', () => {
'website/client-old/*',
'website/views/*',
'common/dist/script/content/*',
]
],
});
});

View File

@@ -13,10 +13,13 @@ import Bluebird from 'bluebird';
import runSequence from 'run-sequence';
import os from 'os';
import nconf from 'nconf';
import fs from 'fs';
const i18n = require('../website/server/libs/i18n');
// TODO rewrite
const TEST_SERVER_PORT = 3003
const TEST_SERVER_PORT = 3003;
let server;
const TEST_DB_URI = nconf.get('TEST_DB_URI');
@@ -33,11 +36,11 @@ let testResults = [];
let testCount = (stdout, regexp) => {
let match = stdout.match(regexp);
return parseInt(match && match[1] || 0);
}
};
let testBin = (string, additionalEnvVariables = '') => {
if(os.platform() === "win32") {
if(additionalEnvVariables != '') {
if (os.platform() === 'win32') {
if (additionalEnvVariables != '') {
additionalEnvVariables = additionalEnvVariables.split(' ').join('&&set ');
additionalEnvVariables = 'set ' + additionalEnvVariables + '&&';
}
@@ -49,7 +52,7 @@ let testBin = (string, additionalEnvVariables = '') => {
gulp.task('test:nodemon', (done) => {
process.env.PORT = TEST_SERVER_PORT;
process.env.NODE_DB_URI=TEST_DB_URI;
process.env.NODE_DB_URI = TEST_DB_URI;
runSequence('nodemon');
});
@@ -65,17 +68,24 @@ gulp.task('test:prepare:mongo', (cb) => {
gulp.task('test:prepare:server', ['test:prepare:mongo'], () => {
if (!server) {
server = exec(testBin(`node ./website/server/index.js`, `NODE_DB_URI=${TEST_DB_URI} PORT=${TEST_SERVER_PORT}`), (error, stdout, stderr) => {
server = exec(testBin('node ./website/server/index.js', `NODE_DB_URI=${TEST_DB_URI} PORT=${TEST_SERVER_PORT}`), (error, stdout, stderr) => {
if (error) { throw `Problem with the server: ${error}`; }
if (stderr) { console.error(stderr); }
});
}
});
gulp.task('test:prepare:build', ['build'], (cb) => {
exec(testBin('grunt build:test'), cb);
gulp.task('test:prepare:translations', (cb) => {
fs.writeFile(
'test/client-old/spec/mocks/translations.js',
`if(!window.env) window.env = {};
window.env.translations = ${JSON.stringify(i18n.translations['en'])};`, cb);
});
gulp.task('test:prepare:build', ['build', 'test:prepare:translations']);
// exec(testBin('grunt build:test'), cb);
gulp.task('test:prepare:webdriver', (cb) => {
exec('npm run test:prepare:webdriver', cb);
});
@@ -83,7 +93,7 @@ gulp.task('test:prepare:webdriver', (cb) => {
gulp.task('test:prepare', [
'test:prepare:build',
'test:prepare:mongo',
'test:prepare:webdriver'
'test:prepare:webdriver',
]);
gulp.task('test:sanity', (cb) => {
@@ -128,7 +138,7 @@ gulp.task('test:common:safe', ['test:prepare:build'], (cb) => {
suite: 'Common Specs\t',
pass: testCount(stdout, /(\d+) passing/),
fail: testCount(stdout, /(\d+) failing/),
pend: testCount(stdout, /(\d+) pending/)
pend: testCount(stdout, /(\d+) pending/),
});
cb();
}
@@ -167,33 +177,7 @@ gulp.task('test:content:safe', ['test:prepare:build'], (cb) => {
suite: 'Content Specs\t',
pass: testCount(stdout, /(\d+) passing/),
fail: testCount(stdout, /(\d+) failing/),
pend: testCount(stdout, /(\d+) pending/)
});
cb();
}
);
pipe(runner);
});
gulp.task('test:server_side', ['test:prepare:build'], (cb) => {
let runner = exec(
testBin(SERVER_SIDE_TEST_COMMAND),
(err, stdout, stderr) => {
cb(err);
}
);
pipe(runner);
});
gulp.task('test:server_side:safe', ['test:prepare:build'], (cb) => {
let runner = exec(
testBin(SERVER_SIDE_TEST_COMMAND),
(err, stdout, stderr) => {
testResults.push({
suite: 'Server Side Specs',
pass: testCount(stdout, /(\d+) passing/),
fail: testCount(stdout, /(\d+) failing/),
pend: testCount(stdout, /(\d+) pending/)
pend: testCount(stdout, /(\d+) pending/),
});
cb();
}
@@ -232,7 +216,7 @@ gulp.task('test:karma:safe', ['test:prepare:build'], (cb) => {
suite: 'Karma Specs\t',
pass: testCount(stdout, /(\d+) tests? completed/),
fail: testCount(stdout, /(\d+) tests? failed/),
pend: testCount(stdout, /(\d+) tests? skipped/)
pend: testCount(stdout, /(\d+) tests? skipped/),
});
cb();
}
@@ -249,7 +233,7 @@ gulp.task('test:e2e', ['test:prepare', 'test:prepare:server'], (cb) => {
Bluebird.all([
awaitPort(TEST_SERVER_PORT),
awaitPort(4444)
awaitPort(4444),
]).then(() => {
let runner = exec(
'npm run test:e2e',
@@ -273,7 +257,7 @@ gulp.task('test:e2e:safe', ['test:prepare', 'test:prepare:server'], (cb) => {
Bluebird.all([
awaitPort(TEST_SERVER_PORT),
awaitPort(4444)
awaitPort(4444),
]).then(() => {
let runner = exec(
'npm run test:e2e',
@@ -284,7 +268,7 @@ gulp.task('test:e2e:safe', ['test:prepare', 'test:prepare:server'], (cb) => {
suite: 'End-to-End Specs\t',
pass: testCount(stdout, /(\d+) passing/),
fail: testCount(stdout, /(\d+) failing/),
pend: testCount(stdout, /(\d+) pending/)
pend: testCount(stdout, /(\d+) pending/),
});
support.forEach(kill);
cb();
@@ -296,14 +280,14 @@ gulp.task('test:e2e:safe', ['test:prepare', 'test:prepare:server'], (cb) => {
gulp.task('test:api-v3:unit', (done) => {
let runner = exec(
testBin('mocha test/api/v3/unit --recursive'),
testBin('mocha test/api/v3/unit --recursive --require ./test/helpers/start-server'),
(err, stdout, stderr) => {
if (err) {
process.exit(1);
}
done();
}
)
);
pipe(runner);
});
@@ -314,15 +298,15 @@ gulp.task('test:api-v3:unit:watch', () => {
gulp.task('test:api-v3:integration', (done) => {
let runner = exec(
testBin('mocha test/api/v3/integration --recursive'),
{maxBuffer: 500*1024},
testBin('mocha test/api/v3/integration --recursive --require ./test/helpers/start-server'),
{maxBuffer: 500 * 1024},
(err, stdout, stderr) => {
if (err) {
process.exit(1);
}
done();
}
)
);
pipe(runner);
});
@@ -335,9 +319,9 @@ gulp.task('test:api-v3:integration:watch', () => {
gulp.task('test:api-v3:integration:separate-server', (done) => {
let runner = exec(
testBin('mocha test/api/v3/integration --recursive', 'LOAD_SERVER=0'),
{maxBuffer: 500*1024},
{maxBuffer: 500 * 1024},
(err, stdout, stderr) => done(err)
)
);
pipe(runner);
});

Some files were not shown because too many files have changed in this diff Show More