557 Commits

Author SHA1 Message Date
Remy Sharp
131d75968c Extended /<user>/last support to /<user>/last-n
So /rem/last still works, but also /rem/last-1 gives me the penulimate bin I worked on.
2013-11-02 15:38:23 +00:00
Remy Sharp
8e46260244 FIRE!!!! 2013-10-04 16:08:53 +01:00
Remy Sharp
a13cfd18a9 Seriously? I seem to be breaking really old code... 2013-10-04 16:06:11 +01:00
Remy Sharp
811cc6bff9 Only show panels with content (...again) 2013-10-04 16:01:09 +01:00
Remy Sharp
82039849e7 Updated prepopuation to support processors
Used to only support HTML, CSS and JavaScript (with alias support), but now it will correctly move posted values for coffeescript, less, etc to the right processor.

Feels pretty hacky the way it's been done though, and highlights the issue with aliases (or rather inconsistent) naming on the live/output panel. I prefer output, but legacy code has 'live'.

Note already exists, but saying again: editor.js needs a refactor.
2013-10-04 15:54:45 +01:00
Remy Sharp
29f2a13430 FUCK YOU COMMA! 2013-09-27 13:37:20 +01:00
Remy Sharp
05cbcc9591 testing, eh? 2013-09-27 13:36:28 +01:00
Remy Sharp
ff632aa970 attempt to expose 500 errors 2013-09-27 13:33:59 +01:00
Remy Sharp
036a01d3bd Fixed posting API to also allow opening default panels 2013-09-27 13:25:01 +01:00
Remy Sharp
d41591ffa5 Add default redirect for github auth
Prevents recent regular crashing
2013-09-18 23:43:49 +02:00
Aron Carroll
8af5eefabc Handle errors raised by passport-github
Despite being a 401 they currently bubble up to the top level error
handler, here we redirect the user back to the app with a friendly
flash message.
2013-09-18 19:59:36 +02:00
Remy Sharp
b02dad6d2d revert domain cookie change - seems to break login - crap 2013-09-13 09:45:56 +01:00
Remy Sharp
38105883b4 Fixed redirect on team pages to login
BUT: requires clearing of cookies for it to work first. Not ideal...ref #857
2013-09-12 16:45:50 +01:00
Remy Sharp
bfb2d0d3fa Fixed revision bumping on codecasting & live reload 2013-09-12 16:16:07 +01:00
Remy Sharp
b0a95a6240 Cache bust the spike.js in the preview. Fixes #801...I hope 2013-09-12 14:45:00 +01:00
Remy Sharp
678c7bc68c Runner wasn't being set properly :-\ 2013-09-12 14:28:22 +01:00
Remy Sharp
e3718aca56 s/runnerHost/runner/g 2013-09-12 12:04:15 +01:00
Remy Sharp
b9b6515c01 Merge branch 'master' of github.com:spdustin/jsbin into spdustin-master 2013-09-12 12:02:38 +01:00
Remy Sharp
707d95b89c Removed stylus support from the server 2013-09-11 11:44:11 +01:00
Dustin Miller
10164212d6 Added comment to helper for runnerHost 2013-09-10 10:57:43 -05:00
Dustin Miller
be3ab85f96 Added option url.runnerhost, remove regexp jsbin to run.jsbin in URL 2013-09-09 17:58:33 -05:00
Remy Sharp
84308ef680 Add in pro group accounts for emberjs & codeclub 2013-09-08 12:19:16 +01:00
Remy Sharp
4353bdc871 Attempt to prevent crash on bumpRevision
Note that this is just a patch to a problem, the actual source of which is unknown.
2013-09-04 14:22:27 +01:00
Remy Sharp
7c3452ad52 asthetics 2013-09-02 22:23:13 +01:00
Remy Sharp
71c4a23483 Merge branch 'ably-forks-api-fixup' 2013-09-02 22:02:02 +01:00
Remy Sharp
39a416c94c Fixed #819 - should have returned when no result 2013-08-31 23:11:00 +01:00
Remy Sharp
a7270b12d1 Fixed #819. Thowing exception when user had no bins 2013-08-31 19:50:31 +01:00
Remy Sharp
619dd63e38 attempt to prevent jsbin from crash on ropy urls... 2013-08-31 19:45:02 +01:00
Remy Sharp
dc34c19448 Shorten bin urls to 4 characters
And add glyph font
2013-08-20 14:13:18 +01:00
Remy Sharp
626ad51354 Ensure userhome page references static.jsbin rather than hitting node 2013-08-18 17:54:49 +01:00
Remy Sharp
5e9d01f033 Fix #765 and #793. Increase bin url length and posibilities.
The error was:

