function getTagQuotes(tags) { let q = []; for (let i = 0; i < tags.length; i++) { for (let j = 0; j < quotes.length; j++) { if (quotes[j].tags.indexOf(tags[i]) != -1) { q.push(quotes[j]); } } } return q; }
createObjects(scenarioNumber, cb) { async.forEachOf(this._scenario[scenarioNumber].keyNames, (key, i, done) => { this.s3.putObject({ Body: '', Bucket: this.bucket, Key: key, Tagging: this._scenario[scenarioNumber].tags[i], }, done); }, err => { assert.ifError(err); return cb(); }); }
send(action, text, ...params) { const { prefix } = this; const clog = clogs[action] || clogs._default; const status = statuses[action] || statuses._default; // function addHash(tag) { // if (['#', '@'].includes(tag[0])) { // } // } const tags = (params.tags || []).map(t => (['#', '@'].includes(t[0]) ? '' : `#${t}`)).join(' '); const errText = params.err; const md = `${status} ${prefix} ${[text, errText].filter(a => a).join('\n')}\n\n${tags}`.trim(); clog(md); const url = [this.base, this.project].join('/'); return axios.post(url, { action, status, text: md, tags: params.tags, }).catch((err) => { console.log(`Logger.${action} error`, err); // eslint-disable-line no-console return null; }); }
createDeleteMarkers(scenarioNumber, cb) { this.setBucketVersioning('Enabled', err => { assert.ifError(err); return async.eachOfLimit(this._scenario[scenarioNumber].keyNames, 1, (key, i, done) => ( async.series([ next => this.s3.putObject({ Body: '', Bucket: this.bucket, Key: key, Tagging: this._scenario[scenarioNumber].tags[i], }, next), next => this.s3.deleteObject({ Bucket: this.bucket, Key: key, }, next), ], err => { assert.ifError(err); done(); }) ), err => { assert.ifError(err); cb(); }); }); }
const wrapper = mount(<TagsTable tags={observable.array(stubDetails[0].tags)} />);
body() { const { repos } = this; const hasIndex = repos.length > 1 || repos[0].tags.length > 1; const raw = ` <!doctype html> <td style="text-align: right; padding: 0; vertical-align: top;">${anchor( repoBold(r), r.tags[0] )}</td> <td style="padding: 0; vertical-align: top;">${anchor( "@", r.tags[0] )}</td> <td style="padding: 0; vertical-align: top;">${r.tags .map((tag) => anchor(tag.name, tag)) .join(", ")} r.tags .map( (tag) => `
send(action, text, ...params) { const { prefix } = this; const clog = clogs[action] || clogs._default; const status = statuses[action] || statuses._default; // function addHash(tag) { // if (['#', '@'].includes(tag[0])) { // } // } const tags = (params.tags || []).map(t => (['#', '@'].includes(t[0]) ? '' : `#${t}`)).join(' '); const errText = params.err; const md = `${status} ${prefix} ${[text, errText].filter(a => a).join('\n')}\n\n${tags}`.trim(); clog(md); const url = [this.base, this.project].join('/'); return axios.post(url, { action, status, text: md, tags: params.tags, }).catch((err) => { console.log(`Logger.${action} error`, err); // eslint-disable-line no-console return null; }); }