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
$workingDirectory = $args[0] | |
$machine = $args[1] | |
$environment = $args[2] | |
$configuration = $args[3] | |
Set-Location $workingDirectory | |
# read the version file, which indicates which version we're going to deploy | |
$versionFile = resolve-path ../Version | |
$version = Get-Content $versionFile |
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
App.Application = Ember.Object.extend({ | |
hasUnread: false, | |
name: null, | |
environment: null, | |
shortEnvironment: function () { | |
var env = this.get('environment'); | |
if (env == 'development') { | |
return 'dev'; | |
} |
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
source: Em.Route.extend({ | |
route: '/source/:application_id', | |
connectOutlets: function (router, application) { | |
router.set('navigationController.selected', 'logs'); | |
router.get('applicationController').connectOutlet('source', application); | |
}, | |
deleteApplication: function (router) { | |
var application = router.get('sourceController').get('content'); | |
application.deleteRecord(); | |
App.store.commit(); |
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 HttpResponseMessage Post(IEnumerable<Message> messages) | |
{ | |
try | |
{ | |
Logger.Info("POST MessagesController::Create"); | |
if (messages.Any(m => !m.IsValid)) | |
{ | |
return new HttpResponseMessage(HttpStatusCode.BadRequest) | |
{ |
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 Application : IIdentifiable | |
{ | |
public ObjectId Id { get; set; } | |
public string Name { get; set; } | |
public string Environment { get; set; } | |
public long TotalMessages { get; set; } |
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 MessageHeader : IMessageHeader | |
{ | |
public MessageHeader() | |
{ | |
} | |
public MessageHeader(string message) | |
{ | |
Body = message; | |
} |
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
subscribe: function (connection) { | |
console.log(" -> subscribing to application updates"); | |
var subscriber = connection.applicationHub; | |
var store = App.store; | |
subscriber.client.applicationUpdated = function (data) { | |
data.forEach(function (d) { | |
var persisted = store.find(App.Application, d.id); | |
persisted.set('last_message', d.last_message); |
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
$('.button').each(function () { | |
var location = $(this).attr('href'); | |
$(this).click(function (e) { | |
var image = $('<img/>'); | |
image.error(function () { | |
window.location = location; | |
}).load(function () { | |
window.location = location; | |
}).attr('src', location); |
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 UpdateJobIsPinned : IUpdate<Job, bool> | |
{ | |
public UpdateJobIsPinned(string id, bool isPinned) | |
{ | |
Id = id; | |
IsPinned = isPinned; | |
} | |
public string Id { get; private set; } |
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
/// <summary> | |
/// Repository interface | |
/// </summary> | |
public interface IMongoRepository | |
{ | |
/// <summary> | |
/// Indicates whether or not the repository can connect to the underlying | |
/// mongo instance | |
/// </summary> | |
bool CanConnect { get; } |