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
cbb27012bb0c8ffc338d92b2cf3ef4449a65e4a4
src/config.js
src/config.js
const config = Object.assign({ development: { api: { trade_events: { host: 'https://intrasearch.govwizely.com/v1/trade_events', }, }, }, production: { api: { trade_events: { host: 'https://intrasearch.export.gov/v1/trade_events', }, }, }, }); export defau...
import assign from 'object-assign'; const config = assign({ development: { api: { trade_events: { host: 'https://intrasearch.govwizely.com/v1/trade_events', }, }, }, production: { api: { trade_events: { host: 'https://intrasearch.export.gov/v1/trade_events', },...
Use object-assign instead of Object.assign
Use object-assign instead of Object.assign
JavaScript
mit
GovWizely/trade-event-search-app,GovWizely/trade-event-search-app
--- +++ @@ -1,4 +1,6 @@ -const config = Object.assign({ +import assign from 'object-assign'; + +const config = assign({ development: { api: { trade_events: {
8295d27a906f850cefd86321d212162cba7ef296
local-cli/wrong-react-native.js
local-cli/wrong-react-native.js
#!/usr/bin/env node /** * Copyright (c) 2015-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same direc...
#!/usr/bin/env node /** * Copyright (c) 2015-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same direc...
Fix usage of react-native cli inside package.json scripts
Fix usage of react-native cli inside package.json scripts Summary: IIRC we made `wrong-react-native` to warn people in case they installed `react-native` globally (instead of `react-native-cli` what the guide suggests). To do that we added `bin` entry to React Native's `package.json` that points to `local-cli/wrong-re...
JavaScript
bsd-3-clause
CodeLinkIO/react-native,imjerrybao/react-native,shrutic123/react-native,tszajna0/react-native,gitim/react-native,DanielMSchmidt/react-native,jadbox/react-native,ndejesus1227/react-native,tsjing/react-native,exponent/react-native,naoufal/react-native,martinbigio/react-native,mironiasty/react-native,browniefed/react-nati...
--- +++ @@ -9,11 +9,17 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -console.error([ - '\033[31mLooks like you installed react-native globally, maybe you meant react-native-cli?', - 'To fix the issue, run:\033[0m', - 'npm uninstall -g react-native', - 'npm install -g reac...
1aac1de738fdef73676948be8e4d5d8fc18eb27c
caspy/static/js/api.js
caspy/static/js/api.js
(function(){ var mod = angular.module('caspy.api', ['ngResource', 'caspy.server']); mod.config(['$resourceProvider', function($resourceProvider) { $resourceProvider.defaults.stripTrailingSlashes = false; }] ); mod.factory('caspyAPI', ['$q', '$http', '$resource', 'Constants', function($q, $htt...
(function(){ var mod = angular.module('caspy.api', ['ngResource', 'caspy.server']); mod.config(['$resourceProvider', function($resourceProvider) { $resourceProvider.defaults.stripTrailingSlashes = false; }] ); mod.factory('caspyAPI', ['$q', '$http', '$resource', 'Constants', function($q, $htt...
Put higher level functions first
Put higher level functions first
JavaScript
bsd-3-clause
altaurog/django-caspy,altaurog/django-caspy,altaurog/django-caspy
--- +++ @@ -14,15 +14,11 @@ root: null , resources: {} - , resolve: function(name) { - var d = $q.defer(); - if (typeof api.root[name] === 'undefined') { - d.reject(new Error(name + ' endpoint not available')); - } ...
cb754daf342cdea42225efca3834966bd5328fba
src/footer.js
src/footer.js
/* backgrid http://github.com/wyuenho/backgrid Copyright (c) 2013 Jimmy Yuen Ho Wong and contributors Licensed under the MIT @license. */ /** A Footer is a generic class that only defines a default tag `tfoot` and number of required parameters in the initializer. @abstract @class Backgrid.Footer ...
/* backgrid http://github.com/wyuenho/backgrid Copyright (c) 2013 Jimmy Yuen Ho Wong and contributors Licensed under the MIT @license. */ /** A Footer is a generic class that only defines a default tag `tfoot` and number of required parameters in the initializer. @abstract @class Backgrid.Footer ...
Remove extraneous parent reference from Footer
Remove extraneous parent reference from Footer
JavaScript
mit
goodwall/backgrid,blackducksoftware/backgrid,wyuenho/backgrid,wyuenho/backgrid,digideskio/backgrid,qferr/backgrid,bryce-gibson/backgrid,aboieriu/backgrid,ludoo0d0a/backgrid,bryce-gibson/backgrid,blackducksoftware/backgrid,aboieriu/backgrid,digideskio/backgrid,Acquisio/backgrid,kirill-zhirnov/backgrid,crealytics/backgri...
--- +++ @@ -32,7 +32,6 @@ */ initialize: function (options) { Backgrid.requireOptions(options, ["columns", "collection"]); - this.parent = options.parent; this.columns = options.columns; if (!(this.columns instanceof Backbone.Collection)) { this.columns = new Backgrid.Columns(this.colum...
c51089b4f5be53d7657aecf9cfa721ced5895fa4
lib/health.js
lib/health.js
var express = require('express'); var geocode = require('./geocode'); var mongoose = require('./mongo'); var otp = require('./otp'); /** * Expose `router` */ var router = module.exports = express.Router(); /** * Main check */ router.all('/', checkGeocoder, checkOTP, function(req, res) { var checks = { api...
var express = require('express'); var geocode = require('./geocode'); var mongoose = require('./mongo'); var otp = require('./otp'); /** * Expose `router` */ var router = module.exports = express.Router(); /** * Main check */ router.all('/', checkGeocoder, checkOTP, function(req, res) { var checks = { api...
Use encode to check geocoder status
Use encode to check geocoder status
JavaScript
bsd-3-clause
amigocloud/modified-tripplanner,tismart/modeify,miraculixx/modeify,miraculixx/modeify,tismart/modeify,arunnair80/modeify,amigocloud/modeify,tismart/modeify,amigocloud/modeify,miraculixx/modeify,arunnair80/modeify-1,arunnair80/modeify-1,arunnair80/modeify,miraculixx/modeify,amigocloud/modeify,amigocloud/modified-trippla...
--- +++ @@ -44,7 +44,7 @@ */ function checkGeocoder(req, res, next) { - geocode.suggest('1133 15th St NW, Washington, DC', function(err, suggestions) { + geocode.encode('1133 15th St NW, Washington, DC', function(err, suggestions) { req.geocoder = err; next(); });
8d46d03dd81046fb1e9821ab5e3c4c85e7eba747
lib/modules/storage/class_static_methods/is_secured.js
lib/modules/storage/class_static_methods/is_secured.js
function isSecured(operation) { if (_.has(this.schema.secured, operation)) { return this.schema.secured[operation]; } else { return this.schema.secured.common || false; } }; export default isSecured;
import _ from 'lodash'; function isSecured(operation) { if (_.has(this.schema.secured, operation)) { return this.schema.secured[operation]; } else { return this.schema.secured.common || false; } }; export default isSecured;
Fix lack of loads import
Fix lack of loads import
JavaScript
mit
jagi/meteor-astronomy
--- +++ @@ -1,3 +1,5 @@ +import _ from 'lodash'; + function isSecured(operation) { if (_.has(this.schema.secured, operation)) { return this.schema.secured[operation];
f6397f79ef1471f87aa113a4dc4bab900e07935c
lib/routes.js
lib/routes.js
var addFollowers = require('./follow'); var checkAuth = require('./check_auth'); var checkPrivilege = require('./privilege_check'); var githubOAuth = require('./github_oauth'); var users = require('./db').get('users'); module.exports = function(app) { app.get('/me', checkAuth, function(req, res) { checkPrivileg...
var addFollowers = require('./follow'); var checkAuth = require('./check_auth'); var checkPrivilege = require('./privilege_check'); var githubOAuth = require('./github_oauth'); var users = require('./db').get('users'); module.exports = function(app) { app.get('/me', checkAuth, function(req, res) { checkPrivileg...
Add privilege check on follow button
Add privilege check on follow button
JavaScript
mit
simplyianm/ghfollowers,legoboy0215/ghfollowers,simplyianm/ghfollowers,legoboy0215/ghfollowers
--- +++ @@ -23,20 +23,16 @@ return res.json(req.session.user); }); - app.post('/follow/:login', function(req, res) { - if (!req.session.user) { - return res.status(401).json({ - error: 'Not logged in' + app.post('/follow/:login', checkAuth, function(req, res) { + checkPrivilege(req.sessi...
3bed3dbca37e1e2072581ae8fc1a532c63c1afd7
js/plugins/EncryptedInsightStorage.js
js/plugins/EncryptedInsightStorage.js
var cryptoUtil = require('../util/crypto'); var InsightStorage = require('./InsightStorage'); var inherits = require('inherits'); function EncryptedInsightStorage(config) { InsightStorage.apply(this, [config]); } inherits(EncryptedInsightStorage, InsightStorage); EncryptedInsightStorage.prototype.getItem = function...
var cryptoUtil = require('../util/crypto'); var InsightStorage = require('./InsightStorage'); var inherits = require('inherits'); function EncryptedInsightStorage(config) { InsightStorage.apply(this, [config]); } inherits(EncryptedInsightStorage, InsightStorage); EncryptedInsightStorage.prototype.getItem = function...
Use the same kdf for Insight Storage
Use the same kdf for Insight Storage
JavaScript
mit
LedgerHQ/copay,troggy/unicoisa,Bitcoin-com/Wallet,BitGo/copay,wallclockbuilder/copay,msalcala11/copay,cmgustavo/copay,BitGo/copay,Kirvx/copay,DigiByte-Team/copay,mpolci/copay,Neurosploit/copay,payloadtech/wallet,mzpolini/copay,mpolci/copay,wallclockbuilder/copay,wallclockbuilder/copay,ObsidianCryptoVault/copay,fr34k8/c...
--- +++ @@ -8,7 +8,7 @@ inherits(EncryptedInsightStorage, InsightStorage); EncryptedInsightStorage.prototype.getItem = function(name, callback) { - var key = cryptoUtil.kdfbinary(this.password + this.email); + var key = cryptoUtil.kdf(this.password + this.email); InsightStorage.prototype.getItem.apply(this, ...
197b667ca677c5961c9c1d116fb86032bd2ef861
app/assets/javascripts/application.js
app/assets/javascripts/application.js
//= require jquery $(function() { $('.login-trello').click(function() { Trello.authorize({ type: "redirect", name: "Reportrello", scope: { read: true, write: true } }); }); })
//= require jquery $(function() { $('.login-trello').click(function() { Reportrello.authorize(); }); Reportrello = { authorize: function() { var self = this Trello.authorize({ type: 'popup', name: 'Reportrello', fragment: 'postmessage', scope: { rea...
Add JS to authentication and get user information by token
Add JS to authentication and get user information by token
JavaScript
mit
SauloSilva/reportrello,SauloSilva/reportrello,SauloSilva/reportrello
--- +++ @@ -2,13 +2,50 @@ $(function() { $('.login-trello').click(function() { - Trello.authorize({ - type: "redirect", - name: "Reportrello", - scope: { - read: true, - write: true - } - }); + Reportrello.authorize(); }); + + Reportrello = { + authorize: functi...
3578177e3e10ebb0c5c0403b2df13fa472c70edb
app/assets/javascripts/application.js
app/assets/javascripts/application.js
// This is a manifest file that'll be compiled into application.js, which will include all the files // listed below. // // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative pat...
// This is a manifest file that'll be compiled into application.js, which will include all the files // listed below. // // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative pat...
Enable JavaScript code of bootstrap
Enable JavaScript code of bootstrap
JavaScript
mit
eqot/petroglyph3,eqot/petroglyph3
--- +++ @@ -12,5 +12,6 @@ // //= require jquery //= require jquery_ujs +//= require twitter/bootstrap //= require turbolinks //= require_tree .
9716b2cd82d4f4a778f798b88838a5685db2b7ea
app/assets/javascripts/application.js
app/assets/javascripts/application.js
// This is a manifest file that'll be compiled into application.js, which will include all the files // listed below. // // Any JavaScript file within this directory, lib/assets/javascripts, vendor/assets/javascripts, // or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path. /...
// This is a manifest file that'll be compiled into application.js, which will include all the files // listed below. // // Any JavaScript file within this directory, lib/assets/javascripts, vendor/assets/javascripts, // or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path. /...
Enable rails-ujs to make working REST methods on link by js
Enable rails-ujs to make working REST methods on link by js
JavaScript
mit
gadzorg/gram2_api_server,gadzorg/gram2_api_server,gadzorg/gram2_api_server
--- +++ @@ -11,4 +11,5 @@ // about supported directives. // //= require turbolinks +//= require rails-ujs //= require_tree .
e467997d760eeb7c3b9282a645568e4b3bcc13e8
app/services/stripe.js
app/services/stripe.js
/* global Stripe */ import config from '../config/environment'; import Ember from 'ember'; var debug = config.LOG_STRIPE_SERVICE; function createToken (card) { if (debug) { Ember.Logger.info('StripeService: getStripeToken - card:', card); } // manually start Ember loop Ember.run.begin(); return new Emb...
/* global Stripe */ import config from '../config/environment'; import Ember from 'ember'; var debug = config.LOG_STRIPE_SERVICE; function createToken (card) { if (debug) { Ember.Logger.info('StripeService: getStripeToken - card:', card); } // manually start Ember loop Ember.run.begin(); return new Emb...
Add a create bank account token method to the service
Add a create bank account token method to the service
JavaScript
mit
iezer/ember-stripe-service,iezer/ember-stripe-service,sescobb27/ember-stripe-service,samselikoff/ember-stripe-service,samselikoff/ember-stripe-service,ride/ember-stripe-service,fastly/ember-stripe-service,fastly/ember-stripe-service,sescobb27/ember-stripe-service,ride/ember-stripe-service
--- +++ @@ -30,6 +30,34 @@ }); } +function createBankAccountToken(bankAccount) { + if (debug) { + Ember.Logger.info('StripeService: getStripeToken - bankAccount:', bankAccount); + } + + // manually start Ember loop + Ember.run.begin(); + + return new Ember.RSVP.Promise(function (resolve, reject) { + ...
fecd1be97cfd7539a738effe8a870ed71470b56a
src/lib/HttpApi.js
src/lib/HttpApi.js
export default class HttpApi { constructor (prefix = '') { this.prefix = prefix this.opts = { credentials: 'same-origin', headers: new Headers({ 'Content-Type': 'application/json', }) } return this.callApi } callApi = (method, url, opts = {}) => { opts = Object.assi...
export default class HttpApi { constructor (prefix = '') { this.prefix = prefix this.opts = { credentials: 'same-origin', headers: new Headers({ 'Content-Type': 'application/json', }) } return this.callApi } callApi = (method, url, opts = {}) => { opts = Object.assi...
Fix fetch api when returning non-JSON
Fix fetch api when returning non-JSON
JavaScript
isc
bhj/karaoke-forever,bhj/karaoke-forever
--- +++ @@ -23,7 +23,7 @@ .then(res => { if (res.ok) { const type = res.headers.get('Content-Type') - return (type && type.includes('application/json')) ? res.json() : res.text() + return (type && type.includes('application/json')) ? res.json() : res } ...
700f316c0ca9aa873181111752ba99b0f17a1d35
src-es6/test/classTest.js
src-es6/test/classTest.js
import test from 'tape' import { Vector, Polygon, Rectangle, Circle, ShapeEventEmitter } from '..' test('Polygon#contains', t => { t.plan(5) //Disable warning about missing 'new'. That's what we are testing /*jshint -W064 */ /*eslint-disable new-cap */ t.throws(()=> Polygon(), TypeError) t.throws(()=> Rect...
import test from 'tape' import { Vector, Polygon, Rectangle, Circle, ShapeEventEmitter } from '..' test('Classtest', t => { t.plan(5) //Disable warning about missing 'new'. That's what we are testing /*jshint -W064 */ /*eslint-disable new-cap */ t.throws(()=> Polygon(), TypeError) t.throws(()=> Rectangle()...
Fix name for the classtest
Fix name for the classtest
JavaScript
mit
tillarnold/shapes
--- +++ @@ -1,7 +1,7 @@ import test from 'tape' import { Vector, Polygon, Rectangle, Circle, ShapeEventEmitter } from '..' -test('Polygon#contains', t => { +test('Classtest', t => { t.plan(5) //Disable warning about missing 'new'. That's what we are testing /*jshint -W064 */
1cf21242ccd82a54bf1b0da0f61184065f3bd765
WebContent/js/moe-list.js
WebContent/js/moe-list.js
/* Cached Variables *******************************************************************************/ var context = sessionStorage.getItem('context'); var rowThumbnails = document.querySelector('.row-thumbnails'); /* Initialization *********************************************************************************/ rowTh...
/* Cached Variables *******************************************************************************/ var context = sessionStorage.getItem('context'); var rowThumbnails = document.querySelector('.row-thumbnails'); /* Initialization *********************************************************************************/ rowTh...
Change nodelist.foreach to a normal for loop
Change nodelist.foreach to a normal for loop This should bring much greater browser compatibility the the nodelist foreach allowing it to work on all the major browser vendors. Fixes #95
JavaScript
mit
NYPD/moe-sounds,NYPD/moe-sounds
--- +++ @@ -21,16 +21,14 @@ var thumbnails = window.document.querySelectorAll('.thumbnail'); var tallestThumbnailSize = 0; -thumbnails.forEach(function(value, key, listObj, argument) { - var offsetHeight = listObj[key].offsetHeight; - if(offsetHeight > tallestThumbnailSize) tallestThumbnailSize = offsetHeight; -}...
0a5d4a96c4f656ff2aa154274dc19cfa3f4d3d17
openstack_dashboard/static/fiware/contextualHelp.js
openstack_dashboard/static/fiware/contextualHelp.js
$( document ).ready(function () { $('.contextual-help').click(function (){ $(this).find('i').toggleClass('active'); }); $('body').click(function (e) { $('[data-toggle="popover"]').each(function () { //the 'is' for buttons that trigger popups //the 'has' for icons within a button that triggers ...
$( document ).ready(function () { $('.contextual-help').click(function (){ $(this).find('i').toggleClass('active'); }); $('body').click(function (e) { $('[data-toggle="popover"].contextual-help').each(function () { //the 'is' for buttons that trigger popups //the 'has' for icons within a butto...
Improve usability of contextual-help popovers
Improve usability of contextual-help popovers
JavaScript
apache-2.0
ging/horizon,ging/horizon,ging/horizon,ging/horizon
--- +++ @@ -4,7 +4,7 @@ }); $('body').click(function (e) { - $('[data-toggle="popover"]').each(function () { + $('[data-toggle="popover"].contextual-help').each(function () { //the 'is' for buttons that trigger popups //the 'has' for icons within a button that triggers a popup if...
6655280140920d0697a5bf1ef8cff12c7bcee5d0
src/twig.header.js
src/twig.header.js
/** * Twig.js 0.8.2 * * @copyright 2011-2015 John Roepke and the Twig.js Contributors * @license Available under the BSD 2-Clause License * @link https://github.com/justjohn/twig.js */ var Twig = (function (Twig) { Twig.VERSION = "0.8.2"; return Twig; })(Twig || {});
/** * Twig.js 0.8.2-1 * * @copyright 2011-2015 John Roepke and the Twig.js Contributors * @license Available under the BSD 2-Clause License * @link https://github.com/justjohn/twig.js */ var Twig = (function (Twig) { Twig.VERSION = "0.8.2-1"; return Twig; })(Twig || {});
Bump internal Twig.js version to "0.8.2-1"
Bump internal Twig.js version to "0.8.2-1"
JavaScript
bsd-2-clause
FoxyCart/twig.js,FoxyCart/twig.js,FoxyCart/twig.js
--- +++ @@ -1,5 +1,5 @@ /** - * Twig.js 0.8.2 + * Twig.js 0.8.2-1 * * @copyright 2011-2015 John Roepke and the Twig.js Contributors * @license Available under the BSD 2-Clause License @@ -8,7 +8,7 @@ var Twig = (function (Twig) { - Twig.VERSION = "0.8.2"; + Twig.VERSION = "0.8.2-1"; return ...
f4ac2aad1922930d4c27d4841e5665714a509a14
src/command-line/index.js
src/command-line/index.js
var program = require("commander"); var pkg = require("../../package.json"); var fs = require("fs"); var mkdirp = require("mkdirp"); var Helper = require("../helper"); program.version(pkg.version, "-v, --version"); program.option(""); program.option(" --home <path>" , "home path"); require("./start"); require("./c...
var program = require("commander"); var pkg = require("../../package.json"); var fs = require("fs"); var mkdirp = require("mkdirp"); var Helper = require("../helper"); program.version(pkg.version, "-v, --version"); program.option(""); program.option(" --home <path>" , "home path"); var argv = program.parseOptions(...
Fix loading config before HOME variable is set
Fix loading config before HOME variable is set
JavaScript
mit
realies/lounge,ScoutLink/lounge,realies/lounge,rockhouse/lounge,rockhouse/lounge,FryDay/lounge,williamboman/lounge,rockhouse/lounge,sebastiencs/lounge,sebastiencs/lounge,libertysoft3/lounge-autoconnect,metsjeesus/lounge,FryDay/lounge,williamboman/lounge,williamboman/lounge,metsjeesus/lounge,ScoutLink/lounge,sebastiencs...
--- +++ @@ -7,14 +7,6 @@ program.version(pkg.version, "-v, --version"); program.option(""); program.option(" --home <path>" , "home path"); - -require("./start"); -require("./config"); -require("./list"); -require("./add"); -require("./remove"); -require("./reset"); -require("./edit"); var argv = program.par...
2135e956f28bafdfe11786d3157f52ea05bccf33
config/env/production.js
config/env/production.js
'use strict'; module.exports = { db: 'mongodb://localhost/mean', app: { name: 'MEAN - A Modern Stack - Production' }, facebook: { clientID: 'APP_ID', clientSecret: 'APP_SECRET', callbackURL: 'http://localhost:3000/auth/facebook/callback' }, twitter: { cli...
'use strict'; module.exports = { app: { name: 'MEAN - A Modern Stack - Production' }, facebook: { clientID: 'APP_ID', clientSecret: 'APP_SECRET', callbackURL: 'http://localhost:3000/auth/facebook/callback' }, twitter: { clientID: 'CONSUMER_KEY', clien...
Use MONGOHQ_URL for database connection in prod
Use MONGOHQ_URL for database connection in prod
JavaScript
bsd-2-clause
asm-products/barrtr,asm-products/barrtr
--- +++ @@ -1,7 +1,6 @@ 'use strict'; module.exports = { - db: 'mongodb://localhost/mean', app: { name: 'MEAN - A Modern Stack - Production' },
a92f5fd72560341022223b039b9282f0c360627e
addon/transitions/fade.js
addon/transitions/fade.js
import opacity from 'ember-animated/motions/opacity'; /** Fades inserted, removed, and kept sprites. ```js import fade from 'ember-animated/transitions/fade' export default Component.extend({ transition: fade }); ``` ```hbs {{#animated-if use=transition}} ... {{/animated-if}} ``` @fun...
import opacity from 'ember-animated/motions/opacity'; /** Fades inserted, removed, and kept sprites. ```js import fade from 'ember-animated/transitions/fade'; export default Component.extend({ transition: fade }); ``` ```hbs {{#animated-if use=transition}} ... {{/animated-if}} ``` @fu...
Add missing semicolon to example
Add missing semicolon to example Adds a missing semicolon to the fade transition example.
JavaScript
mit
ember-animation/ember-animated,ember-animation/ember-animated,ember-animation/ember-animated
--- +++ @@ -4,7 +4,7 @@ Fades inserted, removed, and kept sprites. ```js - import fade from 'ember-animated/transitions/fade' + import fade from 'ember-animated/transitions/fade'; export default Component.extend({ transition: fade
f6f3afda12313c5093774b47b62fa79789efccc0
dev/_/components/js/sourceModel.js
dev/_/components/js/sourceModel.js
// Source Model AV.source = Backbone.Model.extend({ url: 'php/redirect.php/source', defaults: { name: '', type: 'raw', contentType: 'txt', data: '' }, }); // Source Model Tests // test_source = new AV.source({ // name: 'The Wind and the Rain', // type: 'raw', // contentType: 'txt', // data:...
// Source Model AV.Source = Backbone.Model.extend({ url: 'php/redirect.php/source', defaults: { name: '', type: 'raw', contentType: 'txt', data: '' }, }); // Source Model Tests // test_Source = new AV.Source({ // name: 'The Wind and the Rain', // type: 'raw', // contentType: 'txt', // data:...
Add some tests, they're commented out right now. Things work!
Add some tests, they're commented out right now. Things work!
JavaScript
bsd-3-clause
Swarthmore/juxtaphor,Swarthmore/juxtaphor
--- +++ @@ -1,5 +1,5 @@ // Source Model -AV.source = Backbone.Model.extend({ +AV.Source = Backbone.Model.extend({ url: 'php/redirect.php/source', defaults: { name: '', @@ -11,14 +11,15 @@ // Source Model Tests -// test_source = new AV.source({ +// test_Source = new AV.Source({ // name: 'The Wind and...
74e17f622ac60623e4461c5c472e740f292855f6
test/index.js
test/index.js
var callisto = require('callisto'); var users = require('./lib/users.js'); var sqlite3 = require('sqlite3').verbose(); var db = new sqlite3.Database('database.db3'); callisto.server({ port: 8090, root: 'www' }); callisto.addModule('users', users);
var callisto = require('callisto'); var users = require('./lib/users.js'); var sqlite3 = require('sqlite3').verbose(); global.db = new sqlite3.Database('database.db3'); callisto.server({ port: 8090, root: 'www' }); callisto.addModule('users', users);
Add db to the global variables
Add db to the global variables
JavaScript
mit
codingvillage/callisto,codingvillage/callisto
--- +++ @@ -1,7 +1,8 @@ var callisto = require('callisto'); var users = require('./lib/users.js'); var sqlite3 = require('sqlite3').verbose(); -var db = new sqlite3.Database('database.db3'); +global.db = new sqlite3.Database('database.db3'); + callisto.server({ port: 8090,
625fc78ee616baedf64aa37357403b4b72c7363c
src/js/select2/i18n/th.js
src/js/select2/i18n/th.js
define(function () { // Thai return { inputTooLong: function (args) { var overChars = args.input.length - args.maximum; var message = 'โปรดลบออก ' + overChars + ' ตัวอักษร'; return message; }, inputTooShort: function (args) { var remainingChars = args.minimum - args.input.lengt...
define(function () { // Thai return { errorLoading: function () { return 'ไม่สามารถค้นข้อมูลได้'; }, inputTooLong: function (args) { var overChars = args.input.length - args.maximum; var message = 'โปรดลบออก ' + overChars + ' ตัวอักษร'; return message; }, inputTooShort:...
Add errorLoading translation of Thai language.
Add errorLoading translation of Thai language. This closes https://github.com/select2/select2/pull/4521.
JavaScript
mit
bottomline/select2,select2/select2,ZaArsProgger/select2,inway/select2,ZaArsProgger/select2,iestruch/select2,inway/select2,bottomline/select2,iestruch/select2,select2/select2
--- +++ @@ -1,6 +1,9 @@ define(function () { // Thai return { + errorLoading: function () { + return 'ไม่สามารถค้นข้อมูลได้'; + }, inputTooLong: function (args) { var overChars = args.input.length - args.maximum;
263e6691ad0cda4c2adaee1aca584316fedcf382
test/index.js
test/index.js
var assert = require('assert') var mongo = require('../') var db = mongo('mongodb://read:read@ds031617.mongolab.com:31617/esdiscuss') before(function (done) { this.timeout(10000) db._get(done) }) describe('read only operation', function () { it('db.getCollectionNames', function (done) { db.getCollectionName...
var assert = require('assert') var mongo = require('../') var db = mongo('mongodb://read:read@ds031617.mongolab.com:31617/esdiscuss') before(function (done) { this.timeout(10000) db._get(done) }) describe('read only operation', function () { it('db.getCollectionNames', function (done) { db.getCollectionName...
Add test case for `count` method
Add test case for `count` method
JavaScript
mit
then/mongod,then/then-mongo
--- +++ @@ -27,4 +27,12 @@ }) .nodeify(done) }) + it('db.collection("name").find().count()', function (done) { + db.collection('headers').count() + .then(function (count) { + assert(typeof count === 'number'); + assert(count > 0); + }) + .nodeify(done) + }) })
74632c81aa309e7d4cfab2bc4fb80effd49da773
test/index.js
test/index.js
'use strict'; var test = require('tape'); var isError = require('../index.js'); test('isError is a function', function t(assert) { assert.equal(typeof isError, 'function'); assert.end(); }); test('returns true for error', function t(assert) { assert.equal(isError(new Error('foo')), true); assert.equ...
'use strict'; var test = require('tape'); var vm = require('vm'); var isError = require('../index.js'); test('isError is a function', function t(assert) { assert.equal(typeof isError, 'function'); assert.end(); }); test('returns true for error', function t(assert) { assert.equal(isError(new Error('foo')...
Add breaking tests for foreign/inherited errors
Add breaking tests for foreign/inherited errors
JavaScript
mit
Raynos/is-error
--- +++ @@ -1,6 +1,7 @@ 'use strict'; var test = require('tape'); +var vm = require('vm'); var isError = require('../index.js'); @@ -21,3 +22,21 @@ assert.equal(isError({message: 'hi'}), false); assert.end(); }); + +test('errors that inherit from Error', function t(assert) { + var error = Objec...
ce11c728c6aba22c377c9abd563aebc03df71964
core/client/views/settings/tags/settings-menu.js
core/client/views/settings/tags/settings-menu.js
var TagsSettingsMenuView = Ember.View.extend({ saveText: Ember.computed('controller.model.isNew', function () { return this.get('controller.model.isNew') ? 'Add Tag' : 'Save Tag'; }), // This observer loads and resets the uploader whenever the active tag changes, // ensu...
var TagsSettingsMenuView = Ember.View.extend({ saveText: Ember.computed('controller.model.isNew', function () { return this.get('controller.model.isNew') ? 'Add Tag' : 'Save Tag'; }), // This observer loads and resets the uploader whenever the active tag changes, // ensu...
Reset upload component on tag switch
Reset upload component on tag switch Closes #4755
JavaScript
mit
sangcu/Ghost,thinq4yourself/Unmistakable-Blog,JohnONolan/Ghost,ThorstenHans/Ghost,optikalefx/Ghost,wemakeweb/Ghost,jomahoney/Ghost,lanffy/Ghost,tidyui/Ghost,rollokb/Ghost,shrimpy/Ghost,fredeerock/atlabghost,ClarkGH/Ghost,letsjustfixit/Ghost,UsmanJ/Ghost,rito/Ghost,TribeMedia/Ghost,BlueHatbRit/Ghost,e10/Ghost,NovaDevelo...
--- +++ @@ -15,7 +15,7 @@ if (image) { uploader[0].uploaderUi.initWithImage(); } else { - uploader[0].uploaderUi.initWithDropzone(); + uploader[0].uploaderUi.reset(); } } })
9d75d13fcca1105093170e6b98d1e690fc9cbd29
system-test/env.js
system-test/env.js
const expect = require('chai').expect; const version = process.env.QB_VERSION; describe('check compiler version inside docker', function () { it('should have the same version', async () => { const exec = require('child_process').exec; let options = { timeout: 60000, killSig...
const expect = require('chai').expect; const version = process.env.QB_VERSION; describe('check compiler version inside docker', function () { it('should have the same version', async () => { const exec = require('child_process').exec; let options = { timeout: 60000, killSig...
Add a test for std-versions script
Add a test for std-versions script
JavaScript
bsd-2-clause
FredTingaud/quick-bench-back-end,FredTingaud/quick-bench-back-end,FredTingaud/quick-bench-back-end
--- +++ @@ -15,3 +15,18 @@ expect(result).to.eql(version); }).timeout(60000); }); + +describe('check available standards', function() { + it('should contain multiple standards', async() =>{ + const exec = require('child_process').exec; + let options = { + timeout: 60000, + ...
210babd039054adf81522da01f55b10b5e0dc06f
tests/dev.js
tests/dev.js
var f_ = require('../index.js'); var TaskList = require('./TaskList'); var f_config = { functionFlow: ['getSource', 'writeSource', 'notify'], // REQUIRED resetOnRetryAll: true, toLog: ['all'], desc: 'Test taskList', maxRetries: { all: 2 } }; TaskList = f_.augment(TaskList, f_config); var runSingle = fun...
var f_ = require('../index.js'); var TaskList = require('./TaskList'); var f_config = { /** * `start` method is not given here, since we call it manualy * This is just a matter of personal taste, I do not like auto starts! */ functionFlow: ['getSource', 'writeSource', 'notify'], // REQUIRED resetOnRetryAll...
Comment about start method not being present in functionFlow
Comment about start method not being present in functionFlow
JavaScript
mit
opensoars/f_
--- +++ @@ -3,6 +3,11 @@ var TaskList = require('./TaskList'); var f_config = { + + /** + * `start` method is not given here, since we call it manualy + * This is just a matter of personal taste, I do not like auto starts! + */ functionFlow: ['getSource', 'writeSource', 'notify'], // REQUIRED resetOnRetry...
e34ec4cde226f760dc21926e9f2fb504fdb7fdb5
src/Drivers/Cache/index.js
src/Drivers/Cache/index.js
'use strict' /** * Abstract base class that ensures required public methods are implemented by * inheriting classes. * * @example * * class BloomFilterCache extends Cache { * constructor() { * super() * } * * get(key) {} * put(key, value, milliseconds) {} * increment(key) {} * incrementEx...
'use strict' /** * Abstract base class that ensures required public methods are implemented by * inheriting classes. * * @example * * class BloomFilterCache extends Cache { * constructor() { * super() * } * * get(key) {} * put(key, value, milliseconds) {} * increment(key) {} * incrementEx...
Mark secondsToExpiration as abstract method
Mark secondsToExpiration as abstract method
JavaScript
mit
masasron/adonis-throttle,masasron/adonis-throttle
--- +++ @@ -31,7 +31,8 @@ 'get', 'put', 'increment', - 'incrementExpiration' + 'incrementExpiration', + 'secondsToExpiration' ].map(name => { const implemented = typeof this[name] === 'function' return { name, implemented }
3f5e236d5a23f13e8f683a550d31ff44080ecb01
transforms.js
transforms.js
/** * Module dependencies */ var accounting = require('accounting') , util = require('util') , currency = require('currency-symbol-map'); /** * formatPrice - format currency code and price nicely * @param {Object} value * @returns {String} formatted price * @note Value is expected to be of the form: * { ...
/** * Module dependencies */ var accounting = require('accounting') , util = require('util') , currency = require('currency-symbol-map'); /** * formatPrice - format currency code and price nicely * @param {Object} value * @returns {String} formatted price * @note Value is expected to be of the form: * { ...
Format prices differently for germany
Format prices differently for germany
JavaScript
mit
urgeiolabs/aws-price
--- +++ @@ -17,9 +17,19 @@ */ module.exports.formatPrice = function (val) { var code = val && val.CurrencyCode && val.CurrencyCode[0] - , amount = val && val.Amount && val.Amount[0]; + , amount = val && val.Amount && val.Amount[0] + , decimal, thousand; if (!code || !amount) return null; - retu...
351e1eb2093ff4cfb87f17f6bcfccb95f0f589f0
source/assets/javascripts/locastyle/_toggle-text.js
source/assets/javascripts/locastyle/_toggle-text.js
var locastyle = locastyle || {}; locastyle.toggleText = (function() { 'use strict'; var config = { trigger: '[data-ls-module=toggleText]', triggerChange: 'toggleText:change' }; function eventHandler(el, target, text) { el.trigger(config.triggerChange, [target, text]); } function bindToggle(e...
var locastyle = locastyle || {}; locastyle.toggleText = (function() { 'use strict'; var config = { trigger: '[data-ls-module=toggleText]', triggerChange: 'toggleText:change' }; function eventHandler(el, target, text) { el.trigger(config.triggerChange, [target, text]); } function bindToggle(e...
Remove stop propagation from toggle text module
Remove stop propagation from toggle text module
JavaScript
mit
locaweb/locawebstyle,deividmarques/locawebstyle,deividmarques/locawebstyle,deividmarques/locawebstyle,locaweb/locawebstyle,locaweb/locawebstyle
--- +++ @@ -27,7 +27,6 @@ $(config.trigger).on('click.ls', function(event) { event.preventDefault(); bindToggle($(this)); - event.stopPropagation(); }); }
c090cf03c81639622df3f7d3b0414aea926d95a3
bonfires/sum-all-odd-fibonacci-numbers/logic.js
bonfires/sum-all-odd-fibonacci-numbers/logic.js
/* Bonfire: Sum All Odd Fibonacci Numbers */ function sumFibs(num) { var f1 = 1; var f2 = 1; function fib(){ } return num; } sumFibs(4);
/* Bonfire: Sum All Odd Fibonacci Numbers */ function sumFibs(num) { var tmp = num; while (num > 2){ } return num; } sumFibs(4);
Edit Fibonacci project in Bonfires Directory
Edit Fibonacci project in Bonfires Directory
JavaScript
mit
witblacktype/freeCodeCamp_projects,witblacktype/freeCodeCamp_projects
--- +++ @@ -2,10 +2,8 @@ function sumFibs(num) { - var f1 = 1; - var f2 = 1; - - function fib(){ + var tmp = num; + while (num > 2){ }
069d6ac19107f126cc71b37dad5d8d0821d3c249
app/controllers/stream.js
app/controllers/stream.js
import Ember from 'ember'; import ENV from 'plenario-explorer/config/environment'; export default Ember.Controller.extend({ modelArrived: Ember.observer('model', function() { const nodeList = this.get('model.nodes'); const nodeTuples = nodeList.map(node => { return [node.properties.id, node.properties]...
import Ember from 'ember'; // import ENV from 'plenario-explorer/config/environment'; export default Ember.Controller.extend({ modelArrived: Ember.observer('model', function() { const nodeList = this.get('model.nodes'); const nodeTuples = nodeList.map(node => { return [node.properties.id, node.properti...
Set default node as first returned from API
Set default node as first returned from API
JavaScript
mit
UrbanCCD-UChicago/plenario-explorer,UrbanCCD-UChicago/plenario-explorer,UrbanCCD-UChicago/plenario-explorer
--- +++ @@ -1,5 +1,5 @@ import Ember from 'ember'; -import ENV from 'plenario-explorer/config/environment'; +// import ENV from 'plenario-explorer/config/environment'; export default Ember.Controller.extend({ modelArrived: Ember.observer('model', function() { @@ -9,8 +9,7 @@ }); const nodeMap = new M...
c8edf1a27fe1a9142793a071b079d079138c6851
schema/sorts/fair_sorts.js
schema/sorts/fair_sorts.js
import { GraphQLEnumType } from 'graphql'; export default { type: new GraphQLEnumType({ name: 'FairSorts', values: { created_at_asc: { value: 'created_at', }, created_at_desc: { value: '-created_at', }, start_at_asc: { value: 'start_at', }, st...
import { GraphQLEnumType } from 'graphql'; export default { type: new GraphQLEnumType({ name: 'FairSorts', values: { CREATED_AT_ASC: { value: 'created_at', }, CREATED_AT_DESC: { value: '-created_at', }, START_AT_ASC: { value: 'start_at', }, ST...
Use uppercase for fair sort enum
Use uppercase for fair sort enum
JavaScript
mit
artsy/metaphysics,broskoski/metaphysics,artsy/metaphysics,mzikherman/metaphysics-1,mzikherman/metaphysics-1,craigspaeth/metaphysics,1aurabrown/metaphysics,mzikherman/metaphysics-1,mzikherman/metaphysics-1,artsy/metaphysics,craigspaeth/metaphysics
--- +++ @@ -4,22 +4,22 @@ type: new GraphQLEnumType({ name: 'FairSorts', values: { - created_at_asc: { + CREATED_AT_ASC: { value: 'created_at', }, - created_at_desc: { + CREATED_AT_DESC: { value: '-created_at', }, - start_at_asc: { + START_AT_...
50b994a3873b14b50a28660547ea7d4a36e4d429
config/pathresolver.js
config/pathresolver.js
/*jslint node: true */ const pathresolver = require('angular-filemanager-nodejs-bridge').pathresolver; const path = require('path'); pathresolver.baseDir = function(req) { if(!req.user || !req.user.username || !Array.isArray(req.user.global_roles)) { throw new Error("No valid user!"); } // Admin users can ...
/*jslint node: true */ const pathresolver = require('angular-filemanager-nodejs-bridge').pathresolver; const path = require('path'); const fs = require('fs.extra'); pathresolver.baseDir = function(req) { if(!req.user || !req.user.username || !Array.isArray(req.user.global_roles)) { throw new Error("No valid use...
Create user directories if they do not exist
Create user directories if they do not exist
JavaScript
agpl-3.0
fkoester/purring-flamingo,fkoester/purring-flamingo
--- +++ @@ -1,6 +1,7 @@ /*jslint node: true */ const pathresolver = require('angular-filemanager-nodejs-bridge').pathresolver; const path = require('path'); +const fs = require('fs.extra'); pathresolver.baseDir = function(req) { @@ -14,5 +15,10 @@ } // Other users can only see their own directory - r...
c8ac6f48aae5a473f712231bbad389f9b788cfc7
discord-client/src/bot.js
discord-client/src/bot.js
const Discord = require('discord.js'); const { ChannelProcessor } = require('./channelProcessor'); const {discordApiToken } = require('./secrets.js'); const client = new Discord.Client(); const channelProcessorMap = {}; client.on('ready', () => { console.log('Bot is ready'); }); client.on('message', (message) => {...
const Discord = require('discord.js'); const { ChannelProcessor } = require('./channelProcessor'); const {discordApiToken } = require('./secrets.js'); const client = new Discord.Client(); const channelProcessorMap = {}; client.on('ready', () => { console.log('Bot is ready'); }); client.on('message', (message) => {...
Add console logging upon haiku trigger
Add console logging upon haiku trigger
JavaScript
mit
bumblepie/haikubot
--- +++ @@ -16,11 +16,15 @@ if(channelProcessorMap[channelID] == null) { const newChannelProcessor = new ChannelProcessor(channelID); newChannelProcessor.setOnHaikuFunction((haiku) => { + console.log( + `Haiku triggered: + author: ${haiku.author} + lines: ${haiku.lines}`); ...
cc472a3d07b2803c9e3b4cb80624d1c312d519f7
test/fetch.js
test/fetch.js
'use strict'; var http = require('http'); var assert = require('assertive'); var fetch = require('../lib/fetch'); describe('fetch', function() { var server; before('start echo server', function(done) { server = http.createServer(function(req, res) { res.writeHead(200, { 'Content-Type': 'appli...
'use strict'; var http = require('http'); var assert = require('assertive'); var fetch = require('../lib/fetch'); describe('fetch', function() { var server; before('start echo server', function(done) { server = http.createServer(function(req, res) { var chunks = []; req.on('data', function(chun...
Add test for empty body
Add test for empty body
JavaScript
bsd-3-clause
jkrems/srv-gofer
--- +++ @@ -11,14 +11,21 @@ before('start echo server', function(done) { server = http.createServer(function(req, res) { - res.writeHead(200, { - 'Content-Type': 'application/json', + var chunks = []; + req.on('data', function(chunk) { + chunks.push(chunk); }); - res...
f8339c53d8b89ebb913088be19954ad8d0c44517
src/providers/sh/index.js
src/providers/sh/index.js
module.exports = { title: 'now.sh', subcommands: new Set([ 'login', 'deploy', 'ls', 'list', 'alias', 'scale', 'certs', 'dns', 'domains', 'rm', 'remove', 'whoami', 'secrets', 'logs', 'upgrade', 'teams', 'switch' ]), get deploy() { return req...
const mainCommands = new Set([ 'help', 'list', 'remove', 'alias', 'domains', 'dns', 'certs', 'secrets', 'billing', 'upgrade', 'teams', 'logs', 'scale', 'logout', 'whoami' ]) const aliases = { list: ['ls'], remove: ['rm'], alias: ['ln', 'aliases'], domains: ['domain'], certs: ['c...
Support for all aliases added
Support for all aliases added
JavaScript
apache-2.0
zeit/now-cli,zeit/now-cli,zeit/now-cli,zeit/now-cli,zeit/now-cli,zeit/now-cli,zeit/now-cli
--- +++ @@ -1,73 +1,70 @@ -module.exports = { +const mainCommands = new Set([ + 'help', + 'list', + 'remove', + 'alias', + 'domains', + 'dns', + 'certs', + 'secrets', + 'billing', + 'upgrade', + 'teams', + 'logs', + 'scale', + 'logout', + 'whoami' +]) + +const aliases = { + list: ['ls'], + remove: ['...
d1709007440080cc4b1ced6dbebe0096164f15fb
model/file.js
model/file.js
'use strict'; var memoize = require('memoizee/plain') , validDb = require('dbjs/valid-dbjs') , defineFile = require('dbjs-ext/object/file') , defineJpegFile = require('dbjs-ext/object/file/image-file/jpeg-file') , docMimeTypes = require('../utils/microsoft-word-doc-mime-types'); module.exp...
'use strict'; var memoize = require('memoizee/plain') , validDb = require('dbjs/valid-dbjs') , defineFile = require('dbjs-ext/object/file') , defineJpegFile = require('dbjs-ext/object/file/image-file/jpeg-file') , docMimeTypes = require('../utils/microsoft-word-doc-mime-types'); module.exp...
Add File methods for proper JSON snapshots
Add File methods for proper JSON snapshots
JavaScript
mit
egovernment/eregistrations,egovernment/eregistrations,egovernment/eregistrations
--- +++ @@ -20,7 +20,11 @@ } }, isPreviewGenerated: { type: db.Boolean, value: true }, generatedPreview: { type: File, nested: true }, - thumb: { type: JpegFile, nested: true } + thumb: { type: JpegFile, nested: true }, + toJSON: { value: function (descriptor) { + return { kind: 'file', url: this.url, t...
f1c0c236e8b6d3154781c9f30f91b3eae59b60e4
region-score-lead.meta.js
region-score-lead.meta.js
// ==UserScript== // @id iitc-plugin-region-score-lead@hansolo669 // @name IITC plugin: region score lead // @category Tweaks // @version 0.2.3 // @namespace https://github.com/hansolo669/iitc-tweaks // @updateURL https://iitc.reallyawesomedomain.com/region-score-lead.meta.j...
// ==UserScript== // @id iitc-plugin-region-score-lead@hansolo669 // @name IITC plugin: region score lead // @category Tweaks // @version 0.2.4 // @namespace https://github.com/hansolo669/iitc-tweaks // @updateURL https://iitc.reallyawesomedomain.com/region-score-lead.meta.j...
Fix for intel routing changes
Fix for intel routing changes
JavaScript
mit
hansolo669/iitc-tweaks,hansolo669/iitc-tweaks
--- +++ @@ -2,7 +2,7 @@ // @id iitc-plugin-region-score-lead@hansolo669 // @name IITC plugin: region score lead // @category Tweaks -// @version 0.2.3 +// @version 0.2.4 // @namespace https://github.com/hansolo669/iitc-tweaks // @updateURL https://iitc.reallyaw...
85db50188bcf660bdf83fc09c0c50eed9f0433c4
test/index.js
test/index.js
'use strict'; var assert = require('assert'); var chromedriver = require('chromedriver'); var browser = require('../'); chromedriver.start(); browser.remote('http://localhost:9515/').timeout('60s').operationTimeout('20s'); after(function () { chromedriver.stop(); }); var getHeadingText = browser.async(function* (b...
'use strict'; var assert = require('assert'); var chromedriver = require('chromedriver'); var browser = require('../'); var LOCAL = !process.env.CI; if (LOCAL) { chromedriver.start(); browser.remote('http://localhost:9515/').timeout('60s').operationTimeout('5s'); after(function () { chromedriver.stop(); ...
Support CI using sauce labs
Support CI using sauce labs
JavaScript
mit
ForbesLindesay/selenium-mocha
--- +++ @@ -4,11 +4,17 @@ var chromedriver = require('chromedriver'); var browser = require('../'); -chromedriver.start(); -browser.remote('http://localhost:9515/').timeout('60s').operationTimeout('20s'); -after(function () { - chromedriver.stop(); -}); +var LOCAL = !process.env.CI; + +if (LOCAL) { + chromedriv...
67ad246f902b2c04a426d16d5fe877ffa1fee5d0
tests/integration/angular-meteor-session-spec.js
tests/integration/angular-meteor-session-spec.js
describe('$meteorSession service', function () { var $meteorSession, $rootScope, $scope; beforeEach(angular.mock.module('angular-meteor')); beforeEach(angular.mock.inject(function(_$meteorSession_, _$rootScope_) { $meteorSession = _$meteorSession_; $rootScope = _$rootScope_; $scope = $ro...
describe('$meteorSession service', function () { var $meteorSession, $rootScope, $scope; beforeEach(angular.mock.module('angular-meteor')); beforeEach(angular.mock.inject(function(_$meteorSession_, _$rootScope_) { $meteorSession = _$meteorSession_; $rootScope = _$rootScope_; $scope = $ro...
Add test for $meteorSession service to support scope variable nested property
Add test for $meteorSession service to support scope variable nested property
JavaScript
mit
IgorMinar/angular-meteor,omer72/angular-meteor,IgorMinar/angular-meteor,zhoulvming/angular-meteor,dszczyt/angular-meteor,craigmcdonald/angular-meteor,divramod/angular-meteor,aleksander351/angular-meteor,thomkaufmann/angular-meteor,Urigo/angular-meteor,Unavi/angular-meteor,manhtuongbkhn/angular-meteor,dszczyt/angular-me...
--- +++ @@ -30,4 +30,35 @@ expect(Session.get('myVar')).toEqual(4); }); + + + it('should update the scope variable nested property when session variable changes', function () { + Session.set('myVar', 3); + $scope.a ={ + b:{ + myVar: 3 + } + }; + + $meteorSession('myVar').bind($...
67567c4809789b1896b470c621085125450cf845
src/renderer/ui/components/generic/PlatformSpecific.js
src/renderer/ui/components/generic/PlatformSpecific.js
import { Component, PropTypes } from 'react'; import os from 'os'; import semver from 'semver'; export const semverValidator = (props, propName, componentName) => { if (props[propName]) { return semver.validRange(props[propName]) ? null : new Error(`${propName} in ${componentName} is not a valid semver string`);...
import { Component, PropTypes } from 'react'; import os from 'os'; import semver from 'semver'; const parsedOSVersion = semver.parse(os.release()); const osVersion = `${parsedOSVersion.major}.${parsedOSVersion.minor}.${parsedOSVersion.patch}`; export const semverValidator = (props, propName, componentName) => { if ...
Fix version tests on linux
Fix version tests on linux
JavaScript
mit
petuhovskiy/Google-Play-Music-Desktop-Player-UNOFFICIAL-,petuhovskiy/Google-Play-Music-Desktop-Player-UNOFFICIAL-,petuhovskiy/Google-Play-Music-Desktop-Player-UNOFFICIAL-
--- +++ @@ -1,6 +1,9 @@ import { Component, PropTypes } from 'react'; import os from 'os'; import semver from 'semver'; + +const parsedOSVersion = semver.parse(os.release()); +const osVersion = `${parsedOSVersion.major}.${parsedOSVersion.minor}.${parsedOSVersion.patch}`; export const semverValidator = (props, p...
0aad07073773a20898d950c649a7fa74b22497fc
Emix.Web/ngApp/emixApp.js
Emix.Web/ngApp/emixApp.js
angular.module('emixApp', ['ngRoute', 'emixApp.controllers', 'emixApp.directives', 'emixApp.services', 'mgcrea.ngStrap', 'ngMorris', //'ngGoogleMap' 'pascalprecht.translate' ]) .config(['$routeProvider', function ($routeProvider) { $routeProvider .when('/das...
angular.module('emixApp', ['ngRoute', 'ngCookies', 'emixApp.controllers', 'emixApp.directives', 'emixApp.services', 'mgcrea.ngStrap', 'ngMorris', 'pascalprecht.translate' ]) .config(['$routeProvider', function ($routeProvider) { $routeProvider .when('/dashbo...
Allow translator plugin to store selected language in sessionStorage/cookie and remember the settings
Allow translator plugin to store selected language in sessionStorage/cookie and remember the settings
JavaScript
mit
sierrodc/ASP.NET-MVC-AngularJs-Seed,sierrodc/ASP.NET-MVC-AngularJs-Seed,sierrodc/ASP.NET-MVC-AngularJs-Seed
--- +++ @@ -1,11 +1,11 @@ angular.module('emixApp', ['ngRoute', + 'ngCookies', 'emixApp.controllers', 'emixApp.directives', 'emixApp.services', 'mgcrea.ngStrap', 'ngMorris', - //'ngGoogleMap' 'pascalprecht.translate' ]) .config(['$routeProvider', function ($routePr...
e42f8f09fa04b1893a96479e004f06fa964efc67
test/assets/javascripts/specs/login-controller-spec.js
test/assets/javascripts/specs/login-controller-spec.js
'use strict'; describe('Login controller', function () { var scope; var loginCtrl; var $httpBackend; beforeEach(module('todo.controllers')); beforeEach(inject(function(_$httpBackend_, $controller, $rootScope) { $httpBackend = _$httpBackend_; scope = $rootScope.$new(); log...
'use strict'; describe('Login controller', function () { var scope; var loginCtrl; var $httpBackend; beforeEach(module('todo.controllers')); beforeEach(inject(function (_$httpBackend_, $controller, $rootScope) { $httpBackend = _$httpBackend_; scope = $rootScope.$new(); lo...
Fix login JS test to use SecureSocial endpoint.
Fix login JS test to use SecureSocial endpoint.
JavaScript
mit
timothygordon32/reactive-todolist,timothygordon32/reactive-todolist
--- +++ @@ -7,7 +7,7 @@ beforeEach(module('todo.controllers')); - beforeEach(inject(function(_$httpBackend_, $controller, $rootScope) { + beforeEach(inject(function (_$httpBackend_, $controller, $rootScope) { $httpBackend = _$httpBackend_; scope = $rootScope.$new(); @@ -16,8 +16,10 ...
62f676d0f493689dc877b12f9067c32179d81788
app/events/routes.js
app/events/routes.js
var eventSource = require('express-eventsource'), logger = require('radiodan-client').utils.logger('event-routes'); module.exports = function (app, eventBus, services) { var eventStream = eventSource(); // Shared eventsource // To send data call: eventStream.send(dataObj, 'eventName'); app.use('/', e...
var eventSource = require('express-eventsource'), logger = require('radiodan-client').utils.logger('event-routes'); module.exports = function (app, eventBus, services) { var eventStream = eventSource(); // Shared eventsource // To send data call: eventStream.send(dataObj, 'eventName'); app.use('/', e...
Fix bug where volume changes not emitted to client through event stream
Fix bug where volume changes not emitted to client through event stream
JavaScript
apache-2.0
radiodan/magic-button,radiodan/magic-button
--- +++ @@ -18,7 +18,7 @@ }; } - ['settings.*', 'service.changed', 'power', 'exit', 'shutdown'].forEach(function (topic) { + ['settings.*', 'service.changed', 'power', 'exit', 'shutdown', 'audio'].forEach(function (topic) { eventBus.on(topic, function (args) { if (args && args.length === 1) { ...
78b046830969751e89f34683938a58154ec4ce1f
public/script/project.js
public/script/project.js
function sortProject(changeEvent) { var data = {}; // Get old and new index from event data.oldIndex = changeEvent.oldIndex; data.newIndex = changeEvent.newIndex; // Get filters data.filters = {}; data.filters = getCurrentFilters(); // Get project id from event item data.project...
function sortProject(changeEvent) { var data = {}; // Get old and new index from event data.oldIndex = changeEvent.oldIndex; data.newIndex = changeEvent.newIndex; // Get filters data.filters = {}; data.filters = getCurrentFilters(); // Get project id from event item data.project...
Clean up unfinished work + conflict
Clean up unfinished work + conflict
JavaScript
mit
BBBThunda/projectify,BBBThunda/projectify,BBBThunda/projectify
--- +++ @@ -21,5 +21,5 @@ // TODO: Function to update sequences on update // TODO: make this queue-able + } -
05975f56e6561e789dfb8fedaf4954cc751c787c
src/common.js
src/common.js
function findByIds(items, ids) { return ids .map((id) => { return items.find((item) => item.id === id) }) .filter((item) => item) } function findOneById(items, id) { return items.find((item) => item.id === id) } function findOneByAliases(items, aliases) { if (Array.isArray(aliases)) { retu...
function findByIds(items, ids) { return ids .map((id) => { return items.find((item) => item.id === id) }) .filter((item) => item) } function findOneById(items, id) { return items.find((item) => item.id === id) } function findOneByAliases(items, aliases) { if (Array.isArray(aliases)) { retu...
Add findOneByName for usage with nested names
Add findOneByName for usage with nested names
JavaScript
isc
alex-shnayder/comanche
--- +++ @@ -23,6 +23,26 @@ }) } +function findOneByName(items, field, name) { + if (arguments.length === 2) { + return findOneByAliases(items, field) + } else if (typeof name === 'string') { + return findOneByAliases(items, name) + } + + let result + + for (let i = 0; i < name.length && items.length;...
10c8e31cfd598b8f736ba7cdc9d280b607b30042
src/config.js
src/config.js
import * as FrontendPrefsOptions from './utils/frontend-preferences-options'; const config = { api:{ host: 'http://localhost:3000', sentinel: null // keep always last }, auth: { cookieDomain: 'localhost', tokenPrefix: 'freefeed_', userStorageKey: 'USER_KEY', sentinel: null // keep always ...
import * as FrontendPrefsOptions from './utils/frontend-preferences-options'; const config = { api:{ host: 'http://localhost:3000', sentinel: null // keep always last }, auth: { cookieDomain: 'localhost', tokenPrefix: 'freefeed_', userStorageKey: 'USER_KEY', sentinel: null // keep always ...
Change default value of displayname setting
Change default value of displayname setting New default is: "Display name + username"
JavaScript
mit
davidmz/freefeed-react-client,FreeFeed/freefeed-react-client,kadmil/freefeed-react-client,kadmil/freefeed-react-client,davidmz/freefeed-react-client,davidmz/freefeed-react-client,FreeFeed/freefeed-react-client,FreeFeed/freefeed-react-client,kadmil/freefeed-react-client
--- +++ @@ -31,7 +31,7 @@ clientId: 'net.freefeed', defaultValues: { displayNames: { - displayOption: FrontendPrefsOptions.DISPLAYNAMES_DISPLAYNAME, + displayOption: FrontendPrefsOptions.DISPLAYNAMES_BOTH, useYou: true }, realtimeActive: false,
6d22dabca3b69a06fb8f3fdc11469b6da7641bfd
src/config.js
src/config.js
// = Server config ============================================================= export const port = 3000 export const enableGraphiQL = true; export const logFile = 'store.log' // = App config ================================================================
// = Server config ============================================================= export const port = process.env.PORT || 3000 export const enableGraphiQL = true; export const logFile = 'store.log' // = App config ================================================================
Add ability to define port as environment variable
Add ability to define port as environment variable
JavaScript
mit
jukkah/comicstor
--- +++ @@ -1,6 +1,6 @@ // = Server config ============================================================= -export const port = 3000 +export const port = process.env.PORT || 3000 export const enableGraphiQL = true;
30f2923409e548ccc4626278509ae158bae6d5e0
web_clients/javascript_mvc/www/js/test/test-main.js
web_clients/javascript_mvc/www/js/test/test-main.js
var allTestFiles = []; var TEST_REGEXP = /_test\.js$/i; var pathToModule = function(path) { return path.replace(/^\/base\/js\//, '..\/').replace(/\.js$/, ''); }; Object.keys(window.__karma__.files).forEach(function(file) { if (TEST_REGEXP.test(file)) { // Normalize paths to RequireJS module names. allTest...
(function() { 'use strict'; var test_files, coverage_files; function pathToModule(path) { return path.replace(/^\/base\/js\//, '..\/').replace(/\.js$/, ''); }; // Configure require's paths require.config({ baseUrl: '/base/js/vendor', paths: { jquery: 'jquery/jquery-2.1.1.min', squire: 'squire/Squi...
Include all client files for coverage reporting
Include all client files for coverage reporting Also: clean up test-main a bit from its original copypasta.
JavaScript
mit
xaroth8088/tournament-of-lulz,xaroth8088/tournament-of-lulz,xaroth8088/tournament-of-lulz,xaroth8088/tournament-of-lulz
--- +++ @@ -1,27 +1,62 @@ -var allTestFiles = []; -var TEST_REGEXP = /_test\.js$/i; +(function() { + 'use strict'; -var pathToModule = function(path) { - return path.replace(/^\/base\/js\//, '..\/').replace(/\.js$/, ''); -}; + var test_files, coverage_files; -Object.keys(window.__karma__.files).forEach(function(...
32c4655b62a4edf005b4233ad8b0ce8718c10537
client/templates/admin/posts/posts.js
client/templates/admin/posts/posts.js
Template.add_post.events({ 'submit .add_post_form': function(){ var title = event.target.title.value; var body - event.target.body.value; // Insert the post Posts.insert({ title: title, body: body }); FlashMessages.sendSucess('Post has been s...
Save post after submit the form
Save post after submit the form
JavaScript
mit
pH-7/pH7Ortfolio,pH-7/pH7Ortfolio
--- +++ @@ -0,0 +1,18 @@ +Template.add_post.events({ + 'submit .add_post_form': function(){ + var title = event.target.title.value; + var body - event.target.body.value; + + // Insert the post + Posts.insert({ + title: title, + body: body + }); + + Fl...
637d929936c13fb6e5cb96630200df02f615b0a3
client/templates/register/register.js
client/templates/register/register.js
Template.register.rendered = function () { /* * Reset form select field values * to prevent an edge case bug for code push * where accommodations value was undefined */ $('#age').val(''); $('#registration_type').val(''); $('#accommodations').val(''); $('#carbon-tax').val(''); }; Te...
Template.register.rendered = function () { /* * Reset form select field values * to prevent an edge case bug for code push * where accommodations value was undefined */ $('#age').val(''); $('#registration_type').val(''); $('#accommodations').val(''); $('#carbon-tax').val(''); }; Te...
Add donation field to calculation
Add donation field to calculation
JavaScript
agpl-3.0
quaker-io/pym-2015,quaker-io/pym-online-registration,quaker-io/pym-online-registration,quaker-io/pym-2015
--- +++ @@ -28,7 +28,8 @@ firstTimeAttender: firstTimeAttenderVar.get(), linens: linensVar.get(), createdAt: new Date(), - carbonTax: carbonTaxVar.get() + carbonTax: carbonTaxVar.get(), + donation: donationVar.get() ...
0a0d0c90aab2d5cb50e67e11cac747342eda27ed
grunt/tasks/_browserify-bundles.js
grunt/tasks/_browserify-bundles.js
module.exports = { 'src-specs': { src: [ 'test/fail-tests-if-have-errors-in-src.js', 'test/spec/api/**/*', 'test/spec/core/**/*', 'test/spec/dataviews/**/*', 'test/spec/util/**/*', 'test/spec/geo/**/*', 'test/spec/ui/**/*', 'test/spec/vis/**/*', 'test/spec/win...
module.exports = { 'src-specs': { src: [ 'test/fail-tests-if-have-errors-in-src.js', 'test/spec/api/**/*', 'test/spec/core/**/*', 'test/spec/dataviews/**/*', 'test/spec/util/**/*', 'test/spec/geo/**/*', 'test/spec/ui/**/*', 'test/spec/vis/**/*', 'test/spec/win...
Add latest camshaft reference in the bundle
Add latest camshaft reference in the bundle
JavaScript
bsd-3-clause
splashblot/cartodb.js,splashblot/cartodb.js,splashblot/cartodb.js,splashblot/cartodb.js
--- +++ @@ -30,7 +30,10 @@ }, 'carto-public': { - src: 'src/api/v4/index.js', + src: [ + 'src/api/v4/index.js', + 'node_modules/camshaft-reference/versions/0.59.4/reference.json' + ], dest: '<%= config.dist %>/public/carto.uncompressed.js', options: { external: [ 'leaflet' ...
791d07b503940051c19fc11187c67859c299b252
src/patterns/autosubmit.js
src/patterns/autosubmit.js
define([ '../jquery/autosubmit' ], function(require) { var autosubmit = { initContent: function(root) { $("[data-autosubmit]", root) .find("input[type-search]").andSelf() .patternAutosubmit(); } }; return autosubmit; }); // jshint indent: 4, b...
define([ '../jquery/autosubmit' ], function() { var autosubmit = { initContent: function(root) { $("[data-autosubmit]", root) .find("input[type-search]").andSelf() .patternAutosubmit(); } }; return autosubmit; }); // jshint indent: 4, browser:...
Fix error in define call
Fix error in define call
JavaScript
bsd-3-clause
Patternslib/require-experimental-build,Patternslib/Patterns-archive,Patternslib/Patterns-archive,Patternslib/Patterns-archive
--- +++ @@ -1,6 +1,6 @@ define([ '../jquery/autosubmit' -], function(require) { +], function() { var autosubmit = { initContent: function(root) { $("[data-autosubmit]", root)
84e2ef62b1faff132d69ad3384be68fb364d86c9
src/string.js
src/string.js
// ================================================================================================= // Core.js | String Functions // (c) 2014 Mathigon / Philipp Legner // ================================================================================================= (function() { M.extend(String.prototype, { ...
// ================================================================================================= // Core.js | String Functions // (c) 2014 Mathigon / Philipp Legner // ================================================================================================= (function() { M.extend(String.prototype, { ...
Fix String endsWith prototype shadowing
Fix String endsWith prototype shadowing
JavaScript
mit
Mathigon/core.js
--- +++ @@ -8,11 +8,6 @@ M.extend(String.prototype, { - endsWith: function(search) { - var end = this.length; - var start = end - search.length; - return (this.substring(start, end) === search); - }, strip: function() { return this.replac...
a8d74088d41f2bb83336dc242d512193e743385a
components/home/events.js
components/home/events.js
import React from 'react' import PropTypes from 'prop-types' import Link from 'next/link' import { translate } from 'react-i18next' import Section from './section' const Events = ({ t }) => ( <Section title={t('eventsSectionTitle')}> <Link href='/events'> <a>{t('eventsLink')}</a> </Link> <style j...
import React from 'react' import PropTypes from 'prop-types' import { translate } from 'react-i18next' import Link from '../link' import Section from './section' const Events = ({ t }) => ( <Section title={t('eventsSectionTitle')}> <Link href='/events'> <a>{t('eventsLink')}</a> </Link> <style jsx...
Fix link to event page
Fix link to event page
JavaScript
mit
sgmap/inspire,sgmap/inspire
--- +++ @@ -1,8 +1,8 @@ import React from 'react' import PropTypes from 'prop-types' -import Link from 'next/link' import { translate } from 'react-i18next' +import Link from '../link' import Section from './section' const Events = ({ t }) => (
8bfcc293065a51f365fe574dcf168c3c10af98a6
api/controllers/requestHandlers/handleSuggest.js
api/controllers/requestHandlers/handleSuggest.js
var elasticsearch = require('elasticsearch'); if (sails.config.useElastic === true) { var CLIENT = new elasticsearch.Client({ host: sails.config.elasticHost, log: sails.config.elasticLogLevel }) } module.exports = function(req, res) { if (!CLIENT) { return res.notFound() } ...
var elasticsearch = require('elasticsearch'); if (sails.config.useElastic === true) { var CLIENT = new elasticsearch.Client({ host: sails.config.elasticHost, log: sails.config.elasticLogLevel }) } module.exports = function(req, res) { if (!CLIENT) { return res.notFound() } ...
Allow searching for HPO term ID's and match only entries that contain all of the query words (instead of one of the query words).
Allow searching for HPO term ID's and match only entries that contain all of the query words (instead of one of the query words).
JavaScript
mit
molgenis/gene-network,molgenis/gene-network
--- +++ @@ -27,8 +27,9 @@ query: { query_string : { fields : ["name", "id"], - query: query.replace(/\:/g, '\\:') + '*', - analyze_wildcard: true + query: query.replace(/\:/g, '\\\:') + '*', + ...
cf4e0ba45bb8da2f44ea3eccee25f38b69479f45
controllers/submission.js
controllers/submission.js
const Submission = require('../models/Submission'); const moment = require('moment'); /** * GET /submissions */ exports.getSubmissions = (req, res) => { const page = parseInt(req.query && req.query.page) || 0; Submission .find() .sort({ _id: -1 }) .populate('user') .populate('language') .skip(500 * pag...
const Submission = require('../models/Submission'); const User = require('../models/User'); const moment = require('moment'); const Promise = require('bluebird'); /** * GET /submissions */ exports.getSubmissions = (req, res) => { Promise.try(() => { if (req.query.author) { return User.findOne({ email: `$...
Add author and status parameter
Add author and status parameter
JavaScript
mit
hakatashi/esolang-battle,hakatashi/esolang-battle,hakatashi/esolang-battle
--- +++ @@ -1,19 +1,38 @@ const Submission = require('../models/Submission'); +const User = require('../models/User'); const moment = require('moment'); +const Promise = require('bluebird'); /** * GET /submissions */ exports.getSubmissions = (req, res) => { - const page = parseInt(req.query && req.query.pa...
221ed0e89bf69a169d1110788e0be3e2d10c49f0
lib/node_modules/@stdlib/buffer/from-array/lib/index.js
lib/node_modules/@stdlib/buffer/from-array/lib/index.js
'use strict'; /** * Allocate a buffer using an octet array. * * @module @stdlib/buffer/from-array * * @example * var array2buffer = require( '@stdlib/type/buffer/from-array' ); * * var buf = array2buffer( [ 1, 2, 3, 4 ] ); * // returns <Buffer> */ // MODULES // var hasFrom = require( './has_from.js' ); // MAIN // ...
'use strict'; /** * Allocate a buffer using an octet array. * * @module @stdlib/buffer/from-array * * @example * var array2buffer = require( '@stdlib/type/buffer/from-array' ); * * var buf = array2buffer( [ 1, 2, 3, 4 ] ); * // returns <Buffer> */ // MODULES // var hasFrom = require( './has_from.js' ); var main = re...
Refactor to avoid dynamic module resolution
Refactor to avoid dynamic module resolution
JavaScript
apache-2.0
stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib
--- +++ @@ -15,15 +15,17 @@ // MODULES // var hasFrom = require( './has_from.js' ); +var main = require( './main.js' ); +var polyfill = require( './polyfill.js' ); // MAIN // var array2buffer; if ( hasFrom ) { - array2buffer = require( './main.js' ); + array2buffer = main; } else { - array2buffer = requ...
3ac7f2a8044ad8febe16541e9b3683cf00fd1ae0
components/search/result/thumbnail.js
components/search/result/thumbnail.js
import React from 'react' import PropTypes from 'prop-types' import { translate } from 'react-i18next' import { GEODATA_API_URL } from '@env' const Thumbnail = ({ recordId, thumbnails, t }) => { const hasThumbnail = thumbnails && thumbnails.length > 0 const thumbnail = hasThumbnail ? `${GEODATA_API_URL}/recor...
import React from 'react' import PropTypes from 'prop-types' import { translate } from 'react-i18next' import { GEODATA_API_URL } from '@env' const Thumbnail = ({ recordId, thumbnails, t }) => { const hasThumbnail = thumbnails && thumbnails.length > 0 const thumbnail = hasThumbnail ? `${GEODATA_API_URL}/recor...
Fix search result image sizes
Fix search result image sizes
JavaScript
mit
sgmap/inspire,sgmap/inspire
--- +++ @@ -36,10 +36,11 @@ img { display: flex; - height: 100%; + max-height: 100%; @media (max-width: 767px) { max-width: 100%; + max-height: none; height: auto; margin: auto; }
5591b4615ec9e88f448ad2a9f777c85e659bd0a0
server/helpers/helpers.js
server/helpers/helpers.js
const handleError = (err, res) => { switch (err.code) { case 401: return res.status(401).send(err.message); case 404: return res.status(404).send(err.message); default: return res.status(400).send(err); } }; const handleSuccess = (code, body, res) => { switch (code) { case 201: ...
const handleError = (err, res) => { switch (err.code) { case 401: return res.status(401).json(err.message); case 404: return res.status(404).json(err.message); default: return res.status(400).json(err); } }; const handleSuccess = (code, body, res) => { switch (code) { case 201: ...
Refactor the helper methods to use json method instead of send method
Refactor the helper methods to use json method instead of send method
JavaScript
mit
johadi10/PostIt,johadi10/PostIt
--- +++ @@ -1,19 +1,19 @@ const handleError = (err, res) => { switch (err.code) { case 401: - return res.status(401).send(err.message); + return res.status(401).json(err.message); case 404: - return res.status(404).send(err.message); + return res.status(404).json(err.message); d...
c6335c604a1495d2526f6f395e429e065f9317af
test/endpoints/account.js
test/endpoints/account.js
'use strict'; var assert = require('assert'); var sinon = require('sinon'); var Account = require('../../lib/endpoints/account'); var Request = require('../../lib/request'); describe('endpoints/account', function () { describe('changePassword', function () { it('should set the request URL', function () {...
'use strict'; const assert = require('assert'); const sinon = require('sinon'); const Account = require('../../lib/endpoints/account'); const Request = require('../../lib/request'); describe('endpoints/account', () => { describe('changePassword', () => { it('should set the request URL', () => { ...
Rewrite Account tests to ES2015
Rewrite Account tests to ES2015
JavaScript
mit
jwilsson/glesys-api-node
--- +++ @@ -1,58 +1,50 @@ 'use strict'; -var assert = require('assert'); -var sinon = require('sinon'); +const assert = require('assert'); +const sinon = require('sinon'); -var Account = require('../../lib/endpoints/account'); -var Request = require('../../lib/request'); +const Account = require('../../lib/endpo...
a151d88b94ee726f0450b93df5ede04124a81ded
packages/rendering/addon/-private/meta-for-field.js
packages/rendering/addon/-private/meta-for-field.js
export default function metaForField(content, fieldName) { if (!content) { return; } try { return content.constructor.metaForProperty(fieldName); } catch (err) { return; } }
import { camelize } from "@ember/string"; export default function metaForField(content, fieldName) { if (!content) { return; } fieldName = camelize(fieldName); try { return content.constructor.metaForProperty(fieldName); } catch (err) { return; } }
Fix field editors not appearing for field names that contain dashes
Fix field editors not appearing for field names that contain dashes
JavaScript
mit
cardstack/cardstack,cardstack/cardstack,cardstack/cardstack,cardstack/cardstack,cardstack/cardstack,cardstack/cardstack
--- +++ @@ -1,6 +1,9 @@ +import { camelize } from "@ember/string"; + export default function metaForField(content, fieldName) { if (!content) { return; } + fieldName = camelize(fieldName); try { return content.constructor.metaForProperty(fieldName); } catch (err) {
8c8c3ef0efabbcf07ead714b3fb79f1f7ed81a41
test/spec/test_captcha.js
test/spec/test_captcha.js
defaultConf = { height: 100, width: 300, fingerprintLength: 20 }; describe("The constructor is supposed a proper Captcha object", function() { it('Constructor Captcha exists', function(){ expect(Captcha).toBeDefined(); }); var captcha = new Captcha(); it("Captcha object is not null"...
defaultConf = { height: 100, width: 300, fingerprintLength: 20 }; describe("The constructor is supposed a proper Captcha object", function() { it('Constructor Captcha exists', function(){ expect(Captcha).toBeDefined(); }); var captcha = new Captcha(); it("Captcha object is not null"...
Add one more test and it fails
Add one more test and it fails
JavaScript
mit
sonjahohlfeld/Captcha-Generator,sonjahohlfeld/Captcha-Generator
--- +++ @@ -21,4 +21,7 @@ it('the width of the svg should be set to the configured width', function(){ expect(Number(captcha.width)).toEqual(defaultConf.width); }); + it('the length of the fingerprint should be set to the configured fingerprintLength', function(){ + expect(Number(captcha....
02ee190d7383336953c7dde6d3e4f50285a7d113
src/interface/common/Ad.js
src/interface/common/Ad.js
import React from 'react'; import PropTypes from 'prop-types'; class Ad extends React.PureComponent { static propTypes = { style: PropTypes.object, }; componentDidMount() { (window.adsbygoogle = window.adsbygoogle || []).push({}); } render() { const { style, ...others } = this.props; const...
import React from 'react'; import PropTypes from 'prop-types'; class Ad extends React.PureComponent { static propTypes = { style: PropTypes.object, }; componentDidMount() { try { (window.adsbygoogle = window.adsbygoogle || []).push({}); } catch (err) { // "adsbygoogle.push() error: No sl...
Fix crash caused by google adsense
Fix crash caused by google adsense
JavaScript
agpl-3.0
WoWAnalyzer/WoWAnalyzer,anom0ly/WoWAnalyzer,WoWAnalyzer/WoWAnalyzer,fyruna/WoWAnalyzer,fyruna/WoWAnalyzer,ronaldpereira/WoWAnalyzer,anom0ly/WoWAnalyzer,sMteX/WoWAnalyzer,anom0ly/WoWAnalyzer,Juko8/WoWAnalyzer,ronaldpereira/WoWAnalyzer,yajinni/WoWAnalyzer,WoWAnalyzer/WoWAnalyzer,Juko8/WoWAnalyzer,ronaldpereira/WoWAnalyze...
--- +++ @@ -7,7 +7,12 @@ }; componentDidMount() { - (window.adsbygoogle = window.adsbygoogle || []).push({}); + try { + (window.adsbygoogle = window.adsbygoogle || []).push({}); + } catch (err) { + // "adsbygoogle.push() error: No slot size for availableWidth=0" error that I can't explain +...
a96f3a13dc3a80d18ca7bc2fec5268c453c24533
src/react-chayns-personfinder/utils/normalizeOutput.js
src/react-chayns-personfinder/utils/normalizeOutput.js
export default function normalizeOutput(type, value) { return { type, name: value.name, firstName: value.firstName, lastName: value.lastName, personId: value.personId, userId: value.userId, siteId: value.siteId, locationId: value.locationId, is...
import { FRIEND_RELATION, LOCATION_RELATION, PERSON_RELATION, PERSON_UNRELATED, } from '../constants/relationTypes'; export default function normalizeOutput(type, value) { const newType = (type === PERSON_RELATION || type === PERSON_UNRELATED || type === FRIEND_RELATION) ? PERSON_RELATION : LOCATIO...
Add normalization of type to prevent wrong types
:bug: Add normalization of type to prevent wrong types
JavaScript
mit
TobitSoftware/chayns-components,TobitSoftware/chayns-components,TobitSoftware/chayns-components
--- +++ @@ -1,6 +1,15 @@ +import { + FRIEND_RELATION, + LOCATION_RELATION, + PERSON_RELATION, + PERSON_UNRELATED, +} from '../constants/relationTypes'; + export default function normalizeOutput(type, value) { + const newType = (type === PERSON_RELATION || type === PERSON_UNRELATED || type === FRIEND_R...
046b77894ef1df26a411ae2ca808936d920632c9
to.etc.domui/src/resources/themes/domui/style.props.js
to.etc.domui/src/resources/themes/domui/style.props.js
/* * "domui" stylesheet properties. */ font_family='Verdana, Geneva, "DejaVu Sans", sans-serif'; font_size="11px"; hdr_font_size="14px"; fixed_font_family='Courier New, Courier, monospace'; fixed_font_size="11px"; defaultbutton_height=23; window_title_font_size='15px';
/* * "blue" stylesheet properties. */ font_family='Verdana, Geneva, "DejaVu Sans", sans-serif'; //font_family='Verdana, Tahoma, helvetica, sans-serif'; font_size="11px"; hdr_font_size="14px"; fixed_font_family='Courier New, Courier, monospace'; fixed_font_size="11px"; //special_font = "Verdana, Tahoma, helvetica, s...
Make both style properties equal
Make both style properties equal
JavaScript
lgpl-2.1
fjalvingh/domui,fjalvingh/domui,fjalvingh/domui,fjalvingh/domui,fjalvingh/domui,fjalvingh/domui,fjalvingh/domui
--- +++ @@ -1,12 +1,21 @@ /* - * "domui" stylesheet properties. + * "blue" stylesheet properties. */ font_family='Verdana, Geneva, "DejaVu Sans", sans-serif'; +//font_family='Verdana, Tahoma, helvetica, sans-serif'; font_size="11px"; hdr_font_size="14px"; fixed_font_family='Courier New, Courier, monospace'; ...
f5484310a9e52d1c7786d111486882dd94959a98
src/website/app/demos/Flex/components/Flex.js
src/website/app/demos/Flex/components/Flex.js
/* @flow */ import { createStyledComponent, pxToEm } from '../../../../../library/styles'; import _Flex from '../../../../../library/Flex'; type Props = { gutterWidth?: number | string, theme: Object }; export const containerStyles = ({ gutterWidth: propGutterSize, theme }: Props) => { const gutterWidth = p...
/* @flow */ import { createStyledComponent, pxToEm } from '../../../../../library/styles'; import _Flex from '../../../../../library/Flex'; type Props = { gutterWidth?: number | string, theme: Object }; export const containerStyles = ({ gutterWidth: propGutterSize, theme }: Props) => { const gutterWidth = p...
Fix display issue with Layout examples
chore(website): Fix display issue with Layout examples
JavaScript
apache-2.0
mineral-ui/mineral-ui,mineral-ui/mineral-ui
--- +++ @@ -21,6 +21,7 @@ return { position: 'relative', + zIndex: 1, '&::before': { border: `1px dotted ${theme.color_theme_30}`,
979bf24a28e95f6975fde020b002426eafe5f3e6
static/js/activity-23andme-complete-import.js
static/js/activity-23andme-complete-import.js
$(function () { var params = {'data_type': '23andme_names'}; $.ajax({ 'type': 'GET', 'url': '/json-data/', 'data': params, 'success': function(data) { if (data.profiles && data.profiles.length > 0) { for (var i = 0; i < data.profiles.length; i++) { ...
$(function () { var params = {'data_type': '23andme_names'}; $.ajax({ 'type': 'GET', 'url': '/json-data/', 'data': params, 'success': function(data) { if (data.profiles && data.profiles.length > 0) { for (var i = 0; i < data.profiles.length; i++) { var radioElem = $('<input ...
Fix JS to use 2-space tabs
Fix JS to use 2-space tabs
JavaScript
mit
PersonalGenomesOrg/open-humans,OpenHumans/open-humans,PersonalGenomesOrg/open-humans,OpenHumans/open-humans,OpenHumans/open-humans,PersonalGenomesOrg/open-humans,PersonalGenomesOrg/open-humans,OpenHumans/open-humans
--- +++ @@ -1,32 +1,32 @@ $(function () { - var params = {'data_type': '23andme_names'}; + var params = {'data_type': '23andme_names'}; - $.ajax({ - 'type': 'GET', - 'url': '/json-data/', - 'data': params, - 'success': function(data) { - if (data.profiles && data.profi...
0100ebf9a24675a16ec200caf894af862196589c
d3/js/wgaPipeline.js
d3/js/wgaPipeline.js
/** * Creates an object of type wgaPipeline for drawing whole genome alignment visualizations * @author Markus Ankenbrand <markus.ankenbrand@uni-wuerzburg.de> * @constructor * @param {Object} svg - jQuery object containing a svg DOM element. Visualizations will be drawn on this svg. Size may be changed by object m...
/** * Creates an object of type wgaPipeline for drawing whole genome alignment visualizations * @author Markus Ankenbrand <markus.ankenbrand@uni-wuerzburg.de> * @constructor * @param {Object} svg - jQuery object containing a svg DOM element. Visualizations will be drawn on this svg. Size may be changed by object m...
Test for existence of setData method passes
Test for existence of setData method passes
JavaScript
mit
BioInf-Wuerzburg/AliTV,BioInf-Wuerzburg/AliTV,AliTVTeam/AliTV,BioInf-Wuerzburg/AliTV,BioInf-Wuerzburg/AliTV,BioInf-Wuerzburg/AliTV,BioInf-Wuerzburg/AliTV,AliTVTeam/AliTV
--- +++ @@ -12,3 +12,7 @@ this.svg = svg; this.data = {}; } + +WgaPipeline.prototype.setData = function() { + +};
c74647dae08d8d5f55a3d68de956a37b1fccec0e
assets/main.js
assets/main.js
function do_command(item, command, val) { var data = {}; data[item] = command; if (val != undefined) { data["value"] = val; } $.get("/CMD", data); } function do_scene(scene, action) { $.get("/api/scene/" + scene + "/command/" + (action?action:"")); } $(function() { $(".command").each(fun...
function do_command(item, command, val) { var data = {}; if (val != undefined) { data["val"] = val; } $.get("/api/item/" + item + "/command/" + command, data); } function do_scene(scene, action) { $.get("/api/scene/" + scene + "/command/" + (action?action:"")); } $(function() { $(".command")...
Update javascript to use native API
Update javascript to use native API
JavaScript
mit
idiotic/idiotic-webui,idiotic/idiotic-webui,idiotic/idiotic-webui
--- +++ @@ -1,11 +1,10 @@ function do_command(item, command, val) { var data = {}; - data[item] = command; if (val != undefined) { - data["value"] = val; + data["val"] = val; } - $.get("/CMD", data); + $.get("/api/item/" + item + "/command/" + command, data); } function do_scene(scene, ...
d90f7b2a0393318affbb02ff89a63ade1a8b0469
javascript/example_code/nodegetstarted/sample.js
javascript/example_code/nodegetstarted/sample.js
/ Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. // Licensed under the Apache-2.0 License on an "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND. // ABOUT THIS NODE.JS SAMPLE: This sample is part of the SDK for JavaScript Developer Guide topic at // https://docs.aws.amazon.com/sdk-for-jav...
// Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. // Licensed under the Apache-2.0 License on an "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND. // ABOUT THIS NODE.JS SAMPLE: This sample is part of the SDK for JavaScript Developer Guide topic at // https://docs.aws.amazon.com/sdk-for-ja...
Add a backslash for a comment
Add a backslash for a comment
JavaScript
apache-2.0
awsdocs/aws-doc-sdk-examples,awsdocs/aws-doc-sdk-examples,awsdocs/aws-doc-sdk-examples,awsdocs/aws-doc-sdk-examples,awsdocs/aws-doc-sdk-examples,awsdocs/aws-doc-sdk-examples,awsdocs/aws-doc-sdk-examples,awsdocs/aws-doc-sdk-examples,awsdocs/aws-doc-sdk-examples,awsdocs/aws-doc-sdk-examples,awsdocs/aws-doc-sdk-examples,a...
--- +++ @@ -1,4 +1,4 @@ -/ Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. +// Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. // Licensed under the Apache-2.0 License on an "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND. // ABOUT THIS NODE.JS SAMPLE: Th...
3bc142f44ebd589227eec3660c72640fdfa7a238
bl/pipeline.js
bl/pipeline.js
var TaskScheduler = require("./task").TaskScheduler; var colors = require("colors"); exports.execute = function(initialStep, context, cb) { var completedSteps = 0; var estimatedSteps = initialStep.remaining; var scheduler = new TaskScheduler({ maxConcurrency: 5, mode: "lifo" }, cb); scheduler.schedule(execu...
var TaskScheduler = require("./task").TaskScheduler; var colors = require("colors"); exports.execute = function(initialStep, context, cb) { var completedSteps = 0; var estimatedSteps = initialStep.remaining; var scheduler = new TaskScheduler({ maxConcurrency: 5, mode: "lifo" }, cb); scheduler.schedule(execu...
Add current date to polling log messages.
Add current date to polling log messages.
JavaScript
mit
aaubry/feed-reader,aaubry/feed-reader
--- +++ @@ -32,7 +32,7 @@ } } - console.log("Completed %d steps of %d".green, completedSteps, estimatedSteps); + console.log("%s Completed %d steps of %d".green, new Date(), completedSteps, estimatedSteps); if(step.next && err == null) { items.forEach(function(i) {
56e784e7e966ccff9ba29b658ebd31406a868987
lib/paymaya/core/HttpConnection.js
lib/paymaya/core/HttpConnection.js
module.exports = HttpConnection; var request = require('requestretry'); var HttpConfig = require("./HttpConfig"); var PaymayaApiError = require("./PaymayaApiError"); function HttpConnection(httpConfig) { this._httpConfig = httpConfig; }; HttpConnection.prototype = { /* PUBLIC FUNCTIONS */ execute: function(data,...
module.exports = HttpConnection; var request = require('requestretry'); var HttpConfig = require("./HttpConfig"); var PaymayaApiError = require("./PaymayaApiError"); function HttpConnection(httpConfig) { this._httpConfig = httpConfig; }; HttpConnection.prototype = { /* PUBLIC FUNCTIONS */ execute: function(data,...
Modify displaying of error message
Modify displaying of error message
JavaScript
mit
PayMaya/PayMaya-Node-SDK
--- +++ @@ -42,7 +42,7 @@ return callback(err.message); } - if(body.message) { + if(body.message && response.statusCode != 200) { return callback(body.message); }
bb85a90b6941c8f6d20b2cc6e15359d7daf9b461
src/authentication/sessions.js
src/authentication/sessions.js
'use strict'; export default { setup, }; /** * Module dependencies. */ import SequelizeStore from 'koa-generic-session-sequelize'; import session from 'koa-generic-session'; /** * Prepares session middleware and methods without attaching to the stack * * @param {Object} router * @param {Object} settings * ...
'use strict'; export default { setup, }; /** * Module dependencies. */ import SequelizeStore from 'koa-generic-session-sequelize'; import convert from 'koa-convert'; import session from 'koa-generic-session'; /** * Prepares session middleware and methods without attaching to the stack * * @param {Object} set...
Add missing file from last commit
Add missing file from last commit
JavaScript
mit
HiFaraz/identity-desk
--- +++ @@ -9,46 +9,45 @@ */ import SequelizeStore from 'koa-generic-session-sequelize'; +import convert from 'koa-convert'; import session from 'koa-generic-session'; /** * Prepares session middleware and methods without attaching to the stack * - * @param {Object} router * @param {Object} settings ...
4d6ef02203bb5c198c9a6574601c8664271ad44d
app/javascript/flavours/glitch/components/column_back_button_slim.js
app/javascript/flavours/glitch/components/column_back_button_slim.js
import React from 'react'; import { FormattedMessage } from 'react-intl'; import PropTypes from 'prop-types'; import Icon from 'mastodon/components/icon'; export default class ColumnBackButtonSlim extends React.PureComponent { static contextTypes = { router: PropTypes.object, }; handleClick = (event) => { ...
import React from 'react'; import { FormattedMessage } from 'react-intl'; import PropTypes from 'prop-types'; import Icon from 'flavours/glitch/components/icon'; export default class ColumnBackButtonSlim extends React.PureComponent { static contextTypes = { router: PropTypes.object, }; handleClick = (event...
Fix using wrong component in ColumnBackButtonSlim
Fix using wrong component in ColumnBackButtonSlim
JavaScript
agpl-3.0
im-in-space/mastodon,im-in-space/mastodon,glitch-soc/mastodon,im-in-space/mastodon,glitch-soc/mastodon,glitch-soc/mastodon,Kirishima21/mastodon,Kirishima21/mastodon,Kirishima21/mastodon,im-in-space/mastodon,Kirishima21/mastodon,glitch-soc/mastodon
--- +++ @@ -1,7 +1,7 @@ import React from 'react'; import { FormattedMessage } from 'react-intl'; import PropTypes from 'prop-types'; -import Icon from 'mastodon/components/icon'; +import Icon from 'flavours/glitch/components/icon'; export default class ColumnBackButtonSlim extends React.PureComponent {
88e405fdaa97a224ad6683d39163a04d86982ede
src/components/video_detail.js
src/components/video_detail.js
import React from 'react'; // import VideoListItem from './video_list_item'; const VideoDetail = ({video}) => { const videoId = video.id.videoId; const url = `https://www.youtube.com/embed/${videoId}`; return ( <div className="video-detail col-md-8"> <div className="embed-responsive embed-responsive-16...
Add code to video detail component
Add code to video detail component
JavaScript
mit
izabelka/redux-simple-starter,izabelka/redux-simple-starter
--- +++ @@ -0,0 +1,20 @@ +import React from 'react'; +// import VideoListItem from './video_list_item'; + +const VideoDetail = ({video}) => { + const videoId = video.id.videoId; + const url = `https://www.youtube.com/embed/${videoId}`; + return ( + <div className="video-detail col-md-8"> + <div className="...
1e2aa246a558447455dba80c4f49e5f9cdbb00c7
test/read-only-parallel.js
test/read-only-parallel.js
const test = require('tape') const BorrowState = require('../lib/module.js') const sleep50ms = require('./sleep.js') const countTo = require('./count-to.js') ;[true, false].forEach((unsafe) => { test(`read-only-parallel (${unsafe ? 'un' : ''}safe)`, (t) => { t.plan(3) t.timeoutAfter(100) let myState = n...
const test = require('tape') const BorrowState = require('../lib/module.js') const sleep50ms = require('./sleep.js') const countTo = require('./count-to.js') ;[true, false].forEach((unsafe) => { test(`read-only-parallel (${unsafe ? 'un' : ''}safe)`, (t) => { t.plan(6) t.timeoutAfter(100) let myState = n...
Make sure to count up test additions
Make sure to count up test additions
JavaScript
isc
jamescostian/borrow-state
--- +++ @@ -6,10 +6,11 @@ ;[true, false].forEach((unsafe) => { test(`read-only-parallel (${unsafe ? 'un' : ''}safe)`, (t) => { - t.plan(3) + t.plan(6) t.timeoutAfter(100) let myState = new BorrowState() countTo(3).forEach(() => { + t.ok(true) myState.block('r') .then(sl...
b948a9b149394932a0d3bf8a957a8792e23510ae
front_end/.eslintrc.js
front_end/.eslintrc.js
// Copyright 2020 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. const path = require('path'); const rulesDirPlugin = require('eslint-plugin-rulesdir'); rulesDirPlugin.RULES_DIR = path.join(__dirname, '..', 'scripts', '...
// Copyright 2020 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. const path = require('path'); const rulesDirPlugin = require('eslint-plugin-rulesdir'); rulesDirPlugin.RULES_DIR = path.join(__dirname, '..', 'scripts', '...
Enforce camelCase for private and protected class members
Enforce camelCase for private and protected class members This encodes some of the TypeScript style guides about identifiers https://google.github.io/styleguide/tsguide.html#identifiers (in particular the rules our codebase already adheres to). The automatic enforcement will save time during code reviews. The current...
JavaScript
bsd-3-clause
ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend
--- +++ @@ -16,6 +16,18 @@ 'rulesdir/set_data_type_reference': 2, 'rulesdir/lit_html_data_as_type': 2, 'rulesdir/lit_no_style_interpolation': 2, + '@typescript-eslint/naming-convention': [ + 'error', { + 'selector': 'property', + 'modifiers': ['private', 'protected']...
c7329c1c5347ca2f453c41aeb0f479edc4050187
app/assets/javascripts/hyrax/browse_everything.js
app/assets/javascripts/hyrax/browse_everything.js
//= require jquery.treetable //= require browse_everything/behavior // Show the files in the queue Blacklight.onLoad( function() { // We need to check this because https://github.com/samvera/browse-everything/issues/169 if ($('#browse-btn').length > 0) { $('#browse-btn').browseEverything() .done(function(d...
//= require jquery.treetable //= require browse_everything/behavior // Show the files in the queue function showBrowseEverythingFiles() { // We need to check this because https://github.com/samvera/browse-everything/issues/169 if ($('#browse-btn').length > 0) { $('#browse-btn').browseEverything() .done(fun...
Fix loading of browse-everything done event
Fix loading of browse-everything done event Avoids situations where the prototype browseEverything() function has not been defined yet.
JavaScript
apache-2.0
samvera/hyrax,samvera/hyrax,samvera/hyrax,samvera/hyrax
--- +++ @@ -2,7 +2,7 @@ //= require browse_everything/behavior // Show the files in the queue -Blacklight.onLoad( function() { +function showBrowseEverythingFiles() { // We need to check this because https://github.com/samvera/browse-everything/issues/169 if ($('#browse-btn').length > 0) { $('#browse-b...
79ac8a1c0b3e48b3b29f24422ab189d5dccc8fa0
client/src/js/home/components/Welcome.js
client/src/js/home/components/Welcome.js
import React from "react"; import { get } from "lodash-es"; import { connect } from "react-redux"; import { Panel } from "react-bootstrap"; import { getSoftwareUpdates } from "../../updates/actions"; import { Icon } from "../../base"; class Welcome extends React.Component { componentDidMount () { this.pr...
import React from "react"; import { get } from "lodash-es"; import { connect } from "react-redux"; import { Panel } from "react-bootstrap"; import { getSoftwareUpdates } from "../../updates/actions"; import { Icon } from "../../base"; class Welcome extends React.Component { componentDidMount () { this.pr...
Fix home virtool version display
Fix home virtool version display
JavaScript
mit
virtool/virtool,igboyes/virtool,igboyes/virtool,virtool/virtool
--- +++ @@ -45,7 +45,7 @@ } const mapStateToProps = (state) => ({ - version: get(state.updates.software, "version") + version: get(state.updates, "version") }); const mapDispatchToProps = (dispatch) => ({
443a4ae12198f757370e95cf9e2de12aae9f710f
app/assets/javascripts/pages/new/new.component.js
app/assets/javascripts/pages/new/new.component.js
(function(){ 'use strict' const New = { templateUrl: 'pages/new/new.html' // templateUrl: 'components/bookmarks/bookmark-search.html', // controller: 'NewController' // controllerAs: 'model' } angular .module("shareMark") .component("new", New); }());
(function(){ 'use strict' const New = { templateUrl: 'pages/new/new.html', controller: 'NewController', controllerAs: 'model' } angular .module("shareMark") .component("new", New); }());
Update NewComponent to use NewController
Update NewComponent to use NewController
JavaScript
mit
Dom-Mc/shareMark,Dom-Mc/shareMark,Dom-Mc/shareMark
--- +++ @@ -2,16 +2,13 @@ 'use strict' const New = { - templateUrl: 'pages/new/new.html' - - // templateUrl: 'components/bookmarks/bookmark-search.html', - // controller: 'NewController' - // controllerAs: 'model' + templateUrl: 'pages/new/new.html', + controller: 'NewController', + contr...
17e546f1a58744f7fe2f4e80147f6df2a203a2ee
esbuild/frappe-html.js
esbuild/frappe-html.js
module.exports = { name: "frappe-html", setup(build) { let path = require("path"); let fs = require("fs/promises"); build.onResolve({ filter: /\.html$/ }, (args) => { return { path: path.join(args.resolveDir, args.path), namespace: "frappe-html", }; }); build.onLoad({ filter: /.*/, namespace...
module.exports = { name: "frappe-html", setup(build) { let path = require("path"); let fs = require("fs/promises"); build.onResolve({ filter: /\.html$/ }, (args) => { return { path: path.join(args.resolveDir, args.path), namespace: "frappe-html", }; }); build.onLoad({ filter: /.*/, namespace...
Revert "fix: allow backtick in HTML templates as well"
Revert "fix: allow backtick in HTML templates as well" This reverts commit 2f96458bcb6dfe8b8db4ef0101036b09bfa7c5f5.
JavaScript
mit
StrellaGroup/frappe,StrellaGroup/frappe,frappe/frappe,frappe/frappe,StrellaGroup/frappe,frappe/frappe
--- +++ @@ -18,9 +18,9 @@ return fs .readFile(filepath, "utf-8") .then((content) => { - content = JSON.stringify(scrub_html_template(content)); + content = scrub_html_template(content); return { - contents: `\n\tfrappe.templates['${filename}'] = ${content};\n`, + contents: `\n\tf...
7f009627bc82b67f34f93430152da71767be0029
packages/rear-system-package/config/app-paths.js
packages/rear-system-package/config/app-paths.js
const fs = require('fs'); const path = require('path'); const resolveApp = require('rear-core/resolve-app'); const ownNodeModules = fs.realpathSync( path.join(__dirname, '..', 'node_modules') ); const AppPaths = { ownNodeModules, root: resolveApp('src'), appIndexJs: resolveApp('src', 'index.js'), // TODO: r...
const fs = require('fs'); const path = require('path'); const resolveApp = require('rear-core/resolve-app'); let ownNodeModules; try { // Since this package is also used to build other packages // in this repo, we need to make sure its dependencies // are available when is symlinked by lerna. // Normally, mod...
Fix an issue that prevented modules to be resolved
Fix an issue that prevented modules to be resolved rear-system-package's config/app-paths.js was trying to resolve node_modules from inside the dependency. This is needed when rear-system-package is symlinked. Normally node_modules paths should be resolved from the app's node_modules.
JavaScript
mit
erremauro/rear,rearjs/rear
--- +++ @@ -2,15 +2,24 @@ const path = require('path'); const resolveApp = require('rear-core/resolve-app'); -const ownNodeModules = fs.realpathSync( - path.join(__dirname, '..', 'node_modules') -); +let ownNodeModules; + +try { + // Since this package is also used to build other packages + // in this repo, we...
8046548e86332e8b544563bcbc660a37b50ebd5e
test/index.js
test/index.js
var assert = require('assert'), capitalize = require('../index.js') describe('Capitalizer', function () { it('Capitalizes the first letter of a string', function () { assert.equal(capitalize('test'), 'Test') assert.equal(capitalize.first('test'), 'Test') }) it('Capitalizes all words in a string', function ...
var assert = require('assert'), capitalize = require('../index.js') describe('Capitalizer', function () { it('Capitalizes the first letter of a string', function () { assert.equal(capitalize('test'), 'Test') assert.equal(capitalize.first('test'), 'Test') }) it('Capitalizes all words in a string', function ...
Test for deep equality of arrays
Test for deep equality of arrays
JavaScript
mit
adius/capitalizer
--- +++ @@ -19,7 +19,7 @@ it('Capitalizes all words in an array', function () { - assert.equal( + assert.deepEqual( capitalize(['this', 'is', 'a', 'test', 'sentence']), ['This', 'Is', 'A', 'Test', 'Sentence'] )
314b2f1b8350b64e29824257cef48f142d4c152f
test/index.js
test/index.js
'use strict'; const chai = require('chai'); const plate = require('../index'); const expect = chai.expect; describe('Those postal codes', function() { it('should be valid', function() { expect(plate.validate('10188')).to.be.true; expect(plate.validate('49080')).to.be.true; }); }); describe('Those posta...
'use strict'; const chai = require('chai'); const postalCode = require('../index'); const expect = chai.expect; describe('Those postal codes', function() { it('should be valid', function() { expect(postalCode.validate('10188')).to.be.true; expect(postalCode.validate('49080')).to.be.true; }); }); descri...
Fix wrong naming in tests
Fix wrong naming in tests
JavaScript
mit
alefteris/greece-postal-code
--- +++ @@ -2,30 +2,30 @@ const chai = require('chai'); -const plate = require('../index'); +const postalCode = require('../index'); const expect = chai.expect; describe('Those postal codes', function() { it('should be valid', function() { - expect(plate.validate('10188')).to.be.true; - expect(pla...
b77fd67ee02329bd25fe224689dcd8434262c282
src/finders/JumpPointFinder.js
src/finders/JumpPointFinder.js
/** * @author aniero / https://github.com/aniero */ var DiagonalMovement = require('../core/DiagonalMovement'); var JPFNeverMoveDiagonally = require('./JPFNeverMoveDiagonally'); var JPFAlwaysMoveDiagonally = require('./JPFAlwaysMoveDiagonally'); var JPFMoveDiagonallyIfNoObstacles = require('./JPFMoveDiagonallyIfNoObs...
/** * @author aniero / https://github.com/aniero */ var DiagonalMovement = require('../core/DiagonalMovement'); var JPFNeverMoveDiagonally = require('./JPFNeverMoveDiagonally'); var JPFAlwaysMoveDiagonally = require('./JPFAlwaysMoveDiagonally'); var JPFMoveDiagonallyIfNoObstacles = require('./JPFMoveDiagonallyIfNoObs...
Fix exception on missing options object
Fix exception on missing options object If the JumpPointFinder constructor was not passed the options object there was a ReferenceError.
JavaScript
bsd-3-clause
radify/PathFinding.js,radify/PathFinding.js
--- +++ @@ -16,6 +16,7 @@ * movement will be allowed. */ function JumpPointFinder(opt) { + opt = opt || {}; if (opt.diagonalMovement === DiagonalMovement.Never) { return new JPFNeverMoveDiagonally(opt); } else if (opt.diagonalMovement === DiagonalMovement.Always) {
9edb7717b460685efaff9b2974daa9b776bd2921
share/spice/urban_dictionary/urban_dictionary.js
share/spice/urban_dictionary/urban_dictionary.js
// `ddg_spice_urban_dictionary` is a callback function that gets // "urban dictionary cool" or "urban dictionary ROTFL." // Note: This plugin can display adult content and profanity. function ddg_spice_urban_dictionary(response) { "use strict"; if (!(response || response.response.result_type === "exact" ...
// `ddg_spice_urban_dictionary` is a callback function that gets // "urban dictionary cool" or "urban dictionary ROTFL." // Note: This plugin can display adult content and profanity. function ddg_spice_urban_dictionary(response) { "use strict"; if (!(response || response.response.result_type === "exact" ||...
Fix whitespace tabs-versus-spaces conflict in Urban_dictionary Spice.
Fix whitespace tabs-versus-spaces conflict in Urban_dictionary Spice.
JavaScript
apache-2.0
alexandernext/zeroclickinfo-spice,rubinovitz/zeroclickinfo-spice,ppant/zeroclickinfo-spice,TomBebbington/zeroclickinfo-spice,Dwaligon/zeroclickinfo-spice,bibliotechy/zeroclickinfo-spice,ScreapDK/zeroclickinfo-spice,cylgom/zeroclickinfo-spice,tagawa/zeroclickinfo-spice,bibliotechy/zeroclickinfo-spice,samskeller/zeroclic...
--- +++ @@ -6,20 +6,20 @@ function ddg_spice_urban_dictionary(response) { "use strict"; - if (!(response || response.response.result_type === "exact" - || response.list || response.list[0])) { - return; + if (!(response || response.response.result_type === "exact" + || response.list || r...
01c7ea21e810e5c27ca8105c5e169c28b57975a8
examples/todo/static/assets/js/app.js
examples/todo/static/assets/js/app.js
var loadTodos = function() { $.ajax({ url: "/graphql?query={todoList{id,text,done}}" }).done(function(data) { console.log(data); var dataParsed = JSON.parse(data); var todos = dataParsed.data.todoList; if (!todos.length) { $('.todo-list-container').append('<p>There are no tasks for you to...
var handleTodoList = function(object) { var todos = object; if (!todos.length) { $('.todo-list-container').append('<p>There are no tasks for you today</p>'); } $.each(todos, function(i, v) { var doneHtml = '<input id="' + v.id + '" type="checkbox"' + (v.done ? ' checked="checked"' : '') + '>'; ...
Add "Add task" functionality, use the mutation
Add "Add task" functionality, use the mutation
JavaScript
mit
kr15h/graphql
--- +++ @@ -1,25 +1,50 @@ +var handleTodoList = function(object) { + var todos = object; + + if (!todos.length) { + $('.todo-list-container').append('<p>There are no tasks for you today</p>'); + } + + $.each(todos, function(i, v) { + var doneHtml = '<input id="' + v.id + '" type="checkbox"' + (v.done ? ' ch...
7888270cc70a99be1c0fc20945a9684d66a69134
examples/client/app.js
examples/client/app.js
angular.module('MyApp', ['ngResource', 'ngMessages', 'ngRoute', 'ngAuth', 'mgcrea.ngStrap']) .config(['$routeProvider', function($routeProvider) { $routeProvider .when('/', { templateUrl: 'views/home.html', controller: 'HomeCtrl' }) .when('/login', { templateUrl: 'views/l...
angular.module('MyApp', ['ngResource', 'ngMessages', 'ngRoute', 'ngAuth', 'mgcrea.ngStrap']) .config(['$routeProvider', 'AuthProvider', function($routeProvider, AuthProvider) { $routeProvider .when('/', { templateUrl: 'views/home.html', controller: 'HomeCtrl' }) .when('/login', {...
Move AuthProvider into first config block
Move AuthProvider into first config block
JavaScript
mit
hsr-ba-fs15-dat/satellizer,gshireesh/satellizer,bnicart/satellizer,jskrzypek/satellizer,jskrzypek/satellizer,johan--/satellizer,vebin/satellizer,TechyTimo/CoderHunt,celrenheit/satellizer,maciekrb/satellizer,maciekrb/satellizer,david300/satellizer,ELAPAKAHARI/satellizer,gregoriusxu/satellizer,maciekrb/satellizer,rick447...
--- +++ @@ -1,5 +1,5 @@ angular.module('MyApp', ['ngResource', 'ngMessages', 'ngRoute', 'ngAuth', 'mgcrea.ngStrap']) - .config(['$routeProvider', function($routeProvider) { + .config(['$routeProvider', 'AuthProvider', function($routeProvider, AuthProvider) { $routeProvider .when('/', { templat...
614b4d791cf3660f1e84550cc17e86c2d10f5c9f
iscan/static/iscan/env.js
iscan/static/iscan/env.js
(function (window) { window.__env = window.__env || {}; window.__env.hostUrl = 'https://' + window.location.hostname +'/'; window.__env.apiUrl = window.__env.hostUrl+'api/'; window.__env.intontationUrl = window.__env.hostUrl +'intonation/'; window.__env.annotatorUrl = window.__env.hostUrl +'annotator/api/'; ...
(function (window) { window.__env = window.__env || {}; if (window.location.port) { window.__env.hostUrl = 'https://' + window.location.hostname + ':' + window.location.port + '/'; } else { window.__env.hostUrl = 'https://' + window.location.hostname + '/'; } window.__env.apiUrl ...
Fix for missing port on API requests
Fix for missing port on API requests
JavaScript
mit
MontrealCorpusTools/polyglot-server,MontrealCorpusTools/polyglot-server,MontrealCorpusTools/polyglot-server,MontrealCorpusTools/polyglot-server
--- +++ @@ -1,10 +1,15 @@ (function (window) { - window.__env = window.__env || {}; - window.__env.hostUrl = 'https://' + window.location.hostname +'/'; - window.__env.apiUrl = window.__env.hostUrl+'api/'; - window.__env.intontationUrl = window.__env.hostUrl +'intonation/'; - window.__env.annotatorUrl = window....
a707a26bd606f8b10e5610dec5f8f2743b6c41a4
example/test.js
example/test.js
var Compile = require('./index2.js') compile = Compile('b11bf50b8a391d4e8560e97fd9d63460') //Source Code to be compiled remotely var sourceCode = 'print 3*20' //Programming Language Selection var language = 'Python' //Input for the program var testCases = '' //'Run' routine compiles the code and return the answe...
var Compile = require('../index.js') compile = Compile('b11bf50b8a391d4e8560e97fd9d63460') //Source Code to be compiled remotely var sourceCode = 'print 3*20' //Programming Language Selection var language = 'Python' //Input for the program var testCases = '' //'Run' routine compiles the code and return the answe...
Fix mistypo on relative index.js
Fix mistypo on relative index.js
JavaScript
mit
saru95/ideone-npm
--- +++ @@ -1,4 +1,4 @@ -var Compile = require('./index2.js') +var Compile = require('../index.js') compile = Compile('b11bf50b8a391d4e8560e97fd9d63460')
1771ab50f1a5d3dbe06871a26bdfa31882e393ac
test/setup.js
test/setup.js
// From https://github.com/airbnb/enzyme/blob/master/docs/guides/jsdom.md var jsdom = require('jsdom').jsdom; var exposedProperties = ['window', 'navigator', 'document']; global.document = jsdom(''); global.window = document.defaultView; Object.keys(document.defaultView).forEach((property) => { if (typeof global[p...
// From https://github.com/airbnb/enzyme/blob/master/docs/guides/jsdom.md var jsdom = require('jsdom').jsdom; var exposedProperties = ['window', 'navigator', 'document']; global.document = jsdom(''); global.window = document.defaultView; Object.keys(document.defaultView).forEach((property) => { if (typeof global[p...
Add mocks for menu tests
Add mocks for menu tests
JavaScript
bsd-3-clause
jdetle/nteract,jdfreder/nteract,jdetle/nteract,nteract/nteract,0u812/nteract,0u812/nteract,nteract/nteract,captainsafia/nteract,temogen/nteract,jdetle/nteract,nteract/composition,rgbkrk/nteract,nteract/nteract,0u812/nteract,captainsafia/nteract,nteract/composition,temogen/nteract,rgbkrk/nteract,rgbkrk/nteract,captainsa...
--- +++ @@ -48,4 +48,13 @@ 'shell': { 'openExternal': function(url) { }, }, + 'remote': { + 'require': function(module) { + if (module === 'electron') { + return { + 'dialog': function() { }, + }; + } + }, + }, })
662828ef56046bc7830718ef897a4ebbefd50278
examples/utils/embedly.js
examples/utils/embedly.js
// @flow const getJSON = ( endpoint: string, data: ?{}, successCallback: ({ url: string, title: string, author_name: string, thumbnail_url: string, }) => void, ) => { const request = new XMLHttpRequest(); request.open("GET", endpoint, true); request.setRequestHeader("Content-Type", "appli...
// @flow type Embed = { url: string, title: string, author_name: string, thumbnail_url: string, html: string, }; const getJSON = ( endpoint: string, data: ?{}, successCallback: (embed: Embed) => void, ) => { const request = new XMLHttpRequest(); request.open("GET", endpoint, true); request.setRe...
Support retrieving embed HTML in Embedly integration
Support retrieving embed HTML in Embedly integration
JavaScript
mit
springload/draftail,springload/draftail,springload/draftail,springload/draftail
--- +++ @@ -1,14 +1,17 @@ // @flow + +type Embed = { + url: string, + title: string, + author_name: string, + thumbnail_url: string, + html: string, +}; const getJSON = ( endpoint: string, data: ?{}, - successCallback: ({ - url: string, - title: string, - author_name: string, - thumbnail_u...
05c19987d3f569aa892d50755c757a6356e4a9f1
environments/react/v15.js
environments/react/v15.js
/** * Js-coding-standards * * @author Robert Rossmann <rr.rossmann@me.com> * @copyright 2016 STRV * @license http://choosealicense.com/licenses/bsd-3-clause BSD-3-Clause License */ 'use strict' module.exports = { extends: [ './recommended.js', './accessibility.js', ], rules: { 'o...
/** * Js-coding-standards * * @author Robert Rossmann <rr.rossmann@me.com> * @copyright 2016 STRV * @license http://choosealicense.com/licenses/bsd-3-clause BSD-3-Clause License */ 'use strict' module.exports = { extends: [ './recommended.js', './accessibility.js', ], rules: { 'o...
Fix console still being turned off for react env
Fix console still being turned off for react env
JavaScript
bsd-3-clause
strvcom/js-coding-standards,strvcom/eslint-config-javascript,strvcom/eslint-config-javascript
--- +++ @@ -18,9 +18,6 @@ rules: { 'operator-linebreak': 0, 'require-jsdoc': 0, - // Disallow Use of console - // Turned off for React apps, console is quite useful in browsers - 'no-console': 0, }, plugins: [
d607447c7a4ee04fd559ba44f4fbb07ad42b8453
src/components/Counter.js
src/components/Counter.js
import React, { Component, PropTypes } from 'react'; import { connect } from 'react-redux'; import * as counterActions from '../actions/counterActions'; import { dispatch } from '../store'; @connect(state => ({ counter: state.counter, })) export class Counter extends Component { static propTypes = { counter: PropT...
import React, { Component, PropTypes } from 'react'; import { connect } from 'react-redux'; import * as counterActions from '../actions/counterActions'; import { dispatch } from '../store'; @connect(state => ({ counter: state.counter, })) export class Counter extends Component { static propTypes = { counter: PropT...
Add defaultProps and initial state.
Add defaultProps and initial state.
JavaScript
mit
autozimu/react-hot-boilerplate,autozimu/react-hot-boilerplate
--- +++ @@ -10,6 +10,12 @@ static propTypes = { counter: PropTypes.number, }; + + static defaultProps = { + counter: 0, + }; + + state = {}; constructor(props) { super(props);
8999a66c88e56bc769bded0fe1ec17e0360682b5
src/core/cb.main/main.js
src/core/cb.main/main.js
function setup(options, imports, register) { // Import var server = imports.server.http; var port = imports.server.port; var watch = imports.watch; var workspace = imports.workspace; var logger = imports.logger.namespace("codebox"); // Start server server.listen(port); server.on('l...
function setup(options, imports, register) { // Import var server = imports.server.http; var port = imports.server.port; var watch = imports.watch; var workspace = imports.workspace; var logger = imports.logger.namespace("codebox"); // Start server server.listen(port); server.on('l...
Change init of watch and server
Change init of watch and server
JavaScript
apache-2.0
rajthilakmca/codebox,code-box/codebox,code-box/codebox,fly19890211/codebox,etopian/codebox,nobutakaoshiro/codebox,indykish/codebox,Ckai1991/codebox,fly19890211/codebox,CodeboxIDE/codebox,lcamilo15/codebox,kustomzone/codebox,lcamilo15/codebox,ronoaldo/codebox,ronoaldo/codebox,listepo/codebox,rajthilakmca/codebox,indykis...
--- +++ @@ -11,18 +11,19 @@ server.on('listening', function() { logger.log("Server is listening on ", port); - watch.init(workspace.root) - .then(function() { - logger.log("Started Watch"); - }) - .fail(function(err) { - logger.error("Failed to start W...
715fec370fa84ee9687a3e1f34e942a37cdf9dd7
src/js/editing/History.js
src/js/editing/History.js
define(['summernote/core/range'], function (range) { /** * @class editing.History * * Editor History * */ var History = function ($editable) { var stack = [], stackOffset = -1; var editable = $editable[0]; var makeSnapshot = function () { var rng = range.create(); var emptyBo...
define(['summernote/core/range'], function (range) { /** * @class editing.History * * Editor History * */ var History = function ($editable) { var stack = [], stackOffset = -1; var editable = $editable[0]; var makeSnapshot = function () { var rng = range.create(); var emptyBo...
Fix script error when last undo.
Fix script error when last undo.
JavaScript
mit
bebeeteam/summernote,summernote/summernote,summernote/summernote,AshDevFr/winternote,summernote/summernote,bebeeteam/summernote,bebeeteam/summernote,AshDevFr/winternote,AshDevFr/winternote
--- +++ @@ -11,7 +11,7 @@ var makeSnapshot = function () { var rng = range.create(); - var emptyBookmark = {s: {path: [0], offset: 0}, e: {path: [0], offset: 0}}; + var emptyBookmark = {s: {path: [], offset: 0}, e: {path: [], offset: 0}}; return { contents: $editable.html(),
68bb8489b6fe7b2466159b2e5b9e08c21c466588
src/button.js
src/button.js
const React = require('react'); const classNames = require('classnames'); class Button extends React.Component { render() { const { className, children, type, ...props } = this.props; const buttonClassNames = classNames({ btn: true, 'btn-sm': this.props.size === 'smal...
const React = require('react'); const classNames = require('classnames'); class Button extends React.Component { render() { const { className, children, theme, ...props } = this.props; const buttonClassNames = classNames({ btn: true, 'btn-sm': this.props.size === 'sma...
Change `type` prop to `theme`
Change `type` prop to `theme`
JavaScript
mit
Opstarts/opstarts-ui
--- +++ @@ -6,7 +6,7 @@ const { className, children, - type, + theme, ...props } = this.props; @@ -15,16 +15,16 @@ 'btn-sm': this.props.size === 'small', 'btn-xs': this.props.size === 'extra-small', 'btn-lg': this.props.size === 'large', - [`btn-${t...