Skip to content

Commit 021921d

Browse files
committed
Merge branch 'master' of github.com:nko/website
2 parents 6098d27 + b012e77 commit 021921d

File tree

3 files changed

+14
-7
lines changed

3 files changed

+14
-7
lines changed

models/models.coffee

+6
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,12 @@ class Team
9393
else
9494
@generateSlug fn, @slug + '-' # try with another -
9595

96+
toJoyentSlug: ->
97+
@slug.replace(/^(\d)/, 'ko-$1')
98+
99+
toHerokuSlug: ->
100+
'nko-' + @slug.replace(/_/g, '-').substring(0, 26)
101+
96102
nko.Team = Team
97103

98104
class Person

script/post-receive

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
curl -X POST -d url=http://$(hostname).no.de -d head=$rev -d head_long=$newrev http://nodeknockout.com/deploys
1+
curl -X POST -d url=http://$(hostname).no.de -d app=$(hostname) -d head=$rev -d head_long=$newrev http://nodeknockout.com/deploys

views/teams/show.html.haml

+7-6
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@
1212
%h3 NOT YET DEPLOYED
1313
.setup_instructions{ style: 'display:' + (ctx.team.lastDeployedTo ? 'none' : '') }
1414
%p.note
15-
You can deploy to either Joyent or Heroku.
15+
You can deploy to either
16+
!= ' <a href="http://nodeknockout.posterous.com/countdown-to-knockout-post-11-deploying-to-jo">Joyent</a> '
17+
or
18+
!= ' <a href="http://nodeknockout.posterous.com/countdown-to-knockout-post-8-deploying-to-her">Heroku</a>.'
1619
%br
1720
We will use the server from the most recent deploy.
1821
%table
@@ -42,8 +45,7 @@
4245
%li
4346
%code
4447
git remote add joyent \\<br/> ssh://node@
45-
= ctx.team.slug.replace(/^(\d)/, 'ko-$1')
46-
\.no.de/repo
48+
= ctx.team.toJoyentSlug() + '.no.de/repo'
4749
%li
4850
%code git push joyent master
4951
%td
@@ -53,9 +55,8 @@
5355
.coupon &nbsp;
5456
%li
5557
%code
56-
git remote add heroku \\<br/> [email protected]:nko-
57-
= ctx.team.slug
58-
\.git
58+
git remote add heroku \\<br/> [email protected]:
59+
= ctx.team.toHerokuSlug() + '.git'
5960
%li
6061
%code git push heroku master
6162

0 commit comments

Comments
 (0)