- The user should not see any record he/she isn't allowed to view
- The user should not see relationships which he/she isn't allowed to view
- We should be able to invalidate a link
- We should be able to expire a link
- We should support sharing different types or records in the future
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
const { execSync } = require('child_process'); | |
const files = execSync(`git --no-pager diff --name-only HEAD HEAD~1`).toString().split('\n'); | |
const extensions = {} | |
const identity = (i) => i | |
const upper = (s) => s.toUpperCase() | |
files.forEach(f => { |
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
# | |
# MIGRATION | |
# | |
create_table :user_favourites do |t| | |
t.string :favourite_type, index: true | |
t.integer :favourite_id | |
t.integer :user_id | |
t.boolean :persitent, default: false # Setting this prop to true would essentially make it behave as a "favourite" |
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
const RSVP = require('rsvp'); | |
const Ember = { RSVP }; | |
/** | |
* Returns a promise and a trigger to start the job | |
* | |
* @export | |
* @param {Function} func the job to execute | |
* @param {any} scope the scope to bind the function to |
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
page :home do | |
header do | |
add_link 'Home', to: :home | |
add_link 'Posts', to: :posts | |
end | |
section :description, layout: :horizontal do | |
section :image do | |
add_image '/some/image' |
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
import _ from 'lodash'; | |
export function setProperty(key) { | |
return (state, action) => ({ [key]: action[key] }) | |
} | |
export function increment(key) { | |
return state => ({ [key]: state[key] + 1 }); | |
} |
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
import _ from 'lodash'; | |
const ALLOWED_MUTATIONS = { | |
set(key) { | |
return (state, action) => ({ [key]: action[key] }) | |
}, | |
increment(key) { | |
return state => ({ [key]: state[key] + 1 }); | |
}, |
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
--- | |
- hosts: all | |
remote_user: {{ REMOTE_USER }} | |
become: true | |
tasks: | |
- name: Install Docker | |
yum: | |
name: docker | |
state: present |
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 hasMissingAssociations(record, associationName) { | |
if (_.isArray(associationName)) { | |
return _.some(associationName, name => { | |
hasMissingAssociations(record, name); | |
}); | |
} | |
const relationship = record.relationshipFor(associationName); | |
if (!relationship) { | |
return false; |
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
const chalk = require('chalk'); | |
const cli = require('ember-cli'); | |
const fs = require('fs'); | |
let enableLog = false; | |
let failures = 0; | |
function wrapStream(stream) { | |
const _write = stream.write.bind(stream); | |
const _print = (txt) => _write(txt + "\n"); |