Commit Graph
100 Commits
Author SHA1 Message Date
jomoandJake a162387f83 clean code 2014-12-17 14:52:13 -06:00
jomoandJake 834e737498 if true then false else true 2014-12-17 14:52:12 -06:00
jomoandJake 62e1994121 fix config, use min_scale + max_scale 2014-12-17 14:52:11 -06:00
jomoandJake dd2ac9ee4e fix config 2014-12-17 14:52:10 -06:00
jomoandJake 9df986b044 there shouldn't be a max sale 💰 2014-12-17 14:52:08 -06:00
jomoandJake 4df237b454 don't overwrite my config :) 2014-12-17 14:52:07 -06:00
jomo a4ae97ea1e clean up docs 2014-12-04 23:13:14 +01:00
jomo 7aa25b807d cache images for 20 minutes, not 1 hour 2014-11-30 20:37:45 +01:00
jomo 5ef084d8be catch df errors 2014-11-30 20:25:24 +01:00
jomo 972a9db442 typos 2014-11-30 19:40:49 +01:00
jomo 96ae65ee6a set User-Agent to 'https://crafatar.com' 2014-11-30 06:49:49 +01:00
jomo 30fabeac8c clarify how to get face without helm 2014-11-30 06:39:33 +01:00
jomo bbeb734d91 parseInt size 2014-11-30 06:30:38 +01:00
jomo d18b862ecc proper favicon, close #11
I also added a note about the default parameter for skins
2014-11-30 05:18:27 +01:00
jomo 39e6e626b9 add tiny tests for skins 2014-11-30 03:48:32 +01:00
jomo 7d47028ff7 fix errors for null skins, closes #20 2014-11-30 03:34:37 +01:00
jomo a31282e244 OCD 2014-11-30 03:02:09 +01:00
jomo 91854ad86e log -> debug etag 2014-11-30 03:01:06 +01:00
jomo cf43f1dc07 use seconds in config, don't clear .files 2014-11-30 02:56:21 +01:00
jomo d65dbd83a2 fix seconds / ms 2014-11-30 02:49:42 +01:00
jomo 48e1f54336 add imagecleaner, fix #4 2014-11-30 02:48:54 +01:00
jomo 332330f68e replacing all single quotes with double quotes
Until now it was a big mess with some strings using single quotes and some others double quotes
We were using way more double quotes, so I chose to use them globally
2014-11-30 00:07:05 +01:00
jomo 1a7f456c83 fix #23 2014-11-29 23:57:48 +01:00
jomo 60387c8c7c req.secure is always 'http' 2014-11-29 23:20:29 +01:00
jomo e80ddc79f3 Use node instead of npm to start 2014-11-29 23:19:52 +01:00
jomo 4883531127 merge :octocat: 2014-11-29 23:16:50 +01:00
jomo e01cff53b2 re-add checking for existing file before downloading 2014-11-29 23:15:43 +01:00
jomo 8cea2ed65f fix windoge line splitting? 2014-11-29 21:32:13 +01:00
jomo 4f610861e9 Merge branch 'master' of github.com:Jake0oo0/crafatar 2014-11-29 21:25:19 +01:00
jomo db223f1dc6 fix tests 2014-11-29 21:24:59 +01:00
jomo 042129eed4 log used username / uuid in tests 2014-11-29 17:39:50 +01:00
jomo 2cc7b455af using flat badges from shields.io in readme 2014-11-29 17:28:35 +01:00
jomo b98cfa8918 log if uuid was too old or not known 2014-11-29 17:26:24 +01:00
jomo 3d708d2342 fix #22, caused by @e6481e3 2014-11-29 17:15:59 +01:00
jomo 452bb14605 debug log for cloudflare/etag 2014-11-27 13:37:14 +01:00
jomo 6945cda8d6 remove redundant etag modifications
helm and size are URL parameters. An Etag is an identifier for a single URL, not multiple
2014-11-27 13:36:22 +01:00
jomo 37d1f3c2da I think everyone knows how to use <img> 2014-11-25 20:21:04 +01:00
jomo b1e842c12c solve merge conflicts. @Jake0oo0 please don't push to heroku only ;) 2014-11-25 20:02:59 +01:00
jomo b0c66785a7 added avatars to readme 2014-11-25 19:55:50 +01:00
jomo 7d09da8384 add Access-Control-Allow-Origin, fix #19 2014-11-25 00:37:14 +01:00
jomo 95ebaf86c5 use Etag, fix #18 2014-11-25 00:35:25 +01:00
jomo 040aeb1c0c Don't store helm image when user has no helm, fix #16 2014-11-24 23:24:19 +01:00
jomo 0734060d96 oops 💩 2014-11-24 02:31:21 +01:00
jomo fdb52d7d0f add docs for #17 2014-11-24 02:21:59 +01:00
jomo 1dd1ee4d34 allow custom default image, fix #17 2014-11-24 02:12:56 +01:00
jomo 18bec6a196 make html valid 2014-11-24 02:00:01 +01:00
jomo d658a84668 docs improvements 2014-11-24 01:49:00 +01:00
jomo 509bd78c8e add docs for usernames + skins 2014-11-24 01:12:39 +01:00
jomo 55ed86a3f6 skin support, fix #15 2014-11-24 00:53:39 +01:00
jomo 796f410248 allow custom config 2014-11-23 23:19:32 +01:00
jomo bac6a0dadd less spammy tests :) 2014-11-23 23:05:43 +01:00
jomo dd8a3b91e2 using our own logging, allows us to do some eventual modifications 2014-11-23 23:02:45 +01:00
jomo ea3f322c73 test improvements, fix #14 2014-11-23 22:41:27 +01:00
jomo 8ee862596b add test for invalid file updates (#14) 2014-11-23 22:39:02 +01:00
jomo 3b7acbd28d add test for existing files / not re-downloading (#14) 2014-11-23 22:17:40 +01:00
jomo 06172a8aaf add test for textures 404 (#14) 2014-11-23 22:11:07 +01:00
jomo 148ea45631 add test for timing out on username info (#14) 2014-11-23 22:01:11 +01:00
jomo 464c1eab98 add IRC info to readme 2014-11-23 21:56:46 +01:00
jomo e6481e3c73 bug fixes, improvements, fix #13, fix #14 2014-11-23 21:53:42 +01:00
jomo ebd8e18b29 add tests for default avatar 2014-11-23 04:45:39 +01:00
jomo 05d7547a07 tests: dashed uuid should be valid 2014-11-23 04:15:44 +01:00
jomo 3216833887 allow dashed uuid 2014-11-22 21:28:54 +01:00
jomo 3830b3ccf4 more tests w/ timeouts 2014-11-22 21:17:49 +01:00
jomo 42dae4582b logging stuff 2014-11-22 18:04:45 +01:00
jomo df3f008188 fix typo 2014-11-22 17:20:25 +01:00
jomo 7dbfaedb2f allow longer timeouts when testing 2014-11-22 17:20:16 +01:00
jomo 1aeeb19fcf only flush redis when running on heroku; don't delete files on start (see @46f36e9fede3984e85cb1cafa7a4fea67a56176d) 2014-11-22 17:16:55 +01:00
jomo 04066591c5 add comment about heroku + deleting files 2014-11-22 02:27:20 +01:00
jomo 170ca55535 Revert "don't flush redis on start, don't delete images on start"
Ah, we did this because heroku.
2014-11-22 02:24:35 +01:00
jomo 893ac91717 add more tests for usernames 2014-11-22 02:20:21 +01:00
jomo bc8a6d9b15 add usernames.txt
can be used for testing, all usernames (currently) exist but not all of them may have a skin.

It's relatively small compared to uuids.txt.
2014-11-22 02:12:38 +01:00
jomo 7afeafc21a don't flush redis on start, don't delete images on start
I think we initially did this to debug some problems with broken data in redis
2014-11-22 01:50:19 +01:00
jomo 46f36e9fed speed improvement: don't download files that exist on disk 2014-11-22 01:46:34 +01:00
jomo 9dde7e31b5 don't cache on fail 2014-11-22 01:30:50 +01:00
jomo a03ee5d979 more username/uuid tests 2014-11-22 00:56:49 +01:00
jomo 749403e81b fix uuid_valid 2014-11-22 00:32:47 +01:00
jomo 5b5462393d nicer logging format 2014-11-22 00:23:44 +01:00
jomo e828f976f1 removing some errors in networking.skin_file callback
404 shouldn't return an error, null is fine. Setting the error causes that non-existing skins aren't cached. Thus we'd always make a new request to mojang, which will result in hitting the (sessionserver's) rate limit
Removing the error for Too Many Requests for the same reason.
2014-11-22 00:22:08 +01:00
jomo b7a61bbc36 well shit. :poop::poop::poop::poop:💩 2014-11-17 02:52:28 +01:00
jomo 03306dff08 better X-Storage-Type
none: Cached: User has no skin.
cached: Skin cached
checked: cached & checked for updates. No (new) skin
downloaded: checked, Skin changed or unknown, downloaded.
error: (error)
2014-11-10 23:55:56 +01:00
jomo 66914efb19 styles + missing favicon file ;_; 2014-11-10 22:47:30 +01:00
jomo 7954f4ba23 we don't need serve-favicon 2014-11-10 01:59:03 +01:00
jomo 05bc54721b fix content margin-top
floating header is 50px and has a 20px margin-bottom (which is obviously not applied)
2014-11-09 23:34:36 +01:00
jomo 9b3720e6fe add alt tags to images 2014-11-09 23:26:28 +01:00
jomo c8c686133f fix link -> meta tag 2014-11-09 23:24:47 +01:00
jomo 6c3136712d fix jade markup, link to #, remove commented code 2014-11-09 23:21:17 +01:00
jomo fe82720ff6 comply with html standards
image/x-icon is not a valid MIME type. the valid MIME for ico files is image/vnd.microsoft.icon.
the .ico file also contained 3 sizes (which we don't really need), which were poorly resized. One of the sizes actually had glitches, see https://i.imgur.com/OGWpggH.png

the /favicon.ico file remains, but contains only 1 image. The link/icon meta tag complies with the standard defined at
https://html.spec.whatwg.org/multipage/semantics.html#rel-icon. It links to favicon.png using image/png.

The ico file has been compressed to 1.1KB and the PNG is 0.5KB.
2014-11-09 23:19:46 +01:00
jomo 24fcc70973 add some meta tags 2014-11-09 22:05:58 +01:00
jomo a6514ad104 add missing status to comments 2014-11-09 20:57:12 +01:00
jomo f9fe00b36c fix coveralls? 2014-11-08 04:36:25 +01:00
jomo 987cbe911a remove some stuff 2014-11-08 03:54:14 +01:00
jomo 814e4ee66b fix coveralls / travis? :o 2014-11-08 03:13:52 +01:00
jomo d8041c3ccd fix travis badge 2014-11-08 03:00:48 +01:00
jomo 4d562d70c4 use coveralls 2014-11-08 02:58:16 +01:00
jomo 2de0b0f9be add coveralls badge 2014-11-08 02:16:08 +01:00
jomo db84f8745b comment = 👍 2014-11-08 02:13:42 +01:00
jomo 93623905ac use stictEqual where applicable, add tests 'should not exist' and 'should exist without skin' 2014-11-08 02:02:02 +01:00
jomo c545c47ddf use \n instead of \r\n 2014-11-08 01:33:01 +01:00
jomo 653590228f cache valid UUIDs without skin 2014-11-08 01:16:46 +01:00
jomo 230444f866 add clean_images.sh, fixes #4 2014-11-08 00:23:25 +01:00