- Put
reporter.js
intests/helpers/reporter.js
- Change
tests/test-helper.js
to look like the attached - Put
test-container-styles.css
invendor/ember-cli-mocha
to override the default - Stop your server and restart (it doesn't watch
vendor/
by default)
This file contains 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
# $AZURE_REPO_URL needs to be set in your projects Variables section | |
# and include both username and password, e.g: https://username:password@site.scm.azurewebsites.net:443/site.git | |
# Clone Azure repository | |
git clone $AZURE_REPO_URL ~/azure | |
cd ~/azure | |
# Replace repository contents | |
rsync --archive --delete --exclude ".*" ~/clone/public/ . |
This file contains 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
Promise = require 'bluebird' | |
defaultPageSize = 20 | |
paginate = (knex) -> (query, paginationOptions, options) -> | |
if query.fetchAll? | |
model = query | |
query = model.query() |
This file contains 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
Knex = require 'knex' | |
Promise = require 'bluebird' | |
FlormModel = require './flormModel' | |
Document = FlormModel.extend | |
tableName: 'documents' | |
# here's an example sideload construct. I want to know document editor ids, which are stored in the | |
# edges join table - that table stores parent_id and child_id polymorphically (with parent_type and child_type) | |
# also polymorphically with join type- 'grant: edit' denotes editorship. |
This file contains 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
import Ember from 'ember'; | |
import DS from 'ember-data'; | |
export default DS.Transform.extend({ | |
serialize: function(deserialized) { | |
return !!deserialized ? deserialized.toArray() : null; | |
}, | |
deserialize: function(serialized) { | |
return Ember.A(serialized); |
// Notes from our previous deploy strategy
Using
ember-cli-deploy
we will deploy our Ember(-cli) app to S3 (and cloudfront), Redis via github and codeship.
Since skill-set's may vary, set's start by breaking this down at a high level:
This file contains 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
... | |
import { RollbarService, RollbarErrorHandler, rollbarFactory } from './rollbar'; | |
@NgModule({ | |
... | |
providers: [ | |
{ | |
provide: ErrorHandler, | |
useClass: RollbarErrorHandler | |
}, |
This file contains 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
// Examples | |
// Yes, "router.router" twice - this assumes that the router is being injected | |
// into the component. Otherwise lookup 'router:main' | |
// One of these will be of interest, figure out which one you want: | |
this.get('router.router.state'); | |
this.get('router.router.state.params'); | |
this.get('container').lookup('controller:application').currentPath; |
This file contains 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
/****************************************************************************** | |
How to load Javascript modules into postgres | |
******************************************************************************/ | |
CREATE EXTENSION IF NOT EXISTS plv8 | |
/****************************************************************************** | |
First step is download the Javascript module file | |
Example with undescore-min and node-jpath | |
******************************************************************************/ |
This file contains 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
// Use function that Async keyword appended | |
Bluebird.promisifyAll(blobService, { | |
promisifier: (originalFunction) => function (...args) { | |
return new Promise((resolve, reject) => { | |
try { | |
originalFunction.call(this, ...args, (error, result, response) => { | |
error && reject(error); | |
resolve({result, response}); | |
}); | |
} catch (e) { |
OlderNewer