github.com/zoomfoo/nomad@v0.8.5-0.20180907175415-f28fd3a1a056/ui/mirage/factories/policy.js (about) 1 import { Factory, faker } from 'ember-cli-mirage'; 2 3 export default Factory.extend({ 4 id: () => faker.hacker.verb(), 5 name() { 6 return this.id; 7 }, 8 description: () => (Math.random() > 0.2 ? faker.lorem.sentence() : null), 9 rules: ` 10 # Allow read only access to the default namespace 11 namespace "default" { 12 policy = "read" 13 } 14 15 node { 16 policy = "read" 17 }`, 18 });