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
45b60408828c430d18a470c16d3c3ac3557d5fc1
config/ember-try.js
config/ember-try.js
module.exports = { scenarios: [ { name: 'default', dependencies: { } }, { name: 'ember-release', dependencies: { 'ember': 'components/ember#release', 'ember-data': 'components/ember-data#1.13.4' }, resolutions: { 'ember': 'release', 'embe...
module.exports = { scenarios: [ { name: 'default', dependencies: { } }, { name: 'ember-release', dependencies: { 'ember': 'components/ember#release', 'ember-data': 'components/ember-data#release' }, resolutions: { 'ember': 'release', 'emb...
Use release channel of ember-data
Use release channel of ember-data v1.13 is not supported for the next version of ember-data-fixture-adapter.
JavaScript
mit
emberjs/ember-data-fixture-adapter,emberjs/ember-data-fixture-adapter
--- +++ @@ -8,11 +8,11 @@ name: 'ember-release', dependencies: { 'ember': 'components/ember#release', - 'ember-data': 'components/ember-data#1.13.4' + 'ember-data': 'components/ember-data#release' }, resolutions: { 'ember': 'release', - 'ember-data': ...
0b148e268b8922d100d51e8bd5703b976955ed2b
lib/node_modules/@stdlib/utils/constructor-name/lib/constructor_name.js
lib/node_modules/@stdlib/utils/constructor-name/lib/constructor_name.js
'use strict'; // MODULES // var nativeClass = require( '@stdlib/utils/native-class' ); var RE = require( '@stdlib/regexp/function-name' ); var isBuffer = require( '@stdlib/assert/is-buffer' ); // MAIN // /** * Determines the name of a value's constructor. * * @param {*} v - input value * @returns {string} name of ...
'use strict'; // MODULES // var nativeClass = require( '@stdlib/utils/native-class' ); var RE = require( '@stdlib/regexp/function-name' ); var isBuffer = require( '@stdlib/assert/is-buffer' ); // MAIN // /** * Determines the name of a value's constructor. * * @param {*} v - input value * @returns {string} name of ...
Fix lint error and update JSDoc examples
Fix lint error and update JSDoc examples
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
--- +++ @@ -18,17 +18,21 @@ * @example * var v = constructorName( 'a' ); * // returns 'String' +* * @example * var v = constructorName( 5 ); * // returns 'Number' +* * @example * var v = constructorName( null ); * // returns 'Null' +* * @example * var v = constructorName( undefined ); * // returns 'Undefi...
dbfc34db0f4413c10205357ed423b244827c6388
shaq_overflow/app/assets/javascripts/app.js
shaq_overflow/app/assets/javascripts/app.js
$(document).ready(function() { $("a.up-vote-answer").click(function(event) { event.preventDefault(); var $target = $(event.target); console.log($target.data("url")) $.ajax({ type: "post", url: $target.data("url"), data: $target.data(), success: function(...
$(document).ready(function() { $("a.up-vote-answer").click(function(event) { event.preventDefault(); var $target = $(event.target); $.ajax({ type: "post", url: $target.data("url"), data: $target.data(), success: function(response) { $('#' + $target.data('ans...
Add ajax call for questions
Add ajax call for questions
JavaScript
mit
lucasrsantos1/lucky-ambassador,lucasrsantos1/lucky-ambassador,lucasrsantos1/lucky-ambassador
--- +++ @@ -1,6 +1,21 @@ $(document).ready(function() { $("a.up-vote-answer").click(function(event) { + event.preventDefault(); + var $target = $(event.target); + $.ajax({ + type: "post", + url: $target.data("url"), + data: $target.data(), + success: function(response) ...
3cbedcf697029d844f472c6d2503f47edee6506d
src/helpers/getPetitionDaysRemaining.js
src/helpers/getPetitionDaysRemaining.js
import moment from 'moment'; import getPetitionEndDate from 'selectors/petitionEndDate'; export default ({ created, expires }, timeNow) => { const endDate = getPetitionEndDate({ created, expires }); const nowDate = timeNow || moment().valueOf(); const daysRemaining = moment.duration(moment(endDate).diff(nowDate)...
import moment from 'moment'; import getPetitionEndDate from 'selectors/petitionEndDate'; export default ({ created, expires }) => { const endDate = getPetitionEndDate({ created, expires }); const nowDate = moment().valueOf(); const daysRemaining = moment.duration(endDate.diff(nowDate)).asDays(); return Math.ma...
Remove unused param from daysRemaining function
Remove unused param from daysRemaining function
JavaScript
apache-2.0
iris-dni/iris-frontend,iris-dni/iris-frontend,iris-dni/iris-frontend
--- +++ @@ -1,9 +1,9 @@ import moment from 'moment'; import getPetitionEndDate from 'selectors/petitionEndDate'; -export default ({ created, expires }, timeNow) => { +export default ({ created, expires }) => { const endDate = getPetitionEndDate({ created, expires }); - const nowDate = timeNow || moment().valu...
071b13d9b044fd09d31f3d3f5c4d7f7c2385a793
src/models/CustomerIoEvent.js
src/models/CustomerIoEvent.js
'use strict'; class CustomerIoEvent { constructor(id, name, data) { this.id = id; this.name = name; this.data = data; } getId() { return this.id; } getName() { return this.name; } getData() { return this.data; } setVersion(version) { this.data.version = version; } } ...
'use strict'; class CustomerIoEvent { constructor(id, name, data) { this.id = id; this.name = name; this.data = data; } getId() { return this.id; } getName() { return this.name; } getData() { return this.data; } // Schema version of event data. setVersion(version) { ...
Add comment clarifying that cio event version is data schema version
Add comment clarifying that cio event version is data schema version
JavaScript
mit
DoSomething/blink,DoSomething/blink
--- +++ @@ -19,6 +19,7 @@ return this.data; } + // Schema version of event data. setVersion(version) { this.data.version = version; }
fa74ef9e2294c798743d689d30fd8aa6138a2e44
lib/jsdom/living/post-message.js
lib/jsdom/living/post-message.js
"use strict"; const isValidTargetOrigin = require("../utils").isValidTargetOrigin; const DOMException = require("../web-idl/DOMException"); module.exports = function (message, targetOrigin) { if (arguments.length < 2) { throw new TypeError("'postMessage' requires 2 arguments: 'message' and 'targetOrigin'"); } ...
"use strict"; const isValidTargetOrigin = require("../utils").isValidTargetOrigin; const DOMException = require("../web-idl/DOMException"); module.exports = function (message, targetOrigin) { if (arguments.length < 2) { throw new TypeError("'postMessage' requires 2 arguments: 'message' and 'targetOrigin'"); } ...
Fix origin-checking logic in postMessage
Fix origin-checking logic in postMessage This allows us to post messages where the origin is something other than `*`. Closes #1789.
JavaScript
mit
mzgol/jsdom,Zirro/jsdom,Zirro/jsdom,mzgol/jsdom,mzgol/jsdom,tmpvar/jsdom,tmpvar/jsdom,snuggs/jsdom,snuggs/jsdom
--- +++ @@ -16,7 +16,7 @@ // TODO: targetOrigin === '/' - requires reference to source window // See https://github.com/tmpvar/jsdom/pull/1140#issuecomment-111587499 - if (targetOrigin !== "*" && targetOrigin !== this.origin) { + if (targetOrigin !== "*" && targetOrigin !== this.location.origin) { retu...
aa31895f622ad0beebda72284ff76d7971edaf3a
generate-config-schema.js
generate-config-schema.js
"use strict"; const fs = require("fs"); const packageJsonPath = "./package.json"; const packageJson = require(packageJsonPath); const configurationSchema = require("./node_modules/markdownlint/schema/markdownlint-config-schema.json"); const defaultConfig = require("./default-config.json"); // Update package.json cons...
"use strict"; const fs = require("fs"); const packageJsonPath = "./package.json"; const packageJson = require(packageJsonPath); const configurationSchema = require("./node_modules/markdownlint/schema/markdownlint-config-schema.json"); const defaultConfig = require("./default-config.json"); // Update package.json cons...
Add trailing newline charater when generating config schema for package.json.
Add trailing newline charater when generating config schema for package.json.
JavaScript
mit
DavidAnson/vscode-markdownlint
--- +++ @@ -10,4 +10,4 @@ const configurationRoot = packageJson.contributes.configuration.properties["markdownlint.config"]; configurationRoot.default = defaultConfig; configurationRoot.properties = configurationSchema.properties; -fs.writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, "\t")); +fs.wri...
c442ad739f2b65e5a62b7c4e6579a10ab5d34004
test/integration/assertions/noJsErrors.js
test/integration/assertions/noJsErrors.js
exports.assertion = function () { this.message = 'Page loaded with no errors.'; this.expected = []; this.pass = function (result) { return result && result.length === 0; }; this.failure = function (result) { var failed = result.value.length > 0; if (failed) { ...
exports.assertion = function () { this.message = 'Page loaded with no errors.'; this.expected = []; this.pass = function (result) { return !result.value && result.length === 0; }; this.failure = function (result) { var failed = result.value && result.value.length > 0; ...
Improve client side error detection
Improve client side error detection
JavaScript
apache-2.0
junbon/binary-static-www2,borisyankov/binary-static,massihx/binary-static,borisyankov/binary-static,brodiecapel16/binary-static,massihx/binary-static,massihx/binary-static,junbon/binary-static-www2,einhverfr/binary-static,borisyankov/binary-static,animeshsaxena/binary-static,brodiecapel16/binary-static,tfoertsch/binary...
--- +++ @@ -6,12 +6,12 @@ this.pass = function (result) { - return result && result.length === 0; + return !result.value && result.length === 0; }; this.failure = function (result) { - var failed = result.value.length > 0; + var failed = result.value && resul...
cfeb83d35a957a433362e8eed762c0e364cb4d6e
modules/angular-meteor-user.js
modules/angular-meteor-user.js
var angularMeteorUser = angular.module('angular-meteor.user', ['angular-meteor.utils']); angularMeteorUser.run(['$rootScope', '$meteorUtils', function($rootScope, $meteorUtils){ var currentUserDefer; $meteorUtils.autorun($rootScope, function(){ if (Meteor.user) { $rootScope.currentUser = Meteor.user(); ...
var angularMeteorUser = angular.module('angular-meteor.user', ['angular-meteor.utils']); angularMeteorUser.run(['$rootScope', '$meteorUtils', '$q', function($rootScope, $meteorUtils, $q){ var currentUserDefer; $meteorUtils.autorun($rootScope, function(){ if (Meteor.user) { $rootScope.currentUser = Meteo...
Add missing $q service to User
Add missing $q service to User
JavaScript
mit
shankarregmi/angular-meteor,Wanderfalke/angular-meteor,davidyaha/angular-meteor,Urigo/angular-meteor,evanliomain/angular-meteor,manhtuongbkhn/angular-meteor,nweat/angular-meteor,efosao12/angular-meteor,IgorMinar/angular-meteor,idanwe/angular-meteor,omer72/angular-meteor,eugene-d/angular-meteor,ahmedshuhel/angular-meteo...
--- +++ @@ -1,6 +1,6 @@ var angularMeteorUser = angular.module('angular-meteor.user', ['angular-meteor.utils']); -angularMeteorUser.run(['$rootScope', '$meteorUtils', function($rootScope, $meteorUtils){ +angularMeteorUser.run(['$rootScope', '$meteorUtils', '$q', function($rootScope, $meteorUtils, $q){ var curre...
777ca8757c04561f0bd0c3ad17e43ad384424504
src/routes.js
src/routes.js
//@flow import React from 'react' import { Route, IndexRoute } from 'react-router' import App from './App' if (process.env.NODE_ENV === 'development' || typeof require.ensure === 'undefined') require.ensure = (undefined, fc) => fc(require) export default () => ( // eslint-disable-line <Route component={App}> <R...
//@flow import React from 'react' import { Route, IndexRoute } from 'react-router' import App from './App' import Posts from './Posts' import AddPost from './AddPost' export default () => ( // eslint-disable-line <Route component={App}> <Route path="/"> <IndexRoute component={Posts}/> <Route path="ad...
Revert "Disable code-split in development mode and for server side"
Revert "Disable code-split in development mode and for server side" This reverts commit 90d307f6cf9792882dc4beabc2cd1d007ae26dc6.
JavaScript
mit
MrEfrem/TestApp,MrEfrem/TestApp
--- +++ @@ -2,30 +2,14 @@ import React from 'react' import { Route, IndexRoute } from 'react-router' import App from './App' - -if (process.env.NODE_ENV === 'development' || typeof require.ensure === 'undefined') require.ensure = (undefined, fc) => fc(require) +import Posts from './Posts' +import AddPost from './A...
aea16e7ef4aa2fe11d282a2dabfbf73ade85fe31
ghost/admin/components/gh-notification.js
ghost/admin/components/gh-notification.js
var NotificationComponent = Ember.Component.extend({ classNames: ['js-bb-notification'], typeClass: function () { var classes = '', message = this.get('message'), type, dismissible; // Check to see if we're working with a DS.Model or a plain JS object ...
var NotificationComponent = Ember.Component.extend({ classNames: ['js-bb-notification'], typeClass: function () { var classes = '', message = this.get('message'), type, dismissible; // Check to see if we're working with a DS.Model or a plain JS object ...
Check the end of notification fade-out animation
Check the end of notification fade-out animation
JavaScript
mit
TryGhost/Ghost,TryGhost/Ghost,TryGhost/Ghost
--- +++ @@ -31,7 +31,9 @@ self.$().on('animationend webkitAnimationEnd oanimationend MSAnimationEnd', function (event) { /* jshint unused: false */ - self.notifications.removeObject(self.get('message')); + if (event.originalEvent.animationName === 'fade-out') { + ...
e31c5e39f3775e2278f7bdb1b8e4de919c97266e
ghost/admin/components/gh-upload-modal.js
ghost/admin/components/gh-upload-modal.js
import ModalDialog from 'ghost/components/gh-modal-dialog'; import upload from 'ghost/assets/lib/uploader'; var UploadModal = ModalDialog.extend({ layoutName: 'components/gh-modal-dialog', didInsertElement: function () { this._super(); upload.call(this.$('.js-drop-zone'), {fileStorage: this.ge...
import ModalDialog from 'ghost/components/gh-modal-dialog'; import upload from 'ghost/assets/lib/uploader'; var UploadModal = ModalDialog.extend({ layoutName: 'components/gh-modal-dialog', didInsertElement: function () { this._super(); upload.call(this.$('.js-drop-zone'), {fileStorage: this.ge...
Fix button class on upload modal
Fix button class on upload modal no issue - this makes sure that the cancel button on the upload modal gets the correct class
JavaScript
mit
TryGhost/Ghost,TryGhost/Ghost,TryGhost/Ghost
--- +++ @@ -13,7 +13,7 @@ func: function () { // The function called on rejection return true; }, - buttonClass: true, + buttonClass: 'btn btn-default', text: 'Cancel' // The reject button text }, accept: {
23b4df8733dd31415a3053b8f8625144b259894c
test/component-test.js
test/component-test.js
var tape = require("tape"), jsdom = require("jsdom"), d3 = Object.assign( require("../"), require("d3-selection") ); // An example component. function Paragraph(){ return function (context, d){ context.text(d); }; } Paragraph.tagName = "p"; tape("component()", function(test) { var div = d3...
var tape = require("tape"), jsdom = require("jsdom"), d3 = Object.assign( require("../"), require("d3-selection") ); // An example component. function Paragraph(){ return function (context, d){ context.text(d); }; } Paragraph.tagName = "p"; tape("A component should render multiple inst...
Add test for single instance
Add test for single instance
JavaScript
bsd-3-clause
curran/d3-component
--- +++ @@ -7,14 +7,24 @@ // An example component. function Paragraph(){ - return function (context, d){ context.text(d); }; + return function (context, d){ + context.text(d); + }; } Paragraph.tagName = "p"; -tape("component()", function(test) { +tape("A component should render multiple instances.", fun...
50fbcfd21058af009584b41cfd543c98b38ccb5a
reverse-array-in-place.js
reverse-array-in-place.js
// Reverse Array In Place /*RULES: Take array as parameter Reverse array Return reversed array NOTES: Can't create new empty array to push in Must modify given array Can't use array.reverse(); */ /*PSEUDOCODE 1) Find array length 2) Create variable "stopper" for last element in array 2) (arr...
// Reverse Array In Place /*RULES: Take array as parameter Reverse array Return reversed array NOTES: Can't create new empty array to push in Must modify given array Can't use array.reverse(); */ /*PSEUDOCODE 1) Find array length 2) Create variable "stopper" for last element in array 2) (arr...
Complete working algorithm, follows all rules and works perfectly
Complete working algorithm, follows all rules and works perfectly
JavaScript
mit
benjaminhyw/javascript_algorithms
--- +++ @@ -23,5 +23,12 @@ function reverseArray(arr){ var count = arr.length; + var stopper = arr[count - 1]; + for (var i = 0; i < count; i++){ + arr.push(arr[arr.indexOf(stopper) - 1]); + arr.splice((arr.indexOf(stopper) - 1), 1); + } + + return arr; }
37738318c9c13f5c796467a302776cca08c441bc
.eslintrc.js
.eslintrc.js
module.exports = { "extends": "react-app", "rules": { "comma-dangle": ["error", "always-multiline"], // disallow unnecessary semicolons 'no-extra-semi': 'error', }, };
module.exports = { "extends": "react-app", "rules": { "comma-dangle": ["warn", "always-multiline"], // disallow unnecessary semicolons 'no-extra-semi': 'warn', }, };
Change code style issues to warnings
Change code style issues to warnings
JavaScript
agpl-3.0
sMteX/WoWAnalyzer,FaideWW/WoWAnalyzer,Yuyz0112/WoWAnalyzer,sMteX/WoWAnalyzer,ronaldpereira/WoWAnalyzer,Juko8/WoWAnalyzer,ronaldpereira/WoWAnalyzer,WoWAnalyzer/WoWAnalyzer,anom0ly/WoWAnalyzer,yajinni/WoWAnalyzer,Yuyz0112/WoWAnalyzer,sMteX/WoWAnalyzer,anom0ly/WoWAnalyzer,enragednuke/WoWAnalyzer,FaideWW/WoWAnalyzer,hasseb...
--- +++ @@ -1,8 +1,8 @@ module.exports = { "extends": "react-app", "rules": { - "comma-dangle": ["error", "always-multiline"], + "comma-dangle": ["warn", "always-multiline"], // disallow unnecessary semicolons - 'no-extra-semi': 'error', + 'no-extra-semi': 'warn', }, };
23af74d81b718ab07db40c38c46b8c1c6337374b
app/assets/javascripts/dispatcher/index.js
app/assets/javascripts/dispatcher/index.js
// This dispatcher modifies some of the ideas in Facebook's template: // https://github.com/facebook/flux/blob/master/src/Dispatcher.js var FluxDispatcher = require('flux').Dispatcher; class AppDispatcher extends FluxDispatcher { dispatch(payload) { if (!payload.action && !payload.type) { console.error('C...
var FluxDispatcher = require('flux').Dispatcher; class AppDispatcher extends FluxDispatcher { dispatch(payload) { if (!payload.action && !payload.type) { console.error('Cannot dispatch null action. Make sure action type is in constants.js'); return; } super.dispatch(payload); } }; module....
Remove unnecessary comment, since the origins of the Dispatcher are now apparent
Remove unnecessary comment, since the origins of the Dispatcher are now apparent
JavaScript
agpl-3.0
lachlanjc/meta,assemblymade/meta,assemblymade/meta,assemblymade/meta,lachlanjc/meta,lachlanjc/meta,assemblymade/meta,lachlanjc/meta
--- +++ @@ -1,6 +1,3 @@ -// This dispatcher modifies some of the ideas in Facebook's template: -// https://github.com/facebook/flux/blob/master/src/Dispatcher.js - var FluxDispatcher = require('flux').Dispatcher; class AppDispatcher extends FluxDispatcher {
414958ef0ee5d48d7f823517976493a2b237d2f3
test/encoders.tests.js
test/encoders.tests.js
var assert = require('assert'); var encoders = require('../lib/encoders'); var fixtures = require('./fixture/server'); describe('encoders', function () { describe('thumbprint', function () { it('should return the thumbprint in all caps', function () { var certThumbprint = encoders.thumbprint(fixtures.crede...
'use strict'; const assert = require('assert'); const encoders = require('../lib/encoders'); const fixtures = require('./fixture/server'); describe('encoders', function () { describe('thumbprint', function () { it('should return the thumbprint in all caps', function () { const certThumbprint = encoders.th...
Revert "Make compatible with Node 0.10 🤢"
Revert "Make compatible with Node 0.10 🤢" This reverts commit eaf1ad7
JavaScript
mit
auth0/node-wsfed,auth0/node-wsfed
--- +++ @@ -1,11 +1,13 @@ -var assert = require('assert'); -var encoders = require('../lib/encoders'); -var fixtures = require('./fixture/server'); +'use strict'; + +const assert = require('assert'); +const encoders = require('../lib/encoders'); +const fixtures = require('./fixture/server'); describe('encoders', f...
028e456ff191d013c3cf48fcaaa106e11348c5c2
src/js/views/controls.js
src/js/views/controls.js
define(['underscore', 'backbone', 'jquery'], function(_, Backbone, $) { 'use strict'; var $navigatorBtn = $('.caption .controls button.navigator'); var $navigatorOverlay = $('.navigator-overlay'); return Backbone.View.extend({ initialize: function() { $navigatorBtn.click(_.bind(this.toggleNavigator, this)); ...
define(['underscore', 'backbone', 'jquery'], function(_, Backbone, $) { 'use strict'; var $navigatorBtn = $('.caption .controls button.navigator'); var $navigatorOverlay = $('.navigator-overlay'); return Backbone.View.extend({ initialize: function() { $navigatorBtn.click(_.bind(this.toggleNavigator, this)); ...
Remove unused methods from navigator control
Remove unused methods from navigator control
JavaScript
mit
nuclearwingsclan/skymaps,asleepwalker/skymaps,asleepwalker/skymaps,nuclearwingsclan/skymaps
--- +++ @@ -10,26 +10,13 @@ $navigatorOverlay.on('click mousedown touchdown', _.bind(this.closeNavigator, this)); }, - openNavigator: function() { - $('body').addClass('navigator'); + toggleNavigator: function() { + $('body').toggleClass('navigator'); }, closeNavigator: function() { $('body...
c847d07a1d096750b9188a0969795c65afa859f5
lib/rules/validate-self-closing-tags.js
lib/rules/validate-self-closing-tags.js
var utils = require('../utils') , selfClosing = require('void-elements') module.exports = function () {} module.exports.prototype = { name: 'validateSelfClosingTags' , configure: function (options) { utils.validateTrueOptions(this.name, options) } , lint: function (file, errors) { var isX...
var utils = require('../utils') , selfClosing = require('void-elements') module.exports = function () {} module.exports.prototype = { name: 'validateSelfClosingTags' , configure: function (options) { utils.validateTrueOptions(this.name, options) } , lint: function (file, errors) { var isX...
Refactor `validateSelfClosingTags` to handle new token structure
Refactor `validateSelfClosingTags` to handle new token structure
JavaScript
isc
benedfit/jade-lint,pugjs/jade-lint,pugjs/pug-lint,benedfit/jadelint
--- +++ @@ -22,7 +22,9 @@ if (!isXml) { file.iterateTokensByType('tag', function (token) { - if (token.selfClosing && selfClosing[token.val]) { + var nextToken = file.getToken(token._index + 1) + + if (nextToken.type === 'slash' && selfClosing[token.val]) { er...
c8ed1fb00519c3a0c42739476e07ad632bba86c0
lib/server/model.js
lib/server/model.js
'use strict'; const CommonModel = require('../common/model.js'); class ServerModel extends CommonModel { constructor(validator, messenger, dbStorage, config, jwt) { super(validator, messenger); this.db = dbStorage; this.config = config; this.jwt = jwt; } signinPassword(event) { this.db ...
'use strict'; const CommonModel = require('../common/model.js'); class ServerModel extends CommonModel { constructor(validator, messenger, dbStorage, config, jwt) { super(validator, messenger); this.db = dbStorage; this.config = config; this.jwt = jwt; } signinPassword(event) { this.db ...
Fix bug: call reply method on messenger
Fix bug: call reply method on messenger
JavaScript
mit
scola84/node-auth
--- +++ @@ -19,7 +19,7 @@ } signinToken(event) { - this.reply(event, this.jwt.verify( + this.messenger.reply(event, this.jwt.verify( this.getToken(), this.config.get('@scola.auth.privateKey') )); @@ -36,7 +36,7 @@ expiresIn: '7 days' }); - this.reply(event, { + thi...
b72a2e4ecd8c8fee9dba0b9bba059b31757dd0f7
lib/services/tag.js
lib/services/tag.js
import rp from 'request-promise'; import {Microservices} from '../../configs/microservices'; import {isEmpty, assignToAllById} from '../../common'; export default { // fetches the tags data fetchTagInfo(tags) { if (isEmpty(tags)) return Promise.resolve([]); return rp.get({ uri: `...
import rp from 'request-promise'; import {Microservices} from '../../configs/microservices'; import {isEmpty, assignToAllById} from '../../common'; export default { // fetches the tags data fetchTagInfo(tags) { if (isEmpty(tags)) return Promise.resolve([]); return rp.get({ uri: `...
Fix no topics shown when loading a deck
Fix no topics shown when loading a deck
JavaScript
mpl-2.0
slidewiki/slidewiki-platform,slidewiki/slidewiki-platform,slidewiki/slidewiki-platform
--- +++ @@ -12,6 +12,7 @@ return rp.get({ uri: `${Microservices.tag.uri}/tags`, qs: { + tagType: 'all', tagName: tags.map((t) => t.tagName), paging: false, // this allows for unpaged results },
03b3bd619dcf68fbba409fa6de788d2e02f4c0ca
test/selectors.spec.js
test/selectors.spec.js
import * as selectors from '../src/selectors' describe('selectors', () => { it('includes selector to get session data', () => { const state = { session: { data: { token: 'abcde' } } } const result = selectors.getSessionData(state) expect(result).toEqual({ token: 'abcde' }) }) ...
import * as selectors from '../src/selectors' describe('selectors', () => { it('includes selector to get session data', () => { const state = { session: { data: { token: 'abcde' } } } const result = selectors.getSessionData(state) expect(result).toEqual({ token: 'abcde' }) }) ...
Add test for getHasFailedAuth selector
Add test for getHasFailedAuth selector
JavaScript
mit
jerelmiller/redux-simple-auth
--- +++ @@ -60,4 +60,16 @@ expect(result).toEqual('You shall not pass') }) + + it('includes selector to get hasFailedAuth', () => { + const state = { + session: { + hasFailedAuth: true + } + } + + const result = selectors.getHasFailedAuth(state) + + expect(result).toEqual(true)...
923e723b701bb382c87ff811a2a4b861e4e6ec36
src/components/laws/LawCollectionChooser.js
src/components/laws/LawCollectionChooser.js
import React, { PropTypes } from 'react'; import ImmutableTypes from 'react-immutable-proptypes'; import { Grid, Cell, Button } from 'react-mdl'; const LawCollectionChooser = ({ collections, selected, onSelect }) => ( <Grid noSpacing> {collections.map(title => ( <Cell key={title} col={3} tablet={4} phone=...
import React, { PropTypes } from 'react'; import { List } from 'immutable'; import { range } from 'lodash'; import ImmutableTypes from 'react-immutable-proptypes'; import { Grid, Cell, Button } from 'react-mdl'; const shell = List(range(4).map(() => '')); const LawCollectionChooser = ({ collections, selected, onSel...
Implement shells for law index collection chooser.
Implement shells for law index collection chooser.
JavaScript
agpl-3.0
ahoereth/lawly,ahoereth/lawly,ahoereth/lawly
--- +++ @@ -1,16 +1,28 @@ import React, { PropTypes } from 'react'; +import { List } from 'immutable'; +import { range } from 'lodash'; import ImmutableTypes from 'react-immutable-proptypes'; import { Grid, Cell, Button } from 'react-mdl'; +const shell = List(range(4).map(() => '')); + + const LawCollectionCh...
05a0de2d8680c92a40739027bd15a19c205d1f80
lib/utils/images.js
lib/utils/images.js
var _ = require("lodash"); var Q = require("q"); var fs = require("./fs"); var shellescape = require('shell-escape'); var spawn = require('spawn-cmd').spawn; var links = require("./links"); // Convert a svg file var convertSVG = function(source, dest, options) { if (!fs.existsSync(source)) return Q.reject(new Error(...
var _ = require("lodash"); var Q = require("q"); var fs = require("./fs"); var spawn = require('spawn-cmd').spawn; var links = require("./links"); // Convert a svg file var convertSVG = function(source, dest, options) { if (!fs.existsSync(source)) return Q.reject(new Error("File doesn't exist: "+source)); var d = Q...
Remove require of old dependency "shell-escape"
Remove require of old dependency "shell-escape"
JavaScript
apache-2.0
haamop/documentation,jocr1627/gitbook,hongbinz/gitbook,hujianfei1989/gitbook,athiruban/gitbook,switchspan/gitbook,haamop/documentation,bradparks/gitbook,gencer/gitbook,palerdot/gitbook,grokcoder/gitbook,sunlianghua/gitbook,sunlianghua/gitbook,jasonslyvia/gitbook,xxxhycl2010/gitbook,kamyu104/gitbook,webwlsong/gitbook,su...
--- +++ @@ -1,7 +1,6 @@ var _ = require("lodash"); var Q = require("q"); var fs = require("./fs"); -var shellescape = require('shell-escape'); var spawn = require('spawn-cmd').spawn; var links = require("./links");
8de090891a3492729fbb74b94fb28740c7143428
src/components/loggertrace/HeaderDisplay.js
src/components/loggertrace/HeaderDisplay.js
import React, { PropTypes } from 'react'; import { Table } from 'react-bootstrap'; import { List } from 'immutable'; import moment from 'moment'; import HeaderRow from './HeaderRow'; function HeaderDisplay(props) { let headers = props.headers; const rows = headers.map(h => { const name = h.get('name'); co...
import React, { PropTypes } from 'react'; import { Table } from 'react-bootstrap'; import { List } from 'immutable'; import moment from 'moment'; import HeaderRow from './HeaderRow'; function HeaderDisplay(props) { let headers = props.headers; const rows = headers.map((h, index) => { const name = h.get('name'...
Support for two headers with same name.
Support for two headers with same name. I found an example file with two different firmware version header lines. This caused a React error due to duplicate item keys. Fixed by appending the index to the name.
JavaScript
mit
alistairmgreen/soaring-analyst,alistairmgreen/soaring-analyst
--- +++ @@ -7,12 +7,12 @@ function HeaderDisplay(props) { let headers = props.headers; - const rows = headers.map(h => { + const rows = headers.map((h, index) => { const name = h.get('name'); const value = h.get('value').toString(); return ( - <HeaderRow key={name} name={name} value={val...
af861de8c276b56babd2d978e2a1bc2950115ff5
main.js
main.js
import { app, BrowserWindow } from 'electron'; let mainWindow = null; app.on('window-all-closed', () => { if (process.platform != 'darwin') { app.quit(); } }); app.on('ready', () => { mainWindow = new BrowserWindow({width: 800, maxWidth: 800, height: 600}); //, titleBarStyle: 'hidden'}); mainWindow.loadU...
import { app, BrowserWindow } from 'electron'; let mainWindow = null; let willQuit = false; function createWindow() { mainWindow = new BrowserWindow({width: 800, maxWidth: 800, height: 600, fullscreenable: false}); //, titleBarStyle: 'hidden'}); mainWindow.loadURL('file://' + __dirname + '/index.html'); } app.on...
Make window persist on close
Make window persist on close
JavaScript
mit
cassidoo/todometer,jdebarochez/todometer,jdebarochez/todometer,cassidoo/todometer
--- +++ @@ -1,16 +1,25 @@ import { app, BrowserWindow } from 'electron'; let mainWindow = null; +let willQuit = false; -app.on('window-all-closed', () => { - if (process.platform != 'darwin') { - app.quit(); - } +function createWindow() { + mainWindow = new BrowserWindow({width: 800, maxWidth: 800, height...
516e2ca05aefe603e3ad2bbff272af1e2506d339
generators/client/templates/src/main/webapp/app/home/_home.controller.js
generators/client/templates/src/main/webapp/app/home/_home.controller.js
'use strict'; angular.module('<%=angularAppName%>') .controller('HomeController', function ($scope, Principal, LoginService) { function getAccount() { Principal.identity().then(function(account) { $scope.account = account; $scope.isAuthenticated = Principal.isAut...
'use strict'; angular.module('<%=angularAppName%>') .controller('HomeController', function ($scope, Principal, LoginService) { function getAccount() { Principal.identity().then(function(account) { $scope.account = account; $scope.isAuthenticated = Principal.isAut...
Fix the link sign in
Fix the link sign in
JavaScript
apache-2.0
danielpetisme/generator-jhipster,atomfrede/generator-jhipster,nkolosnjaji/generator-jhipster,ruddell/generator-jhipster,hdurix/generator-jhipster,eosimosu/generator-jhipster,liseri/generator-jhipster,maniacneron/generator-jhipster,PierreBesson/generator-jhipster,atomfrede/generator-jhipster,yongli82/generator-jhipster,...
--- +++ @@ -13,4 +13,6 @@ $scope.$on('authenticationSuccess', function() { getAccount(); }); + + $scope.login = LoginService.open; });
0d23116dc716585310a41cbd083988406d1013b0
backend-services-push-hybrid-advanced/scripts/app.js
backend-services-push-hybrid-advanced/scripts/app.js
(function (global) { 'use strict'; var app = global.app = global.app || {}; var fixViewResize = function () { if (device.platform === 'iOS') { setTimeout(function() { $(document.body).height(window.innerHeight); }, 10); } }; var...
(function (global) { 'use strict'; var app = global.app = global.app || {}; app.everlive = new Everlive({ apiKey: app.config.everlive.apiKey, scheme: app.config.everlive.scheme }); var fixViewResize = function () { if (device.platform === 'iOS') { ...
Initialize earlier the Everlive instance.
Initialize earlier the Everlive instance.
JavaScript
bsd-2-clause
telerik/backend-services-push-hybrid-advanced,telerik/backend-services-push-hybrid-advanced
--- +++ @@ -3,6 +3,11 @@ var app = global.app = global.app || {}; + app.everlive = new Everlive({ + apiKey: app.config.everlive.apiKey, + scheme: app.config.everlive.scheme + }); + var fixViewResize = function () { if (device.platform === 'iOS') { @@ -3...
5bae5495c6e2518bb71ada45cc80fc98cbe94623
Gruntfile.js
Gruntfile.js
'use strict'; module.exports = function(grunt) { grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), //JS Source files src: { js: ['app/js/**/*.js'] }, //JS Test files test: { karmaConfig: 'test/karma.conf.js', unit: ['test/unit/**/*.js'] }, // Configure Lint\JSHint Task jshint:...
'use strict'; module.exports = function(grunt) { grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), //JS Source files src: { js: ['app/js/**/*.js'] }, //JS Test files test: { karmaConfig: 'test/karma.conf.js', unit: ['test/unit/**/*.js'] }, // Configure Lint\JSHint Task jshint:...
Change tab to 4 instead of 8
Change tab to 4 instead of 8
JavaScript
mit
joetravis/angular-grunt-karma-coverage-seed
--- +++ @@ -39,3 +39,4 @@ grunt.loadNpmTasks('grunt-contrib-jshint'); grunt.loadNpmTasks('grunt-karma'); }; +
a8ed7c84080df374058353ea93f404a203d8a6b7
js/index.js
js/index.js
/** * Pulsar * * Core UI components that should always be present. * * Jadu Ltd. */ // Fixes issue with dependencies that expect both $ and jQuery to be set window.jQuery = window.$ = require('jquery'); // Global UI components var $ = require('jquery'), deck = require('./deck'), dropdown =...
/** * Pulsar * * Core UI components that should always be present. * * Jadu Ltd. */ // Fixes issue with dependencies that expect both $ and jQuery to be set window.jQuery = window.$ = require('jquery'); // Global UI components var $ = require('jquery'), deck = require('./deck'), dropdown ...
Add datatable libs to browserify config
Add datatable libs to browserify config
JavaScript
mit
jadu/pulsar,jadu/pulsar,jadu/pulsar
--- +++ @@ -10,18 +10,21 @@ window.jQuery = window.$ = require('jquery'); // Global UI components -var $ = require('jquery'), - deck = require('./deck'), - dropdown = require('./dropdown'), - modal = require('./modal'), - tab = require('./tab'), - popover = require('./popo...
57e634af79738c46b25df71a12282763721a072c
js/index.js
js/index.js
module.exports = require('./load-image') require('./load-image-meta') require('./load-image-exif') require('./load-image-exif-map') require('./load-image-orientation')
module.exports = require('./load-image') require('./load-image-scale') require('./load-image-meta') require('./load-image-fetch') require('./load-image-exif') require('./load-image-exif-map') require('./load-image-orientation')
Include the scale and fetch plugins in the module.
Include the scale and fetch plugins in the module.
JavaScript
mit
blueimp/JavaScript-Load-Image,blueimp/JavaScript-Load-Image
--- +++ @@ -1,6 +1,8 @@ module.exports = require('./load-image') +require('./load-image-scale') require('./load-image-meta') +require('./load-image-fetch') require('./load-image-exif') require('./load-image-exif-map') require('./load-image-orientation')
47aefc0b32b1c008fb7cb2798b02cc7571d82380
test/fixtures/multiTargets/Gruntfile.js
test/fixtures/multiTargets/Gruntfile.js
module.exports = function(grunt) { 'use strict'; grunt.initConfig({ echo: { one: { message: 'one has changed' }, two: { message: 'two has changed' }, wait: { message: 'I waited 2s', wait: 2000 }, interrupt: { message: 'I was interrupted', wait: 2000 }, }, watch: { one: { ...
module.exports = function(grunt) { 'use strict'; grunt.initConfig({ echo: { one: { message: 'one has changed' }, two: { message: 'two has changed' }, wait: { message: 'I waited 2s', wait: 2000 }, interrupt: { message: 'I was interrupted', wait: 5000 }, }, watch: { one: { ...
Increase interrupt test wait time to 5s
Increase interrupt test wait time to 5s
JavaScript
mit
testcodefresh/grunt-contrib-watch,testsUser/1428079884569,Ariel-Isaacm/grunt-contrib-watch,chemoish/grunt-contrib-watch,mobify/grunt-contrib-watch,Rebzie/grunt-contrib-watch,gruntjs/grunt-contrib-watch,JimRobs/grunt-chokidar,RealSkillorg/1427451101848,testsUser/1428079877839,yuhualingfeng/grunt-contrib-watch,chrisirhc/...
--- +++ @@ -5,7 +5,7 @@ one: { message: 'one has changed' }, two: { message: 'two has changed' }, wait: { message: 'I waited 2s', wait: 2000 }, - interrupt: { message: 'I was interrupted', wait: 2000 }, + interrupt: { message: 'I was interrupted', wait: 5000 }, }, watch: { ...
84e9e1957356f730aa78632971cfaa7c1b16eaef
app/scripts/controllers/logachievement.js
app/scripts/controllers/logachievement.js
angular.module('worldOfWorkCraftApp') .controller('LogAchievementCtrl', function($scope, $routeParams, $location, $http, UserData) { $scope.challengeName = $routeParams.challengeName; // TODO replace with real service endpoint $http.get('http://localhost:8080/worldofworkcraft/learner/'+UserData.username...
angular.module('worldOfWorkCraftApp') .controller('LogAchievementCtrl', function($scope, $routeParams, $location, $http, UserData) { $scope.challengeName = $routeParams.challengeName; // TODO replace with real service endpoint $http.get('http://localhost:8080/worldofworkcraft/learner/'+UserData.username...
Fix URL for logging achievement to match RequestMapping
Fix URL for logging achievement to match RequestMapping
JavaScript
mit
StevenACoffman/WorldOfWorkCraft,StevenACoffman/WorldOfWorkCraft
--- +++ @@ -24,11 +24,11 @@ $scope.logAchievement = function(achievement, pointValue) { // TODO replace with real POST - console.log('Would have posted to achievements'); - - $http.post('http://localhost:8080/worldofworkcraft/logger', {uniqname:UserData.username, achievementName:achievem...
5e92ba10682c5e3419fd21c9f3e57a315c1e1e38
lib/configuration/hooks/i18n/index.js
lib/configuration/hooks/i18n/index.js
'use strict'; /** * Module dependencies */ // Node.js core. const path = require('path'); // Public node modules. const _ = require('lodash'); /** * i18n hook */ module.exports = function (strapi) { const hook = { /** * Default options */ defaults: { i18n: { defaultLocale: '...
'use strict'; /** * Module dependencies */ // Node.js core. const path = require('path'); // Public node modules. const _ = require('lodash'); /** * i18n hook */ module.exports = function (strapi) { const hook = { /** * Default options */ defaults: { i18n: { defaultLocale: '...
Update hook i18n to consider new locales filename
Update hook i18n to consider new locales filename
JavaScript
mit
lucusteen/strap,skelpook/strapi,evian42/starpies,lucusteen/strap,skelpook/strapi,wistityhq/strapi,evian42/starpies,evian42/starpies,wistityhq/strapi,skelpook/strapi,lucusteen/strap
--- +++ @@ -23,7 +23,7 @@ defaults: { i18n: { - defaultLocale: 'en', + defaultLocale: 'en_US', modes: ['query', 'subdomain', 'cookie', 'header', 'url', 'tld'], cookieName: 'locale' }
f4f9703afebfcb51bb6a7905b930feef160f41aa
src/utils/file-loader.js
src/utils/file-loader.js
VideoStream.utils.loadFileFromURL = function(file, dir = '.'){ if(!file){ return new Promise(function(resolve){resolve('');}); } var path = file; if(file.startsWith('/') == false && file.startsWith(/http(s):\/\/|file:\/\//) == false){ path = dir.endsWith('/') ? dir + file : dir + '/' + file; } retu...
VideoStream.utils.loadFileFromURL = function(file, dir = '.'){ if(!file){ return new Promise(function(resolve){resolve(null);}); } var path = file; if(file.startsWith('/') == false && file.startsWith(/http(s):\/\/|file:\/\//) == false){ path = dir.endsWith('/') ? dir + file : dir + '/' + file; } re...
Change return type on empty arguments
Change return type on empty arguments
JavaScript
apache-2.0
2b2/video-stream.js
--- +++ @@ -1,6 +1,6 @@ VideoStream.utils.loadFileFromURL = function(file, dir = '.'){ if(!file){ - return new Promise(function(resolve){resolve('');}); + return new Promise(function(resolve){resolve(null);}); } var path = file; if(file.startsWith('/') == false && file.startsWith(/http(s):\/\/|file:\/\//) ...
a08e21fb52b0c46b8b90221719fb54c56f06d317
tests/unit/mixins/service-cache-test.js
tests/unit/mixins/service-cache-test.js
import Ember from 'ember'; import ServiceCacheMixin from '../../../mixins/service-cache'; import { module, test } from 'qunit'; module('Unit | Mixin | service cache'); // Replace this with your real tests. test('it works', function(assert) { var ServiceCacheObject = Ember.Object.extend(ServiceCacheMixin); var sub...
import Ember from 'ember'; import ServiceCacheMixin from '../../../mixins/service-cache'; import { module, test } from 'qunit'; import { Post } from 'dummy/tests/helpers/resources'; let sandbox, subject; module('Unit | Mixin | service cache', { beforeEach() { sandbox = window.sinon.sandbox.create(); let Ser...
Add unit tests for service cache mixin
Add unit tests for service cache mixin
JavaScript
mit
Rahien/ember-jsonapi-resources,pixelhandler/ember-jsonapi-resources,kmkamruzzaman/ember-jsonapi-resources,greyhwndz/ember-jsonapi-resources,proteamer/ember-jsonapi-resources,rwjblue/ember-jsonapi-resources,Rahien/ember-jsonapi-resources,greyhwndz/ember-jsonapi-resources,proteamer/ember-jsonapi-resources,pixelhandler/em...
--- +++ @@ -1,20 +1,54 @@ import Ember from 'ember'; import ServiceCacheMixin from '../../../mixins/service-cache'; import { module, test } from 'qunit'; +import { Post } from 'dummy/tests/helpers/resources'; -module('Unit | Mixin | service cache'); +let sandbox, subject; -// Replace this with your real tests....
41c4f7f557aa24983a6367a715bdfcc3f4e7ff78
test.js
test.js
'use strict'; var test = require('ava'); var githubRepos = require('./'); test('user with more than 100 repos', function (t) { t.plan(2); var token = '523ef691191741c99d5afbcfe58079bfa0038771'; githubRepos('kevva', {token: token}, function (err, data) { t.assert(!err, err); t.assert(data.length, data.length);...
'use strict'; var test = require('ava'); var githubRepos = require('./'); test('user with more than 100 repos', function (t) { t.plan(2); var token = '523ef691191741c99d5afbcfe58079bfa0038771'; githubRepos('kevva', {token: token}, function (err, data) { t.assert(!err, err); t.assert(data.length, data.length);...
Test two subsequent requests get the same data
Test two subsequent requests get the same data
JavaScript
mit
forivall/github-repositories,kevva/github-repositories
--- +++ @@ -22,3 +22,18 @@ t.assert(data.length, data.length); }); }); + +test('two requests should return same data', function (t) { + t.plan(5); + var token = '523ef691191741c99d5afbcfe58079bfa0038771'; + + githubRepos('octocat', {token: token}, function (err, data1) { + t.assert(!err, err); + t.assert(data...
dec57486ad76b180f7bd4c1e4541d046677addcf
src/projects/ll-links.js
src/projects/ll-links.js
import { inject, bindable, bindingMode } from 'aurelia-framework'; import { EventAggregator } from 'aurelia-event-aggregator'; @inject(EventAggregator) export class LlLinks { @bindable({ defaultBindingMode: bindingMode.twoWay }) source; constructor(eventAggregator) { this.ea = eventAggregator; ...
import { inject, bindable, bindingMode } from 'aurelia-framework'; import { EventAggregator } from 'aurelia-event-aggregator'; @inject(EventAggregator) export class LlLinks { @bindable({ defaultBindingMode: bindingMode.twoWay }) source; constructor(eventAggregator) { this.ea = eventAggregator; ...
Fix links on project not saved because of failed init
Fix links on project not saved because of failed init
JavaScript
mit
GETLIMS/LIMS-Frontend,GETLIMS/LIMS-Frontend
--- +++ @@ -10,7 +10,7 @@ this.link = {}; } - attached() { + sourceChanged() { if (this.source && !this.source.links) { this.source.links = []; }
86222918e01b9ab91b8a14c2c8990857b944f953
src/routes/case/utils.js
src/routes/case/utils.js
/* @flow */ const CONSUMER = 'Consumer'; const NON_CONSUMER = 'Non Consumer'; const days = (date: number) => date / 1000 / 60 / 60 / 24; const ConsumerParty = { type: 'Consumer', name: 'Consumer', }; function partyType(initiatingParty: ?string) { switch (initiatingParty) { case 'Non Consumer': case 'B...
/* @flow */ const CONSUMER = 'Consumer'; const NON_CONSUMER = 'Non Consumer'; const days = (date: number) => Math.floor(date / 1000 / 60 / 60 / 24); const ConsumerParty = { type: 'Consumer', name: 'Consumer', }; function partyType(initiatingParty: ?string) { switch (initiatingParty) { case 'Non Consumer':...
Fix date display on case
Fix date display on case
JavaScript
mit
LevelPlayingField/levelplayingfield,LevelPlayingField/levelplayingfield
--- +++ @@ -2,7 +2,7 @@ const CONSUMER = 'Consumer'; const NON_CONSUMER = 'Non Consumer'; -const days = (date: number) => date / 1000 / 60 / 60 / 24; +const days = (date: number) => Math.floor(date / 1000 / 60 / 60 / 24); const ConsumerParty = { type: 'Consumer',
264e9a53b02f983f2131123eb02a2c17b37bf3b8
lib/plugin/theme/renderable/renderable.js
lib/plugin/theme/renderable/renderable.js
"use strict"; const merge = require('../../../util/merge'); const {coroutine: co} = require('bluebird'); class Renderable { constructor(data) { this.parent = undefined; this.data = data || {}; this.id = this.constructor.id; this.name = this.constructor.name; this.templateFile = this.constructor....
"use strict"; const merge = require('../../../util/merge'); const {coroutine: co} = require('bluebird'); class Renderable { constructor(data) { this.parent = undefined; this.data = data || {}; this.id = this.constructor.id; this.name = (data && data.name) ? data.name : this.constructor.name; thi...
Allow Renderable name to be included in initialization data
Allow Renderable name to be included in initialization data
JavaScript
mit
coreyp1/defiant,coreyp1/defiant
--- +++ @@ -8,7 +8,7 @@ this.parent = undefined; this.data = data || {}; this.id = this.constructor.id; - this.name = this.constructor.name; + this.name = (data && data.name) ? data.name : this.constructor.name; this.templateFile = this.constructor.templateFile; this.variables = this.co...
4cdab30201d079b0b7112c14ec56615e94155692
tasks/prepare-package.js
tasks/prepare-package.js
const fs = require('fs'); const path = require('path'); const pkg = require('../package.json'); const buildDir = path.resolve(__dirname, '../build/ol'); // update the version number in util.js const utilPath = path.join(buildDir, 'util.js'); const versionRegEx = /const VERSION = '(.*)';/g; const utilSrc = fs.readFile...
const fs = require('fs'); const path = require('path'); const pkg = require('../package.json'); const buildDir = path.resolve(__dirname, '../build/ol'); // update the version number in util.js const utilPath = path.join(buildDir, 'util.js'); const versionRegEx = /var VERSION = '(.*)';/g; const utilSrc = fs.readFileSy...
Replace VERSION correctly in transpiled code
Replace VERSION correctly in transpiled code
JavaScript
bsd-2-clause
geekdenz/openlayers,ahocevar/openlayers,stweil/ol3,adube/ol3,mzur/ol3,oterral/ol3,tschaub/ol3,ahocevar/openlayers,bjornharrtell/ol3,fredj/ol3,geekdenz/ol3,geekdenz/openlayers,stweil/openlayers,ahocevar/ol3,oterral/ol3,fredj/ol3,mzur/ol3,tschaub/ol3,oterral/ol3,openlayers/openlayers,stweil/openlayers,tschaub/ol3,geekden...
--- +++ @@ -6,8 +6,8 @@ // update the version number in util.js const utilPath = path.join(buildDir, 'util.js'); -const versionRegEx = /const VERSION = '(.*)';/g; -const utilSrc = fs.readFileSync(utilPath, 'utf-8').replace(versionRegEx, `const VERSION = '${pkg.version}';`); +const versionRegEx = /var VERSION = '(...
8c12936d9664b80716344c8f7e389cf2efcefeb7
frontend/src/components/chat/navigation/DeleteAccountForm.js
frontend/src/components/chat/navigation/DeleteAccountForm.js
import React, { Component } from 'react'; import {Button} from 'react-bootstrap'; class DeleteAccountForm extends Component { constructor(props) { super(props); this.state = { displayDeleteAccountMessage: false }; } handleDeleteAccountButton = () => { this.setSt...
import React, { Component } from 'react'; import {Button} from 'react-bootstrap'; import * as config from '../../config'; import axios from 'axios'; axios.defaults.withCredentials = true; class DeleteAccountForm extends Component { constructor(props) { super(props); this.state = { disp...
Call backend view on delete account frontend
Call backend view on delete account frontend
JavaScript
mit
dimkarakostas/unimeet,dimkarakostas/unimeet,dimkarakostas/unimeet,dimkarakostas/unimeet
--- +++ @@ -1,5 +1,9 @@ import React, { Component } from 'react'; import {Button} from 'react-bootstrap'; +import * as config from '../../config'; + +import axios from 'axios'; +axios.defaults.withCredentials = true; class DeleteAccountForm extends Component { constructor(props) { @@ -13,8 +17,20 @@ ...
27e999ba0fce125acc05c651ffe27811e639360a
static/js/services/dialogs.js
static/js/services/dialogs.js
/* * Spreed WebRTC. * Copyright (C) 2013-2014 struktur AG * * This file is part of Spreed WebRTC. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, either version 3 of the License...
/* * Spreed WebRTC. * Copyright (C) 2013-2014 struktur AG * * This file is part of Spreed WebRTC. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, either version 3 of the License...
Update dialog service to use defaults of angular ui-bootstrap.
Update dialog service to use defaults of angular ui-bootstrap.
JavaScript
agpl-3.0
tymiles003/spreed-webrtc,fancycode/spreed-webrtc,gerzhan/spreed-webrtc,theurere/spreed-webrtc,shelsonjava/spreed-webrtc,fancycode/spreed-webrtc,gerzhan/spreed-webrtc,gerzhan/spreed-webrtc,tymiles003/spreed-webrtc,shelsonjava/spreed-webrtc,gerzhan/spreed-webrtc,shelsonjava/spreed-webrtc,gerzhan/spreed-webrtc,shelsonjava...
--- +++ @@ -30,8 +30,8 @@ return $modal.open({ templateUrl: url, controller: controller, - keyboard : opts.kb, - backdrop : opts.bd, + keyboard : opts.kb === undefined ? true : opts.kb, + backdrop : opts.bd === undefined ? true : opts.bd, windowClass: opts.wc, size: opts.w...
aaaa6b05c25c3cd7c24d54bfbf906ee77f109f90
spec/process-tree.spec.js
spec/process-tree.spec.js
// Copyright (c) 2017 The Regents of the University of Michigan. // All Rights Reserved. Licensed according to the terms of the Revised // BSD License. See LICENSE.txt for details. const processTree = require("../lib/process-tree"); let treeSpy = function(logTree, runningProcess) { let spy = { }; spy.tree = logT...
// Copyright (c) 2017 The Regents of the University of Michigan. // All Rights Reserved. Licensed according to the terms of the Revised // BSD License. See LICENSE.txt for details. const processTree = require("../lib/process-tree"); let treeSpy = function(logTree, runningProcess) { let spy = { }; spy.tree = logT...
Use async/await instead of Promise().then
:art: Use async/await instead of Promise().then
JavaScript
bsd-3-clause
daaang/awful-mess
--- +++ @@ -19,11 +19,9 @@ }; let spy; -let spyOnTree = function(done, setup) { - processTree(treeSpy, setup).then(logger => { - spy = logger; - done(); - }); +let spyOnTree = async function(done, setup) { + spy = await processTree(treeSpy, setup) + done(); }; describe("a processTree with no childre...
da007b0590fb4540bc1c8b5d32a140ef57ccf720
lib/IntersectionParams.js
lib/IntersectionParams.js
/** * * IntersectionParams.js * * copyright 2002, Kevin Lindsey * */ /** * IntersectionParams * * @param {String} name * @param {Array<Point2D} params * @returns {IntersectionParams} */ function IntersectionParams(name, params) { this.init(name, params); } /** * init * * @param {String} n...
/** * * IntersectionParams.js * * copyright 2002, Kevin Lindsey * */ /** * IntersectionParams * * @param {String} name * @param {Array<Point2D} params * @returns {IntersectionParams} */ function IntersectionParams(name, params) { this.init(name, params); } !function () { IntersectionParams...
Make IntersectionPrams standard type strings available as constants.
Make IntersectionPrams standard type strings available as constants.
JavaScript
bsd-3-clause
Quazistax/kld-intersections,effektif/svg-intersections
--- +++ @@ -17,6 +17,24 @@ this.init(name, params); } +!function () { + IntersectionParams.TYPE = {}; + var t = IntersectionParams.TYPE; + var d = Object.defineProperty; + + d(t, 'LINE', { value: 'Line' }); + d(t, 'RECT', { value: 'Rectangle' }); + d(t, 'ROUNDRECT', { value: 'RoundRectangle'...
7c2a06e6f1d47874b9e394aec4383f5c3a066ab4
public/src/core/track-network.js
public/src/core/track-network.js
/* @autor: Robin Giles Ribera * Module: TrackNetwork * Used on trackevent.js */ define( [], function() { console.log("[TrackNetwork][***###***]"); function TrackNetwork() { this.drawLine = function() { console.log("[DrawLine][***###***]"); var canvasElem = document.getElementById("tracks-container-canva...
/* @autor: Robin Giles Ribera * Module: TrackNetwork * Used on trackevent.js */ define( [], function() { function TrackNetwork() { //Adds a line in the drawing loop of the background canvas this.addLine = function(start_x, start_y, end_x, end_y, color) { lines.push({ start:{ x: start_x, y: s...
Add method 'AddLine' to the Module TrackNetwork
Add method 'AddLine' to the Module TrackNetwork
JavaScript
mit
robinparadise/videoquizmaker,robinparadise/videoquizmaker
--- +++ @@ -5,9 +5,23 @@ */ define( [], function() { - console.log("[TrackNetwork][***###***]"); function TrackNetwork() { + + //Adds a line in the drawing loop of the background canvas + this.addLine = function(start_x, start_y, end_x, end_y, color) { + lines.push({ + start:{ + x: start_x, + y...
cfdc132456e7269377974206939bc0d094f0848b
test/e2e/pages/invite.js
test/e2e/pages/invite.js
'use strict'; var Chance = require('chance'), chance = new Chance(); class InvitePage { constructor () { this.titleEl = element(by.css('.project-title')); this.message = chance.sentence(); this.AddPeopleBtn = element(by.css('.invite-button')); this.inviteBtn = element(by.css('[ng-click="invi...
'use strict'; var Chance = require('chance'), chance = new Chance(); class InvitePage { constructor () { this.titleEl = element(by.css('.project-title')); this.message = chance.sentence(); this.AddPeopleBtn = element(by.css('.invite-button')); this.inviteBtn = element(by.css('[ng-click="invi...
Add missing function calls in tests
Add missing function calls in tests
JavaScript
agpl-3.0
Grasia/teem,P2Pvalue/teem,P2Pvalue/teem,P2Pvalue/pear2pear,Grasia/teem,Grasia/teem,P2Pvalue/teem,P2Pvalue/pear2pear
--- +++ @@ -35,9 +35,9 @@ this.inputInvite.sendKeys(who); - browser.wait(protractor.ExpectedConditions.presenceOf(this.inviteOption)); + browser.wait(protractor.ExpectedConditions.presenceOf(this.inviteOption())); - browser.wait(protractor.ExpectedConditions.visibilityOf(this.inviteOption)); + ...
8bda805d45b23c5c46988acf2d27863b0ed4092a
test/git-diff-archive.js
test/git-diff-archive.js
"use strict"; const assert = require("power-assert"); const rimraf = require("rimraf"); const unzip = require("unzip"); const gitDiffArchive = require("../"); const ID1 = ""; const ID2 = ""; const OUTPUT_DIR = `${__dirname}/tmp`; const OUTPUT_PATH = `${OUTPUT_DIR}/output.zip`; describe("git-diff-archive", () => { ...
"use strict"; const fs = require("fs"); const path = require("path"); const assert = require("power-assert"); const glob = require("glob"); const rimraf = require("rimraf"); const unzip = require("unzip"); const gitDiffArchive = require("../"); const ID1 = "b148b54"; const ID2 = "acd6e6d"; const EMPTY_ID1 = "f74c8e2"...
Add promise & create zip tests
Add promise & create zip tests
JavaScript
mit
tsuyoshiwada/git-diff-archive
--- +++ @@ -1,12 +1,17 @@ "use strict"; +const fs = require("fs"); +const path = require("path"); const assert = require("power-assert"); +const glob = require("glob"); const rimraf = require("rimraf"); const unzip = require("unzip"); const gitDiffArchive = require("../"); -const ID1 = ""; -const ID2 = ""; +...
de2fb2c260720ae3142066f2a3b611b7ba922af6
spec/specs.js
spec/specs.js
describe('pingPong', function() { it("is true for a number that is divisible by 3", function() { expect(pingPong(6)).to.equal(true); }); it("is true for a number that is divisible by 5", function() { expect(pingPong(10)).to.equal(true); }); it("is false for a number that is not divisible by 3 or 5", f...
describe('pingPong', function() { it("returns ping for a number that is divisible by 3", function() { expect(pingPong(6)).to.equal("ping"); }); it("returns pong for a number that is divisible by 5", function() { expect(pingPong(10)).to.equal("pong"); }); it("returns ping pong for a number that is divi...
Change spec test according to new javascript test code
Change spec test according to new javascript test code
JavaScript
mit
kcmdouglas/pingpong,kcmdouglas/pingpong
--- +++ @@ -1,9 +1,12 @@ describe('pingPong', function() { - it("is true for a number that is divisible by 3", function() { - expect(pingPong(6)).to.equal(true); + it("returns ping for a number that is divisible by 3", function() { + expect(pingPong(6)).to.equal("ping"); }); - it("is true for a number th...
cc345fd8262974e3cc192c71199c6555d06bb161
examples/2DScrolling/2DScrolling.js
examples/2DScrolling/2DScrolling.js
var scrollingExample = { box: { id: "clip", className: "clip", children: { id: "image", className: "image" } }, constraints: [ "clip.left == 0", "clip.top == 0", "clip.right == 300", "clip.bottom == 300", // Spec...
var scrollingExample = { box: { id: "clip", className: "clip", children: { id: "image", className: "image" } }, constraints: [ "clip.left == 0", "clip.top == 0", "clip.right == 300", "clip.bottom == 300", // Spec...
Clean up weak initial position constraints.
Clean up weak initial position constraints.
JavaScript
apache-2.0
iamralpht/slalom,iamralpht/slalom,iamralpht/slalom
--- +++ @@ -15,8 +15,8 @@ // Specify the bounds of the image and hint its position. "image.right == image.left + 800 !strong", "image.bottom == image.top + 800 !strong", - "image.left == 0",// !weak", - "image.top == 0",// !weak" + "image.left == 0 !weak", + "ima...
4d39b6e4e1334d571e8e03823740a7b5f8ebf218
routes/questionRoute.js
routes/questionRoute.js
var QuestionCtrl = require('../controllers/questionCtrl.js'); module.exports = function(express, app){ var router = express.Router(); router.post('/', QuestionCtrl.create); router.get('/', QuestionCtrl.get); router.put('/status', QuestionCtrl.set); app.use('/questions', router); };
var QuestionCtrl = require('../controllers/questionCtrl.js'); module.exports = function(express, app) { var router = express.Router(); router.post('/', QuestionCtrl.create); router.get('/', QuestionCtrl.get); router.post('/status', QuestionCtrl.set); app.use('/questions', router); };
Use post over put for the status change api
Use post over put for the status change api
JavaScript
mit
EasyAce-Edu/easyace-api
--- +++ @@ -1,12 +1,12 @@ var QuestionCtrl = require('../controllers/questionCtrl.js'); -module.exports = function(express, app){ +module.exports = function(express, app) { var router = express.Router(); router.post('/', QuestionCtrl.create); router.get('/', QuestionCtrl.get); - router.put('/status',...
edb127f1c41dfb84bcb367cf4076cb25bda52727
tests/specs/math.test.js
tests/specs/math.test.js
define(['base'], function (base) { "use strict"; var math = base.math; describe("math", function () { it(".factorial()", function () { expect(typeof math.factorial).toBe('function'); [[0,1], [1,1], [2,2], [3,6], [4,24], [5,120], [6,720]].forEach(function (test) { expect(math.factorial(test[0])).toBe(te...
define(['base'], function (base) { "use strict"; var math = base.math; describe("math", function () { it(".clamp()", function () { expect(typeof math.clamp).toBe('function'); for (var i = -2; i < 5; ++i) { for (var min = -2; min < 3; ++min) { for (var max = min + 1; max < 4; ++max) { var cla...
Test cases for math.sign() and math.clamp()
Test cases for math.sign() and math.clamp()
JavaScript
mit
LeonardoVal/creatartis-base,LeonardoVal/creatartis-base
--- +++ @@ -2,6 +2,30 @@ var math = base.math; describe("math", function () { + it(".clamp()", function () { + expect(typeof math.clamp).toBe('function'); + for (var i = -2; i < 5; ++i) { + for (var min = -2; min < 3; ++min) { + for (var max = min + 1; max < 4; ++max) { + var clamped = math.cl...
1999ff53d63ec55759b6ccb9109904a467585aa9
src/adapters/cli/serve.js
src/adapters/cli/serve.js
#!/usr/bin/env node /* @flow */ import { serve } from 'aspect/src/adapters/server' async function run(): Promise<void> { const server = await serve({ port: 'PORT' in process.env ? Number(process.env.PORT) : null }) console.log(`Running server at http://127.0.0.1:${server.port}`) } run()
#!/usr/bin/env node /* @flow */ import { serve } from 'aspect/src/adapters/server' import { parseEnv, optional } from 'env' async function run(): Promise<void> { const config = parseEnv({ PORT: optional(Number) }) const server = await serve({ port: config.PORT }) console.log(`Running server at http:...
Use env library to parse config out of environment
Use env library to parse config out of environment
JavaScript
mit
vinsonchuong/aspect,vinsonchuong/aspect
--- +++ @@ -1,10 +1,15 @@ #!/usr/bin/env node /* @flow */ import { serve } from 'aspect/src/adapters/server' +import { parseEnv, optional } from 'env' async function run(): Promise<void> { + const config = parseEnv({ + PORT: optional(Number) + }) + const server = await serve({ - port: 'PORT' in proce...
7ffa7a9528767ff915e1179e7e6dd7eec66e5afc
utils/slimer-script.js
utils/slimer-script.js
/*global slimer */ var webpage = require("webpage").create(); var messages = []; var system = require("system"); var args = system.args; var url = args[1] || ""; var thumbPath = args[2] || ""; webpage.onConsoleMessage = function(message, line, file) { console.log(message); }; webpage.onError = function(message) ...
/*global slimer */ var webpage = require("webpage").create(); var messages = []; var system = require("system"); var args = system.args; var url = args[1] || ""; var thumbPath = args[2] || ""; webpage.onConsoleMessage = function(message, line, file) { console.log(message); }; webpage.onError = function(message) ...
Remove example info text before rendering
Remove example info text before rendering
JavaScript
mit
variablestudio/pex-examples,pex-gl/pex-examples
--- +++ @@ -24,9 +24,18 @@ webpage.reload(); setTimeout(function() { + webpage.evaluate(function () { + var info = document.querySelector('#info'); + //info.innerHTML = 'dupa'; + info.parentNode.removeChild(info); + }); + }, 100); + + + setTimeout(function() { web...
af100fdb60b7d5bce620249be4a6370d345071e1
packages/standard-minifier-css/package.js
packages/standard-minifier-css/package.js
Package.describe({ name: 'standard-minifier-css', version: '1.3.3-beta.1', summary: 'Standard css minifier used with Meteor apps by default.', documentation: 'README.md' }); Package.registerBuildPlugin({ name: "minifyStdCSS", use: [ 'minifier-css@1.2.14' ], npmDependencies: { "source-map": "0.5...
Package.describe({ name: 'standard-minifier-css', version: '1.3.3', summary: 'Standard css minifier used with Meteor apps by default.', documentation: 'README.md' }); Package.registerBuildPlugin({ name: "minifyStdCSS", use: [ 'minifier-css@1.2.14' ], npmDependencies: { "source-map": "0.5.6", ...
Remove -beta.n suffix from standard-minifier-css before republishing.
Remove -beta.n suffix from standard-minifier-css before republishing.
JavaScript
mit
Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor
--- +++ @@ -1,6 +1,6 @@ Package.describe({ name: 'standard-minifier-css', - version: '1.3.3-beta.1', + version: '1.3.3', summary: 'Standard css minifier used with Meteor apps by default.', documentation: 'README.md' });
7b02cbde4f8e6118597e940cbc332251a86199b9
demos/demos.js
demos/demos.js
// Demo components. import "./src/CalendarDayMoonPhase.js"; import "./src/CarouselComboBox.js"; import "./src/CountryListBox.js"; import "./src/CustomCarousel2.js"; import "./src/CustomDrawer.js"; import "./src/FocusVisibleTest.js"; import "./src/LabeledColorSwatch.js"; import "./src/LocaleSelector.js"; import "./src/M...
// Demo components. import "./src/CalendarDayMoonPhase.js"; import "./src/CarouselComboBox.js"; import "./src/CountryListBox.js"; import "./src/CustomCarousel2.js"; import "./src/CustomDrawer.js"; import "./src/LabeledColorSwatch.js"; import "./src/LocaleSelector.js"; import "./src/MessageListBox.js"; import "./src/Mes...
Remove reference to old demo.
Remove reference to old demo.
JavaScript
mit
JanMiksovsky/elix,elix/elix,JanMiksovsky/elix,elix/elix
--- +++ @@ -4,7 +4,6 @@ import "./src/CountryListBox.js"; import "./src/CustomCarousel2.js"; import "./src/CustomDrawer.js"; -import "./src/FocusVisibleTest.js"; import "./src/LabeledColorSwatch.js"; import "./src/LocaleSelector.js"; import "./src/MessageListBox.js";
9cea73194d1274f475fae552ba1cf2ac7a2a4ded
dist/store_watch_mixin.js
dist/store_watch_mixin.js
var StoreWatchMixin = function(stores, options) { if (!options) options = {}; options.addListenerFnName = options.addListenerFnName || 'addChangeListener'; options.removeListenerFnName = options.removeListenerFnName || 'removeChangeListener'; options.handlerName = options.handlerName || 'onStoreChange'; re...
var StoreWatchMixin = function(stores, options) { if (!options) options = {}; options.addListenerFnName = options.addListenerFnName || 'addChangeListener'; options.removeListenerFnName = options.removeListenerFnName || 'removeChangeListener'; options.handlerName = options.handlerName || 'onStoreChange'; re...
Throw instead of warning when the handler is not declared
Throw instead of warning when the handler is not declared
JavaScript
mit
rafaelchiti/flux-commons-store-watch-mixin
--- +++ @@ -9,7 +9,8 @@ return { componentDidMount: function() { if (!this[options.handlerName]) { - console.log("WARNING: The handler required for the store listener was not found."); + throw new Error("Handler not found on the view. " + + "Handler with name: [" + options.handle...
da316224e7a440d30c944a0ecd17e65e1d7528d9
api/image.js
api/image.js
var http = require('http'); var request = require('request').defaults({ encoding: null }); var url = require('url'); var h = { 'Referer': null, 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' }; function error (response) { response.writeHead(404); response.end(); retur...
var http = require('http'); var request = require('request').defaults({ encoding: null }); var headers = { 'Referer': null, 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' }; var result; function error (response) { response.writeHead(404); response.end(); return; } h...
Update API to do -all- the logic
Update API to do -all- the logic
JavaScript
mit
jillesme/ng-movies
--- +++ @@ -1,11 +1,12 @@ var http = require('http'); var request = require('request').defaults({ encoding: null }); -var url = require('url'); -var h = { +var headers = { 'Referer': null, 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' }; + +var result; function e...
9c1345b65035216149de35a8959fd6d086c65d44
website/static/js/pages/profile-page.js
website/static/js/pages/profile-page.js
/** * Initialization code for the profile page. Currently, this just loads the necessary * modules and puts the profile module on the global context. * */ var $ = require('jquery'); var m = require('mithril'); require('../project.js'); // Needed for nodelists to work require('../components/logFeed.js'); // Needed f...
/** * Initialization code for the profile page. Currently, this just loads the necessary * modules and puts the profile module on the global context. * */ var $ = require('jquery'); var m = require('mithril'); require('../project.js'); // Needed for nodelists to work require('../components/logFeed.js'); // Needed f...
Stop mounting quickfiles if no quickfiles
Stop mounting quickfiles if no quickfiles
JavaScript
apache-2.0
TomBaxter/osf.io,icereval/osf.io,aaxelb/osf.io,CenterForOpenScience/osf.io,adlius/osf.io,Johnetordoff/osf.io,TomBaxter/osf.io,cslzchen/osf.io,caseyrollins/osf.io,crcresearch/osf.io,HalcyonChimera/osf.io,baylee-d/osf.io,binoculars/osf.io,baylee-d/osf.io,Johnetordoff/osf.io,felliott/osf.io,aaxelb/osf.io,erinspace/osf.io,...
--- +++ @@ -21,6 +21,8 @@ $(document).ready(function () { m.mount(document.getElementById('publicProjects'), m.component(publicNodes.PublicNodes, {user: ctx.user, nodeType: 'projects'})); m.mount(document.getElementById('publicComponents'), m.component(publicNodes.PublicNodes, {user: ctx.user, nodeType: 'c...
66db7e0c65a87a3b5a613b39b0cb9fc093e67609
client/controllers/marketing/marketing.js
client/controllers/marketing/marketing.js
MarketingController = RouteController.extend({ waitOn: function () { return Meteor.subscribe('marketing'); }, action: function () { var indexPage = Pages.findOne(); if (indexPage) { Router.go('pages.show', { _id: indexPage.slug || indexPage._id }); } else { this.render(); } } })...
MarketingController = RouteController.extend({ waitOn: function () { return Meteor.subscribe('marketing'); }, action: function () { var indexPage = Pages.findOne({ type: 'INDEX' }); if (indexPage) { Router.go('pages.show', { _id: indexPage.slug || indexPage._id }); } else { this.rende...
Add constrain type index for home page
Add constrain type index for home page
JavaScript
mit
bojicas/letterhead,bojicas/letterhead
--- +++ @@ -4,7 +4,7 @@ }, action: function () { - var indexPage = Pages.findOne(); + var indexPage = Pages.findOne({ type: 'INDEX' }); if (indexPage) { Router.go('pages.show', { _id: indexPage.slug || indexPage._id }); } else {
8a13fac752a4eb37f7b28a7baa938b5228bb9d6b
webpack.config.react-responsive-select.js
webpack.config.react-responsive-select.js
const nodeExternals = require('webpack-node-externals'); const path = require('path'); const entry = './src/ReactResponsiveSelect.js'; const library = 'ReactResponsiveSelect'; const module = { rules: [{ test: /\.js$/, loader: 'babel-loader', exclude: path.resolve(__dirname, 'node_modules') }] }; modul...
const nodeExternals = require('webpack-node-externals'); const path = require('path'); const entry = './src/ReactResponsiveSelect.js'; const library = 'ReactResponsiveSelect'; const moduleConfig = { rules: [{ test: /\.js$/, loader: 'babel-loader', exclude: path.resolve(__dirname, 'node_modules') }] }; ...
Remove name conflict module => moduleConfig
Remove name conflict module => moduleConfig
JavaScript
mit
benbowes/react-responsive-select,benbowes/react-responsive-select,benbowes/react-responsive-select
--- +++ @@ -3,7 +3,7 @@ const entry = './src/ReactResponsiveSelect.js'; const library = 'ReactResponsiveSelect'; -const module = { +const moduleConfig = { rules: [{ test: /\.js$/, loader: 'babel-loader', @@ -14,7 +14,7 @@ module.exports = [{ entry, - module, + module: moduleConfig, output:...
87f37e3b1f94aaae56ae59dfd775f08abe15f7bc
server/models/bikeshed.js
server/models/bikeshed.js
/** * Bikeshed model */ import Joi from 'joi' import * as utils from './utils' export const INDEXES = ['userId', 'createdAt'] export const TABLE = 'bikesheds' export const TYPE = 'Bikeshed' export const FileListItemSchema = Joi.object().keys({ fieldname: Joi.string(), originalname: Joi.string(), encoding: Joi...
/** * Bikeshed model */ import Joi from 'joi' import BaseModel from './model' const FileListItemSchema = Joi.object() .keys({ fieldname: Joi.string(), originalname: Joi.string(), encoding: Joi.string(), mimetype: Joi.string(), size: Joi.number(), key: Joi.string() }) const BikeshedSchema = Joi.object() ...
Update Bikeshed to use BaseModel
Update Bikeshed to use BaseModel
JavaScript
apache-2.0
cesarandreu/bshed,cesarandreu/bshed
--- +++ @@ -2,13 +2,10 @@ * Bikeshed model */ import Joi from 'joi' -import * as utils from './utils' +import BaseModel from './model' -export const INDEXES = ['userId', 'createdAt'] -export const TABLE = 'bikesheds' -export const TYPE = 'Bikeshed' - -export const FileListItemSchema = Joi.object().keys({ +cons...
98512d9d51ab29b6bf9cf57a90958adc31ddc2a3
app/routes/index.js
app/routes/index.js
'use strict'; var path = process.cwd(); module.exports = function (app) { app.route('/') .get(function (req, res) { res.sendFile(path + '/public/index.html'); }); app.route('/:time') .get(function(req, res) { console.log("Reached the regexp route for", req.url); let timeStr = req.params.time; ...
'use strict'; var path = process.cwd(); module.exports = function (app) { app.route('/') .get(function (req, res) { res.sendFile(path + '/public/index.html'); }); app.route('/:time') .get(function(req, res) { console.log("Reached the regexp route for", req.url); let timeStr = req.params.time; ...
Return null for the the properties if the string cannot be parsed as a date
Return null for the the properties if the string cannot be parsed as a date
JavaScript
mit
paperbagcorner/timestamp-microservice,paperbagcorner/timestamp-microservice
--- +++ @@ -15,7 +15,7 @@ let timeStr = req.params.time; console.log(timeStr); let timestamp; - let result = {}; + let result = {unix: null, natural: null}; console.log("Time string:", timeStr); // If the time string contains non-numeric characters, attempt to parse it as as time string.
cdc1a125c60dad38fb52403b8c6bea79d7fcffbd
renderer-process/scrubVideoToTimestamp.js
renderer-process/scrubVideoToTimestamp.js
const moment = require('moment') const scrubVideoToTimestamp = function () { let player = document.getElementsByTagName('video')[0] let timestamp = this.innerHTML const timeToGoTo = moment.duration({ seconds: timestamp.split(':')[1], minutes: timestamp.split(':')[0] }).asSeconds() console.log(timest...
const moment = require('moment') const scrubVideoToTimestamp = function () { let player = document.getElementsByTagName('video')[0] let timestamp = this.innerHTML const timeToGoTo = moment .duration(timestamp) .asSeconds() console.log(timestamp) console.log(timeToGoTo) if (player !== null && play...
Use momentjs duration to parse timestamps
Use momentjs duration to parse timestamps
JavaScript
agpl-3.0
briandk/transcriptase,briandk/transcriptase
--- +++ @@ -3,10 +3,9 @@ const scrubVideoToTimestamp = function () { let player = document.getElementsByTagName('video')[0] let timestamp = this.innerHTML - const timeToGoTo = moment.duration({ - seconds: timestamp.split(':')[1], - minutes: timestamp.split(':')[0] - }).asSeconds() + const timeToGoTo =...
5eb79eb1492fdf3bd759bf7c04a57d516ad0581f
src/deploy.js
src/deploy.js
#!/bin/node import path from 'path'; import fs from 'fs'; import {all as rawMetadata} from '../katas/es6/language/__raw-metadata__'; import {writeToFileAsJson} from './_external-deps/filesystem'; import MetaData from './metadata.js'; import FlatMetaData from './flat-metadata'; import GroupedMetaData from './grouped-m...
#!/bin/node import path from 'path'; import fs from 'fs'; import {all as rawMetadata} from '../katas/es6/language/__raw-metadata__'; import {writeToFileAsJson} from './_external-deps/filesystem'; import MetaData from './metadata.js'; import FlatMetaData from './flat-metadata'; import GroupedMetaData from './grouped-m...
Fix the path because the file had moved.
Fix the path because the file had moved.
JavaScript
mit
tddbin/katas,tddbin/katas,tddbin/katas
--- +++ @@ -10,7 +10,7 @@ import GroupedMetaData from './grouped-metadata'; const katasDir = path.join(__dirname, '../katas'); -const destinationDir = path.join(__dirname, '../dist/katas/es6/language'); +const destinationDir = path.join(__dirname, '../../dist/katas/es6/language'); const buildMetadata = () => {...
4711c3aab32f24ab4ab1dcdf9ed59f76ece562b1
Gruntfile.js
Gruntfile.js
module.exports = (grunt) => { // Grunt configuration grunt.initConfig({ ghostinspector: { options: { apiKey: 'ff586dcaaa9b781163dbae48a230ea1947f894ff' }, test1: { suites: ['53cf58c0350c6c41029a11be'] }, test2: { tests: ['53cf58fc350c6c41029a11bf', '53cf59e0...
module.exports = (grunt) => { // Grunt configuration grunt.initConfig({ ghostinspector: { options: { apiKey: process.env.GHOST_INSPECTOR_API_KEY }, test1: { suites: ['53cf58c0350c6c41029a11be'] }, test2: { tests: ['53cf58fc350c6c41029a11bf', '53cf59e0350c6c4...
Use env variable to API key during testing
Use env variable to API key during testing
JavaScript
mit
ghost-inspector/grunt-ghost-inspector
--- +++ @@ -3,7 +3,7 @@ grunt.initConfig({ ghostinspector: { options: { - apiKey: 'ff586dcaaa9b781163dbae48a230ea1947f894ff' + apiKey: process.env.GHOST_INSPECTOR_API_KEY }, test1: { suites: ['53cf58c0350c6c41029a11be']
0fc6b9922db01d3c4d71f51120bdbcb2c52df489
Gruntfile.js
Gruntfile.js
module.exports = function(grunt) { 'use strict'; grunt.initConfig({ less: { development: { options: { paths: ['velvet'] }, files: { 'build/style.css': 'velvet/velvet.less' } }, production: { options: { paths: ['less'], ...
module.exports = function(grunt) { 'use strict'; grunt.initConfig({ less: { development: { options: { paths: ['velvet'] }, files: { 'build/style.css': 'velvet/velvet.less' } }, production: { options: { paths: ['less'], ...
Change production build for input/output files
Change production build for input/output files
JavaScript
bsd-3-clause
sourrust/velvet
--- +++ @@ -17,7 +17,7 @@ yuicompress: true }, files: { - 'css/style.css': 'less/main.less' + 'build/style.css': 'velvet/velvet.less' } } },
67a700f507d46e2b5d6ef3e6c61a747ccfd43db5
Gruntfile.js
Gruntfile.js
module.exports = function(grunt) { grunt.initConfig({ pkg : grunt.file.readJSON('package.json'), jshint: { files: ['Gruntfile.js', '<%= pkg.name %>.js'], options: { globals: { window: true } } }, uglify: { options: { ba...
module.exports = function(grunt) { grunt.initConfig({ pkg : grunt.file.readJSON('package.json'), jshint: { files: ['Gruntfile.js', '<%= pkg.name %>.js'], options: { globals: { window: true } } }, uglify: { options: { re...
Add minified file size notification on Grunt build
Add minified file size notification on Grunt build
JavaScript
mit
premasagar/pablo,premasagar/pablo
--- +++ @@ -12,6 +12,7 @@ }, uglify: { options: { + report: 'gzip', // Report minified size banner: '/* <%= pkg.name %> v<%= pkg.version %> (<%= grunt.template.today("yyyy-mm-dd") %>) */\n\n' }, build: {
641aa2bdbffc43c70f037ecf50940c4e8905e485
Gruntfile.js
Gruntfile.js
/*jslint node: true, sloppy: true */ module.exports = function (grunt) { grunt.initConfig({ inlineEverything: { simpleExample: { options: { tags: { link: true, script: true } ...
/*jslint node: true, sloppy: true */ module.exports = function (grunt) { grunt.initConfig({ inlineEverything: { simpleExample: { options: { tags: { link: true, script: true } ...
Rename main html file to index.html during build
Rename main html file to index.html during build to make publish process more streamlined
JavaScript
mit
vrabcak/czemaco,vrabcak/czemaco,vrabcak/czemaco
--- +++ @@ -16,7 +16,7 @@ }, src: 'czemaco.html', - dest: 'build/czemaco.html' + dest: 'build/index.html' }
c1898593b80c25df9d2a8319ea83741da7e6979b
Gruntfile.js
Gruntfile.js
module.exports = function (grunt) { require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks); grunt.initConfig({ mdlint: { pass: ['README.md'], fail: ['test/fixtures/*.md'] }, simplemocha: { options: { globals: ['should'], timeout: 10000, ignoreLeaks...
module.exports = function (grunt) { require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks); grunt.initConfig({ mdlint: { pass: ['README.md'], fail: ['test/fixtures/*.md'] }, simplemocha: { options: { globals: ['should'], timeout: 10000, ignoreLeaks...
Add grunt-mdlint to CI tests
Add grunt-mdlint to CI tests
JavaScript
mit
ChrisWren/grunt-mdlint
--- +++ @@ -49,7 +49,7 @@ } }); - grunt.registerTask('default', ['jshint', 'simplemocha']); + grunt.registerTask('default', ['jshint', 'mdlint:pass', 'simplemocha']); grunt.loadTasks('tasks');
ca5297ae6808f336bb3d468db71410fb1b6e5dad
Gruntfile.js
Gruntfile.js
"use strict"; module.exports = function (grunt) { grunt.loadNpmTasks("grunt-contrib-uglify"); grunt.initConfig({ uglify: { options: { report: "gzip" }, dist: { files: { "q.min.js": ["q.js"] } ...
"use strict"; module.exports = function (grunt) { grunt.loadNpmTasks("grunt-contrib-uglify"); grunt.initConfig({ uglify: { "q.min.js": ["q.js"], options: { report: "gzip" } } }); grunt.registerTask("default", ["uglify"]); };
Use less verbose Grunt syntax.
Use less verbose Grunt syntax.
JavaScript
mit
harks198913/q,ajunflying/q,Zeratul5/q,STRd6/q,liwangbest/q,darkdragon-001/q,miamarti/q,willsmth/q,ShopCo/q,potato620/q,behind2/q,dracher/q,criferlo/q,IbpTeam/node-q,bnicart/q,cgvarela/q,gustavobeavis/q,100star/q,X-Bird/q,lidasong2014/q,npmcomponent/techjacker-q,rasata/q,gorcz/q,darkdragon-001/q,gustavobeavis/q,liwangbe...
--- +++ @@ -5,13 +5,9 @@ grunt.initConfig({ uglify: { + "q.min.js": ["q.js"], options: { report: "gzip" - }, - dist: { - files: { - "q.min.js": ["q.js"] - } } } })...
5e00fba2922bfc0d67bc7943e2fa0b0ca69ecff2
sixquiprend/static/js/main_controller.js
sixquiprend/static/js/main_controller.js
'use strict'; app.controller('MainController', ['$rootScope', '$scope', '$http', 'growl', function($rootScope, $scope, $http, growl) { // UI $scope.is_admin = function() { return $rootScope.current_user && $rootScope.current_user.urole == 3; }; } ]);
'use strict'; app.controller('MainController', ['$rootScope', '$scope', '$http', 'growl', function($rootScope, $scope, $http, growl) { // UI $scope.is_admin = function() { return $rootScope.current_user && $rootScope.current_user.urole == 2; }; } ]);
Update admin urole in front
Update admin urole in front
JavaScript
mit
nyddogghr/SixQuiPrend,nyddogghr/SixQuiPrend,nyddogghr/SixQuiPrend,nyddogghr/SixQuiPrend
--- +++ @@ -6,7 +6,7 @@ // UI $scope.is_admin = function() { - return $rootScope.current_user && $rootScope.current_user.urole == 3; + return $rootScope.current_user && $rootScope.current_user.urole == 2; }; }
1fbf265beb5d1c1c63a3ac19c13598e14d6735fb
js/exporters/InstancedGeometryExporter.js
js/exporters/InstancedGeometryExporter.js
/** * @author jimbo00000 */ THREE.InstancedGeometryExporter = function () {}; THREE.InstancedGeometryExporter.prototype = { constructor: THREE.InstancedGeometryExporter, parse: function ( geometry ) { var output = { metadata: { version: 4.0, type: 'InstancedGeometry', generator: 'InstancedGeom...
/** * @author jimbo00000 */ THREE.InstancedGeometryExporter = function () {}; THREE.InstancedGeometryExporter.prototype = { constructor: THREE.InstancedGeometryExporter, parse: function ( geometry ) { var output = { metadata: { version: 4.1, type: 'InstancedGeometry3D', generator: 'InstancedGe...
Update file format version string.
Update file format version string.
JavaScript
mit
jimbo00000/Shmiltbrush,jimbo00000/Shmiltbrush
--- +++ @@ -12,16 +12,13 @@ var output = { metadata: { - version: 4.0, - type: 'InstancedGeometry', + version: 4.1, + type: 'InstancedGeometry3D', generator: 'InstancedGeometryExporter' } }; console.log(geometry); - - //output['fileFormatType'] = '3D instanced geomtry'; - //out...
c77addad3e26ad040945acccf603d2937d66a0b1
src/marbles/dispatcher.js
src/marbles/dispatcher.js
//= require ./core (function () { "use strict"; var __callbacks = []; Marbles.Dispatcher = { register: function (callback) { __callbacks.push(callback); var dispatchIndex = __callbacks.length - 1; return dispatchIndex; }, dispatch: function (event) { var promises = __callbacks.map(function (callback) { ...
//= require ./core (function () { "use strict"; var __callbacks = []; Marbles.Dispatcher = { register: function (callback) { __callbacks.push(callback); var dispatchIndex = __callbacks.length - 1; return dispatchIndex; }, dispatch: function (event) { var promises = __callbacks.map(function (callback) { ...
Update Dispatcher: dispatch resolves with results of callbacks
Update Dispatcher: dispatch resolves with results of callbacks
JavaScript
bsd-3-clause
jvatic/marbles-js,jvatic/marbles-js
--- +++ @@ -15,8 +15,7 @@ dispatch: function (event) { var promises = __callbacks.map(function (callback) { return new Promise(function (resolve) { - callback(event); - resolve(event); + resolve(callback(event)); }); }); return Promise.all(promises);
8879ea7b095f94dcdca49eb199dda4d78906c554
tools/commit-analyzer.js
tools/commit-analyzer.js
const { parseRawCommit } = require('conventional-changelog/lib/git') module.exports = function (pluginConfig, {commits}, cb) { let type = null commits .map((commit) => parseRawCommit(`${commit.hash}\n${commit.message}`)) .filter((commit) => !!commit) .every((commit) => { if (commit.breaks.length) { ...
const { parseRawCommit } = require('conventional-changelog/lib/git') module.exports = function (pluginConfig, {commits}, cb) { let type = null commits .map((commit) => parseRawCommit(`${commit.hash}\n${commit.message}`)) .filter((commit) => !!commit) .every((commit) => { if (commit.breaks.length) { ...
Use process instead of globel to set env variable
chore: Use process instead of globel to set env variable
JavaScript
mit
matreshkajs/matreshka,matreshkajs/matreshka,finom/matreshka,finom/matreshka
--- +++ @@ -23,7 +23,7 @@ }) if(type) { - global.env.PROJECT_HAS_CHANGES = 'true'; + process.env.PROJECT_HAS_CHANGES = 'true'; } cb(null, type)
f3bce3e7938f28c0dd6471ea8bbca5cecab44052
duo-comment-links.user.js
duo-comment-links.user.js
// ==UserScript== // @name Duolingo Comment Links // @description Turn comment timestamps into direct links // @match *://www.duolingo.com/* // @author HodofHod // @namespace HodofHod // @version 0.0.3 // ==/UserScript== function inject(f) { var script = document.createElement('scrip...
// ==UserScript== // @name Duolingo Comment Links // @description Turn comment timestamps into direct links // @match *://www.duolingo.com/* // @author HodofHod // @namespace HodofHod // @version 0.0.3 // ==/UserScript== /* Copyright (c) 2013-2014 HodofHod (https://github.com/HodofHod) L...
Add Copyright and link to MIT License
Add Copyright and link to MIT License
JavaScript
mit
HodofHod/Userscripts
--- +++ @@ -7,6 +7,12 @@ // @version 0.0.3 // ==/UserScript== +/* +Copyright (c) 2013-2014 HodofHod (https://github.com/HodofHod) + +Licensed under the MIT License (MIT) +Full text of the license is available at https://raw2.github.com/HodofHod/Userscripts/master/LICENSE +*/ function inject(f) { var ...
cb49dac428723756d2529810a2614b9ceab67ad3
web/src/stores/coords.js
web/src/stores/coords.js
import { observable, action } from 'mobx'; export default new class StoreCoords { @observable lat = 0 @observable lng = 0 @observable accuracy = 9999 @action _update(...values) { [ this.lat, this.lng, this.accuracy ] = values; } constructor() { navigator.geolocation.watchPosition((e) => { ...
import { observable, action } from 'mobx'; export default new class StoreCoords { @observable lat = 0 @observable lng = 0 @observable accuracy = 9999 @action _update(...values) { [ this.lat, this.lng, this.accuracy ] = values; } constructor() { if (navigator.geolocation) navigator.geolocatio...
Add Geolocation API compatibility check (web)
Add Geolocation API compatibility check (web)
JavaScript
agpl-3.0
karlkoorna/Bussiaeg,karlkoorna/Bussiaeg
--- +++ @@ -18,7 +18,7 @@ constructor() { - navigator.geolocation.watchPosition((e) => { + if (navigator.geolocation) navigator.geolocation.watchPosition((e) => { const { latitude: lat, longitude: lng, accuracy } = e.coords; this._update(lat, lng, accuracy); }, () => {}, {
ca99ce59c3f7a40972470eb2194d116f33cccd45
web/src/stores/coords.js
web/src/stores/coords.js
import { decorate, observable, action } from 'mobx'; class StoreCoords { lat = 0 lng = 0 accuracy = 9999 // Update coordinates and accuracy in store. update(coords) { [ this.lat, this.lng, this.accuracy ] = [ coords.latitude || coords.lat, coords.longitude || coords.lng, coords.accuracy ]; } constructor...
import { decorate, observable, action } from 'mobx'; import { opts as mapOpts } from 'views/Map/Map.jsx'; class StoreCoords { lat = mapOpts.startLat lng = mapOpts.startLng accuracy = 9999 // Update coordinates and accuracy in store. update(coords) { [ this.lat, this.lng, this.accuracy ] = [ coords.latitude...
Fix map flashing outside country (web)
Fix map flashing outside country (web)
JavaScript
agpl-3.0
karlkoorna/Bussiaeg,karlkoorna/Bussiaeg
--- +++ @@ -1,9 +1,11 @@ import { decorate, observable, action } from 'mobx'; + +import { opts as mapOpts } from 'views/Map/Map.jsx'; class StoreCoords { - lat = 0 - lng = 0 + lat = mapOpts.startLat + lng = mapOpts.startLng accuracy = 9999 // Update coordinates and accuracy in store.
777f78602ac3d875ae2ca3a56bdd8508c70d12ed
spa_ui/self_service/client/app/states/marketplace/details/details.state.js
spa_ui/self_service/client/app/states/marketplace/details/details.state.js
(function() { 'use strict'; angular.module('app.states') .run(appRun); /** @ngInject */ function appRun(routerHelper) { routerHelper.configureStates(getStates()); } function getStates() { return { 'marketplace.details': { url: '/:serviceTemplateId', templateUrl: 'app/sta...
(function() { 'use strict'; angular.module('app.states') .run(appRun); /** @ngInject */ function appRun(routerHelper) { routerHelper.configureStates(getStates()); } function getStates() { return { 'marketplace.details': { url: '/:serviceTemplateId', templateUrl: 'app/sta...
Fix issue when API wasn't returning correct service dialog results
Fix issue when API wasn't returning correct service dialog results
JavaScript
apache-2.0
matobet/manageiq,KevinLoiseau/manageiq,romanblanco/manageiq,fbladilo/manageiq,jameswnl/manageiq,israel-hdez/manageiq,maas-ufcg/manageiq,lpichler/manageiq,matobet/manageiq,aufi/manageiq,romanblanco/manageiq,mresti/manageiq,lpichler/manageiq,ManageIQ/manageiq,fbladilo/manageiq,tzumainn/manageiq,maas-ufcg/manageiq,kbrock/...
--- +++ @@ -34,7 +34,7 @@ /** @ngInject */ function resolveDialogs($stateParams, CollectionsApi) { - var options = {expand: true, attributes: 'content'}; + var options = {expand: 'resources', attributes: 'content'}; return CollectionsApi.query('service_templates/' + $stateParams.serviceTemplateId...
596a5affa2f9411c6a4b0a1c28f3b0d917b5feee
Gruntfile.js
Gruntfile.js
/* * grunt-liquibase * https://github.com/chrisgreening/grunt-liquibase * * Copyright (c) 2014 Chris Greening * Licensed under the MIT license. */ 'use strict'; module.exports = function(grunt) { // Project configuration. grunt.initConfig({ // Configuration to be run (and then tested). liquibase: {...
/* * grunt-liquibase * https://github.com/chrisgreening/grunt-liquibase * * Copyright (c) 2014 Chris Greening * Licensed under the MIT license. */ 'use strict'; module.exports = function(grunt) { // Project configuration. grunt.initConfig({ // Configuration to be run (and then tested). liquibase: {...
Create test task to match package.json
Create test task to match package.json
JavaScript
mit
cgreening/grunt-liquibase,MRN-Code/grunt-liquibase,idefy/grunt-liquibase,sameetn/grunt-liquibase
--- +++ @@ -14,11 +14,11 @@ grunt.initConfig({ // Configuration to be run (and then tested). liquibase: { - default_options: { + version : { options: { }, command : 'version' - }, + } } }); @@ -26,6 +26,6 @@ grunt.loadTasks('tasks'); // By ...
f7ea307e8c3e21e53801f1327c5beeddcaf6fb4a
Gruntfile.js
Gruntfile.js
module.exports = function(grunt) { // Project configuration. grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), less: { options: { ieCompat: true, strictImports: false, syncImport: false, report: 'min' }, css: { options: { compress: false, yuicompress: false }...
module.exports = function(grunt) { // Project configuration. grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), less: { options: { ieCompat: true, strictImports: false, syncImport: false, report: 'min' }, css: { options: { compress: false, yuicompress: false }...
Add version to head of minified version
Add version to head of minified version
JavaScript
mit
albertchau/Green,albertchau/Green
--- +++ @@ -31,7 +31,9 @@ }, uglify: { options: { - banner: '/*! <%= pkg.name %> <%= grunt.template.today("yyyy-mm-dd") %> */\nhttps://github.com/Serhioromano/bootstrap-calendar.git\n' + banner: '/*! <%= pkg.name %> - v<%= pkg.version %> - ' + + '<%= grunt.template.today("yyyy-mm-dd") %> \n' + + ...
d483635a68a46a53832c64d72b03a857700a52ad
app/assets/javascripts/tax-disc-ab-test.js
app/assets/javascripts/tax-disc-ab-test.js
//= require govuk/multivariate-test /*jslint browser: true, * indent: 2, * white: true */ /*global $, GOVUK */ $(function () { GOVUK.taxDiscBetaPrimary = function () { $('.primary-apply').html($('#beta-primary').html()); $('.secondary-apply').html($('#dvla-secondary').html()); }; if(window.locatio...
//= require govuk/multivariate-test /*jslint browser: true, * indent: 2, * white: true */ /*global $, GOVUK */ $(function () { GOVUK.taxDiscBetaPrimary = function () { $('.primary-apply').html($('#beta-primary').html()); $('.secondary-apply').html($('#dvla-secondary').html()); }; if(window.locatio...
Rename tax disc test and cohorts
Rename tax disc test and cohorts This effectively creates a new A/B test using the new weightings.
JavaScript
mit
alphagov/frontend,alphagov/frontend,alphagov/frontend,alphagov/frontend
--- +++ @@ -14,11 +14,11 @@ if(window.location.href.indexOf("/tax-disc") > -1) { new GOVUK.MultivariateTest({ - name: 'tax-disc', + name: 'tax-disc-50-50', customVarIndex: 20, cohorts: { - tax_disc_beta_control1: { callback: function () { } }, - tax_disc_beta1: { callba...
36522ada53a64a129cb3519b4183da8084dced1c
app/assets/javascripts/services/dialog_editor_http_service.js
app/assets/javascripts/services/dialog_editor_http_service.js
ManageIQ.angular.app.service('DialogEditorHttp', ['$http', 'API', function($http, API) { this.loadDialog = function(id) { return API.get('/api/service_dialogs/' + id + '?attributes=content,buttons,label'); }; this.saveDialog = function(id, action, data) { return API.post('/api/service_dialogs' + id, { ...
ManageIQ.angular.app.service('DialogEditorHttp', ['$http', 'API', function($http, API) { this.loadDialog = function(id) { return API.get('/api/service_dialogs/' + id + '?attributes=content,buttons,label'); }; this.saveDialog = function(id, action, data) { return API.post('/api/service_dialogs' + id, { ...
Rename fqdn to fqname in DialogEditorHttpService
Rename fqdn to fqname in DialogEditorHttpService https://bugzilla.redhat.com/show_bug.cgi?id=1553846
JavaScript
apache-2.0
ManageIQ/manageiq-ui-classic,ManageIQ/manageiq-ui-classic,ManageIQ/manageiq-ui-classic,ManageIQ/manageiq-ui-classic
--- +++ @@ -12,8 +12,8 @@ }); }; - this.treeSelectorLoadData = function(fqdn) { - var url = '/tree/automate_entrypoint' + (fqdn ? '?fqdn=' + encodeURIComponent(fqdn) : ''); + this.treeSelectorLoadData = function(fqname) { + var url = '/tree/automate_entrypoint' + (fqname ? '?fqname=' + encodeURIComp...
b3b78ff3a18bdfcc533e9f76e4d9ed251c4e6245
Gruntfile.js
Gruntfile.js
module.exports = function(grunt) { grunt.initConfig({ pkg: grunt.file.readJSON('bower.json'), jshint: { grunt: { src: ['Gruntfile.js'] }, main: { src: ['tock.js'], options: { 'browser': true, 'camelcase': true, 'curly': true, 'e...
module.exports = function(grunt) { grunt.initConfig({ pkg: grunt.file.readJSON('bower.json'), jshint: { grunt: { src: ['Gruntfile.js'] }, main: { src: ['tock.js'], options: { 'browser': true, 'camelcase': true, 'curly': true, 'd...
Add missing "devel" and "undef". Remove "indent" since it was moved to jscs.
Add missing "devel" and "undef". Remove "indent" since it was moved to jscs.
JavaScript
mit
Falc/Tock.js
--- +++ @@ -11,10 +11,11 @@ 'browser': true, 'camelcase': true, 'curly': true, + 'devel': true, 'eqeqeq': true, - 'indent': 2, 'newcap': true, 'quotmark': 'single', + 'undef': true, 'unused': true } ...
4b2c8b781b824ebbc56376cd897a26d79bdfca4b
app/src/home/intro-animation/intro-anim.js
app/src/home/intro-animation/intro-anim.js
require('./intro-anim.sass'); const isTouchDevice = 'ontouchstart' in document.documentElement; const ev = isTouchDevice ? 'touchend' : 'click'; const delay = isTouchDevice ? 1050 : 550; document.getElementById('corners').addEventListener(ev, () => setTimeout(() => { console.log('Animation finished'); }, delay));
require('./intro-anim.sass'); const isTouchDevice = 'ontouchstart' in document.documentElement; const ev = isTouchDevice ? 'touchend' : 'click'; const delay = isTouchDevice ? 1050 : 550; document.getElementById('corners').addEventListener(ev, () => setTimeout(() => { alert('You\'re in!'); }, delay));
Implement user-visible alert after interaction
Implement user-visible alert after interaction
JavaScript
mit
arkis/arkis.io,arkis/arkis.io
--- +++ @@ -5,5 +5,5 @@ const delay = isTouchDevice ? 1050 : 550; document.getElementById('corners').addEventListener(ev, () => setTimeout(() => { - console.log('Animation finished'); + alert('You\'re in!'); }, delay));
cb92a155868f4a46472f4061640d9a93cbbf2cb2
bin/migrations/migrations/20161028050220-unnamed-migration.js
bin/migrations/migrations/20161028050220-unnamed-migration.js
'use strict' module.exports = { up: function (queryInterface, Sequelize) { queryInterface.addColumn( 'Rescues', 'type', { type: Sequelize.ENUM('success', 'failure', 'invalid', 'other'), allowNull: false, defaultValue: 'other' } ) queryInterface.addColumn(...
'use strict' module.exports = { up: function (queryInterface, Sequelize) { queryInterface.addColumn( 'Rescues', 'type', { type: Sequelize.ENUM('success', 'failure', 'invalid', 'other'), allowNull: false, defaultValue: 'other' } ) queryInterface.addColumn(...
Use correct default value for status enum in migration
Use correct default value for status enum in migration
JavaScript
bsd-3-clause
FuelRats/api.fuelrats.com,FuelRats/api.fuelrats.com,FuelRats/api.fuelrats.com
--- +++ @@ -19,7 +19,7 @@ { type: Sequelize.ENUM('open', 'inactive', 'closed'), allowNull: false, - defaultValue: 'other' + defaultValue: 'open' } ) },
71c798ac47b0e1c8ad4e10fd4e5a01a429a273bc
app/assets/javascripts/core/pixelator.js
app/assets/javascripts/core/pixelator.js
var Pixelator = function(data, partner) { this.data = data; this.partner = partner; }; Pixelator.prototype = { defaults: function() { var default_context = this.data.context || {}; default_context.timestamp = new Date().getTime(); return default_context; }, picker: function(key, options) { va...
var Pixelator = function(data, partner) { this.data = data; this.partner = partner; }; Pixelator.prototype = { defaults: function() { var default_context = this.data.context || {}; default_context.timestamp = new Date().getTime(); return default_context; }, picker: function(key, options) { va...
Return out of Pixelator.picker if no keys are provided
Return out of Pixelator.picker if no keys are provided
JavaScript
mit
howaboutwe/pixelator,howaboutwe/pixelator
--- +++ @@ -11,8 +11,11 @@ }, picker: function(key, options) { var self = this; - _.each(this.data.pixels[key], function(pixel) { + var keys = self.data.pixels[key]; + if (!keys) { return; } + + _.each(keys, function(pixel) { if (pixel.partner && self.partner !== pixel.partner) { ...
d7327f575048b5735bf65fa0e0fc666601e26e25
script/lib/lint-java-script-paths.js
script/lib/lint-java-script-paths.js
'use strict' const path = require('path') const {spawn} = require('child_process') const CONFIG = require('../config') module.exports = async function () { return new Promise((resolve, reject) => { const eslint = spawn( path.join('script', 'node_modules', '.bin', 'eslint'), ['--cache', '--format', ...
'use strict' const path = require('path') const {spawn} = require('child_process') const process = require('process') const CONFIG = require('../config') module.exports = async function () { return new Promise((resolve, reject) => { const eslintArgs = ['--cache', '--format', 'json'] if (process.argv.inclu...
Add script/lint --fix which fixes some code formatting issues via eslint
Add script/lint --fix which fixes some code formatting issues via eslint
JavaScript
mit
brettle/atom,PKRoma/atom,PKRoma/atom,brettle/atom,atom/atom,Mokolea/atom,atom/atom,PKRoma/atom,Mokolea/atom,Mokolea/atom,brettle/atom,atom/atom
--- +++ @@ -2,14 +2,21 @@ const path = require('path') const {spawn} = require('child_process') +const process = require('process') const CONFIG = require('../config') module.exports = async function () { return new Promise((resolve, reject) => { + const eslintArgs = ['--cache', '--format', 'json'] + ...
78fa674d525f1165a26932c3b1dcb65da6f5f8e2
scripts/get-latest-platform-tests.js
scripts/get-latest-platform-tests.js
"use strict"; if (process.env.NO_UPDATE) { process.exit(0); } const path = require("path"); const fs = require("fs"); const request = require("request"); // Pin to specific version, reflecting the spec version in the readme. // At the moment we are pinned to a branch. // // To get the latest commit: // 1. Go to ht...
"use strict"; if (process.env.NO_UPDATE) { process.exit(0); } const path = require("path"); const fs = require("fs"); const request = require("request"); // Pin to specific version, reflecting the spec version in the readme. // At the moment we are pinned to a branch. // // To get the latest commit: // 1. Go to ht...
Update to the latest web platform tests
Update to the latest web platform tests These just add additional coverage.
JavaScript
mit
jsdom/whatwg-url,jsdom/whatwg-url,jsdom/whatwg-url
--- +++ @@ -15,7 +15,7 @@ // 1. Go to https://github.com/w3c/web-platform-tests/tree/master/url // 2. Press "y" on your keyboard to get a permalink // 3. Copy the commit hash -const commitHash = "d93247d5cb7d70f80da8b154a171f4e3d50969f4"; +const commitHash = "1e1e80441b8d6a60f836de4005dba25698ecfe4a"; const sou...
9fc4be566d1d4f7f68eafc35c4659cb246654936
test/setup.js
test/setup.js
require('babel-register'); require('coffee-script/register');
require('coffee-script/register'); require('babel-register'); require('source-map-support').install({ handleUncaughtExceptions: false, hookRequire: true });
Fix stack traces for errors happening inside coffee-script tests.
fix: Fix stack traces for errors happening inside coffee-script tests. Both `coffee-script` as well as `source-map-support` (loaded through `babel-register`) patch `Error.prepareStackTrace` to modify stack traces to point to correct error locations for transpiled code. Unfortunately, these two patches don't play well ...
JavaScript
mit
tediousjs/tedious,tediousjs/tedious,pekim/tedious
--- +++ @@ -1,2 +1,3 @@ +require('coffee-script/register'); require('babel-register'); -require('coffee-script/register'); +require('source-map-support').install({ handleUncaughtExceptions: false, hookRequire: true });
1142e1ddb10699a59790b1a144ca3570a307cc8a
examples/official-storybook/stories/core/rendering.stories.js
examples/official-storybook/stories/core/rendering.stories.js
import React, { useRef } from 'react'; export default { title: 'Core/Rendering', }; // NOTE: in our example apps each component is mounted twice as we render in strict mode let timesMounted = 0; export const Counter = () => { const countRef = useRef(); if (!countRef.current) timesMounted += 1; countRef.curre...
import React, { useEffect, useRef } from 'react'; import { useArgs } from '@storybook/client-api'; export default { title: 'Core/Rendering', }; // NOTE: in our example apps each component is mounted twice as we render in strict mode let timesCounterMounted = 0; export const Counter = () => { const countRef = useR...
Add an example to highlight if a story renders too many times
Add an example to highlight if a story renders too many times
JavaScript
mit
storybooks/storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook
--- +++ @@ -1,20 +1,55 @@ -import React, { useRef } from 'react'; +import React, { useEffect, useRef } from 'react'; +import { useArgs } from '@storybook/client-api'; export default { title: 'Core/Rendering', }; // NOTE: in our example apps each component is mounted twice as we render in strict mode -let ti...
4f1c5dd238b101a57207708e84da229364572eb9
app/index.js
app/index.js
'use strict'; var generators = require('yeoman-generator'), _ = require('lodash'); module.exports = generators.Base.extend({ constructor: function () { generators.Base.apply(this, arguments); this.argument('appname', { type: String, required: true }); // And you can then access it later on this way...
'use strict'; var generators = require('yeoman-generator'), _ = require('lodash'); module.exports = generators.Base.extend({ constructor: function () { generators.Base.apply(this, arguments); this.argument('appname', { type: String, required: true }); this.viewName = _.startCase(this.appname); ...
Copy entire src directory not file by file
Copy entire src directory not file by file
JavaScript
isc
rudijs/generator-ngpack,rudijs/generator-ngpack,rudijs/generator-ngpack
--- +++ @@ -10,7 +10,6 @@ this.argument('appname', { type: String, required: true }); - // And you can then access it later on this way; e.g. CamelCased this.viewName = _.startCase(this.appname); this.appname = _.camelCase(this.appname); this.kebabName = _.kebabCase(this.appname); @@ -19,18...
a4960ee0a4e0e95d86774bc7ebaaad74bf8695e6
src/Read.js
src/Read.js
function getDocuments(path, email, key, projectId) { const token = getAuthToken_(email, key); const baseUrl = "https://firestore.googleapis.com/v1beta1/projects/" + projectId + "/databases/(default)/documents/" + path; const options = { 'muteHttpExceptions' : true, 'headers': {'content-type': 'applic...
function get(path, email, key, projectId) { const token = getAuthToken_(email, key); const baseUrl = "https://firestore.googleapis.com/v1beta1/projects/" + projectId + "/databases/(default)/documents/" + path; const options = { 'muteHttpExceptions' : true, 'headers': {'content-type': 'application/jso...
Update getDocuments function to be a general GET function
Update getDocuments function to be a general GET function
JavaScript
mit
grahamearley/FirestoreGoogleAppsScript
--- +++ @@ -1,4 +1,4 @@ -function getDocuments(path, email, key, projectId) { +function get(path, email, key, projectId) { const token = getAuthToken_(email, key); const baseUrl = "https://firestore.googleapis.com/v1beta1/projects/" + projectId + "/databases/(default)/documents/" + path;
2601075b3380a6488e8fe6adc45fcbf840d5897f
packages/accounts-google/google_client.js
packages/accounts-google/google_client.js
Meteor.loginWithGoogle = function (options, callback) { // support both (options, callback) and (callback). if (!callback && typeof options === 'function') { callback = options; options = {}; } var config = Accounts.loginServiceConfiguration.findOne({service: 'google'}); if (!config) { callback &...
Meteor.loginWithGoogle = function (options, callback) { // support both (options, callback) and (callback). if (!callback && typeof options === 'function') { callback = options; options = {}; } else if (!options) { options = {}; } var config = Accounts.loginServiceConfiguration.findOne({service: ...
Fix error on Meteor.loginWithGoogle() with no args
Fix error on Meteor.loginWithGoogle() with no args
JavaScript
mit
papimomi/meteor,aramk/meteor,dev-bobsong/meteor,yiliaofan/meteor,brdtrpp/meteor,zdd910/meteor,AlexR1712/meteor,lieuwex/meteor,juansgaitan/meteor,codingang/meteor,cog-64/meteor,yiliaofan/meteor,4commerce-technologies-AG/meteor,nuvipannu/meteor,Hansoft/meteor,jenalgit/meteor,cog-64/meteor,planet-training/meteor,Jeremy017...
--- +++ @@ -2,6 +2,8 @@ // support both (options, callback) and (callback). if (!callback && typeof options === 'function') { callback = options; + options = {}; + } else if (!options) { options = {}; } @@ -16,7 +18,7 @@ // always need this to get user id from google. var requiredScope ...
f5ef0965335933ef9c0cf694f7340fca60b1fd49
baseError.js
baseError.js
function BaseError(data){ var oldLimit = Error.stackTraceLimit, error; Error.stackTraceLimit = 20; error = Error.apply(this, arguments); Error.stackTraceLimit = oldLimit; if(Error.captureStackTrace){ Error.captureStackTrace(this, BaseError); } this.__genericError = true;...
var captureStackTrace = require('capture-stack-trace'); function BaseError(data){ var oldLimit = Error.stackTraceLimit, error; Error.stackTraceLimit = 20; error = Error.apply(this, arguments); Error.stackTraceLimit = oldLimit; captureStackTrace(this, BaseError); this.__genericError...
Use ponyfil for base error
Use ponyfil for base error
JavaScript
mit
MauriceButler/generic-errors
--- +++ @@ -1,3 +1,5 @@ +var captureStackTrace = require('capture-stack-trace'); + function BaseError(data){ var oldLimit = Error.stackTraceLimit, error; @@ -8,9 +10,7 @@ Error.stackTraceLimit = oldLimit; - if(Error.captureStackTrace){ - Error.captureStackTrace(this, BaseError); - ...
5323addedf2cfd1e42218d471b2ef96b70a64276
example/tests/ntfjs.org.js
example/tests/ntfjs.org.js
var ntf = require('ntf') , test = ntf.http('http://ntfjs.org') exports.ntf = test.get('/', function(test) { test.statusCode(200) test.body('ntf') test.done() })
var ntf = require('ntf') , test = ntf.http('http://ntfjs.org') exports.frontpage = test.get('/', function(test) { test.statusCode(200) test.body('ntf') test.done() }) exports.fail = test.get('/fail', function(test) { test.statusCode(200) test.done() })
Add failing test to example
Add failing test to example
JavaScript
mit
shutterstock/ntfd
--- +++ @@ -1,8 +1,13 @@ var ntf = require('ntf') , test = ntf.http('http://ntfjs.org') -exports.ntf = test.get('/', function(test) { +exports.frontpage = test.get('/', function(test) { test.statusCode(200) test.body('ntf') test.done() }) + +exports.fail = test.get('/fail', function(test) { + test.st...
16c50fd316a43c2b934ee2d4d0434166101ad849
src/indicator-parameter/ParameterSearchController.js
src/indicator-parameter/ParameterSearchController.js
'use strict'; // @ngInject var ParameterSearchController = function($scope, $location, $controller, npdcAppConfig, Parameter) { // Extend NpolarApiBaseController $controller("NpolarBaseController", { $scope: $scope }); $scope.resource = Parameter; npdcAppConfig.cardTitle = 'Environmental monitoring para...
'use strict'; // @ngInject var ParameterSearchController = function($scope, $location, $controller, npdcAppConfig, Parameter) { // Extend NpolarApiBaseController $controller("NpolarBaseController", { $scope: $scope }); $scope.resource = Parameter; npdcAppConfig.cardTitle = 'Environmental monitoring para...
Sort on last updated first
Sort on last updated first
JavaScript
mit
npolar/npdc-indicator,npolar/npdc-indicator
--- +++ @@ -17,6 +17,7 @@ "size-facet": 5, format: "json", variant: "atom", + sort: "-updated", facets: "systems,collection,species,themes,dataseries,label,warn,variable,unit,locations.placename,links.rel" }; return Object.assign({}, defaults, $location.search());
2de4a243971aab231adbcab0e67e21570cdbd971
index.js
index.js
/** * Run the first test with "focus" tag. * * @param {Object} hydro * @api public */ module.exports = function(hydro) { if (!hydro.get('focus')) return; var focus = false; hydro.on('pre:test', function(test) { if (focus) return test.skip(); if (test.meta.indexOf('focus') != -1) focus = true; }); ...
/** * Run the first test with "focus" tag. * * @param {Object} hydro * @api public */ module.exports = function(hydro) { if (!hydro.get('focus')) return; var focus = false; hydro.on('pre:test', function(test) { if (focus || test.meta.indexOf('focus') == -1) return test.skip(); focus = true; }); };...
Fix bug where it will run more tests than desired
Fix bug where it will run more tests than desired
JavaScript
mit
hydrojs/focus
--- +++ @@ -9,8 +9,8 @@ if (!hydro.get('focus')) return; var focus = false; hydro.on('pre:test', function(test) { - if (focus) return test.skip(); - if (test.meta.indexOf('focus') != -1) focus = true; + if (focus || test.meta.indexOf('focus') == -1) return test.skip(); + focus = true; }); }; ...
7dcdac1d7e2012090a7346ef764ea07f62b1f835
index.js
index.js
'use strict'; const naked = require('naked-string'); module.exports = function equalsish(stringOne, stringTwo) { if (stringOne === undefined) { throw new Error('No arguments provided.'); } else if (stringTwo === undefined) { return (futureString) => equalsish(stringOne, futureString); } else { return naked(s...
'use strict'; const naked = require('naked-string'); module.exports = function equalsish(stringOne, stringTwo) { if (stringOne === undefined) { throw new Error('No arguments provided.'); } else if (stringTwo === undefined) { return futureString => equalsish(stringOne, futureString); } else { return naked(str...
Remove parentheses from around arrow function arg
Remove parentheses from around arrow function arg
JavaScript
apache-2.0
dar5hak/equalsish
--- +++ @@ -6,7 +6,7 @@ if (stringOne === undefined) { throw new Error('No arguments provided.'); } else if (stringTwo === undefined) { - return (futureString) => equalsish(stringOne, futureString); + return futureString => equalsish(stringOne, futureString); } else { return naked(stringOne) === naked(s...
d64bd789940684d8f53ee41e9ac1a105c5eb9982
problems/kata/001-todo-backend/001/app.js
problems/kata/001-todo-backend/001/app.js
var express = require('express'); var cors = require('cors'); var bodyParser = require('body-parser'); var nano = require('nano')('http://localhost:5984'); var todo = nano.db.use('todo'); var app = express(); app.use(cors()); app.use(bodyParser.json()); app.get('/', function(req, res, next) { console.log('get trig...
var express = require('express'); var cors = require('cors'); var bodyParser = require('body-parser'); var nano = require('nano')('http://localhost:5984'); var todo = nano.db.use('todo'); var app = express(); app.use(cors()); app.use(bodyParser.json()); app.get('/', function(req, res, next) { console.log('get trig...
Return database results in root GET (3/16).
Return database results in root GET (3/16).
JavaScript
mit
PurityControl/uchi-komi-js
--- +++ @@ -11,7 +11,9 @@ app.get('/', function(req, res, next) { console.log('get triggered'); - res.json([]); + todo.view('todos', 'all_todos', function(err, body) { + res.json(body.rows); + }); }); app.post('/', function(req, res, next) {