Skip to content

Commit 5ff6eee

Browse files
authored
Merge branch 'jsbin:master' into master
2 parents 7ec5d2b + 59b6ad8 commit 5ff6eee

34 files changed

+2336
-1430
lines changed

.github/stale.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Number of days of inactivity before an issue becomes stale
2+
daysUntilStale: 30
3+
# Number of days of inactivity before a stale issue is closed
4+
daysUntilClose: 7
5+
# Issues with these labels will never be considered stale
6+
exemptLabels:
7+
- pinned
8+
- security
9+
# Label to use when marking an issue as stale
10+
staleLabel: stale
11+
# Comment to post when marking an issue as stale. Set to `false` to disable
12+
markComment: >
13+
This issue has been automatically marked as stale because it has not had
14+
recent activity. More importantly, jsbin has been undergoing a massive
15+
refactor by Remy, and a large number of issues have been resolved, but
16+
with the growing 600+ open issues, the Stalebot (me), has been brought in
17+
to try to manage the issues.
18+
19+
Keep an eye on jsbin.com blog posts and the @js_bin twitter account for
20+
updates on the new version of jsbin ❤️
21+
22+
It will be closed next week if no further activity occurs. Thank you
23+
for your contributions.
24+
# Comment to post when closing a stale issue. Set to `false` to disable
25+
closeComment: false

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
.vscode/
12
logs
23
logs/*
34
config.*.json

README.markdown

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
1+
**IMPORTANT:** this current version of jsbin (v4.x.x) is no longer actively maintained and the new version of jsbin (v5) is currently in active development. This means that pretty much all the docs in this repo will be soon out of date. Please be warned ❤️
2+
3+
☝️☝️☝️☝️☝️☝️☝️☝️☝️☝️☝️☝️☝️☝️☝️☝️☝️☝️☝️☝️☝️☝️☝️☝️☝️☝️☝️☝️☝️☝️☝️☝️☝️☝️
4+
5+
---
6+
17
# JS Bin
28

39
JS Bin is an open source collaborative web development debugging tool.
410

511
## If you use JS Bin locally...
612

7-
It likely means you're not going to subscribe as a pro user - which is how we're sustaining our project, which is cool, but [please consider donating via Gratipay here](https://gratipay.com/jsbin/).
8-
9-
## IMPORTANT NOTICE
10-
11-
Current documentation does not reflect [email protected] - this is a work in progress and community support is welcome to update how to use locally. ❤️
13+
It likely means you're not going to subscribe as a pro user - which is how we're sustaining our project, which is cool, but [please consider donating via OpenCollective here](https://opencollective.com/jsbin/contribute).
1214

1315
## What can JS Bin do?
1416

@@ -87,9 +89,9 @@ End points are:
8789

8890
## Backers
8991

90-
[Become a backer]((https://opencollective.com/jsbin#backer)) and show your support to our open source project.
92+
[Become a backer]((https://opencollective.com/jsbin/contribute)) and show your support to our open source project.
9193

9294

9395
## Sponsors
9496

95-
Does your company use JS Bin? Ask your manager or marketing team if your company would be interested in supporting our project. Support will allow the maintainers to dedicate more time for maintenance and new features for everyone. Also, your company's logo will show [on GitHub](https://github.com/jsbin/jsbin#readme) --who doesn't want a little extra exposure? [Here's the info](https://opencollective.com/jsbin#sponsor).
97+
Does your company use JS Bin? Ask your manager or marketing team if your company would be interested in supporting our project. Support will allow the maintainers to dedicate more time for maintenance and new features for everyone. Also, your company's logo will show [on GitHub](https://github.com/jsbin/jsbin#readme) --who doesn't want a little extra exposure? [Here's the info](https://opencollective.com/jsbin/contribute).

docs/running-your-own-jsbin.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@
22

33
JS Bin is a [Node](http://nodejs.org) project.
44

5-
Install in 3 simple steps:
5+
Install in 2 steps:
66

77
1. Installing code
88
2. Configuration
9-
3. Database
109

1110
For the simplest install process we recommend using Node with SQLite.
1211

@@ -110,4 +109,4 @@ JS Bin has end-to-end tests. The tests can be found in `tests/e2e` folder.
110109

111110
Running the tests (JS Bin has to be running on port http://localhost:3000):
112111

113-
$ npm run e2e
112+
$ npm run e2e

emails/reset-password.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ It looks like you've requested an email to reset your {{domain}} password.
55
Just click the following link and you'll be logged into JSBin, from there you
66
can change your password from the account menu.
77

8-
{{link}}
8+
{{{link}}}
99

1010
This link will expire in 24 hours so don't wait around.
1111

lib/app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,14 +312,14 @@ app.connect = function (callback) {
312312
}));
313313

314314
app.emit('before:router', app);
315-
app.use(mount, routes(app));
316315

317316
// All routes must be registered after middleware
318317
// Register stripe webhooks
319318
if (options.payment && options.payment.stripe && options.store.adapter === 'mysql') {
320319
stripeRoutes(app);
321320
}
322321
// Register all routes
322+
app.use(mount, routes(app));
323323

324324
app.emit('after', app);
325325

lib/data/features-alt.json

Lines changed: 28 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,29 @@
1-
{ "features": [
2-
{
3-
"name": "<strong>Unlimited</strong> private & public bins",
4-
"user": "pro",
5-
"tip": "Keep your ideas private, and easily toggle privacy"
6-
},
7-
{
8-
"name": "<strong>Unlimited & secure</strong> embeds, with custom theming",
9-
"user": "pro",
10-
"tip": "SSL support, complete CSS customisation and control over editor settings"
11-
},
12-
{
13-
"name": "<strong>1GB storage</strong> for your uploaded assets",
14-
"user": "pro",
15-
"tip": "Just drag and drop assets into your bins for quick & easy use"
16-
},
17-
{
18-
"name": "<strong>Unlimited</strong> dropbox sync",
19-
"user": "pro",
20-
"tip": "Every bin, backed up to your Dropbox"
21-
},
22-
{
23-
"name": "Unique vanity URLs",
24-
"user": "pro",
25-
"tip": "Show off your Pro status with you.jsbin.com"
26-
},
27-
{
28-
"name": "<strong>Support JS Bin's continued operation</strong>",
29-
"user": "pro",
30-
"tip": "Help keep JS Bin online, working, and awesome"
31-
}
32-
]
1+
{
2+
"features": [
3+
{
4+
"name": "<strong>Unlimited</strong> private & public bins",
5+
"user": "pro",
6+
"tip": "Keep your ideas private, and easily toggle privacy"
7+
},
8+
{
9+
"name": "<strong>Unlimited</strong> embeds, with custom theming",
10+
"user": "pro",
11+
"tip": "SSL and non-SSL support, complete CSS customisation and control over editor settings"
12+
},
13+
{
14+
"name": "<strong>1GB storage</strong> for your uploaded assets",
15+
"user": "pro",
16+
"tip": "Just drag and drop assets into your bins for quick & easy use"
17+
},
18+
{
19+
"name": "Unique vanity URLs",
20+
"user": "pro",
21+
"tip": "Show off your Pro status with you.jsbin.com"
22+
},
23+
{
24+
"name": "<strong>Support JS Bin's continued operation</strong>",
25+
"user": "pro",
26+
"tip": "Help keep JS Bin online, working, and awesome"
27+
}
28+
]
3329
}

lib/data/features.json

Lines changed: 68 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,69 @@
1-
{ "features": [
2-
{
3-
"name": "Support JS Bin's continued operation",
4-
"user": "pro",
5-
"tip": "Help keep JS Bin online, working, and awesome"
6-
},
7-
{
8-
"name": "Asset uploading",
9-
"user": "pro",
10-
"tip": "Just drag and drop assets into your bins for quick & easy use"
11-
},
12-
{
13-
"name": "Private bins",
14-
"user": "pro",
15-
"tip": "Keep your ideas private, and easily toggle privacy"
16-
},
17-
{
18-
"name": "Embeds: SSL & custom CSS",
19-
"user": "pro",
20-
"tip": "SSL support, complete CSS customisation and control over editor settings"
21-
},
22-
{
23-
"name": "Dropbox sync",
24-
"user": "pro",
25-
"tip": "Every bin, backed up to your Dropbox"
26-
},
27-
{
28-
"name": "Vanity URLs",
29-
"user": "pro",
30-
"tip": "Show off your Pro status with you.jsbin.com"
31-
},
32-
{
33-
"name": "Email support",
34-
"user": "pro",
35-
"tip": "For private support requests"
36-
},
37-
{
38-
"name": "Full, unmodified output",
39-
"user": "free",
40-
"tip": "Perfect for testing viewports on mobile and more"
41-
},
42-
{
43-
"name": "Save bins to Gist",
44-
"user": "free",
45-
"tip": "Export the complete HTML to a Gist"
46-
},
47-
{
48-
"name": "Codecasting (unlimited)",
49-
"user": "anon",
50-
"tip": "Allow viewers to watch you code, in real-time"
51-
},
52-
{
53-
"name": "Live reload (unlimited)",
54-
"user": "anon",
55-
"tip": "Output live reloads as you code, in real-time"
56-
},
57-
{
58-
"name": "Custom starting code",
59-
"user": "anon",
60-
"tip": "Start with only a doctype? Set your \"new\" template"
61-
}
62-
],
63-
"tweets": ["499277531313631233", "492754486319140865", "492058646118158336", "491948444165365761", "491946894051270656", "491945957450612736", "459041574043664384", "450920759402434561"]
1+
{
2+
"features": [
3+
{
4+
"name": "Support JS Bin's continued operation",
5+
"user": "pro",
6+
"tip": "Help keep JS Bin online, working, and awesome"
7+
},
8+
{
9+
"name": "Asset uploading",
10+
"user": "pro",
11+
"tip": "Just drag and drop assets into your bins for quick & easy use"
12+
},
13+
{
14+
"name": "Private bins",
15+
"user": "pro",
16+
"tip": "Keep your ideas private, and easily toggle privacy"
17+
},
18+
{
19+
"name": "Embeds & custom CSS",
20+
"user": "pro",
21+
"tip": "SSL and non SSL embeds, complete CSS customisation and control over editor settings"
22+
},
23+
{
24+
"name": "Vanity URLs",
25+
"user": "pro",
26+
"tip": "Show off your Pro status with you.jsbin.com"
27+
},
28+
{
29+
"name": "Email support",
30+
"user": "pro",
31+
"tip": "For private support requests"
32+
},
33+
{
34+
"name": "Full, unmodified output",
35+
"user": "free",
36+
"tip": "Perfect for testing viewports on mobile and more"
37+
},
38+
{
39+
"name": "Save bins to Gist",
40+
"user": "free",
41+
"tip": "Export the complete HTML to a Gist"
42+
},
43+
{
44+
"name": "Codecasting (unlimited)",
45+
"user": "anon",
46+
"tip": "Allow viewers to watch you code, in real-time"
47+
},
48+
{
49+
"name": "Live reload (unlimited)",
50+
"user": "anon",
51+
"tip": "Output live reloads as you code, in real-time"
52+
},
53+
{
54+
"name": "Custom starting code",
55+
"user": "anon",
56+
"tip": "Start with only a doctype? Set your \"new\" template"
57+
}
58+
],
59+
"tweets": [
60+
"499277531313631233",
61+
"492754486319140865",
62+
"492058646118158336",
63+
"491948444165365761",
64+
"491946894051270656",
65+
"491945957450612736",
66+
"459041574043664384",
67+
"450920759402434561"
68+
]
6469
}

lib/data/welcome-panel.json

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,6 @@
2525
"title": "Private bins",
2626
"link": "http://jsbin.com/help/private-bins"
2727
},
28-
{
29-
"title": "Dropbox backup",
30-
"link": "http://jsbin.com/help/dropbox"
31-
},
3228
{
3329
"title": "Vanity URLs",
3430
"link": "http://jsbin.com/help/vanity-urls"
@@ -61,11 +57,11 @@
6157
},
6258
"twitter": {
6359
"title": "Donate to JS Bin ❤",
64-
"link": "https://gratipay.com/jsbin",
60+
"link": "https://opencollective.com/jsbin/contribute",
6561
"data": [
6662
{
6763
"title": "Support JS Bin to keep the project open source & MIT for all",
68-
"link": "https://gratipay.com/jsbin"
64+
"link": "https://opencollective.com/jsbin/contribute"
6965
},
7066
{
7167
"title": "Follow @js_bin on twitter",

lib/errors.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,12 @@ exports.NotFound = HTTPError.extend({
5353
}
5454
});
5555

56+
exports.Gone = HTTPError.extend({
57+
constructor: function Gone(message) {
58+
HTTPError.call(this, 410, message);
59+
}
60+
});
61+
5662
exports.BinNotFound = exports.NotFound.extend({
5763
constructor: function BinNotFound(message) {
5864
exports.NotFound.call(this, 404, message);
@@ -103,6 +109,8 @@ exports.create = function (status, message) {
103109
return new exports.Forbidden(message);
104110
case 404:
105111
return new exports.NotFound(message);
112+
case 410:
113+
return new exports.Gone(message);
106114
default:
107115
return new exports.HTTPError(status, message);
108116
}

0 commit comments

Comments
 (0)