commit stringlengths 40 40 | old_file stringlengths 4 150 | new_file stringlengths 4 150 | old_contents stringlengths 0 3.26k | new_contents stringlengths 1 4.43k | subject stringlengths 15 501 | message stringlengths 15 4.06k | lang stringclasses 4
values | license stringclasses 13
values | repos stringlengths 5 91.5k | diff stringlengths 0 4.35k |
|---|---|---|---|---|---|---|---|---|---|---|
49078f5d1c8bfd2510ba39414279dd1756dff22e | js/templates.js | js/templates.js | var Templates = {};
Templates.ItemListingTemplate = _.template('\
<div class="item media">\
<img class="pull-left" src="<%= imageUrl %>" />\
<div class="media-body">\
<h3 class="media-heading"><%= name %></h3>\
<div class="item-location"><strong>Location:</strong> <%= location %></div>\
<div class="item-... | var Templates = {};
Templates.ItemListingTemplate = _.template('\
<div class="item media">\
<img class="pull-left" src="<%= imageUrl %>" />\
<div class="media-body">\
<h3 class="media-heading"><%= name %></h3>\
<div class="item-location"><span class="glyphicon glyphicon-globe"></span> <%= location %></div>\... | Add icons to item template. | Add icons to item template.
| JavaScript | mit | burnflare/CrowdBuy,burnflare/CrowdBuy | ---
+++
@@ -5,8 +5,8 @@
<img class="pull-left" src="<%= imageUrl %>" />\
<div class="media-body">\
<h3 class="media-heading"><%= name %></h3>\
- <div class="item-location"><strong>Location:</strong> <%= location %></div>\
- <div class="item-price"><%= price %></div>\
+ <div class="item-location"><span... |
9d9d48d9df942fe3697726351791e3ccd02cce40 | lib/dependency-theme-import.js | lib/dependency-theme-import.js | var ThemingContext = require('./ThemingContext');
var lessParser = require('./less-parser');
var logger = require('raptor-logging').logger(module);
module.exports = function create(config) {
return {
properties: {
path: 'string'
},
// we don't actually produce JavaScript or CS... | var ThemingContext = require('./ThemingContext');
var lessParser = require('./less-parser');
var logger = require('raptor-logging').logger(module);
module.exports = function create(config) {
return {
properties: {
path: 'string'
},
// we don't actually produce JavaScript or CS... | Store resolved path in path property (don't use separate resolvedPath property) | Store resolved path in path property (don't use separate resolvedPath property)
| JavaScript | apache-2.0 | lasso-js/lasso-theming | ---
+++
@@ -17,7 +17,7 @@
return callback(new Error('Unable to handle themed Less dependency for path "' + this.path + '". The "less" module was not found. This module should be installed as a top-level application module.'));
}
- this.resolvedPath = this.requireResolvePath(... |
9b123e9cca657c4167d91526a768e90654b514bd | src/main.js | src/main.js | /* @flow */
import React from 'react';
import ReactDOM from 'react-dom';
import createBrowserHistory from 'history/lib/createBrowserHistory';
import { useRouterHistory } from 'react-router';
import { syncHistoryWithStore } from 'react-router-redux';
import makeRoutes from './routes';
import Root from './containers/Root... | /* @flow */
import React from 'react';
import ReactDOM from 'react-dom';
import makeRoutes from './routes';
import Root from './containers/Root';
import configureStore from './redux/configureStore';
// Create redux store and sync with react-router-redux. We have installed the
// react-router-redux reducer under the ke... | Remove browser history for now | Remove browser history for now
...since it was playing up on github pages
| JavaScript | mit | felixSchl/try-neodoc,felixSchl/try-neodoc | ---
+++
@@ -1,27 +1,16 @@
/* @flow */
import React from 'react';
import ReactDOM from 'react-dom';
-import createBrowserHistory from 'history/lib/createBrowserHistory';
-import { useRouterHistory } from 'react-router';
-import { syncHistoryWithStore } from 'react-router-redux';
import makeRoutes from './routes';
... |
d1e99478d6fc5b296b511e389da0352372262fa4 | lib/configuration.js | lib/configuration.js | 'use babel';
export default {
"prerelease": {
"title": "Level of prerelease",
"description": "Set the level maximum to check for the libraries versions",
"type": "string",
"default": "stable",
"enum": ["stable", "rc", "beta", "alpha", "dev"]
},
"info": {
"title": "Display information",
... | 'use babel';
export default {
"prerelease": {
"title": "Level of prerelease",
"description": "Set the level maximum to check for the libraries versions",
"type": "string",
"default": "stable",
"enum": ["stable", "rc", "beta", "alpha", "dev"]
},
"info": {
"title": "Display information",
... | Set the default value of the checkInstalled option to false | Set the default value of the checkInstalled option to false
| JavaScript | mit | kilian-ito/atom-npm-outdated | ---
+++
@@ -18,7 +18,7 @@
"title": "Check installed package version",
"description": "The installed package will be inspected to verify that the version satisfy the package.json dependency",
"type": "boolean",
- "default": true
+ "default": false
},
"npmrc": {
"title": "Path to NPM con... |
4b87a36448f78a70138dcd8110074ac518fb9dbe | lib/policies/jwt/extractors.js | lib/policies/jwt/extractors.js | const passportJWT = require('passport-jwt');
module.exports = {
'header': passportJWT.ExtractJwt.fromHeader,
'body': passportJWT.ExtractJwt.fromBodyField,
'query': passportJWT.ExtractJwt.fromUrlQueryParameter,
'authScheme': passportJWT.ExtractJwt.fromAuthHeaderWithScheme,
'authBearer': passportJWT.ExtractJwt... | const passportJWT = require('passport-jwt');
module.exports = {
'header': passportJWT.ExtractJwt.fromHeader,
'query': passportJWT.ExtractJwt.fromUrlQueryParameter,
'authScheme': passportJWT.ExtractJwt.fromAuthHeaderWithScheme,
'authBearer': passportJWT.ExtractJwt.fromAuthHeaderAsBearerToken
};
| Remove body as an extractor | Remove body as an extractor
| JavaScript | apache-2.0 | ExpressGateway/express-gateway | ---
+++
@@ -2,7 +2,6 @@
module.exports = {
'header': passportJWT.ExtractJwt.fromHeader,
- 'body': passportJWT.ExtractJwt.fromBodyField,
'query': passportJWT.ExtractJwt.fromUrlQueryParameter,
'authScheme': passportJWT.ExtractJwt.fromAuthHeaderWithScheme,
'authBearer': passportJWT.ExtractJwt.fromAuthHea... |
317c217910049983a56ea8c03c216356fb747040 | lib/loggly/config.js | lib/loggly/config.js | /*
* config.js: Configuration information for your Loggly account.
* This information is only used for require('loggly')./\.+/ methods
*
* (C) 2010 Nodejitsu Inc.
* MIT LICENSE
*
*/
//
// function createConfig (defaults)
// Creates a new instance of the configuration
// object based on default ... | /*
* config.js: Configuration information for your Loggly account.
* This information is only used for require('loggly')./\.+/ methods
*
* (C) 2010 Nodejitsu Inc.
* MIT LICENSE
*
*/
//
// function createConfig (defaults)
// Creates a new instance of the configuration
// object based on default ... | Add support for alternate URLs for input logging (aka ec2) | Add support for alternate URLs for input logging (aka ec2)
| JavaScript | mit | mavrick/node-loggly,nodejitsu/node-loggly,dtudury/node-loggly,mafintosh/node-loggly,rosskukulinski/node-loggly,freeall/node-loggly | ---
+++
@@ -28,6 +28,7 @@
this.subdomain = defaults.subdomain;
this.json = defaults.json || null;
this.auth = defaults.auth || null;
+ this.inputUrl = defaults.inputUrl || 'https://logs.loggly.com/inputs/';
};
Config.prototype = {
@@ -44,6 +45,10 @@
},
get inputUrl () {
- return 'https://l... |
68e60dc5b22ab3aa668ea1a841037eac10ea5987 | lib/models/errors.js | lib/models/errors.js |
ErrorModel = function (appId) {
var self = this;
this.appId = appId;
this.errors = {};
this.startTime = Date.now();
}
_.extend(ErrorModel.prototype, KadiraModel.prototype);
ErrorModel.prototype.buildPayload = function() {
var metrics = _.values(this.errors);
this.startTime = Date.now();
this.errors = {... |
ErrorModel = function (appId) {
var self = this;
this.appId = appId;
this.errors = {};
this.startTime = Date.now();
}
_.extend(ErrorModel.prototype, KadiraModel.prototype);
ErrorModel.prototype.buildPayload = function() {
var metrics = _.values(this.errors);
this.startTime = Date.now();
this.errors = {... | Use e.message as error name | Use e.message as error name
| JavaScript | mit | chatr/kadira,meteorhacks/kadira | ---
+++
@@ -16,20 +16,18 @@
};
ErrorModel.prototype.trackError = function(ex, source) {
- var name = ex.name + ': ' + ex.message;
- if(this.errors[name]) {
- this.errors[name].count++;
+ if(this.errors[ex.message]) {
+ this.errors[ex.message].count++;
} else {
- this.errors[name] = this._formatErro... |
906cd1da17461c8a71ecefb68462db7628224fd2 | lib/ping-sys.js | lib/ping-sys.js | /**
* LICENSE MIT
* (C) Daniel Zelisko
* http://github.com/danielzzz/node-ping
*
* a simple wrapper for ping
* Now with support of not only english Windows.
*
*/
//system library
var sys = require('util'),
cp = require('child_process'),
os = require('os');
// Promise implementation
var ping = require('./ping-... | 'use strict';
/**
* LICENSE MIT
* (C) Daniel Zelisko
* http://github.com/danielzzz/node-ping
*
* a simple wrapper for ping
* Now with support of not only english Windows.
*
*/
// Promise implementation
var ping = require('./ping-promise');
// TODO:
// 1. Port round trip time to this callback
// 2. However, it may br... | Add TODO comment and fix warning from eslint | Add TODO comment and fix warning from eslint
| JavaScript | mit | danielzzz/node-ping | ---
+++
@@ -1,3 +1,5 @@
+'use strict';
+
/**
* LICENSE MIT
* (C) Daniel Zelisko
@@ -8,14 +10,13 @@
*
*/
-//system library
-var sys = require('util'),
- cp = require('child_process'),
- os = require('os');
-
// Promise implementation
var ping = require('./ping-promise');
+// TODO:
+// 1. Port round tr... |
902e3846be5c6c87cfec171a9ae513b7a72d72a0 | list-and-run.js | list-and-run.js | 'use strict';
const addLineNumbers = require('add-line-numbers');
const spawnSync = require('child_process').spawnSync;
const fs = require('fs');
const path = '/tmp/te';
module.exports = function listAndRun() {
var text = [];
const listing = fs.readFileSync(path, 'utf8');
if (listing.length > 0) {
... | 'use strict';
const addLineNumbers = require('add-line-numbers');
const spawnSync = require('child_process').spawnSync;
const fs = require('fs');
const path = '/tmp/te';
module.exports = function listAndRun() {
let readFileAsync = function(filename, encoding) {
return new Promise(function(resolve, reject)... | Change file IO in listAndRun to be asynchronous | Change file IO in listAndRun to be asynchronous
| JavaScript | mit | gudnm/te | ---
+++
@@ -5,20 +5,34 @@
const path = '/tmp/te';
module.exports = function listAndRun() {
- var text = [];
- const listing = fs.readFileSync(path, 'utf8');
+ let readFileAsync = function(filename, encoding) {
+ return new Promise(function(resolve, reject) {
+ fs.readFile(filename, en... |
6e2386f38b8296f00a36de7f2041a6c3c43abe9f | app/main.js | app/main.js | var counter;
function setup() {
var canvas = createCanvas(400, 400);
canvas.parent('play');
counter = new Counter();
counter.new();
}
function draw() {
background(233, 0, 0);
counter.draw();
}
function keyTyped() {
if (key === ' ') {
counter.new();
}
}
function Counter () {
... | var counter;
function setup() {
var canvas = createCanvas(400, 400);
canvas.parent('play');
counter = new Counter();
counter.new();
}
function draw() {
background(233, 0, 0);
counter.draw();
}
function keyTyped() {
if (key === ' ') {
counter.new();
}
}
function touchStarted()... | Add touch support for the redraw of the circles | Add touch support for the redraw of the circles
| JavaScript | mit | nemesv/playfive,nemesv/playfive | ---
+++
@@ -15,6 +15,19 @@
function keyTyped() {
if (key === ' ') {
counter.new();
+ }
+}
+
+function touchStarted() {
+ if (touches.length > 0) {
+ var touch = touches[0];
+ if (
+ touch.x >= 0 && touch.x < 400 &&
+ touch.y >= 0 && touch.y < 400
+ )
+ ... |
bcd5517032a7e46a98f90f496967a2ce22bd3b89 | webpack/modules/babelPreset.js | webpack/modules/babelPreset.js | const { isProd, isDev } = require('../env');
module.exports = (config) => {
const options = {
babelrc: false,
compact: true,
cacheDirectory: `${__dirname}/.babelCache`,
presets: [
['env', {
loose: true,
modules: false,
exclude: ['transform-regenerator'],
}],
... | const { isProd, isDev } = require('../env');
module.exports = (config) => {
const options = {
babelrc: false,
compact: true,
cacheDirectory: `${__dirname}/.babelCache`,
presets: [
['env', {
loose: true,
modules: false,
useBuiltIns: false,
exclude: ['transform-re... | Add targets option to babel configuration | Add targets option to babel configuration
| JavaScript | mit | AlexMasterov/webpack-kit,AlexMasterov/webpack-kit | ---
+++
@@ -10,7 +10,17 @@
['env', {
loose: true,
modules: false,
+ useBuiltIns: false,
exclude: ['transform-regenerator'],
+ targets: {
+ browsers: [
+ 'last 4 versions',
+ '> 1%',
+ 'Firefox ESR',
+ 'safari >= 7',
+... |
aa4808300be58b9508178b2b7ede4212eb86ac13 | lib/store-init.js | lib/store-init.js |
var SimpleStore = require('fh-wfm-simple-store'),
config = require('./config.js');
/**
* Creates and initializes a store to be used by the app modules.
* @param {String} dataSetId String used as an identifier for the store
* @param {Object|null} seedData Object to be saved in the store initially
* @param {Obj... |
var SimpleStore = require('fh-wfm-simple-store'),
config = require('./config.js');
/**
* Creates and initializes a store to be used by the app modules.
* @param {String} dataSetId String used as an identifier for the store
* @param {Object|null} seedData Object to be saved in the store initially
* @param {Obj... | Initialize array store with an empty array | Initialize array store with an empty array
| JavaScript | mit | feedhenry-raincatcher/raincatcher-demo-cloud | ---
+++
@@ -21,15 +21,14 @@
dataStore.list().then(function(storeData) {
if (!storeData || storeData.length === 0) {
//Check if seed data is given, otherwise initialize store with no initial data.
- if (seedData) {
- dataStore.init(seedData).then(function() {
- dataStore.listen(conf... |
3ccbabddc220088addfe6b059a4468ba96c2a09c | www/js/fonts.js | www/js/fonts.js | var urls = [
'http://s.npr.org/templates/css/fonts/GothamSSm.css',
'http://s.npr.org/templates/css/fonts/Gotham.css'
];
if (window.location.protocol == "https:") {
urls = [
'https://secure.npr.org/templates/css/fonts/GothamSSm.css',
'https://secure.npr.org/templates/css/fonts/Gotham.css'
... | var urls = [
'http://s.npr.org/templates/css/fonts/GothamSSm.css',
'http://s.npr.org/templates/css/fonts/Gotham.css',
'http://s.npr.org/templates/css/fonts/Knockout.css'
];
if (window.location.protocol == "https:") {
urls = [
'https://secure.npr.org/templates/css/fonts/GothamSSm.css',
'... | Add Knockout to font loader | Add Knockout to font loader
| JavaScript | mit | nprapps/austin,nprapps/austin,nprapps/austin,nprapps/austin | ---
+++
@@ -1,12 +1,14 @@
var urls = [
'http://s.npr.org/templates/css/fonts/GothamSSm.css',
- 'http://s.npr.org/templates/css/fonts/Gotham.css'
+ 'http://s.npr.org/templates/css/fonts/Gotham.css',
+ 'http://s.npr.org/templates/css/fonts/Knockout.css'
];
if (window.location.protocol == "https:") {
... |
5a2a56e4b6a678ae96fe4b377c0d7922e0963118 | test/libs/utils/metadata.spec.js | test/libs/utils/metadata.spec.js | 'use strict';
// Load chai
const chai = require('chai');
const expect = chai.expect;
// Load our module
const utils = require('../../../app/libs/utils');
describe('Function "metadata"', () => {
it('should export a function', () => {
expect(utils.metadata).to.be.a('function');
});
});
| 'use strict';
// Load requirements
const path = require('path');
// Load chai
const chai = require('chai');
const expect = chai.expect;
chai.use(require('chai-as-promised'));
// Load our module
const utils = require('../../../app/libs/utils');
describe('Function "metadata"', () => {
it('should export a function'... | Add test coverage to utils metadata | Add test coverage to utils metadata
| JavaScript | apache-2.0 | transmutejs/core | ---
+++
@@ -1,8 +1,12 @@
'use strict';
+
+// Load requirements
+const path = require('path');
// Load chai
const chai = require('chai');
const expect = chai.expect;
+chai.use(require('chai-as-promised'));
// Load our module
const utils = require('../../../app/libs/utils');
@@ -13,4 +17,58 @@
expect(uti... |
e58037f834b0b34c01456d9e01fa493955e3665b | .template-lintrc.js | .template-lintrc.js | /* eslint-env node */
'use strict';
module.exports = {
extends: 'recommended',
rules: {
'html-comments': false
}
};
| /* eslint-env node */
'use strict';
module.exports = {
extends: 'recommended',
rules: {
'no-html-comments': false
}
};
| Fix deprecated template lint runle | Fix deprecated template lint runle
| JavaScript | mit | jelhan/ember-bootstrap,kaliber5/ember-bootstrap,jelhan/ember-bootstrap,kaliber5/ember-bootstrap | ---
+++
@@ -4,6 +4,6 @@
module.exports = {
extends: 'recommended',
rules: {
- 'html-comments': false
+ 'no-html-comments': false
}
}; |
fb815f7573e040d032b894069e10fb4e0a61dd42 | .eslintrc.js | .eslintrc.js | module.exports = {
'env': {
'browser': true,
'es6': true,
'node': true,
},
'extends': [
'eslint:recommended',
'plugin:react/recommended',
'plugin:import/errors',
'plugin:import/warnings',
],
'installedESLint': true,
'parserOptions': {
'ecmaVersion': 7,
'ecmaFeatures': {
... | module.exports = {
'env': {
'browser': true,
'es6': true,
'node': true,
},
'extends': [
'eslint:recommended',
'plugin:react/recommended',
'plugin:import/errors',
'plugin:import/warnings',
],
'installedESLint': true,
'parserOptions': {
'ecmaVersion': 7,
'ecmaFeatures': {
... | Update eslint for es6 import | Update eslint for es6 import
| JavaScript | mit | poooi/plugin-battle-detail | ---
+++
@@ -37,4 +37,25 @@
'react/prop-types': 'off',
},
+ 'settings': {
+ 'import/resolver': {
+ 'node': {
+ 'extensions': ['.js', '.jsx', '.es', '.coffee', '.cjsx'],
+ 'paths': [__dirname],
+ },
+ },
+ 'import/core-modules': [
+ 'electron',
+ 'react',
+ 're... |
3497efd63d2c0af9ffa99c67a4b33cf60988da1b | providers/nmea0183-signalk.js | providers/nmea0183-signalk.js | /*
* Copyright 2014-2015 Fabian Tollenaar <fabian@starting-point.nl>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* Unless requ... | /*
* Copyright 2014-2015 Fabian Tollenaar <fabian@starting-point.nl>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* Unless requ... | Add try-catch as safeguard against potentionally misbehaving parser | Add try-catch as safeguard against potentionally misbehaving parser
| JavaScript | apache-2.0 | lsoltero/signalk-server-node,SignalK/signalk-server-node,SignalK/signalk-server-node,sbender9/signalk-server-node,jaittola/signalk-server-node,webmasterkai/signalk-server-node,sbender9/signalk-server-node,jaittola/signalk-server-node,SignalK/signalk-server-node,mauroc/signalk-oauth-node,sbender9/signalk-server-node,mau... | ---
+++
@@ -31,8 +31,12 @@
require('util').inherits(ToSignalK, Transform);
ToSignalK.prototype._transform = function(chunk, encoding, done) {
- this.parser.write(chunk + '\n');
- done()
+ try {
+ this.parser.write(chunk + '\n');
+ } catch (ex) {
+ console.error(ex);
+ }
+ done();
}
|
370f817c0f879093557c98091c3bdc7207ebad25 | server/startup.js | server/startup.js | Meteor.startup(function () {
Meteor.call("lightstreamerConnect")
Restivus.configure({
useAuth: true,
prettyJson: true
});
Restivus.addCollection(isslocation, {
excludedEndpoints: ['put', 'post', 'delete', 'deleteAll']
});
}); | Meteor.startup(function () {
Meteor.call("lightstreamerConnect")
Restivus.configure({
useAuth: false,
prettyJson: true
});
Restivus.addRoute('isslocation/latest', {authRequired: false}, {
get: function(){
var positionx = isslocation.findOne({type: 'positionx'},{sort: {time : -1}});
var p... | Add latest data API endpoint | Add latest data API endpoint
| JavaScript | mit | slashrocket/stationstream,slashrocket/stationstream | ---
+++
@@ -1,10 +1,24 @@
Meteor.startup(function () {
Meteor.call("lightstreamerConnect")
Restivus.configure({
- useAuth: true,
+ useAuth: false,
prettyJson: true
});
- Restivus.addCollection(isslocation, {
- excludedEndpoints: ['put', 'post', 'delete', 'deleteAll']
+ Restivus.addRoute('iss... |
d9ece655ddd7df695ef2a2087971f691e77ec84a | routes/index.js | routes/index.js | //get index
require('./../config');
async=require('async');
var bitcoin=require('bitcoin').bitcoin;
var knex=require('knex').knex;
//var bookshelf=require('bookshelf').bookshelf;
exports.index = function(req, res){
testnet: async.parallel({
testnet: function(callback){
bitcoin.getInfo(function(e, info){
... | //get index
require('./../config');
var Promise = require("bluebird");
var bitcoin=require('bitcoin').bitcoin;
var knex=require('knex').knex;
Promise.promisifyAll(require('bitcoin').Client.prototype);
//var bookshelf=require('bookshelf').bookshelf;
exports.index = function(req, res){
var info = bitcoin.getInfoAsync... | Change to using promisify instead of async for better code and easy error handling | Change to using promisify instead of async for better code and easy error handling
| JavaScript | bsd-2-clause | Earlz/d4btc | ---
+++
@@ -1,31 +1,21 @@
//get index
require('./../config');
-async=require('async');
+var Promise = require("bluebird");
+
var bitcoin=require('bitcoin').bitcoin;
var knex=require('knex').knex;
-
+Promise.promisifyAll(require('bitcoin').Client.prototype);
//var bookshelf=require('bookshelf').bookshelf;
expo... |
c22cd7328d458b2d307095bf44b5557bbccf881f | routes/users.js | routes/users.js | var express = require('express');
var router = express.Router();
/* GET users listing. */
router.get('/', function(req, res, next) {
res.send('respond with a resource');
});
module.exports = router;
| var express = require('express');
var withConnection = require('../lib/withConnection');
var router = express.Router();
/* GET users listing. */
router.get('/', function(req, res, next) {
res.send('respond with a resource');
});
router.post('/authenticate', function(req, res, next) {
var user;
var data = { emai... | Add authenticate endpoint (but not actually authenticating yet) | Add authenticate endpoint (but not actually authenticating yet)
| JavaScript | mit | getfretless/tracker-serverjs,getfretless/tracker-serverjs | ---
+++
@@ -1,4 +1,5 @@
var express = require('express');
+var withConnection = require('../lib/withConnection');
var router = express.Router();
/* GET users listing. */
@@ -6,4 +7,20 @@
res.send('respond with a resource');
});
+router.post('/authenticate', function(req, res, next) {
+ var user;
+ var da... |
9ecea827bb974b789e7a171b1682059de2cf572b | lib/joiless.js | lib/joiless.js | var isFunction = require('lodash.isfunction');
var joi = require('joi');
var pc = require('pascal-case');
/* Public */
function attach(schema) {
var attachments = {};
schema &&
schema._inner &&
schema._inner.children &&
schema._inner.children.forEach(function (child) {
attachments[pc(child.key)] = {
... | var isFunction = require('lodash.isfunction');
var joi = require('joi');
var pc = require('pascal-case');
/* Public */
function attach(schema) {
var attachments = {};
schema &&
schema._inner &&
schema._inner.children &&
schema._inner.children.forEach(function (child) {
attachments[pc(child.key)] = {
... | Fix an issue with parameter validation | Fix an issue with parameter validation
| JavaScript | mit | zackehh/joiless | ---
+++
@@ -24,8 +24,8 @@
function spec(type, params) {
var after, spec;
- if (arguments.length === 1) {
- params = type;
+ if (!params) {
+ params = type || {};
type = params.type;
delete params.type;
} |
a1c28dd59d5f156a58629be110bb823d978e3db4 | frontend/src/Lists/ListsView.js | frontend/src/Lists/ListsView.js | import React, { Component } from "react";
import styled from "styled-components";
import { Row, RowContent, ColumnContainer } from "../SharedComponents.js";
import Loading from "../loading.js";
import List from "./List.js";
import CreateList from "./CreateList.js";
import Notes from "./Notes.js";
class ListsView ex... | import React, { Component } from "react";
import styled from "styled-components";
import { Row, RowContent, ColumnContainer } from "../SharedComponents.js";
import Loading from "../loading.js";
import List from "./List.js";
import CreateList from "./CreateList.js";
import Notes from "./Notes.js";
class ListsView ex... | Make Lists view mobile friendly | Make Lists view mobile friendly
| JavaScript | mit | Tejpbit/talarlista,Tejpbit/talarlista,Tejpbit/talarlista | ---
+++
@@ -26,7 +26,7 @@
</Row>
<MainContainer>
- <ListContainer width={(lists.length - 2) * 20}>
+ <ListContainer numberOfLists={lists.length} >
{lists.map((list, i) => <List key={list.id} list={list} user={user} inactive={i < lists.length - 1} />)}
</Li... |
5408e47e50289815efbd9ea491e83f9452136f4b | examples/benchmark1-NGX.js | examples/benchmark1-NGX.js | /*
* Copyright (C) DreamLab Onet.pl Sp. z o. o.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, me... | /*
* Copyright (C) DreamLab Onet.pl Sp. z o. o.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, me... | Update example for NGINX parser | Update example for NGINX parser
| JavaScript | mit | DreamLab/node-uriparser,DreamLab/node-uriparser,DreamLab/node-uriparser,DreamLab/node-uriparser | ---
+++
@@ -23,6 +23,6 @@
var uriparser = require('../bin/uriparser'), url = "http://10.177.51.76:1337//example/dir/hi", matches;
for (var i = 0; i < 2000000; i++) {
- matches = uriparser.parse(url, uriparser.kAll, uriparser.eNgxParser);
+ matches = uriparser.parse(url, uriparser.Uri.PROTOCOL, uriparser.Eng... |
c2562990cb077bdf7f2dbb9f5fedb9fd446a05e5 | scripts/ayuda.js | scripts/ayuda.js | document.getElementById("ayuda").setAttribute("aria-current", "page");
var aside = document.getElementById("complementario");
var form = document.createElement("FORM");
var p = document.createElement("P");
var label = document.createElement("LABEL");
label.setAttribute("for", "repo");
t = document.createTextNode("cue... | document.getElementById("ayuda").setAttribute("aria-current", "page");
var aside = document.getElementById("complementario");
var form = document.createElement("FORM");
var p = document.createElement("P");
var label = document.createElement("LABEL");
label.setAttribute("for", "repo");
t = document.createTextNode("cue... | Add type attribute set to button | Add type attribute set to button
| JavaScript | mit | nvdaes/nvdaes.github.io,nvdaes/nvdaes.github.io | ---
+++
@@ -15,12 +15,12 @@
label.appendChild(input);
var submit = document.createElement("BUTTON");
submit.setAttribute("id", "submit");
+submit.setAttribute("type", "button");
var t = document.createTextNode("Consultar descargas de última versión");
submit.appendChild(t);
p.appendChild(label);
form.appendChi... |
d33efd6901b5a54c10da2630bb5fda11ae3391bf | src/validators/record_type_txt.js | src/validators/record_type_txt.js | 'use strict';
const Hoek = require('hoek');
const Joi = require('joi');
const recordBase = require('./record_base');
module.exports = Hoek.clone(recordBase).keys({
record_type: Joi.string().valid('TXT').required(),
text_content: Joi.string().required()
});
| 'use strict';
const Hoek = require('hoek');
const Joi = require('joi');
const recordBase = require('./record_base');
module.exports = Hoek.clone(recordBase).keys({
record_type: Joi.string().valid('TXT').required(),
// Allowed in TXT records are ASCII letters, plus a selected set of
// symbols, which translates ... | Whitelist for characters in TXT records | Whitelist for characters in TXT records
| JavaScript | isc | mikl/edzif-validator | ---
+++
@@ -6,5 +6,9 @@
module.exports = Hoek.clone(recordBase).keys({
record_type: Joi.string().valid('TXT').required(),
- text_content: Joi.string().required()
+ // Allowed in TXT records are ASCII letters, plus a selected set of
+ // symbols, which translates to this gobbledygook you see in the regex
+ /... |
c7d9c51fc1728c01eadf48be2ed559da0b133076 | client-vendor/after-body/jquery.event.clickConfirmed/jquery.event.clickConfirmed.js | client-vendor/after-body/jquery.event.clickConfirmed/jquery.event.clickConfirmed.js | /*
* Author: CM
*/
(function($) {
$.event.special.clickConfirmed = {
bindType: "click",
delegateType: "click",
settings: {
message: 'Please Confirm'
},
handle: function(event) {
var $this = $(this);
var activateButton = function() {
$this.addClass('confirmClick');
$this.attr('title', $.... | /*
* Author: CM
*/
(function($) {
$.event.special.clickConfirmed = {
bindType: "click",
delegateType: "click",
settings: {
message: 'Please Confirm'
},
handle: function(event) {
var $this = $(this);
var deactivateTimeout = null;
var activateButton = function() {
$this.addClass('confirmCl... | Store timeoutId in local variable | Store timeoutId in local variable
| JavaScript | mit | alexispeter/CM,christopheschwyzer/CM,cargomedia/CM,cargomedia/CM,christopheschwyzer/CM,fvovan/CM,cargomedia/CM,njam/CM,fvovan/CM,fauvel/CM,christopheschwyzer/CM,njam/CM,fvovan/CM,vogdb/cm,fauvel/CM,mariansollmann/CM,vogdb/cm,alexispeter/CM,njam/CM,zazabe/cm,cargomedia/CM,christopheschwyzer/CM,vogdb/cm,vogdb/cm,njam/CM,... | ---
+++
@@ -12,13 +12,14 @@
handle: function(event) {
var $this = $(this);
+ var deactivateTimeout = null;
var activateButton = function() {
$this.addClass('confirmClick');
$this.attr('title', $.event.special.clickConfirmed.settings.message).tooltip({trigger: 'manual'}).tooltip('show');
- ... |
a581d98fce6f891d0f78e1ab3dcff70b851d9d55 | server/router.js | server/router.js | const express = require('express');
const router = express.Router();
const authController = require('./authController');
const locationsController = require('./locationsController');
const locationTypeController = require('./locationTypeController');
const happyHoursController = require('./happyHoursController');
ro... | const express = require('express');
const router = express.Router();
const authController = require('./authController');
const locationsController = require('./locationsController');
const locationTypeController = require('./locationTypeController');
const happyHoursController = require('./happyHoursController');
ro... | Add GET location by ID route. | Add GET location by ID route.
| JavaScript | mit | the-oem/happy-hour-power,the-oem/happy-hour-power | ---
+++
@@ -20,6 +20,7 @@
locationsController.addLocation
);
router.get('/v1/locations', locationsController.getLocations);
+router.get('/v1/locations/:id', locationsController.getLocationById);
router.delete(
'/v1/locations/:id',
authController.checkAuth, |
cb927bcf825de717db3a331ab5357c1e95cdbbec | src/Versioning.js | src/Versioning.js | let path = require('path');
let Manifest = require('./Manifest');
let objectValues = require('lodash').values;
class Versioning {
/**
* Create a new Versioning instance.
*
* @param {object} manifest
*/
constructor(manifest) {
this.manifest = manifest;
this.files = [];
}... | let path = require('path');
let Manifest = require('./Manifest');
let objectValues = require('lodash').values;
class Versioning {
/**
* Create a new Versioning instance.
*
* @param {object} manifest
*/
constructor(manifest) {
this.manifest = manifest;
this.files = [];
}... | Fix record function returning this | Fix record function returning this | JavaScript | mit | JeffreyWay/laravel-mix | ---
+++
@@ -19,7 +19,7 @@
* Record versioned files.
*/
record() {
- if (! this.manifest.exists()) return;
+ if (! this.manifest.exists()) return this;
this.reset();
|
b8d08b990108cf42f22e2a196007d99ea34282e4 | tests/integration/components/attributes-test.js | tests/integration/components/attributes-test.js | import { moduleForComponent, test } from 'ember-qunit';
import Component from '@ember/component';
import hbs from 'htmlbars-inline-precompile';
moduleForComponent('attributes', 'Integration | Component | attributes', {
integration: true,
beforeEach() {
this.register('component:x-foo', Component.extend());
}... | import { moduleForComponent, test } from 'ember-qunit';
import Component from '@ember/component';
import hbs from 'htmlbars-inline-precompile';
moduleForComponent('attributes', 'Integration | Component | attributes', {
integration: true,
});
test('it works when component has no existing attribute bindings', functio... | Add basic sanity test for both scenarios. | Add basic sanity test for both scenarios.
| JavaScript | mit | mmun/ember-component-attributes,mmun/ember-component-attributes | ---
+++
@@ -4,15 +4,21 @@
moduleForComponent('attributes', 'Integration | Component | attributes', {
integration: true,
-
- beforeEach() {
- this.register('component:x-foo', Component.extend());
- }
});
-test('it works!', function(assert) {
+test('it works when component has no existing attribute bindin... |
efdd8855715caf469a9423c2dddc90523e6104c6 | src/ol/source/VectorEventType.js | src/ol/source/VectorEventType.js | /**
* @module ol/source/VectorEventType
*/
/**
* @enum {string}
*/
export default {
/**
* Triggered when a feature is added to the source.
* @event module:ol/source/Vector.VectorSourceEvent#addfeature
* @api
*/
ADDFEATURE: 'addfeature',
/**
* Triggered when a feature is updated.
* @event m... | /**
* @module ol/source/VectorEventType
*/
/**
* @enum {string}
*/
export default {
/**
* Triggered when a feature is added to the source.
* @event module:ol/source/Vector.VectorSourceEvent#addfeature
* @api
*/
ADDFEATURE: 'addfeature',
/**
* Triggered when a feature is updated.
* @event m... | Correct documented event names for VectorSourceEvent | Correct documented event names for VectorSourceEvent
| JavaScript | bsd-2-clause | ahocevar/ol3,oterral/ol3,ahocevar/openlayers,stweil/openlayers,adube/ol3,adube/ol3,stweil/openlayers,ahocevar/openlayers,bjornharrtell/ol3,ahocevar/openlayers,stweil/ol3,ahocevar/ol3,oterral/ol3,adube/ol3,stweil/ol3,openlayers/openlayers,ahocevar/ol3,openlayers/openlayers,stweil/ol3,oterral/ol3,openlayers/openlayers,bj... | ---
+++
@@ -37,21 +37,21 @@
/**
* Triggered when features starts loading.
- * @event module:ol/source/Vector.VectorSourceEvent#featureloadstart
+ * @event module:ol/source/Vector.VectorSourceEvent#featuresloadstart
* @api
*/
FEATURESLOADSTART: 'featuresloadstart',
/**
* Triggered when... |
64b61935b843fd6245495699bfee732ab228a50c | prolific.executable/header.js | prolific.executable/header.js | const { Staccato } = require('staccato')
module.exports = async function (input) {
const staccato = new Staccato(input)
let accumulator = Buffer.alloc(0)
for (;;) {
const buffer = await staccato.readable.read()
if (buffer == null) {
return null
}
accumulator = Bu... | const { Staccato } = require('staccato')
module.exports = async function (input) {
const staccato = new Staccato(input)
let accumulator = Buffer.alloc(0)
for (;;) {
const buffer = await staccato.readable.read()
if (buffer == null) {
return null
}
accumulator = Bu... | Replace socket destroy with Staccato unlisten. | Replace socket destroy with Staccato unlisten.
| JavaScript | mit | bigeasy/prolific,bigeasy/prolific | ---
+++
@@ -10,7 +10,7 @@
}
accumulator = Buffer.concat([ accumulator, buffer ])
if (~accumulator.indexOf(0xa)) {
- staccato.stream.destroy()
+ staccato.unlisten()
return JSON.parse(accumulator.toString('utf8'))
}
} |
c80e93c106619ce86eae908e32f1382f666f5c48 | rollup.config.js | rollup.config.js | // @flow
import babel from "rollup-plugin-babel";
import commonjs from "rollup-plugin-commonjs";
import fs from "fs";
import pascalCase from "pascal-case";
import resolve from "rollup-plugin-node-resolve";
import pkg from "./package.json";
const plugins = {
babel: babel({
exclude: "node_modules/**",
runtim... | // @flow
import babel from "rollup-plugin-babel";
import commonjs from "rollup-plugin-commonjs";
import fs from "fs";
import pascalCase from "pascal-case";
import resolve from "rollup-plugin-node-resolve";
import uglify from "rollup-plugin-uglify";
import {minify} from "uglify-es";
import pkg from "./package.json";
... | Set up uglify plugin and sourcemaps | build(rollup): Set up uglify plugin and sourcemaps
| JavaScript | mit | jumpn/utils-composite,jumpn/utils-composite | ---
+++
@@ -5,6 +5,8 @@
import fs from "fs";
import pascalCase from "pascal-case";
import resolve from "rollup-plugin-node-resolve";
+import uglify from "rollup-plugin-uglify";
+import {minify} from "uglify-es";
import pkg from "./package.json";
@@ -14,7 +16,8 @@
runtimeHelpers: true
}),
commonjs: ... |
7480df0fd6a00c11045cf0c1523610e611606cfa | test/fixtures/hard/indentation.js | test/fixtures/hard/indentation.js | import styled from 'styled-components'
// None of the below should throw indentation errors
const Comp = () => {
const Button = styled.button`
color: blue;
`
return Button
}
const Comp2 = () => {
const InnerComp = () => {
const Button = styled.button`
color: blue;
`
return Button
}
... | import styled, { keyframes } from 'styled-components'
// None of the below should throw indentation errors
const Comp = () => {
const Button = styled.button`
color: blue;
`
return Button
}
const Comp2 = () => {
const InnerComp = () => {
const Button = styled.button`
color: blue;
`
retu... | Move wrongly linted animation to hard tests | Move wrongly linted animation to hard tests
| JavaScript | mit | styled-components/stylelint-processor-styled-components | ---
+++
@@ -1,4 +1,4 @@
-import styled from 'styled-components'
+import styled, { keyframes } from 'styled-components'
// None of the below should throw indentation errors
const Comp = () => {
@@ -22,3 +22,15 @@
}
const Button = styled.button`color: blue;`
+
+const animations = {
+ spinnerCircle: keyframes`
... |
867f920794bbfff30901a187ad39296893df5b59 | generators/travis/index.js | generators/travis/index.js | 'use strict';
var generators = require('yeoman-generator');
var extend = require('deep-extend');
module.exports = generators.Base.extend({
constructor: function () {
generators.Base.apply(this, arguments);
this.option('coveralls', {
required: false,
defaults: false,
desc: 'Use React syntax... | 'use strict';
var generators = require('yeoman-generator');
var extend = require('deep-extend');
module.exports = generators.Base.extend({
constructor: function () {
generators.Base.apply(this, arguments);
this.option('coveralls', {
required: false,
defaults: false,
desc: 'Use React syntax... | Fix script addition to package.son | Fix script addition to package.son
| JavaScript | mit | dmarchena/generator-node-test | ---
+++
@@ -31,24 +31,19 @@
);
},
- package: function () {
+ packageJson: function () {
var pkg = this.fs.readJSON(this.destinationPath('package.json'), {});
if (this.options.testRunner === 'karma') {
extend(pkg, {
- devDependencies: {
- scripts: {
- ... |
82c98e5bc76ab1235c070e7253acb616e91f4dd7 | pwm.js | pwm.js | /*
pwm Password Manager
Copyright Owen Maule 2015
o@owen-m.com
https://github.com/owenmaule/pwm
License: GNU Affero General Public License v3
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Soft... | /*
pwm Password Manager
Copyright Owen Maule 2015
o@owen-m.com
https://github.com/owenmaule/pwm
License: GNU Affero General Public License v3
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Soft... | Copy debug alerts to browser console if flag set | Copy debug alerts to browser console if flag set
| JavaScript | agpl-3.0 | owenmaule/pwm,owenmaule/pwm | ---
+++
@@ -23,4 +23,11 @@
$( function() {
console.log( "pwm Password Manager (c) Copyright Owen Maule 2015 <o@owen-m.com> http://owen-m.com/" );
console.log( "Latest version: https://github.com/owenmaule/pwm Licence: GNU Affero General Public License" );
+ if( debugToConsole )
+ { // Transfer debug alerts to ... |
657eb96720524a1ee4656f7bf3889cba05ef2f62 | lib/assets/seeders/skeleton.js | lib/assets/seeders/skeleton.js | 'use strict';
module.exports = {
up: function (queryInterface, Sequelize) {
/*
Add altering commands here.
Return a promise to correctly handle asynchronicity.
Example:
return queryInterface.bulkInsert('Person', [{
name: 'John Doe',
isBetaMember: false
}]);
*/
... | 'use strict';
module.exports = {
up: function (queryInterface, Sequelize) {
/*
Add altering commands here.
Return a promise to correctly handle asynchronicity.
Example:
return queryInterface.bulkInsert('Person', [{
name: 'John Doe',
isBetaMember: false
}], {});
... | Add options object to seed template | [Changed] Add options object to seed template
| JavaScript | mit | xpepermint/cli,martinLE/cli,Americas/cli,Americas/cli,Americas/cli,martinLE/cli,cogpie/cli,sequelize/cli,sequelize/cli,martinLE/cli,brad-decker/cli,sequelize/cli,brad-decker/cli,brad-decker/cli,timrourke/cli | ---
+++
@@ -10,7 +10,7 @@
return queryInterface.bulkInsert('Person', [{
name: 'John Doe',
isBetaMember: false
- }]);
+ }], {});
*/
},
|
09e4dca1919431a57d7c767cdc35826c9b58f59a | addon/components/rl-dropdown-toggle.js | addon/components/rl-dropdown-toggle.js | import Ember from 'ember';
export default Ember.Component.extend({
classNames: ['rl-dropdown-toggle'],
tagName: 'button',
attributeBindings: ['type'],
type: 'button',
targetObject: function () {
return this.get('parentView');
}.property('parentView'),
action: 'toggleDropdown',
click: function... | import Ember from 'ember';
export default Ember.Component.extend({
classNames: ['rl-dropdown-toggle'],
tagName: 'button',
attributeBindings: ['type'],
type: function () {
return this.get('tagName') === 'button' ? 'button' : null;
}.property('tagName'),
targetObject: function () {
return this.ge... | Add type=button only for button tagged dropdown toggles (not for eg. a tags) | Add type=button only for button tagged dropdown toggles (not for eg. a tags)
| JavaScript | mit | RSSchermer/ember-rl-dropdown,RSSchermer/ember-rl-dropdown | ---
+++
@@ -7,7 +7,9 @@
attributeBindings: ['type'],
- type: 'button',
+ type: function () {
+ return this.get('tagName') === 'button' ? 'button' : null;
+ }.property('tagName'),
targetObject: function () {
return this.get('parentView'); |
2c54da703ecbab8c03498b08230ac803bf099249 | src/files/scripts/disqus.js | src/files/scripts/disqus.js | var disqus_shortname = 'jtwebman';
(function () {
'use strict';
var dsq = document.createElement('script');
dsq.type = 'text/javascript';
dsq.async = true;
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appe... | var disqus_shortname = 'jtwebman';
(function () {
'use strict';
var dsq = document.createElement('script');
dsq.type = 'text/javascript';
dsq.async = true;
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
dsq.setAttribute('data-cfasync', 'false');
(document.getElementsByTagName('head')[0] || d... | Add cloudflare Rocket Fix Try 1 | Add cloudflare Rocket Fix Try 1
| JavaScript | mit | jtwebman/jtwebman | ---
+++
@@ -6,5 +6,6 @@
dsq.type = 'text/javascript';
dsq.async = true;
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
+ dsq.setAttribute('data-cfasync', 'false');
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
}()); |
406d0c78c8112f464f05951c2182833c6ae566c9 | src/data/post.js | src/data/post.js | 'use strict';
import { importEntities, validateEntities } from './base';
import { schema } from '../schema/post';
export function importData (entries, space, contentType, data) {
validateEntities(data.posts || [], 'post', schema());
return importEntities(...arguments, 'post', mapData);
}
function mapData (post) ... | 'use strict';
import { importEntities, validateEntities } from './base';
import { schema } from '../schema/post';
export function importData (entries, space, contentType, data) {
validateEntities(data.posts || [], 'post', schema());
return importEntities(...arguments, 'post', mapData);
}
function mapData (post) ... | Fix handling of undefined tags | Fix handling of undefined tags
| JavaScript | mit | sdepold/contentful-blog-importer | ---
+++
@@ -25,7 +25,7 @@
}
function getTags (post) {
- return post.tags.map((tagSlug) => {
+ return (post.tags || []).map((tagSlug) => {
return { sys: { type: 'Link', linkType: 'Entry', id: tagSlug } };
});
} |
20390640e1ba92f6bd52ce14b9e06f0dd241badc | apis/reports.es6.js | apis/reports.es6.js | import BaseAPI from './base.es6.js';
import Report from '../models/report.es6.js';
export default class Reports extends BaseAPI {
model = Report;
move = this.notImplemented('move');
copy = this.notImplemented('copy');
get = this.notImplemented('get');
put = this.notImplemented('put');
patch = this.notImpl... | import BaseAPI from './base.es6.js';
import Report from '../models/report.es6.js';
export default class Reports extends BaseAPI {
model = Report;
move = this.notImplemented('move');
copy = this.notImplemented('copy');
get = this.notImplemented('get');
put = this.notImplemented('put');
patch = this.notImpl... | Make Reports return a promise as expected | Make Reports return a promise as expected
| JavaScript | mit | reddit/node-api-client,reddit/snoode | ---
+++
@@ -21,5 +21,4 @@
reason: 'other',
api_type: 'json',
});
- }
} |
02b45d28bfec3ab4573762aeb6813ded9e9e0286 | lib/post_install.js | lib/post_install.js | // adapted based on rackt/history (MIT)
// Node 0.12+
var execSync = require('child_process').execSync;
var stat = require('fs').stat;
function exec(command) {
execSync(command, {
stdio: [0, 1, 2]
});
}
stat('dist-modules', function(error, stat) {
if (error || !stat.isDirectory()) {
exec('npm i babel');... | // adapted based on rackt/history (MIT)
// Node 0.12+
var execSync = require('child_process').execSync;
var stat = require('fs').stat;
function exec(command) {
execSync(command, {
stdio: [0, 1, 2]
});
}
stat('dist-modules', function(error, stat) {
if (error || !stat.isDirectory()) {
exec('npm i babel@5.... | Install Babel 5 on postinstall | Install Babel 5 on postinstall
Babel 6 will fail.
| JavaScript | mit | austinsc/react-gooey,austinsc/react-gooey | ---
+++
@@ -11,7 +11,7 @@
stat('dist-modules', function(error, stat) {
if (error || !stat.isDirectory()) {
- exec('npm i babel');
+ exec('npm i babel@5.x');
exec('npm run dist-modules');
}
}); |
ec77870dcd8bc0286dded116a04b44ee0f910f39 | app/controllers/application.js | app/controllers/application.js | import Ember from 'ember';
export default Ember.Controller.extend({
session: Ember.inject.service(),
actions: {
login () {
var lockOptions = {
allowedConnections: [
'Username-Password-Authentication',
],
autoclose: true,
allowLogin: true,
allowSignUp: fal... | import Ember from 'ember';
export default Ember.Controller.extend({
session: Ember.inject.service(),
actions: {
login () {
var lockOptions = {
allowedConnections: [
'Default',
],
autoclose: true,
allowLogin: true,
allowSignUp: false,
rememberLastL... | Change configuration on production Auth0 | Change configuration on production Auth0
| JavaScript | bsd-2-clause | barberscore/barberscore-web,barberscore/barberscore-web,barberscore/barberscore-web | ---
+++
@@ -6,7 +6,7 @@
login () {
var lockOptions = {
allowedConnections: [
- 'Username-Password-Authentication',
+ 'Default',
],
autoclose: true,
allowLogin: true, |
18913df91f33250f01da3a178f8816cca7d13db4 | src/js/helpers/JSONPUtil.js | src/js/helpers/JSONPUtil.js | import Q from "q";
const JSONPUtil = {
/**
* Request JSONP data
*
* @todo: write test to verify this util is working properly
*
* @param {string} url
* @returns {Q.promise} promise
*/
request(url) {
var deferred = Q.defer();
var callback = `jsonp_${Date.now().toString(16)}`;
var sc... | const JSONPUtil = {
/**
* Request JSONP data
*
* @todo: write test to verify this util is working properly
*
* @param {string} url
* @returns {Promise} promise
*/
request(url) {
return new Promise(function (resolve, reject) {
var callback = `jsonp_${Date.now().toString(16)}`;
va... | Use es6 promises instead of Q | Use es6 promises instead of Q
| JavaScript | apache-2.0 | cribalik/marathon-ui,cribalik/marathon-ui,mesosphere/marathon-ui,mesosphere/marathon-ui | ---
+++
@@ -1,5 +1,3 @@
-import Q from "q";
-
const JSONPUtil = {
/**
* Request JSONP data
@@ -7,37 +5,37 @@
* @todo: write test to verify this util is working properly
*
* @param {string} url
- * @returns {Q.promise} promise
+ * @returns {Promise} promise
*/
request(url) {
- var def... |
89fdc37d358e0a2c15d6b75d7a40d9dd8f19e977 | tools/deploy.js | tools/deploy.js | /**
* React Static Boilerplate
* https://github.com/koistya/react-static-boilerplate
* Copyright (c) Konstantin Tarkus (@koistya) | MIT license
*/
import GitRepo from 'git-repository';
import task from './lib/task';
// TODO: Update deployment URL
const remote = {
name: 'github',
url: 'git@github.com:nelseric/... | /**
* React Static Boilerplate
* https://github.com/koistya/react-static-boilerplate
* Copyright (c) Konstantin Tarkus (@koistya) | MIT license
*/
import GitRepo from 'git-repository';
import task from './lib/task';
// TODO: Update deployment URL
const remote = {
name: 'github',
url: 'git@github.com:nelseric/... | Deploy to my account gh page | Deploy to my account gh page
| JavaScript | mit | nelseric/fhack-yo | ---
+++
@@ -10,8 +10,8 @@
// TODO: Update deployment URL
const remote = {
name: 'github',
- url: 'git@github.com:nelseric/fhack.git',
- branch: 'gh-pages',
+ url: 'git@github.com:nelseric/nelseric.github.io.git',
+ branch: 'master',
};
/** |
83cdb77f02cc4c98d7882468580abb001441d6e6 | src/modules/rooms/routes.js | src/modules/rooms/routes.js | (function (angular) {
'use strict';
angular.module('birdyard.rooms')
.config(['$routeProvider', function ($routeProvider) {
$routeProvider.when('/rooms/c/everything', {
controller: 'roomsController',
templateUrl: 'modules/rooms/views/rooms.html'
});
$routeProvid... | (function (angular) {
'use strict';
angular.module('birdyard.rooms')
.config(['$routeProvider', function ($routeProvider) {
$routeProvider.when('/rooms/c/everything', {
controller: 'roomsController',
templateUrl: 'modules/rooms/views/rooms.html'
});
$routeProvid... | Make "new room" page an authenticated route | Make "new room" page an authenticated route
| JavaScript | mit | birdyard/birdyard,birdyard/birdyard,bebopchat/bebop,robotnoises/bebop,bebopchat/bebop,robotnoises/bebop | ---
+++
@@ -16,9 +16,15 @@
templateUrl: 'modules/rooms/views/rooms.html'
});
- $routeProvider.when('/rooms/new', {
+ $routeProvider.whenAuthenticated('/rooms/new', {
controller: 'newroomController',
- templateUrl: 'modules/rooms/views/newroom.html'
+ templateUrl: 'modules/room... |
99d6b09e651738e29e1f373093f3653043b65573 | src/node_main.js | src/node_main.js | var sys = require('sys'),
fs = require('fs'),
path = require('path'),
optparse = require('optparse');
function Options(argv){
var switches = [
[ '--encoding', 'Specify encoding (default: utf8)'],
['-h', '--help', 'Shows help sections']
];
var parser = new optparse.OptionParser(swit... | var sys = require('sys'),
fs = require('fs'),
path = require('path'),
optparse = require('optparse');
function Options(argv){
var switches = [
[ '--encoding', 'Specify encoding (default: utf8)'],
['-h', '--help', 'Shows help sections']
];
var parser = new optparse.OptionParser(swit... | Print stacktrace when Biwa crashes in node.js. | Print stacktrace when Biwa crashes in node.js.
| JavaScript | mit | biwascheme/biwascheme.github.io,yhara/biwascheme,biwascheme/biwascheme.github.io,biwascheme/biwascheme,biwascheme/biwascheme,biwascheme/biwascheme,yhara/biwascheme | ---
+++
@@ -21,7 +21,7 @@
var opts = new Options(process.argv.slice(2));
var intp = new BiwaScheme.Interpreter(function(e){
- sys.puts(Object.inspect(e));
+ sys.puts(e.stack);
process.exit(1);
});
|
0eefb282ca8a8eddacca6c55c77d1abd51cdb2b2 | spec/api-deprecations-spec.js | spec/api-deprecations-spec.js | const assert = require('assert')
const deprecations = require('electron').deprecations
describe('deprecations', function () {
beforeEach(function () {
deprecations.setHandler(null)
process.throwDeprecation = true
})
it('allows a deprecation handler function to be specified', function () {
var messag... | const assert = require('assert')
const deprecations = require('electron').deprecations
describe('deprecations', function () {
beforeEach(function () {
deprecations.setHandler(null)
process.throwDeprecation = true
})
it('allows a deprecation handler function to be specified', function () {
var messag... | Test no handler via call to deprecate.log | Test no handler via call to deprecate.log
| JavaScript | mit | kcrt/electron,the-ress/electron,brave/electron,thomsonreuters/electron,miniak/electron,renaesop/electron,tonyganch/electron,brave/muon,brave/electron,gerhardberger/electron,voidbridge/electron,MaxWhere/electron,rajatsingla28/electron,noikiy/electron,jhen0409/electron,gabriel/electron,thompsonemerson/electron,rreimann/e... | ---
+++
@@ -21,7 +21,7 @@
it('throws an exception if no deprecation handler is specified', function () {
assert.throws(function () {
- require('electron').webFrame.registerUrlSchemeAsPrivileged('some-scheme')
- }, 'registerUrlSchemeAsPrivileged is deprecated. Use registerURLSchemeAsPrivileged instea... |
f6465abae47d69e2941e9640930a9e6d13035679 | spec/unpoly/framework_spec.js | spec/unpoly/framework_spec.js | const u = up.util
const $ = jQuery
describe('up.framework', function() {
describe('JavaScript functions', function() {
describe('up.framework.isSupported', function() {
it('returns true on a supported browser', function() {
expect(up.framework.isSupported()).toBe(true)
})
it('return... | const u = up.util
const $ = jQuery
describe('up.framework', function() {
describe('JavaScript functions', function() {
describe('up.framework.isSupported', function() {
it('returns true on a supported browser', function() {
expect(up.framework.isSupported()).toBe(true)
})
it('return... | Fix spec leaving browser in mocked quirks mode | Fix spec leaving browser in mocked quirks mode
| JavaScript | mit | unpoly/unpoly,unpoly/unpoly,unpoly/unpoly | ---
+++
@@ -25,12 +25,15 @@
it('returns false if the document is missing a DOCTYPE, triggering quirks mode', function() {
// Cannot use spyOnProperty() for document.compatMode, as document does not return a property descriptor.
let oldCompatMode = document.compatMode
+ expect(oldCompat... |
72d6339df3fce22422bec835bddbc9e3efb47cb4 | simpleshelfmobile/_attachments/code/views/PageView.js | simpleshelfmobile/_attachments/code/views/PageView.js | /**
* Page view constructor
* Handles all jQuery Mobile setup for any sub-classed page.
*/
define([
"backbone"
],
function(Backbone) {
var PageView = Backbone.View.extend({
tagName: "div",
isInDOM: false,
_name: null,
getName: function() {
return this._name;
... | /**
* Page view constructor
* Handles all jQuery Mobile setup for any sub-classed page.
*/
define([
"backbone"
],
function(Backbone) {
var PageView = Backbone.View.extend({
tagName: "div",
isInDOM: false,
_name: null,
getName: function() {
return this._name;
... | Switch to toJSON to pull data from models | Switch to toJSON to pull data from models
Allows for simpler customization of data.
| JavaScript | agpl-3.0 | tephyr/simpleshelf,tephyr/simpleshelf,tephyr/simpleshelf,tephyr/simpleshelf | ---
+++
@@ -24,7 +24,7 @@
console.warn(this.getName() + " already in DOM.");
} else {
if (this.model) {
- this.$el.html(this.template(this.model.attributes));
+ this.$el.html(this.template(this.model.toJSON()));
} el... |
fc41731cd9c82b44d7cb9c6dce0bd33596bba2c7 | src/bootstrap/package-json.js | src/bootstrap/package-json.js | import { join } from 'path'
import json from '../util/json'
const saguiScripts = {
'start': 'npm run develop',
'test': 'sagui test',
'test-watch': 'sagui test --watch',
'develop': 'sagui develop',
'build': 'sagui build',
'dist': 'NODE_ENV=production sagui dist'
}
export default function (projectPath) {
... | import { join } from 'path'
import json from '../util/json'
const saguiScripts = {
'start': 'npm run develop',
'test': 'NODE_ENV=test sagui test',
'test-watch': 'NODE_ENV=test sagui test --watch',
'develop': 'sagui develop',
'build': 'sagui build',
'dist': 'NODE_ENV=production sagui dist'
}
export default... | Add NODE_ENV on test scripts | Add NODE_ENV on test scripts | JavaScript | mit | saguijs/sagui,saguijs/sagui | ---
+++
@@ -3,8 +3,8 @@
const saguiScripts = {
'start': 'npm run develop',
- 'test': 'sagui test',
- 'test-watch': 'sagui test --watch',
+ 'test': 'NODE_ENV=test sagui test',
+ 'test-watch': 'NODE_ENV=test sagui test --watch',
'develop': 'sagui develop',
'build': 'sagui build',
'dist': 'NODE_ENV=pr... |
7b2b8101d99f60c6b60bd04c1a290e40b6357254 | noita/javascript.js | noita/javascript.js | ---
---
$(document).foundation();
{% for javascript in site.noita.javascripts %}
{% include javascript %}
{% endfor %}
| ---
---
{% for javascript in site.noita.javascripts %}
{% include javascript %}
{% endfor %}
$(document).foundation();
| Move foundation start to the end | Move foundation start to the end
| JavaScript | mit | remy-actual/remy-actual.github.io,rootandflow/old.rootandflow.com,thehammar/thehammar.github.io,remy-actual/remy-actual.github.io,rootandflow/old.rootandflow.com,inlandsplash/inlandsplash.github.io,rootandflow/rootandflow.github.io,inlandsplash/inlandsplash.github.io,mariagwyn/jekyll-noita,inlandsplash/inlandsplash.git... | ---
+++
@@ -1,8 +1,8 @@
---
---
-
-$(document).foundation();
{% for javascript in site.noita.javascripts %}
{% include javascript %}
{% endfor %}
+
+$(document).foundation(); |
6dee47bf20ddcbcee0e757725f300ae3ca8f91db | src/quailBuild.js | src/quailBuild.js | #!/usr/bin/env node --harmony
'use strict';
const path = require('path');
const configUtil = require('./config');
const cwd = process.cwd();
const quailCore = require(path.join(cwd, 'node_modules', '@quailjs/quail-core'));
module.exports = function quailBuild () {
// Get a list of assessments.
configUtil.getLoca... | #!/usr/bin/env node --harmony
'use strict';
const path = require('path');
const configUtil = require('./config');
const cwd = process.cwd();
module.exports = function quailBuild () {
const quailCore = require(
path.join(cwd, 'node_modules', '@quailjs/quail-core')
);
// Get a list of assessments.
configUt... | Move the quail-core require into the build method | Move the quail-core require into the build method
| JavaScript | mit | quailjs/quail-cli | ---
+++
@@ -5,9 +5,11 @@
const path = require('path');
const configUtil = require('./config');
const cwd = process.cwd();
-const quailCore = require(path.join(cwd, 'node_modules', '@quailjs/quail-core'));
module.exports = function quailBuild () {
+ const quailCore = require(
+ path.join(cwd, 'node_modules',... |
5ed795207a690f729c4fa04c5894adc17f2f7bc7 | src/containers/App.js | src/containers/App.js | // This file bootstraps the app with the boilerplate necessary
// to support hot reloading in Redux
import React, {PropTypes} from 'react';
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import FuelSavingsApp from '../components/FuelSavingsApp';
import * as FuelSavingsActions from '.... | // This file bootstraps the app with the boilerplate necessary
// to support hot reloading in Redux
import React, {PropTypes} from 'react';
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import FuelSavingsApp from '../components/FuelSavingsApp';
import * as FuelSavingsActions from '.... | Fix no need to always import DevTools component. | Fix no need to always import DevTools component.
| JavaScript | mit | barrystaes/react-trebuchet,barrystaes/react-trebuchet | ---
+++
@@ -5,7 +5,6 @@
import { connect } from 'react-redux';
import FuelSavingsApp from '../components/FuelSavingsApp';
import * as FuelSavingsActions from '../actions/fuelSavingsActions';
-import DevTools from './DevTools';
class App extends React.Component {
render() { |
d9bbd11b08973865e288102114de7523d5f78768 | packages/truffle/lib/init.js | packages/truffle/lib/init.js | var copy = require("./copy");
var path = require("path");
var temp = require("temp").track();
var Config = require("./config");
var Init = function(destination, callback) {
var example_directory = path.resolve(path.join(__dirname, "..", "example"));
copy(example_directory, destination, callback);
}
Init.sandbox =... | var copy = require("./copy");
var path = require("path");
var temp = require("temp").track();
var Config = require("./config");
var Init = function(destination, callback) {
var example_directory = path.resolve(path.join(__dirname, "..", "example"));
copy(example_directory, destination, callback);
}
Init.sandbox =... | Make Init.sandbox() take an input configuration. | Make Init.sandbox() take an input configuration.
| JavaScript | mit | ConsenSys/truffle | ---
+++
@@ -8,15 +8,17 @@
copy(example_directory, destination, callback);
}
-Init.sandbox = function(callback) {
+Init.sandbox = function(extended_config, callback) {
var self = this;
+ extended_config = extended_config || {}
+
temp.mkdir("truffle-sandbox-", function(err, dirPath) {
if (err) return ... |
d13199ba65acdbf7f6e2bca4f37c71958cbf349c | test/runner-core.js | test/runner-core.js | var EventEmitter = require('events').EventEmitter;
var nodeunit = require('nodeunit');
var assert = require('nodeunit/lib/assert');
assert.equal = function equal(actual, expected, message) {
if (actual != expected) {
if (actual && actual.nodeType) {
actual = actual.toString();
}
if (expected && e... | var EventEmitter = require('events').EventEmitter;
var nodeunit = require('nodeunit');
module.exports = function runModules(toRun) {
var emitter = new EventEmitter();
process.nextTick(function () {
nodeunit.runModules(toRun, {
moduleStart: function (name) {
emitter.emit('moduleStart', name);
... | Remove monkey patches of the unit tester | Remove monkey patches of the unit tester
| JavaScript | mit | nicolashenry/jsdom,Sebmaster/jsdom,zaucy/jsdom,danieljoppi/jsdom,kesla/jsdom,tmpvar/jsdom,evdevgit/jsdom,kesla/jsdom,mbostock/jsdom,medikoo/jsdom,aduyng/jsdom,szarouski/jsdom,susaing/jsdom,beni55/jsdom,Ye-Yong-Chi/jsdom,sirbrillig/jsdom,Zirro/jsdom,Sebmaster/jsdom,evdevgit/jsdom,AVGP/jsdom,lcstore/jsdom,zaucy/jsdom,mzg... | ---
+++
@@ -1,28 +1,5 @@
var EventEmitter = require('events').EventEmitter;
var nodeunit = require('nodeunit');
-
-var assert = require('nodeunit/lib/assert');
-
-assert.equal = function equal(actual, expected, message) {
- if (actual != expected) {
- if (actual && actual.nodeType) {
- actual = actual.toSt... |
db407b1d236f05921ada01645f025921e9ec7614 | adapters/generic.js | adapters/generic.js | /**
* Basic engine support.
*/
require('../lib/setModuleDefaults');
var config = require('config');
var engineConfig = config.engines ? config.engines : undefined;
/**
* Return a function that creates a plugin:
*/
module.exports = function(language){
return {
attach: function (/* options */){
/**
... | /**
* Basic engine support.
*/
require('../lib/setModuleDefaults');
var config = require('config');
var engineConfig = config.engines || {};
/**
* Return a function that creates a plugin:
*/
module.exports = function(language){
return {
attach: function (/* options */){
var languageConfig = engineCo... | Allow module value in config to be optional. | Allow module value in config to be optional.
| JavaScript | mit | markbirbeck/adapter-template | ---
+++
@@ -5,7 +5,7 @@
require('../lib/setModuleDefaults');
var config = require('config');
-var engineConfig = config.engines ? config.engines : undefined;
+var engineConfig = config.engines || {};
/**
* Return a function that creates a plugin:
@@ -14,17 +14,14 @@
module.exports = function(language){
r... |
f1007ef66ef5ffcacbc5a2b0fbbb4725bc99099b | test/test-suites.js | test/test-suites.js | window.VaadinDatePickerSuites = [
'basic.html',
'dropdown.html',
'overlay.html',
'month-calendar.html',
'scroller.html',
'form-input.html',
'custom-input.html',
'keyboard-navigation.html',
'keyboard-input.html',
'late-upgrade.html',
'wai-aria.html'
];
| const isPolymer2 = document.querySelector('script[src*="wct-browser-legacy"]') === null;
window.VaadinDatePickerSuites = [
'basic.html',
'dropdown.html',
'overlay.html',
'month-calendar.html',
'scroller.html',
'form-input.html',
'custom-input.html',
'keyboard-navigation.html',
'keyboard-input.html',
... | Exclude tests usinig importHref from Polymer 3 | Exclude tests usinig importHref from Polymer 3
| JavaScript | apache-2.0 | vaadin/vaadin-date-picker,vaadin/vaadin-date-picker | ---
+++
@@ -1,3 +1,5 @@
+const isPolymer2 = document.querySelector('script[src*="wct-browser-legacy"]') === null;
+
window.VaadinDatePickerSuites = [
'basic.html',
'dropdown.html',
@@ -8,6 +10,9 @@
'custom-input.html',
'keyboard-navigation.html',
'keyboard-input.html',
- 'late-upgrade.html',
'wai-... |
4c9e3a410418c864ea94b509d494893bd18393bb | test/testOffline.js | test/testOffline.js | var assert = require('assert');
var fs = require('fs');
var path = require('path');
var temp = require('temp').track();
var offline = require('../lib/offline');
describe('Offline', function() {
it('should create offline-worker.js in the destination directory', function() {
var dir = temp.mkdirSync('tmp');
r... | var assert = require('assert');
var fs = require('fs');
var path = require('path');
var temp = require('temp').track();
var offline = require('../lib/offline');
describe('Offline', function() {
it('should create offline-worker.js in the destination directory', function() {
var dir = temp.mkdirSync('tmp');
r... | Test that 'offline' overwrites an already existing offline-worker.js | Test that 'offline' overwrites an already existing offline-worker.js
| JavaScript | apache-2.0 | mykmelez/oghliner,mozilla/oghliner,mykmelez/oghliner,mozilla/oghliner,marco-c/oghliner,marco-c/oghliner | ---
+++
@@ -11,7 +11,20 @@
return offline({
rootDir: dir,
}).then(function() {
- fs.accessSync(path.join(dir, 'offline-worker.js'));
+ assert.doesNotThrow(fs.accessSync.bind(fs, path.join(dir, 'offline-worker.js')));
+ });
+ });
+
+ it('should not fail if the destination directory alre... |
452636534735fb807f00d73c1608f97bf40b7025 | parse/public/js/MapsService.js | parse/public/js/MapsService.js | angular.module('atlasApp').service('MapsService', function(
$scope,
$http,
LocationProvider,
BusInfoProvider
) {
return {
/**
* Initializes the Google Maps canvas
*/
this.initMap = function () {
console.log('Initializing');
var mapOptions = {
zoom: 15,
center:... | angular.module('atlasApp').service('MapsService', function(
$scope,
$http,
LocationProvider,
BusInfoProvider
) {
return {
/**
* Initializes the Google Maps canvas
*/
initMap: function () {
console.log('Initializing');
var mapOptions = {
zoom: 15,
center: $scop... | Fix object notation in service | Fix object notation in service
| JavaScript | mit | rice-apps/atlas,rice-apps/atlas,rice-apps/atlas | ---
+++
@@ -8,7 +8,7 @@
/**
* Initializes the Google Maps canvas
*/
- this.initMap = function () {
+ initMap: function () {
console.log('Initializing');
var mapOptions = {
zoom: 15,
@@ -31,7 +31,7 @@
};
- this.plotMarker = function(lat, lng, name) {
+ ... |
b53cc39e264405e073e842e72cb06a7d0e5726c9 | app/initializers/raven-setup.js | app/initializers/raven-setup.js | /* global Raven */
import config from '../config/environment';
import Ember from 'ember';
export function initialize() {
// Disable for development
if (Ember.get('config.sentry.development') === true) {
return;
}
if (!config.sentry) {
throw new Error('`sentry` should be configured when not in develop... | /* global Raven */
import config from '../config/environment';
import Ember from 'ember';
export function initialize() {
// Disable for development
if (Ember.get(config, 'sentry.development') === true) {
return;
}
if (!config.sentry) {
throw new Error('`sentry` should be configured when not in devel... | Fix a broken Ember.get call | Fix a broken Ember.get call
| JavaScript | mit | pifantastic/ember-cli-sentry,dschmidt/ember-cli-sentry,damiencaselli/ember-cli-sentry,damiencaselli/ember-cli-sentry,pifantastic/ember-cli-sentry,dschmidt/ember-cli-sentry | ---
+++
@@ -5,7 +5,8 @@
export function initialize() {
// Disable for development
- if (Ember.get('config.sentry.development') === true) {
+
+ if (Ember.get(config, 'sentry.development') === true) {
return;
}
|
3c0b367aab0d2574a42897f908a57f66a41398be | app/models/user.server.model.js | app/models/user.server.model.js | /**
* Created by vinichenkosa on 05.03.15.
*/
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var UserSchema = new Schema({
firstName: String,
lastName: String,
email: String,
username: String,
password: String
});
mongoose.model('User', UserSchema); | /**
* Created by vinichenkosa on 05.03.15.
*/
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var UserSchema = new Schema({
firstName: String,
lastName: String,
email: {
type: String,
index: true
},
username: {
type: String,
trim: true,
un... | Add get and set modifiers Add virtual fields | Add get and set modifiers
Add virtual fields
| JavaScript | mit | winechess/MEAN | ---
+++
@@ -7,9 +7,37 @@
var UserSchema = new Schema({
firstName: String,
lastName: String,
- email: String,
- username: String,
- password: String
+ email: {
+ type: String,
+ index: true
+ },
+ username: {
+ type: String,
+ trim: true,
+ unique: true
+... |
49370f227a106c43129c23a6a30a91b5a82e9ad6 | src/server/gqlUpdateSchema.js | src/server/gqlUpdateSchema.js | import fs from 'fs-extra';
import path from 'path';
import { mainStory, chalk } from 'storyboard';
import Promise from 'bluebird';
import * as gqlServer from './gqlServer';
const outputPath = path.join(__dirname, '../common/');
gqlServer.init();
Promise.resolve()
.... | import fs from 'fs-extra';
import path from 'path';
import { addListener, mainStory, chalk } from 'storyboard';
import consoleListener from 'storyboard/lib/listeners/console';
import Promise from 'bluebird';
import * as gqlServer from './gqlServer';
addListener... | Fix update-schema JSON for Storyboard 2 | Fix update-schema JSON for Storyboard 2
| JavaScript | mit | guigrpa/mady,guigrpa/mady,guigrpa/mady | ---
+++
@@ -1,8 +1,11 @@
import fs from 'fs-extra';
import path from 'path';
-import { mainStory, chalk } from 'storyboard';
+import { addListener, mainStory, chalk } from 'storyboard';
+import consoleListener from 'storyboard/lib/listeners/console';
import Promise ... |
0d1e37a9f5b3581bea862fa2b54c554fc45d8091 | src/js/api/UserAPI.js | src/js/api/UserAPI.js | import { fetchUser, fetchThreads, fetchRecommendation, fetchUserArray, fetchProfile, fetchStats, postLikeUser, deleteLikeUser, fetchMatching, fetchSimilarity } from '../utils/APIUtils';
export function getUser(login, url = `users/${login}`) {
return fetchUser(url);
}
export function getProfile(login, url = `users... | import { fetchUser, fetchThreads, fetchRecommendation, fetchUserArray, fetchProfile, fetchStats, postLikeUser, deleteLikeUser, fetchMatching, fetchSimilarity } from '../utils/APIUtils';
export function getUser(login, url = `users/${login}`) {
return fetchUser(url);
}
export function getProfile(login, url = `users... | Fix error in conflicted merge | QS-907: Fix error in conflicted merge
| JavaScript | agpl-3.0 | nekuno/client,nekuno/client | ---
+++
@@ -24,9 +24,10 @@
return postLikeUser(url);
}
-export function unsetLikeUser(from, to, url = `users/${from}/likes/${to}`){
+export function unsetLikeUser(from, to, url = `users/${from}/likes/${to}`) {
return deleteLikeUser(url);
-
+}
+
export function getMatching(userId1, userId2, url = `us... |
95d0ef56ecf2aa03d11b957a75bf7fadbb60bc21 | src/routes/ui.js | src/routes/ui.js | 'use strict'
const path = require('path')
const sass = require('rosid-handler-sass')
const js = require('rosid-handler-js')
const preload = require('../preload')
const html = require('../ui/index')
const index = async () => {
return html()
}
const styles = async () => {
const filePath = path.resolve(__dirname,... | 'use strict'
const { resolve } = require('path')
const sass = require('rosid-handler-sass')
const js = require('rosid-handler-js')
const preload = require('../preload')
const html = require('../ui/index')
const optimize = process.env.NODE_ENV !== 'development'
const index = async () => {
return html()
}
const s... | Optimize SASS and JS output | Optimize SASS and JS output
| JavaScript | mit | electerious/Ackee | ---
+++
@@ -1,11 +1,13 @@
'use strict'
-const path = require('path')
+const { resolve } = require('path')
const sass = require('rosid-handler-sass')
const js = require('rosid-handler-js')
const preload = require('../preload')
const html = require('../ui/index')
+
+const optimize = process.env.NODE_ENV !== 'd... |
b3e6b257a2e19d1e10cae8307a9bd673d707a104 | src/lib/background.js | src/lib/background.js | /*
* Copyright (c) 2014 mono
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distr... | /*
* Copyright (c) 2014 mono
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distr... | Use active flag instead of selected flag | Use active flag instead of selected flag
| JavaScript | mit | mono0x/ldr-open-in-background-tab,mono0x/ldr-open-in-background-tab | ---
+++
@@ -24,7 +24,7 @@
port.onMessage.addListener(function(m) {
switch (m.message) {
case 'openInTab':
- chrome.tabs.create({url: m.url, selected: false});
+ chrome.tabs.create({url: m.url, active: false});
break;
}
}); |
1fbf7513c94fa3f7466ecba2256a276455b7ab0b | src/plugins/system.js | src/plugins/system.js | export default function systemPlugin () {
return (mp) => {
function onMessage (text) {
mp.emit('systemMessage', text)
}
mp.on('connected', () => {
mp.ws.on('plugMessage', onMessage)
})
}
}
| export default function systemPlugin () {
return (mp) => {
function onMessage (text) {
mp.emit('systemMessage', text)
}
function onMaintenanceAlert (minutesLeft) {
mp.emit('maintenanceAlert', minutesLeft)
}
function onMaintenance () {
mp.emit('maintenance')
}
mp.on('co... | Implement `maintenance` and `maintenanceAlert` events. | Implement `maintenance` and `maintenanceAlert` events.
| JavaScript | mit | goto-bus-stop/miniplug | ---
+++
@@ -4,8 +4,18 @@
mp.emit('systemMessage', text)
}
+ function onMaintenanceAlert (minutesLeft) {
+ mp.emit('maintenanceAlert', minutesLeft)
+ }
+
+ function onMaintenance () {
+ mp.emit('maintenance')
+ }
+
mp.on('connected', () => {
mp.ws.on('plugMessage', onMes... |
d86ced6ac75cb6e71b6018d3761177cdf5bd892e | app/scripts/directives/block.js | app/scripts/directives/block.js | 'use strict';
angular.module('confRegistrationWebApp')
.directive('block', function () {
return {
templateUrl: 'views/blockDirective.html',
restrict: 'E',
controller: function ($scope, AnswerCache, RegistrationCache, uuid) {
var currentRegistration = RegistrationCache.getCurrentRightNow... | 'use strict';
angular.module('confRegistrationWebApp')
.directive('block', function () {
return {
templateUrl: 'views/blockDirective.html',
restrict: 'E',
controller: function ($scope, AnswerCache, RegistrationCache, uuid) {
var currentRegistration = RegistrationCache.getCurrentRightNow... | Tidy up for loop code | Tidy up for loop code
| JavaScript | mit | CruGlobal/conf-registration-web,CruGlobal/conf-registration-web,CruGlobal/conf-registration-web,CruGlobal/conf-registration-web | ---
+++
@@ -7,12 +7,9 @@
restrict: 'E',
controller: function ($scope, AnswerCache, RegistrationCache, uuid) {
var currentRegistration = RegistrationCache.getCurrentRightNow($scope.conference.id);
- for (var i = 0;i < currentRegistration.answers.length; i++) {
- if (angular.isDef... |
f1a86242849a9e75fd555dfdc95322d563b26646 | src/utils/parseUrl.js | src/utils/parseUrl.js | /**
* Exports `parseUrl` for, well, parsing URLs!
*/
import urlParse from 'url-parse';
const schemeMatcher = /^([a-zA-Z]*\:)?\/\//;
const hasScheme = url => {
if (typeof url !== 'string') {
return false;
}
return schemeMatcher.test(url);
};
const parseUrl = (url = '', baseUrl) => {
if (!hasScheme(url... | /**
* Exports `parseUrl` for, well, parsing URLs!
*/
import urlParse from 'url-parse';
const schemeMatcher = /^([a-zA-Z]*\:)?\/\//;
const hasScheme = url => {
if (typeof url !== 'string') {
return false;
}
return schemeMatcher.test(url);
};
const parseUrl = (url = '', baseUrl) => {
if (!hasScheme(url)... | Add url and baseUrl to error messages | Add url and baseUrl to error messages
Add the url and baseUrl to the error messages
inside `parseUrl`. This should help debug where
these errors originated.
| JavaScript | mit | zapier/redux-router-kit | ---
+++
@@ -14,16 +14,19 @@
};
const parseUrl = (url = '', baseUrl) => {
-
if (!hasScheme(url)) {
if (!hasScheme(baseUrl)) {
- throw new Error('Must provide scheme in url or baseUrl to parse.');
+ throw new Error(
+ `Must provide scheme in url or baseUrl to parse. \`url\` provided: ${url}... |
75e10d72e55daf37d47e269b6b1cc5b774b69e22 | stories/index.js | stories/index.js | import { MemoryRouter } from 'react-router';
if (typeof MemoryRouter !== 'undefined') {
require('./V4/index');
}
else {
require('./V3/index');
}
| require('./V4/index'); // replace with V3 to test with react-router v.3
| Remove any kind of logic that tries to load the right version of react-router and simply does not work. | Remove any kind of logic that tries to load the right version of
react-router and simply does not work.
| JavaScript | mit | gvaldambrini/storybook-router | ---
+++
@@ -1,9 +1 @@
-import { MemoryRouter } from 'react-router';
-
-
-if (typeof MemoryRouter !== 'undefined') {
- require('./V4/index');
-}
-else {
- require('./V3/index');
-}
+require('./V4/index'); // replace with V3 to test with react-router v.3 |
5ffcd271f7bccef678c377558ded06fadb5a234f | app/crash-herald.js | app/crash-herald.js | /* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
const appConfig = require('../js/constants/appConfig')
const crashReporter = require('electron').crashReporter
ex... | /* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
const appConfig = require('../js/constants/appConfig')
const crashReporter = require('electron').crashReporter
con... | Send rev hash to crash reports | Send rev hash to crash reports
Add rev. hash to the extra parameter send with crash reports.
Auditors: 552486fed9a9ff3f07aa28f460daa63ab433892d@alexwykoff
| JavaScript | mpl-2.0 | diasdavid/browser-laptop,timborden/browser-laptop,luixxiul/browser-laptop,diasdavid/browser-laptop,timborden/browser-laptop,diasdavid/browser-laptop,timborden/browser-laptop,timborden/browser-laptop,luixxiul/browser-laptop,luixxiul/browser-laptop,diasdavid/browser-laptop,luixxiul/browser-laptop | ---
+++
@@ -4,6 +4,7 @@
const appConfig = require('../js/constants/appConfig')
const crashReporter = require('electron').crashReporter
+const buildConfig = require('../js/constants/buildConfig')
exports.init = () => {
const options = {
@@ -12,7 +13,8 @@
submitURL: appConfig.crashes.crashSubmitUrl,
... |
3c46ee20228420ded9a6752e8b5fbf482d1ab9b4 | scripts/tweet_release.js | scripts/tweet_release.js | var fetch = require('node-fetch')
var execSync = require('child_process').execSync
var zapierHookURL = 'https://zapier.com/hooks/catch/3petdc/'
var tag = process.env.TRAVIS_TAG
|| execSync('git describe --abbrev=0 --tags').toString().trim()
fetch(zapierHookURL, {
method: 'POST',
body: JSON.stringify({
tweet... | import fetch from 'node-fetch'
import {execSync} from 'child_process'
const zapierHookURL
= `https://zapier.com/hooks/catch/${process.env.ZAPIER_TWEET_RELEASE_HOOK_ID}/`
const tag = process.env.TRAVIS_TAG
|| execSync('git describe --abbrev=0 --tags').toString().trim()
const changelogUrl
= `https://github.com/top... | Secure the Zapier hook URL, use ES 2015 in the script | Secure the Zapier hook URL, use ES 2015 in the script
| JavaScript | mit | js-fns/date-fns,date-fns/date-fns,js-fns/date-fns,date-fns/date-fns,date-fns/date-fns | ---
+++
@@ -1,14 +1,24 @@
-var fetch = require('node-fetch')
-var execSync = require('child_process').execSync
+import fetch from 'node-fetch'
+import {execSync} from 'child_process'
-var zapierHookURL = 'https://zapier.com/hooks/catch/3petdc/'
-var tag = process.env.TRAVIS_TAG
+const zapierHookURL
+ = `https://za... |
5061c75c815a0b43f3e5f52c2a6b7068b7aeaeea | lib/configTest.js | lib/configTest.js | //Copyright 2012 Telefonica Investigación y Desarrollo, S.A.U
//
//This file is part of RUSH.
//
// RUSH is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public
// License as published by the Free Software Foundation, either version 3 of the License, or (at your opt... | //Copyright 2012 Telefonica Investigación y Desarrollo, S.A.U
//
//This file is part of RUSH.
//
// RUSH is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public
// License as published by the Free Software Foundation, either version 3 of the License, or (at your opt... | Remove sentinel from config. Travis won't pass if a sentinel is set | Remove sentinel from config. Travis won't pass if a sentinel is set
| JavaScript | agpl-3.0 | telefonicaid/Rush,telefonicaid/Rush | ---
+++
@@ -26,4 +26,4 @@
module.exports.probeInterval = 5 * 1000;
-module.exports.sentinels = [{host:'localhost', port:26379}];
+//module.exports.sentinels = [{host:'localhost', port:26379}]; |
05b9f0d821d0fda89b49cddd3823a74ccd8a17d8 | lib/httpStatus.js | lib/httpStatus.js | /*jshint node:true */
"use strict";
var data = {
created: { code: 201, body: "Created" },
noContent: { code: 204, body: "" },
notFound: { code: 404, body: "Not found" },
methodNotAllowed: { code: 405, body: "Method not allowed" },
notImplemented: { code: 501, body: "Not implemented"}
};
function HTTPStatus(code,... | /*jshint node:true */
"use strict";
var data = {
created: { code: 201, body: "Created" },
noContent: { code: 204, body: "" },
badRequest: { code: 400, body: "Bad request" },
notFound: { code: 404, body: "Not found" },
methodNotAllowed: { code: 405, body: "Method not allowed" },
notImplemented: { code: 501, body:... | Add 400 bad request status helper | Add 400 bad request status helper
| JavaScript | mit | njoyard/yarm | ---
+++
@@ -4,6 +4,7 @@
var data = {
created: { code: 201, body: "Created" },
noContent: { code: 204, body: "" },
+ badRequest: { code: 400, body: "Bad request" },
notFound: { code: 404, body: "Not found" },
methodNotAllowed: { code: 405, body: "Method not allowed" },
notImplemented: { code: 501, body: "No... |
75eee88ec94c6174761ddb6f121b1becb7b1b395 | app/js/factories.js | app/js/factories.js | 'use strict';
angular.module('ahoyApp.factories', [])
.factory("smartBanner", function() {
var argument = "";
if (document.location.hash.indexOf("#/link/") != -1) {
argument = document.location.hash.substring("#/link/".length);;
}
return {
appId: "973996885",
appArgument: argument
}
... | 'use strict';
angular.module('ahoyApp.factories', [])
.factory("smartBanner", function() {
var argument = "";
if (document.location.hash.indexOf("#/link/") != -1) {
argument = "ahoyconference://link/"+document.location.hash.substring("#/link/".length);;
}
return {
appId: "973996885",
app... | Use full URL as smartbanner argument. | Use full URL as smartbanner argument.
| JavaScript | mit | ahoyconference/ahoy-ui,ahoyconference/ahoy-ui | ---
+++
@@ -4,7 +4,7 @@
.factory("smartBanner", function() {
var argument = "";
if (document.location.hash.indexOf("#/link/") != -1) {
- argument = document.location.hash.substring("#/link/".length);;
+ argument = "ahoyconference://link/"+document.location.hash.substring("#/link/".length);;
}
ret... |
8012441a16ecb34c7933a7edf7d3fd88470bdd19 | test/transform.js | test/transform.js | var test = require('tap').test;
var fs = require('fs');
var path = require('path');
var through = require('through');
var convert = require('convert-source-map');
var transform = require('..');
test('transform adds sourcemap comment', function (t) {
t.plan(1);
var data = '';
var... | var test = require('tap').test;
var fs = require('fs');
var path = require('path');
var through = require('through');
var convert = require('convert-source-map');
var transform = require('..');
test('transform adds sourcemap comment', function (t) {
t.plan(1);
var data = '';
var... | Update source map test to correspond with CoffeeScript 1.7 | Update source map test to correspond with CoffeeScript 1.7 | JavaScript | mit | jsdf/coffee-reactify,jsdf/coffee-reactify,jnordberg/coffeeify,hafeez-syed/coffeeify | ---
+++
@@ -25,7 +25,7 @@
sourceRoot: '',
sources: [ file ],
names: [],
- mappings: 'AAAA,CAAQ,EAAR,IAAO,GAAK',
+ mappings: 'AAAA,OAAO,CAAC,GAAR,CAAY,OAAA,CAAQ,UAAR,CAAZ,CAAA,CAAA',
sourcesContent: [ 'console.log(require \'./bar.js\... |
6055151b88734de9f3dec4bf0c2f6487caf602b1 | jest-puppeteer.config.js | jest-puppeteer.config.js | module.exports = () =>
({
browser: process.env.BROWSER || 'chromium',
launch: {
dumpio: true,
headless: process.env.HEADLESS !== 'false',
},
server: {
command: 'yarn dev:serve',
port: 5000,
},
}());
| module.exports = {
browser: process.env.BROWSER || 'chromium',
launch: {
dumpio: true,
headless: process.env.HEADLESS !== 'false',
},
server: {
command: 'yarn dev:serve',
port: 5000,
},
};
| Revert "test: fix default browser value" | Revert "test: fix default browser value"
This reverts commit a8f88984443a15616c9bdfba67ae7e42dd179ddd.
| JavaScript | mit | FezVrasta/popper.js,FezVrasta/popper.js,FezVrasta/popper.js,floating-ui/floating-ui,floating-ui/floating-ui,floating-ui/floating-ui,FezVrasta/popper.js | ---
+++
@@ -1,12 +1,11 @@
-module.exports = () =>
- ({
- browser: process.env.BROWSER || 'chromium',
- launch: {
- dumpio: true,
- headless: process.env.HEADLESS !== 'false',
- },
- server: {
- command: 'yarn dev:serve',
- port: 5000,
- },
- }());
+module.exports = {
+ browser: p... |
400fdea7e619c24ed21257b340cd27de5876801e | client/otp/index.js | client/otp/index.js | var config = require('config');
var debug = require('debug')(config.application() + ':otp');
var Profiler = require('otp-profiler');
var spin = require('spinner');
/**
* Create profiler
*/
var profiler = new Profiler({
host: '/api/otp'
});
/**
* Expose `journey`
*/
module.exports = function profile(query, ca... | var config = require('config');
var debug = require('debug')(config.application() + ':otp');
var Profiler = require('otp-profiler');
var spin = require('spinner');
/**
* Create profiler
*/
var profiler = new Profiler({
host: '/api/otp'
});
/**
* Expose `journey`
*/
module.exports = function profile(query, ca... | Add spinning animation back in | Add spinning animation back in
| JavaScript | bsd-3-clause | miraculixx/modeify,tismart/modeify,arunnair80/modeify-1,miraculixx/modeify,arunnair80/modeify,miraculixx/modeify,miraculixx/modeify,arunnair80/modeify,amigocloud/modeify,amigocloud/modified-tripplanner,arunnair80/modeify,tismart/modeify,amigocloud/modified-tripplanner,arunnair80/modeify-1,amigocloud/modeify,amigocloud/... | ---
+++
@@ -21,13 +21,13 @@
var spinner = spin();
profiler.profile(query, function(err, data) {
if (err || !data) {
- spinner.stop();
+ spinner.remove();
debug('<-- error profiling', err);
callback(err);
} else {
query.profile = data;
profiler.journey(query, funct... |
16a03f73f99f7e6b0fc9c4ab60dc76579092d3ce | app/components/Docker/index.js | app/components/Docker/index.js | import React, { Component } from 'react'
import { Icon } from 'antd'
import Images from './Images'
import styles from './Docker.scss'
class Docker extends Component {
render()
{
return (
<div>
<h1><Icon type="hdd" /> Docker</h1>
<Images />
</di... | import React, { Component } from 'react'
import { Tabs, Icon } from 'antd'
import Images from './Images'
import styles from './Docker.scss'
const TabPane = Tabs.TabPane
class Docker extends Component {
render()
{
return (
<div>
<h1><Icon type="hdd" /> Docker</h1>
... | Add tab information to Docker window for various sub-interfaces | Add tab information to Docker window for various sub-interfaces
| JavaScript | mit | baublet/lagniappe,baublet/lagniappe | ---
+++
@@ -1,9 +1,11 @@
import React, { Component } from 'react'
-import { Icon } from 'antd'
+import { Tabs, Icon } from 'antd'
import Images from './Images'
import styles from './Docker.scss'
+
+const TabPane = Tabs.TabPane
class Docker extends Component {
@@ -12,7 +14,13 @@
return (
... |
a3d4149b667f00bc44401292b7ed95f705e1b2e2 | source/class/test/Mammalian.js | source/class/test/Mammalian.js | /**
* This is a generic Interface for Mammalian Animals
*
* Those class of Animals have different things in
* common - compared to other animal classes like
* {api.test.Fish}.
*/
core.Interface('api.test.Mammalian', {
properties: {
/**
* All Mammalians have a fur!
*/
fur: {
type: 'Object',
fire... | /**
* This is a generic Interface for Mammalian Animals
*
* Those class of Animals have different things in
* common - compared to other animal classes like
* {api.test.Fish}.
*/
core.Interface('api.test.Mammalian', {
properties: {
/**
* All Mammalians have a fur!
*/
fur: {
type: 'Object',
fire... | Make no sense to have apply routines in interface as it is not visible from the outside | Make no sense to have apply routines in interface as it is not visible from the outside
| JavaScript | mit | zynga/apibrowser,zynga/apibrowser | ---
+++
@@ -14,9 +14,7 @@
*/
fur: {
type: 'Object',
- fire: 'changeFur',
- apply: function(value, old) {
- }
+ fire: 'changeFur'
},
/**
@@ -24,9 +22,7 @@
*/
teeth: {
type: 'Number',
- fire: 'looseTeeth',
- apply: function(value, old) {
- }
+ fire: 'looseTeeth'
},
... |
4b79570b45e609bf224347add37c5be95a432a62 | app/libs/utils/color-string.js | app/libs/utils/color-string.js | 'use strict';
// Load requirements
const clk = require('chalk'),
chalk = new clk.constructor({level: 1, enabled: true});
// Formats a string with ANSI styling
module.exports = function(str) {
// Variables
const regex = /\{([a-z,]+)\:([\s\S]*?)\}/gmi;
let m;
// Check for a non-string
if ( typeof str ... | 'use strict';
// Load requirements
const clk = require('chalk'),
chalk = new clk.constructor({level: 1, enabled: true});
// Formats a string with ANSI styling
module.exports = function(str) {
// Variables
const regex = /\{([a-z,]+)\:([\s\S]*?)\}/gmi;
let m = null, args = Array.prototype.slice.call(argume... | Update utils color string with basic sprintf support | Update utils color string with basic sprintf support
| JavaScript | apache-2.0 | transmutejs/core | ---
+++
@@ -9,12 +9,17 @@
// Variables
const regex = /\{([a-z,]+)\:([\s\S]*?)\}/gmi;
- let m;
+ let m = null, args = Array.prototype.slice.call(arguments, 1);
// Check for a non-string
if ( typeof str !== 'string' ) {
return '';
}
+
+ // Add basic sprintf-esque support
+ args.forEach((arg)... |
819016b9a70329ff1340ebcbdf149244fe60cd4c | client/app/components/b-portion.js | client/app/components/b-portion.js | import Ember from 'ember';
export default Ember.Component.extend({
tagName: 'li',
classNames: ['b-portion'],
click(e) {
const target = Ember.$(e.target);
if (target.hasClass('checkbox__text') || target.hasClass('checkbox__control')) {
this.togglePaidStatus(this.get('portion'));
}
return fa... | import Ember from 'ember';
export default Ember.Component.extend({
tagName: 'li',
classNames: ['b-portion'],
click(e) {
const target = Ember.$(e.target);
if (target.hasClass('checkbox__text') || target.hasClass('checkbox__control')) {
this.togglePaidStatus(this.get('portion'));
}
return fa... | Update order money available when portion status is changed | Update order money available when portion status is changed
| JavaScript | mit | yandex-shri-minsk-2016/yummy-time,yandex-shri-minsk-2016/yummy-time,yandex-shri-minsk-2016/yummy-time | ---
+++
@@ -15,5 +15,14 @@
togglePaidStatus(portion) {
portion.toggleProperty('paid');
portion.save();
+
+ portion.get('order').then((order) => {
+ const cost = portion.get('cost');
+ const available = order.get('money.available');
+ order.set('money.available',
+ available + ((p... |
c8d8b9c215426ebef3d42c94498e1ddaa5718a64 | public/js/calnav.js | public/js/calnav.js | 'use strict';
var calnav = (function() {
var nav = $('.nav-cals');
var renderCal = function(cal, level) {
var input = document.createElement('input');
input.type = 'checkbox';
input.checked = 'checked';
$(input).on('change', function(e) {
var active = $(this).is(":checked");
var l = $... | 'use strict';
var calnav = (function() {
var nav = $('.nav-cals');
var renderCal = function(cal, level) {
var input = document.createElement('input');
input.type = 'checkbox';
input.checked = 'checked';
$(input).on('change', function(e) {
var active = $(this).is(":checked");
var l = $... | Remove calendar nav generated by js | Remove calendar nav generated by js
| JavaScript | mit | oSoc15/educal,tthoeye/educal,oSoc14/code9000,oSoc14/code9000,tthoeye/educal,oSoc15/educal | ---
+++
@@ -29,22 +29,6 @@
};
var render = function(sources) {
- var levels = {
- 1: 1
- };
- var glob = sources[0];
- $.each(sources, function(index, cal) {
- if (!levels[cal.parent_id]) {
- levels[cal.id] = 1;
- } else {
- levels[cal.id] = levels[levels[cal.parent_id... |
f7a29ef2c87f4f56ddb17dafa154c8775b1ba1c1 | app.js | app.js | var gpio = require('onoff').Gpio;
var red = new gpio(16, 'out');
var green = new gpio(12, 'out');
var blue = new gpio(21, 'out');
var button = new gpio(25, 'in', 'both');
var express = require('express');
var app = express();
app.get('/', function(req, res){
res.send('Hello World!');
});
app.listen(3000, function()... | var gpio = require('onoff').Gpio;
var red = new gpio(16, 'out');
var green = new gpio(12, 'out');
var blue = new gpio(21, 'out');
var button = new gpio(25, 'in', 'both');
var express = require('express');
var app = express();
app.get('/', function(req, res){
res.send('Hi I changed this!');
});
app.listen(3000, func... | Update hello world text to text git push to remote server | Update hello world text to text git push to remote server
| JavaScript | mit | davesroka/rpi-node-led,davesroka/rpi-node-led | ---
+++
@@ -7,7 +7,7 @@
var app = express();
app.get('/', function(req, res){
- res.send('Hello World!');
+ res.send('Hi I changed this!');
});
app.listen(3000, function(){ |
7bfe479fbee18bc557cafc26986e01ad947abbda | src/app/index.run.js | src/app/index.run.js | export function runBlock($log, $state, $trace) {
'ngInject';
// Enable logging of state transition
$trace.enable('TRANSITION');
// Add any logic for handling errors from state transitions
$state.defaultErrorHandler(function() {
// console.error('error:', error);
});
}
| export function runBlock($log, $state, $trace, $transitions) {
'ngInject';
// Enable logging of state transition
$trace.enable('TRANSITION');
// Add any logic for handling errors from state transitions
$state.defaultErrorHandler(function() {
// console.error('error:', error);
});
// Test when application is... | Add transition to test for 'app.start' and redirect if websocket is OPEN | Add transition to test for 'app.start' and redirect if websocket is OPEN
| JavaScript | unlicense | ejwaibel/squarrels,ejwaibel/squarrels | ---
+++
@@ -1,4 +1,4 @@
-export function runBlock($log, $state, $trace) {
+export function runBlock($log, $state, $trace, $transitions) {
'ngInject';
// Enable logging of state transition
@@ -8,4 +8,19 @@
$state.defaultErrorHandler(function() {
// console.error('error:', error);
});
+
+ // Test when appl... |
c35fd81e9ec426c683317ce0687de91b6dda4e38 | lib/cb.socket.io/main.js | lib/cb.socket.io/main.js | // Requires
var socketio = require('socket.io');
function setup(options, imports, register) {
var server = imports.server.http;
var io = socketio.listen(server, {
// Do not run a flash policy server
// (requires root permissions)
'flash policy port': -1,
'destroy upgrade': fa... | // Requires
var socketio = require('socket.io');
function setup(options, imports, register) {
var server = imports.server.http;
var io = socketio.listen(server, {
// Do not run a flash policy server
// (requires root permissions)
'flash policy port': -1,
'destroy upgrade': fa... | Switch socket.io's log level to warnings | Switch socket.io's log level to warnings
| JavaScript | apache-2.0 | CodeboxIDE/codebox,code-box/codebox,lcamilo15/codebox,CodeboxIDE/codebox,smallbal/codebox,blubrackets/codebox,ronoaldo/codebox,fly19890211/codebox,LogeshEswar/codebox,ahmadassaf/Codebox,etopian/codebox,blubrackets/codebox,quietdog/codebox,quietdog/codebox,kustomzone/codebox,nobutakaoshiro/codebox,Ckai1991/codebox,liste... | ---
+++
@@ -10,7 +10,8 @@
// Do not run a flash policy server
// (requires root permissions)
'flash policy port': -1,
- 'destroy upgrade': false
+ 'destroy upgrade': false,
+ 'log level': 1,
});
register(null, { |
c79f0fa931512d00a0c76b7d067e3e80088aeb69 | app/javascript/components/forms/login/actions.js | app/javascript/components/forms/login/actions.js | import { createThunkAction } from 'utils/redux';
import { FORM_ERROR } from 'final-form';
import { login, register, resetPassword } from 'services/user';
import { getUserProfile } from 'providers/mygfw-provider/actions';
export const loginUser = createThunkAction('logUserIn', data => dispatch =>
login(data)
.th... | import { createThunkAction } from 'utils/redux';
import { FORM_ERROR } from 'final-form';
import { login, register, resetPassword } from 'services/user';
import { getUserProfile } from 'providers/mygfw-provider/actions';
export const loginUser = createThunkAction('logUserIn', data => dispatch =>
login(data)
.th... | Fix reset password for MyGFW | Fix reset password for MyGFW
| JavaScript | mit | Vizzuality/gfw,Vizzuality/gfw | ---
+++
@@ -34,11 +34,9 @@
export const resetUserPassword = createThunkAction(
'sendResetPassword',
- ({ data, success }) => () =>
+ data => () =>
resetPassword(data)
- .then(() => {
- success();
- })
+ .then(() => {})
.catch(error => {
const { errors } = error.respo... |
6555da3374369edb9bcd03d006c1504010688268 | javascripts/pong.js | javascripts/pong.js | (function() {
'use strict';
var canvas = document.getElementById('game');
var WIDTH = window.innerWidth;
var HEIGHT = window.innerHeight;
canvas.width = WIDTH;
canvas.height = HEIGHT;
var ctx = canvas.getContext('2d');
var FPS = 1000 / 60;
var Paddle = function(x, y, width, height) {
this.x = x;
... | (function() {
'use strict';
var canvas = document.getElementById('game');
var WIDTH = window.innerWidth;
var HEIGHT = window.innerHeight;
canvas.width = WIDTH;
canvas.height = HEIGHT;
var ctx = canvas.getContext('2d');
var FPS = 1000 / 60;
// Define game objects, i.e paddle and ball
var Paddle = fu... | Define and create human player and computer objects. Render them as well! | Define and create human player and computer objects. Render them as well!
| JavaScript | mit | msanatan/pong,msanatan/pong,msanatan/pong | ---
+++
@@ -8,6 +8,7 @@
var ctx = canvas.getContext('2d');
var FPS = 1000 / 60;
+ // Define game objects, i.e paddle and ball
var Paddle = function(x, y, width, height) {
this.x = x;
this.y = y;
@@ -20,7 +21,30 @@
Paddle.prototype.render = function() {
ctx.fillStyle = "#FFFFFF";
ctx... |
5b861da127b26493fa721cb65152edb8f06ab8bf | app/notes/notes.js | app/notes/notes.js | angular.module('marvelousnote.notes', [
'ui.router'
])
.config(function($stateProvider) {
$stateProvider
.state('notes', {
url: '/notes',
templateUrl: 'notes/notes.html',
controller: 'NotesController'
})
.state('notes.form', {
url: '/:noteId',
templateUrl: 'notes/notes-... | (function() {
angular
.module('marvelousnote.notes', ['ui.router'])
.congig(notesConfig)
.controller('NotesController', NotesController);
function notesConfig($stateProvider) {
$stateProvider
.state('notes', {
url: '/notes',
templateUrl: 'notes/notes.html',
controller: 'NotesCon... | Move NotesController and config to named functions. | Move NotesController and config to named functions.
| JavaScript | mit | patriciachunk/MarvelousNote,patriciachunk/MarvelousNote | ---
+++
@@ -1,8 +1,11 @@
-angular.module('marvelousnote.notes', [
- 'ui.router'
-])
+(function() {
+ angular
+ .module('marvelousnote.notes', ['ui.router'])
+ .congig(notesConfig)
+ .controller('NotesController', NotesController);
-.config(function($stateProvider) {
+
+function notesConfig($stateProvider... |
f1062cf3977db91ec257b63fd11e825f40df52aa | web/js/socket.js | web/js/socket.js | window.DEVELOPMENT_MODE = 'local-debug';
switch(window.DEVELOPMENT_MODE) {
case 'local-debug':
window.SOCKET_URI = '0.0.0.0';
break;
case 'competition':
default:
window.SOCKET_URI = "roboRIO-2503-frc.local";
break;
}
window.SOCKET = new Socket("ws://" + window.SOCKET_URI + ":5800/");
function Socket(url)... | window.DEVELOPMENT_MODE = 'local-debug';
switch(window.DEVELOPMENT_MODE) {
case 'local-debug':
window.SOCKET_URI = '0.0.0.0';
break;
case 'competition':
default:
window.SOCKET_URI = "roboRIO-2503-frc.local";
break;
}
function setupSocket(key, uri, messageCallback) {
window[key] = new Socket(uri, (functio... | Fix connection pipeline to be persistent in attempting to connect | Socket: Fix connection pipeline to be persistent in attempting to connect
| JavaScript | mit | frc2503/r2016 | ---
+++
@@ -11,19 +11,42 @@
break;
}
-window.SOCKET = new Socket("ws://" + window.SOCKET_URI + ":5800/");
+function setupSocket(key, uri, messageCallback) {
+ window[key] = new Socket(uri, (function() {
+ setupSocket(key, uri, messageCallback);
+ }), messageCallback);
+}
-function Socket(url) {
+function Soc... |
95b5b40653b50eea009f6f240e0cd60d8110e94f | controllers/news.js | controllers/news.js | klimaChallenge.controller('newsCtrl', function($scope, $http, $sce) {
$scope.facebookImages = Array();
$http.get('https://graph.facebook.com/v2.4/klimachallenge/photos/uploaded?fields=link,width,name,images&limit=10&access_token=846767055411205|UKF39DbxTvvEeA9BuKkWsJgiuLE').
success(function(data, status, he... | klimaChallenge.controller('newsCtrl', function($scope, $http, $sce) {
$scope.facebookImages = Array();
$http.get('https://graph.facebook.com/v2.10/klimachallenge/photos/uploaded?fields=link,width,name,images&limit=10&access_token=846767055411205|UKF39DbxTvvEeA9BuKkWsJgiuLE').
success(function(data, status, h... | Upgrade Facebook API to v. 2.10 | Upgrade Facebook API to v. 2.10
| JavaScript | mit | stromhalm/klimachallenge,stromhalm/klimachallenge,stromhalm/klimachallenge | ---
+++
@@ -2,7 +2,7 @@
$scope.facebookImages = Array();
- $http.get('https://graph.facebook.com/v2.4/klimachallenge/photos/uploaded?fields=link,width,name,images&limit=10&access_token=846767055411205|UKF39DbxTvvEeA9BuKkWsJgiuLE').
+ $http.get('https://graph.facebook.com/v2.10/klimachallenge/photos/upload... |
03c84159702761c70ebc9a3e2abd56048f04ac56 | src/containers/weather_list.js | src/containers/weather_list.js | // Container to render a list of cities and their data
// Saturday, February 25, 2017
import React, { Component } from 'react';
import { connect } from 'react-redux';
class WeatherList extends Component {
render() {
return (
<table className = 'table table-hover'>
<thead>
<tr>
<th>City</th>
... | // Container to render a list of cities and their data
// Saturday, February 25, 2017
import React, { Component } from 'react';
import { connect } from 'react-redux';
class WeatherList extends Component {
constructor(props) {
super(props);
}
renderForecast() {
// this.props.weather => [{ }, { }]
console... | Create renderForecast() method to render each row of data in the weather table. | Create renderForecast() method to render each row of data in the weather table.
| JavaScript | mit | jstowers/ReduxWeatherApp,jstowers/ReduxWeatherApp | ---
+++
@@ -6,7 +6,51 @@
class WeatherList extends Component {
+ constructor(props) {
+ super(props);
+
+
+ }
+
+ renderForecast() {
+
+ // this.props.weather => [{ }, { }]
+ console.log('this.props.weather =', this.props.weather);
+
+ return this.props.weather.map((city, index) => {
+ return (
+ <tr ke... |
8fcdcd00b8a9c97a31c605ec4286984849be0378 | gulpfile.js | gulpfile.js | 'use strict';
var gulp = require('gulp');
var moment = require('moment');
var fs = require('fs');
var simpleGit = require('simple-git')();
var semver = require('semver');
gulp.task('build', function () {
// VERSION
var versionFile = fs.readFileSync('package.json').toString().split('\n');
var version = versionFil... | 'use strict';
var gulp = require('gulp');
var moment = require('moment');
var fs = require('fs');
var simpleGit = require('simple-git')();
var semver = require('semver');
gulp.task('build', function () {
var numberToIncrement = 'patch';
if (process.argv && process.argv[3]) {
var option = process.argv[3].replac... | Build - Pass the major/minor/patch value as an option of the build command | Build - Pass the major/minor/patch value as an option of the build command
| JavaScript | mit | SeyZ/forest-express-mongoose | ---
+++
@@ -6,10 +6,18 @@
var semver = require('semver');
gulp.task('build', function () {
+ var numberToIncrement = 'patch';
+ if (process.argv && process.argv[3]) {
+ var option = process.argv[3].replace('--', '');
+ if (['major', 'minor', 'patch'].indexOf(option) !== -1) {
+ numberToIncrement = op... |
f0015af6ec09fcadea4a0ac4daaf8a5635725952 | gulpfile.js | gulpfile.js | var gulp = require('gulp');
var gReact = require('gulp-react');
var del = require('del');
var shell = require('gulp-shell');
gulp.task('clean', function(cb) {
del(['lib/', 'Flux.js'], cb);
});
gulp.task('default', ['clean'], function() {
return gulp.src('src/*.js')
.pipe(gReact({harmony: true}))
... | var gulp = require('gulp');
var gReact = require('gulp-react');
var del = require('del');
var shell = require('gulp-shell');
gulp.task('clean', function(cb) {
del(['lib/', 'Flux.js'], cb);
});
gulp.task('default', ['clean'], function() {
return gulp.src('src/*.js')
.pipe(gReact({harmony: true}))
... | Update to work with directory outside of cwd | Update to work with directory outside of cwd
| JavaScript | bsd-3-clause | benchling/react-art,toddw/react-art,Sirlon/react-art,scgilardi/react-art,micahlmartin/react-art,kidaa/react-art,kidaa/react-art,reactjs/react-art | ---
+++
@@ -14,13 +14,21 @@
});
-gulp.task('build-examples-website', ['clean'], shell.task([
- 'git checkout gh-pages',
- 'git merge master',
- 'cd examples/vector-widget; ../../node_modules/.bin/webpack app.js bundle.js',
- 'cp -r examples/* .',
- 'git add --all .',
+gulp.task('build-examples-website', ['c... |
5d912e756862ff62f160e7ada15531a8162811ac | web/gcode-parser.js | web/gcode-parser.js | /**
* Parses a string of gcode instructions, and invokes handlers for
* each type of command.
*
* Special handler:
* 'default': Called if no other handler matches.
*/
function GCodeParser(handlers) {
this.handlers = handlers || {};
}
GCodeParser.prototype.parseLine = function(text, info) {
text = text.repl... | /**
* Parses a string of gcode instructions, and invokes handlers for
* each type of command.
*
* Special handler:
* 'default': Called if no other handler matches.
*/
function GCodeParser(handlers) {
this.handlers = handlers || {};
}
GCodeParser.prototype.parseLine = function(text, info) {
text = text.repl... | Support mach3 style comments with parentheses. | Support mach3 style comments with parentheses. | JavaScript | mit | jherrm/gcode-viewer,cheton/gcode-viewer,cheton/gcode-viewer | ---
+++
@@ -10,7 +10,7 @@
}
GCodeParser.prototype.parseLine = function(text, info) {
- text = text.replace(/;.*$/, '').trim(); // Remove comments
+ text = text.replace(/[;(].*$/, '').trim(); // Remove comments
if (text) {
var tokens = text.split(' ');
if (tokens) { |
f0131fe468efcca8fafdc020269e1eda52374f4c | client/common/event_actions.js | client/common/event_actions.js | /**
* Assigns handlers/listeners for `[data-action]` links.
*
* Actions associated with a link will be invoked via Wire with the jQuery
* event object as an argument.
**/
'use strict';
/*global NodecaLoader, N, window*/
var $ = window.jQuery;
$(function () {
['click', 'submit', 'input'].forEach(functi... | /**
* Assigns handlers/listeners for `[data-action]` links.
*
* Actions associated with a link will be invoked via Wire with the jQuery
* event object as an argument.
**/
'use strict';
/*global NodecaLoader, N, window*/
var $ = window.jQuery;
$(function () {
['click', 'submit', 'input'].forEach(functi... | Add `event.preventDefault()` call in UJS action handlers. | Add `event.preventDefault()` call in UJS action handlers.
| JavaScript | mit | nodeca/nodeca.core,nodeca/nodeca.core | ---
+++
@@ -31,6 +31,7 @@
}
});
+ event.preventDefault();
return false;
});
}); |
abe4633a8484bce38e188871d24facf909099b2f | server/routes/rootRoute.js | server/routes/rootRoute.js | /**
* Created by Omnius on 6/25/16.
*/
'use strict';
const security = {
xframe: {
rule: 'sameorigin'
},
hsts: {
maxAge: '31536000',
includeSubdomains: true
},
xss: true
};
module.exports = [
{
// Web login
path: '/',
method: 'GET',
conf... | /**
* Created by Omnius on 6/25/16.
*/
'use strict';
const security = {
xframe: {
rule: 'sameorigin'
},
hsts: {
maxAge: '31536000',
includeSubdomains: true
},
xss: true
};
module.exports = [
{
// Web login
path: '/',
method: 'GET',
conf... | Rearrange object codes - no significant change | Rearrange object codes - no significant change
| JavaScript | mit | identityclash/hapi-login-test,identityclash/hapi-login-test | ---
+++
@@ -20,13 +20,13 @@
path: '/',
method: 'GET',
config: {
+ cache: {
+ privacy: 'public'
+ },
handler: {
rootHandler: {
type: 'index'
}
- },
- cache: {
- ... |
9ec4e70f81966dd0590b03f418fe5b973a5a838b | gulpfile.js | gulpfile.js | var gulp = require('gulp');
var sourcemaps = require('gulp-sourcemaps');
var stylus = require('gulp-stylus');
var rename = require('gulp-rename');
var mainStyl = './styl/main.styl';
gulp.task('build:dev', function() {
gulp.src(mainStyl)
.pipe(sourcemaps.init())
.pipe(stylus())
.pipe(source... | var gulp = require('gulp');
var sourcemaps = require('gulp-sourcemaps');
var stylus = require('gulp-stylus');
var rename = require('gulp-rename');
var mainStyl = './styl/main.styl';
gulp.task('build:dev', function() {
gulp.src(mainStyl)
.pipe(sourcemaps.init())
.pipe(stylus())
.pipe(source... | Fix wrong gulp task during watch | Fix wrong gulp task during watch
| JavaScript | mit | RyenNelsen/baremetal | ---
+++
@@ -26,7 +26,7 @@
});
gulp.task('stylus:watch', function() {
- gulp.watch('./styl/**/*.styl', ['stylus:main']);
+ gulp.watch('./styl/**/*.styl', ['build:dev']);
});
gulp.task('watch', ['build:dev', 'stylus:watch']); |
d1f84e072d74c50dd67be17bd448cbaf672e6d19 | gulpfile.js | gulpfile.js | 'use strict';
var gulp = require('gulp');
var casperjs = require('gulp-casperjs');
var spawn = require('child_process').spawn;
var gutil = require('gulp-util');
gulp.task('integrate', function(){
gulp.src('./spec/integration/**')
.pipe(casperjs({command:'test'}));
});
gulp.task('integrate:win', function () {
... | 'use strict';
var gulp = require('gulp');
var casperjs = require('gulp-casperjs');
var spawn = require('child_process').spawn;
gulp.task('integrate', function(){
gulp.src('./spec/integration/**')
.pipe(casperjs({command:'test'}));
});
| Remove unused Windows integrate code | Remove unused Windows integrate code
| JavaScript | mit | startersacademy/fullstack-project-01,startersacademy/fullstack-project-01 | ---
+++
@@ -3,22 +3,8 @@
var gulp = require('gulp');
var casperjs = require('gulp-casperjs');
var spawn = require('child_process').spawn;
-var gutil = require('gulp-util');
gulp.task('integrate', function(){
gulp.src('./spec/integration/**')
.pipe(casperjs({command:'test'}));
});
-
-gulp.task('integrat... |
ce0da6d74e4103431422f120134ef8a43f700cc4 | webpack.config.js | webpack.config.js | module.exports = {
entry: "./index.jsx",
output: {
path: __dirname,
filename: "./build/bundle.js"
},
module: {
loaders: [
{test: /\.(jsx|js)$/, loader: "babel-loader"},
{test: /\.md$/, loader: "raw-loader"},
{test: /\.json$/, loader: "json-lo... | module.exports = {
entry: "./index.jsx",
output: {
path: __dirname,
filename: "./build/bundle.js"
},
resolve: {
extensions: ['', '.js', '.jsx', '.json']
},
module: {
loaders: [
{test: /\.(jsx|js)$/, loader: "babel-loader"},
{test: /\.md$... | Resolve the jsx in import-s | Resolve the jsx in import-s
| JavaScript | mit | ikr/estimates-template,ikr/estimates-template | ---
+++
@@ -4,6 +4,10 @@
output: {
path: __dirname,
filename: "./build/bundle.js"
+ },
+
+ resolve: {
+ extensions: ['', '.js', '.jsx', '.json']
},
module: { |
d497926e4a55d4b71c997cab7ebe6a00ee4e7ad9 | client/new-paula.js | client/new-paula.js | import React from 'react';
import {connect} from 'react-redux';
import * as actions from './actions';
export default class NewPaula extends React.Component {
update(e) {
e.preventDefault();
this.props.dispatch(actions.replace_paula(this.refs.paula.value));
}
render() {
return <form onSubmit={this.update}>
... | import React from 'react';
import {connect} from 'react-redux';
import * as actions from './actions';
export default connect()(class NewPaula extends React.Component {
update(e) {
e.preventDefault();
this.props.dispatch(actions.replace_paula(this.refs.paula.value));
}
render() {
return <form onSubmit={this.u... | Debug Paula's bean for her | Debug Paula's bean for her
| JavaScript | mit | Rosuav/monopoly-open-bid,oshirodk/dogMatch,alexpoe22/fuzzyFinder,oshirodk/dogMatch,jbenjaminy/fullstack-app-template,jbenjaminy/fullstack-app-template,alexpoe22/fuzzyFinder,Rosuav/monopoly-open-bid,Rosuav/monopoly-open-bid | ---
+++
@@ -2,16 +2,16 @@
import {connect} from 'react-redux';
import * as actions from './actions';
-export default class NewPaula extends React.Component {
+export default connect()(class NewPaula extends React.Component {
update(e) {
e.preventDefault();
this.props.dispatch(actions.replace_paula(this.re... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.