I hereby claim:
- I am kembuco on github.
- I am kevinb (https://keybase.io/kevinb) on keybase.
- I have a public key ASAsR_duO3VCF7yR6TDus89aZJ7d1haLcXFi-d7PE4mBPQo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| /*global phantom:true, console:true, WebPage:true, Date:true*/ | |
| (function () { | |
| var url, timeout, page, defer; | |
| if (phantom.args.length < 1) { | |
| console.log("Usage: phantomjs run-mocha.coffee URL [timeout]"); | |
| phantom.exit(); | |
| } | |
| url = phantom.args[0]; |
| script(id='pageTpl', type='text/html') | |
| | <div class="page"> | |
| | <div class="head"><%=title%> - <%=path%></div> | |
| | <div class="body"> | |
| | <ul> | |
| | <% _(actions).each(function(action) { %> | |
| | <li> | |
| | <%=action.name%> - <%=Helpers.df(action.time)%> | |
| | <% if (action.ext) { %> | |
| | <i class="pop icon-info-sign" data-content="<%=_.template($('#extTpl').html(), action)%>" data-original-title="Extra Information"></i> |
| <beans:bean class="com.fergiggles.giggledust.dust.DustViewResolver"> | |
| <beans:property name="prefix" value="/WEB-INF/views/" /> | |
| <beans:property name="suffix" value=".dust" /> | |
| </beans:bean> |
| <!doctype html> | |
| <html> | |
| <head> | |
| <title>Giggle Dust</title> | |
| </head> | |
| <body> | |
| <h3>Hello, {name}!</h3> | |
| <div>Are you doing it fer giggles?</div> | |
| </body> | |
| </html> |
| @Controller | |
| public class HomeController { | |
| @RequestMapping(value = "/home/{name}", method = RequestMethod.GET) | |
| public String home(Model model, @PathVariable String name) { | |
| model.addAttribute("name", name); | |
| return "home"; | |
| } | |
| } |
| var result; | |
| (function() { | |
| load(basePath + "/dust/dust-full-0.3.0.js"); | |
| var entries = modelMap.entrySet().iterator(), | |
| model = {}, | |
| entry; | |
| // Convert model from java Map to javascript Object |
| public class DustView extends AbstractTemplateView { | |
| @Override | |
| protected void renderMergedTemplateModel(Map<String, Object> model, HttpServletRequest request, HttpServletResponse response) throws Exception { | |
| try { | |
| String basePath = getServletContext().getRealPath(""); | |
| Context cx = ContextFactory.getGlobal().enterContext(); | |
| cx.setOptimizationLevel(-1); |
| package com.fergiggles.giggledust.dust; | |
| import org.springframework.web.servlet.view.AbstractTemplateViewResolver; | |
| public class DustViewResolver extends AbstractTemplateViewResolver { | |
| public DustViewResolver() { | |
| setViewClass(requiredViewClass()); | |
| } | |
| @Override |
| forward 50 | |
| right 90 | |
| forward 50 | |
| right 90 | |
| forward 50 | |
| right 90 | |
| forward 50 |