- Serenity Runner
- Fubu Projections
- fubu new command
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// fubuvalidation.js v0.5.7 | |
// | |
// Copyright (C)2011 Joshua Arnold | |
// Distributed under Apache License, Version 2.0 | |
// | |
// https://github.com/DarthFubuMVC/fubuvalidation-js | |
(function ($, continuations) { | |
_.templateSettings = { interpolate: /\{\{(.+?)\}\}/g }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Timer | |
constructor: (interval) -> | |
@handle = null | |
@interval = interval | |
start: () -> | |
action = @action | |
@handle = window.setInterval(action, @interval) | |
stop: -> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class UniqueUsernameRule : IFieldValidationRule | |
{ | |
private readonly IEntityRepository _repository; | |
public UniqueUsernameRule(IEntityRepository repository) | |
{ | |
_repository = repository; | |
} | |
public void Validate(Accessor accessor, ValidationContext context) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class Wait | |
{ | |
public static void Until(Func<bool> condition, int millisecondPolling = 500, int timeoutInMilliseconds = 5000) | |
{ | |
if (condition()) return; | |
var clock = new Stopwatch(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class AjaxContinuationExtensions | |
{ | |
public const string TOPIC = "topic"; | |
public const string PAYLOAD = "payload"; | |
public static AjaxContinuation SetPayload(this AjaxContinuation continuation, string topic, object payload) | |
{ | |
continuation[PAYLOAD] = payload; | |
continuation[TOPIC] = topic; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(function() { | |
var helloView = null; | |
var helloScreen = { | |
activate: function() { | |
helloView = $.diagnostics.createView('Hello World!'); | |
helloView.configure(function() { | |
this.append('<p>Check this out</p>'); | |
}); | |
helloView.show(); | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface ISessionBoundary : IDisposable | |
{ | |
IDocumentSession Session(); | |
bool WithOpenSession(Action<IDocumentSession> action); | |
void SaveChanges(); | |
void Start(); | |
void MakeReadOnly(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class TemplateExtensions | |
{ | |
public static string ToMustacheKey(this string name) | |
{ | |
return "{{" + name + "}}"; | |
} | |
public static string ToMustacheKey<T>(this Expression<Func<T, object>> expression) | |
{ | |
return expression.ToAccessor().Name.ToMustacheKey(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
amplifyDiagnostics = (function () { | |
var messages = []; | |
var publish = amplify.publish; | |
amplify.publish = function () { | |
var msg = { | |
topic: arguments[0] | |
}; | |
if (arguments.length != 1) { | |
msg.data = arguments[1]; |