Skip to content

Instantly share code, notes, and snippets.

View jstrachan's full-sized avatar

James Strachan jstrachan

View GitHub Profile
table.people
= for (p <- people)
td.name = p.name
td.address = p.customer.address
td.notes
"this is some text #{p.blah}"
new $ {
// replace contents
$("table.people").contents {
for (p <- people) {
$("td.name") = p.name
$("td.address") = p.customer.address
}
// replace entire stuff
$("foo") {
new $(xml) {
new $("li.dog") {
$(".name").assertText = "foo"
}
}
Exception in thread "main" org.codehaus.plexus.PlexusContainerException: Cycle detected in component graph in the system:
at org.codehaus.plexus.DefaultPlexusContainer.initialize(DefaultPlexusContainer.java:624)
at org.codehaus.plexus.DefaultPlexusContainer.construct(DefaultPlexusContainer.java:281)
at org.codehaus.plexus.DefaultPlexusContainer.<init>(DefaultPlexusContainer.java:172)
at org.fusesource.scalate.tool.Scalate$.createContainer(Scalate.scala:136)
at org.fusesource.scalate.tool.Scalate$.container(Scalate.scala:120)
at org.fusesource.scalate.tool.Scalate$.lookup(Scalate.scala:148)
at org.fusesource.scalate.tool.Scalate$.createArchetype(Scalate.scala:75)
at org.fusesource.scalate.tool.Scalate$.main(Scalate.scala:58)
at org.fusesource.scalate.tool.Scalate.main(Scalate.scala)
Release steps when about to release 1.2
* whenever there is a checkin to 'last-release' branch (currently at 1.1) we redeploy the site.
time passes until we're about to do 1.2
* deploy the website of last-release branch (which is at 1.1) to the site/versions/1.1
* release 1.2 from master
* merge master to 'last-release' branch
* the last-release branch is then used to create the website (so it all moves to 1.2)
Provider message:
The git-push command failed.
Command output:
remote: error: refusing to update checked out branch: refs/heads/master
remote: error: By default, updating the current branch in a non-bare repository
remote: error: is denied, because it will make the index and work tree inconsistent
remote: error: with what you pushed, and will require 'git reset --hard' to match
remote: error: the work tree to HEAD.
remote: error:
remote: error: You can set 'receive.denyCurrentBranch' configuration variable to
Counting objects: 148, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (122/122), done.
Writing objects: 100% (137/137), 95.72 KiB, done.
Total 137 (delta 81), reused 0 (delta 0)
To git@github.com:dpp/liftweb.git
badee3a..8d20382 280_port_refresh -> 280_port_refresh
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'git@github.com:dpp/liftweb.git'
To prevent you from losing history, non-fast-forward updates were rejected
new Transformer {
$(".person") { node =>
people.flatMap { p =>
new Transform(node) {
$(".name").contents = p.name
$(".location").contents = p.location
}
}
}
}
package org.fusesource.scalate.mustache
import util.parsing.combinator.RegexParsers
import util.parsing.input.{Positional, CharSequenceReader, NoPosition, Position}
import org.fusesource.scalate.{InvalidSyntaxException, TemplateException}
sealed abstract class Statement extends Positional {
}
case class Text(value: String) extends Statement {
package org.fusesource.scalate.mustache
import util.parsing.combinator.RegexParsers
import util.parsing.input.{Positional, CharSequenceReader, NoPosition, Position}
import org.fusesource.scalate.{TemplateException}
sealed abstract class Statement extends Positional {
}
case class Text(value: String) extends Statement {