a) being caused by strings being passed up through the error handler - instead of actual error objects.
b) more importantly, the 10 tries jsbin was attempting to get a new bin id, it was failing!!!! so I've increased the chances by adding uppercase characters (doubling the possibilties) and on each hit on an existing bin, the shortcode will get longer
2013-08-16 21:58:30 +01:00
Vivek Verma
bbbb493fe0 when archive or unarchive is clicked on Bins under "my Bins",
node crashes and throws a error that 'results are not defined'.

This happens because of silly spelling mistake
in archiveBin in file lib/db/sqlite.js, see commit.

.
2013-08-12 22:10:12 +05:30
Oliver Dain
17fbdacd7d The Passport github module uses options.github.* before the check to see
if they've been set in the config. This causes the app to crash if
things aren't configured for github. Fixed.
2013-08-11 12:28:20 -07:00
Vivek Verma
90ece2e20b wrong order of values in setUser query prevents creating new user
Sql query parameters as defined in lib/db/sql_template.json has github token and id at as last parameter. But, in lib/db/sqlite.json github_token is assigned where there should datetime value in last_login. Thus, resulting is error like "SQLITE CONSTRAINTS: ownership.last_login cannot be null" on console if github authentication is not used for login.
This commit attempts to fix that error and enable registering new users again.
2013-08-06 13:53:40 +05:30
Remy Sharp
095bf1dad0 Fixed #754 no longer requires config with github id
If there's no github config found, then it returns a dummy function.
2013-08-05 21:56:40 +01:00
Remy Sharp
bde67cf321 revert 2013-07-30 18:35:36 +01:00
Remy Sharp
25e2c7c4d6 prevents crash when bin is not found 2013-07-30 18:33:00 +01:00
Remy Sharp
05745d18cb prevent jsbin from crashing when ping is undefined 2013-07-29 07:37:29 +01:00
Remy Sharp
3579f9a73e fricking typo - thanks @aron 2013-07-28 23:25:36 +01:00
Remy Sharp
482556fb9c Fixed jsbin crashing when no accept header - seemed AppEngine was coming in and bombing jsbin... 2013-07-28 09:14:39 +01:00
Remy Sharp
dd6ea259a1 allow switching to concat only view of scripts - this can be removed eventually 2013-07-24 22:51:25 +01:00
Remy Sharp
542b2cdc9d dynamic method of switching to debug in production 2013-07-24 21:48:22 +01:00
Matthew O'Riordan
ec696bbb0a Ensure API is stateless (no session cookie) 2013-07-24 12:16:02 +01:00
Matthew O'Riordan
c96ef68294 Allow any config property to be overridden with Env var
Using format JSBIN_[KEY]_[KEY]=whatever

for example the following config setting:
   {
     "url": {
       "host": "localhost:3300"
     }
   }
can be overriden with the following environment variable set
JSBIN_URL_HOST=my.url.com
2013-07-24 12:16:02 +01:00
Matthew O'Riordan
2ac443d4de Clearer naming for api options allowAnonymousRead[Write] 2013-07-24 12:16:02 +01:00
Matthew O'Riordan
e342bec320 Ensure API authenticated users own their bins
Previously the API key was used for authentication to allow non anonymous API access, however the bin created was not marked as owned by that user.
2013-07-24 12:16:02 +01:00
Matthew O'Riordan
aaaad0e845 Store user against bin even if allowAnonymous is true
Previously because an API key was only validated if allowAnonymous was true, an invalid API key could be provided and the request would have been accepted, and also if a valid API key was provided it was not used to authenticate the user.
2013-07-24 12:15:12 +01:00
Matthew O'Riordan
6f4c23e59e Bug fix for commit API commit b537de085422827887c07d0258a3d3c1df17678e
The previous commit b537de0854 (L3R67) resulted in the API not being available to authenticated users.  The statement if (allowAnonymous) around the route prevented the route being available.  It is unnecessary to enforce this at a routing level as the middleware b537de0854/lib/middleware.js (L209) prevents API write requests without correct authentication.
2013-07-24 12:15:12 +01:00
Remy Sharp
724c188db6 if no email from github, use empty string, not null 2013-07-20 12:47:25 +01:00
Remy Sharp
4702a4c962 return error to user notice when github auth fails 2013-07-20 12:44:17 +01:00