Instruction
stringlengths
14
778
input_code
stringlengths
0
4.24k
output_code
stringlengths
1
5.44k
Switch exclude_fair_booths param to match an updated Gravity API
module.exports = """ fragment current on Artist { auction: sales(size:2, live: true, is_auction: true){ cover_image { cropped(width: 150, height: 104) { url } } href name start_at end_at } show: partner_shows(size:2, exclude_fair_booths: true, ...
module.exports = """ fragment current on Artist { auction: sales(size:2, live: true, is_auction: true){ cover_image { cropped(width: 150, height: 104) { url } } href name start_at end_at } show: partner_shows(size:2, at_a_fair: false, active:tr...
Fix bug where untagged exercises would not render
_ = require 'underscore' React = require 'react' classnames = require 'classnames' {ExerciseStore} = require '../../flux/exercise' String = require '../../helpers/string' {ExercisePreview} = require 'openstax-react-components' Exercise = React.createClass propTypes: exercise: React.PropTypes.object.isRequired ...
_ = require 'underscore' React = require 'react' classnames = require 'classnames' {ExerciseStore} = require '../../flux/exercise' String = require '../../helpers/string' {ExercisePreview} = require 'openstax-react-components' Exercise = React.createClass propTypes: exercise: React.PropTypes.object.isRequired ...
Call space pen attach hooks after attached
{CompositeDisposable} = require 'event-kit' {callAttachHooks} = require './space-pen-extensions' class PanelElement extends HTMLElement createdCallback: -> @subscriptions = new CompositeDisposable getModel: -> @model setModel: (@model) -> view = @model.getItemView() @appendChild(view) callAttac...
{CompositeDisposable} = require 'event-kit' {callAttachHooks} = require './space-pen-extensions' class PanelElement extends HTMLElement createdCallback: -> @subscriptions = new CompositeDisposable getModel: -> @model setModel: (@model) -> view = @model.getItemView() @appendChild(view) @classLi...
Make representative fetch more resilient to API errors (probably only relevant for staging)
Q = require 'bluebird-q' _ = require 'underscore' StepView = require './step.coffee' Form = require '../../form/index.coffee' Representatives = require '../../../collections/representatives.coffee' template = -> require('../templates/specialist.jade') arguments... module.exports = class Specialist extends StepView c...
Q = require 'bluebird-q' _ = require 'underscore' StepView = require './step.coffee' Form = require '../../form/index.coffee' Representatives = require '../../../collections/representatives.coffee' template = -> require('../templates/specialist.jade') arguments... module.exports = class Specialist extends StepView c...
Use Facebook syntax in Atom
"*": editor: fontFamily: "input" fontSize: 13 showInvisibles: true showIndentGuide: true invisibles: {} core: themes: [ "one-dark-ui" "atom-dark-syntax" ] welcome: showOnStartup: false whitespace: removeTrailingWhitespace: true ignoreWhitespaceOnCurrentLine: f...
"*": editor: fontFamily: "input" fontSize: 13 showInvisibles: true showIndentGuide: true invisibles: {} core: themes: [ "one-dark-ui" "facebook-syntax" ] welcome: showOnStartup: false whitespace: removeTrailingWhitespace: true ignoreWhitespaceOnCurrentLine: fa...
Replace childrend by find in jquery
Neighborly.Rewards = {} if Neighborly.Rewards is undefined Neighborly.Rewards.Index = Backbone.View.extend el: '.rewards' initialize: -> this.$rewards = $(this.el) this.load() this.sortable() load: -> that = this $.ajax( url: that.$rewards.data("rewards-path") success: (data) ->...
Neighborly.Rewards = {} if Neighborly.Rewards is undefined Neighborly.Rewards.Index = Backbone.View.extend el: '.rewards' initialize: -> this.$rewards = $(this.el) this.load() this.sortable() load: -> that = this $.ajax( url: that.$rewards.data("rewards-path") success: (data) ->...
Add setupController hook to paper index route
ETahi.PaperIndexRoute = Ember.Route.extend afterModel: (model) -> @transitionTo('paper.edit', model) unless model.get('submitted') actions: viewCard: (task) -> paper = @modelFor('paper') redirectParams = ['paper.index', @modelFor('paper')] @controllerFor('application').set('overlayRedirec...
ETahi.PaperIndexRoute = Ember.Route.extend afterModel: (model) -> @transitionTo('paper.edit', model) unless model.get('submitted') setupController: (controller, model) -> controller.set('model', model) controller.set 'authors', @store.all('author').filter (author) => author.get('authorGroup.paper...
Make sure "lanes" config is still present after set
class SystemSettings extends Lanes.Models.Base mixins: [ Lanes.Models.Mixins.FileSupport ] props: id: {type:"integer"} logo: "file" settings: {type: "object", required: true} modelTypeIdentifier: -> 'system-settings' url: -> Lanes.config.api_path + '/system-settings'...
class SystemSettings extends Lanes.Models.Base mixins: [ Lanes.Models.Mixins.FileSupport ] props: id: {type:"integer"} logo: "file" settings: {type: "object", required: true} modelTypeIdentifier: -> 'system-settings' url: -> Lanes.config.api_path + '/system-settings'...
Remove channel reconnection as it causes problems
'use strict' angular.module('uiApp') .factory 'Channel', ($q, $callback, $rootScope, Config) -> Channel = {} ChannelObject = (socket) -> @socket = socket me = this @socket.onmessage = (e) -> me.onMessage(e) @matrix = {} this ChannelObject::send = (data) -> df...
'use strict' angular.module('uiApp') .factory 'Channel', ($q, $callback, $rootScope, Config) -> Channel = {} ChannelObject = (socket) -> @socket = socket me = this @socket.onmessage = (e) -> me.onMessage(e) @matrix = {} this ChannelObject::send = (data) -> df...
Remove quotes from twitter oembeds
Template.oembedUrlWidget.helpers description: -> if not this.meta? return return this.meta.ogDescription or this.meta.twitterDescription or this.meta.description title: -> if not this.meta? return return this.meta.ogTitle or this.meta.twitterTitle or this.meta.title or this.meta.pageTitle image: ->...
Template.oembedUrlWidget.helpers description: -> if not this.meta? return description = this.meta.ogDescription or this.meta.twitterDescription or this.meta.description if not description? return return description.replace /(^“)|(”$)/g, '' title: -> if not this.meta? return return this.meta.o...
Return undefined explicitly in Helpers::validateMessages
{Range} = require('atom') Helpers = module.exports = validateMessages: (results) -> if (not results) or results.constructor.name isnt 'Array' throw new Error "Got invalid response from Linter, Type: #{typeof results}" for result in results unless result.type throw new Error "Missing type ...
{Range} = require('atom') Helpers = module.exports = validateMessages: (results) -> if (not results) or results.constructor.name isnt 'Array' throw new Error "Got invalid response from Linter, Type: #{typeof results}" for result in results unless result.type throw new Error "Missing type ...
Fix copying of constructor, mount itself and the owner property
### A Result represents the...well...result of a Task. Any function given to {Scriptable#addTask} is expected to return a {Result}. ### module.exports = class Component constructor: (@owner) -> ### Copys all functions from the component to {#owner}. Ignores functions starting with an underscore and refuses t...
### A Result represents the...well...result of a Task. Any function given to {Scriptable#addTask} is expected to return a {Result}. ### module.exports = class Component constructor: (@owner) -> ### Copys all functions from the component to {#owner}. Ignores functions starting with an underscore and refuses t...
Improve minimal tests for slider
React = require('react/addons') expect = require('expect') utils = require('./utils') TestUtils = React.addons.TestUtils Slider = require('../slider') describe 'Slider', -> before -> @component = TestUtils.renderIntoDocument(<Slider />) @component.setState({ sliderStart: 0, sliderLe...
TestUtils = React.addons.TestUtils expect = require('expect') utils = require('./utils') Slider = require('../slider') describe 'Slider', -> describe '#events', -> slider = null before -> props = { min: -500, max: 500 } state = { sliderStart: 0, sliderLength: 1000 } slid...
Use valid CoffeeScript in example
grade = (student, period=(if b? then 7 else 6), messages={"A": "Excellent"}) -> if student.excellentWork "A+" else if student.okayStuff if student.triedHard then "B" else "B-" else "C" square = (x) -> x * x two = -> 2 math = root: Math.sqrt square: square cube: (x) -> x * square x race =...
grade = (student, period=(if b? then 7 else 6), messages={"A": "Excellent"}) -> if student.excellentWork "A+" else if student.okayStuff if student.triedHard then "B" else "B-" else "C" square = (x) -> x * x two = -> 2 math = root: Math.sqrt square: square cube: (x) -> x * square x race =...
Use preview tab like sublime
"*": "exception-reporting": userId: "53c5f869-8a29-d7f5-ef48-bc598612bb8d" welcome: showOnStartup: false core: {} editor: invisibles: {}
"*": "exception-reporting": userId: "53c5f869-8a29-d7f5-ef48-bc598612bb8d" welcome: showOnStartup: false editor: invisibles: {} tabs: usePreviewTabs: true
Select just the first matched element
@Pager = init: (@limit = 0, preload, @disable = false) -> @loading = $(".loading") if preload @offset = 0 @getOld() else @offset = @limit @initLoadMore() getOld: -> @loading.show() $.ajax type: "GET" url: $(".content_list").data('href') || location.href d...
@Pager = init: (@limit = 0, preload, @disable = false) -> @loading = $('.loading').first() if preload @offset = 0 @getOld() else @offset = @limit @initLoadMore() getOld: -> @loading.show() $.ajax type: "GET" url: $(".content_list").data('href') || location.hre...
Support corpora without a tagger config
App.CwbSearchInputsController = Em.ArrayController.extend needs: ['corpus', 'searches'] corpusBinding: 'controllers.corpus.content' currentInterface: null init: -> # Show the preferred interface (simple, multiword or regex) for this user or corpus @set('currentInterface', @get('controllers.corpus.pre...
App.CwbSearchInputsController = Em.ArrayController.extend needs: ['corpus', 'searches'] corpusBinding: 'controllers.corpus.content' currentInterface: null init: -> # Show the preferred interface (simple, multiword or regex) for this user or corpus @set('currentInterface', @get('controllers.corpus.pre...
Add JavaScript with JSX grammar to JSX language
module.exports = { name: "JSX" namespace: "jsx" fallback: ['js'] ### Supported Grammars ### grammars: [ "JSX" "JavaScript (JSX)" "Babel ES6 JavaScript" ] ### Supported extensions ### extensions: [ "jsx", "js" ] }
module.exports = { name: "JSX" namespace: "jsx" fallback: ['js'] ### Supported Grammars ### grammars: [ "JSX" "JavaScript (JSX)" "Babel ES6 JavaScript" "JavaScript with JSX" ] ### Supported extensions ### extensions: [ "jsx", "js" ] }
Add methods to find or retrieve all students
{CrudConfig, makeSimpleStore, extendConfig} = require './helpers' _ = require 'underscore' PerformanceConfig = { exports: getStudentOfTask: (courseId, taskId) -> performances = @_get(courseId) students = _.chain(performances) .pluck('students') .flatten(true) .value() #...
{CrudConfig, makeSimpleStore, extendConfig} = require './helpers' _ = require 'underscore' allStudents = (performances) -> _.chain(performances) .pluck('students') .flatten(true) .value() PerformanceConfig = { exports: getStudent: (courseId, roleId) -> students = allStudents @_get(courseId)...
Hide suggestions dropdown if the keyUp is Enter
Species.TaxonConceptSearchTextField = Em.TextField.extend value: '' currentTimeout: null attributeBindings: ['autocomplete'] focusOut: (event) -> @.$().attr('placeholder', @get('placeholder')) @hideDropdown() if !@get('parentView.mousedOver') keyUp: (event) -> Ember.run.cancel(@currentTimeout) ...
Species.TaxonConceptSearchTextField = Em.TextField.extend value: '' currentTimeout: null attributeBindings: ['autocomplete'] focusOut: (event) -> @.$().attr('placeholder', @get('placeholder')) @hideDropdown() if !@get('parentView.mousedOver') keyUp: (event) -> Ember.run.cancel(@currentTimeout) ...
Set default padding to 0, not null
module.exports = { name: "YAML" namespace: "yaml" fallback: [] scope: ['source.yaml'] ### Supported Grammars ### grammars: [ "YAML" ] ### Supported extensions ### extensions: [ "yml", "yaml" ] defaultBeautifier: "align-yaml" options: { padding: type: 'integer' ...
module.exports = { name: "YAML" namespace: "yaml" fallback: [] scope: ['source.yaml'] ### Supported Grammars ### grammars: [ "YAML" ] ### Supported extensions ### extensions: [ "yml", "yaml" ] defaultBeautifier: "align-yaml" options: { padding: type: 'integer' ...
Fix scan permissions error message
`import Ember from 'ember';` `import Notify from 'ember-notify';` `import CONSTANTS from '../utils/constants';` `import SocketMixin from '../mixins/socket';` IndexController = Ember.ArrayController.extend SocketMixin, needs: ['application'] storeURL: null ratio: null model:( -> @store.all 'project' )...
`import Ember from 'ember';` `import Notify from 'ember-notify';` `import CONSTANTS from '../utils/constants';` `import SocketMixin from '../mixins/socket';` IndexController = Ember.ArrayController.extend SocketMixin, needs: ['application'] storeURL: null ratio: null model:( -> @store.all 'project' )...
Fix path bug in menu generation
# General purpose utitily functions # ================================= fs = require 'fs' path = require 'path' # Trim newlines from beginning and end of multi line string. exports.trimNewLines = (str) -> str.replace(/^\n*/, '').replace(/\n*$/, '') # Build an HTML file name, depending on the source path. expor...
# General purpose utitily functions # ================================= fs = require 'fs' path = require 'path' # Trim newlines from beginning and end of multi line string. exports.trimNewLines = (str) -> str.replace(/^\n*/, '').replace(/\n*$/, '') # Build an HTML file name, depending on the source path. expor...
Update deprecated call to remote
_ = require 'underscore-plus' shell = require 'shell' remote = require 'remote' BrowserWindow = remote.require 'browser-window' module.exports = class WebWindow constructor: (url, options = {}, @openNewWindowExternally = true) -> _.defaults options, show: false width: 400 height: 600 skip...
_ = require 'underscore-plus' shell = require 'shell' remote = require 'remote' BrowserWindow = remote.BrowserWindow module.exports = class WebWindow constructor: (url, options = {}, @openNewWindowExternally = true) -> _.defaults options, show: false width: 400 height: 600 skipTaskbar: tr...
Fix the wildcard in gulp test-mocha
gulp = require('gulp') $ = require('gulp-load-plugins') $ = $ 'rename': 'gulp-task-listing': 'list' path = require('path') pkg = require('./package.json') gulp.task 'default', ['list'] gulp.task 'list', $.list gulp.task 'lint', ['lint-json', 'lint-coffee'] gulp.task 'lint-json', -> gulp.src('package.json') ...
gulp = require('gulp') $ = require('gulp-load-plugins') $ = $ 'rename': 'gulp-task-listing': 'list' path = require('path') pkg = require('./package.json') gulp.task 'default', ['list'] gulp.task 'list', $.list gulp.task 'lint', ['lint-json', 'lint-coffee'] gulp.task 'lint-json', -> gulp.src('package.json') ...
Add instanceof for new keyword
'use strict' DEFAULT = require './Default' CONST = require './Constants' existsDefault = require 'existential-default' module.exports = (options = {}) -> acho = existsDefault(options, DEFAULT) acho.diff = [] if acho.diff acho[key] = value for key, value of acho acho.messages = do -> message...
'use strict' DEFAULT = require './Default' CONST = require './Constants' existsDefault = require 'existential-default' Acho = (options = {}) -> return new Acho options unless this instanceof Acho acho = existsDefault(options, DEFAULT) acho.diff = [] if acho.diff acho[key] = value for key, value...
Make preview tabs off by default for now
module.exports = config: showIcons: type: 'boolean' default: true alwaysShowTabBar: type: 'boolean' default: true description: "Shows the Tab Bar when only 1 tab is open" tabScrolling: type: 'boolean' default: process.platform is 'linux' tabScrollingThreshold:...
module.exports = config: showIcons: type: 'boolean' default: true alwaysShowTabBar: type: 'boolean' default: true description: "Shows the Tab Bar when only 1 tab is open" tabScrolling: type: 'boolean' default: process.platform is 'linux' tabScrollingThreshold:...
Fix initialization of user profile logic
toggleTab = (targetClass) -> $footer = $('div.profile-footer') $nav = $footer.find('ul.nav') $nav.find('.active').removeClass 'active' $nav.find(".tab-#{targetClass}").addClass 'active' toggleTabPanel = (targetClass) -> $('div.tab-pane.active').removeClass 'active' $("div.tab-pane.#{targetClass...
initialize = () -> targetClass = window.location.hash.substr(1) unless targetClass targetClass = 'account' toggleTab(targetClass) toggleTabPanel(targetClass) updateFormAction(targetClass) updateLocationHash(targetClass) $(".nav a").click (event) -> event.preventDefault() ...
Fix meeting dropdown appearing when no meeting type selected
Species.EventLookup = Ember.Mixin.create selectedEvent: null selectedEventId: null initEventSelector: -> @set('selectedEvent', @get('controllers.events.content').findBy('id', @get('selectedEventId'))) if @get('selectedEventType') == null && @get('selectedEvent') @set('selectedEventType', @get('cont...
Species.EventLookup = Ember.Mixin.create selectedEvent: null selectedEventId: null initEventSelector: -> @set('selectedEvent', @get('controllers.events.content').findBy('id', @get('selectedEventId'))) if @get('selectedEventType') == null && @get('selectedEvent') @set('selectedEventType', @get('cont...
Remove unused JavaScript banners code
App.Banners = update_banner: (selector, text) -> $(selector).html(text) update_style: (selector, style) -> $(selector).removeClass($(selector).attr("class"), true) .addClass(style, true) update_background_color: (selector, background_color) -> $(selector).css("background-color", background_co...
App.Banners = update_banner: (selector, text) -> $(selector).html(text) update_background_color: (selector, background_color) -> $(selector).css("background-color", background_color) update_font_color: (selector, font_color) -> $(selector).css("color", font_color) initialize: -> $("[data-js-...
Abort pending artworks requests to fix race condition
_ = require 'underscore' Backbone = require 'backbone' { API_URL } = require('sharify').data Artworks = require '../../../collections/artworks.coffee' class Params extends Backbone.Model defaults: size: 9, page: 1 next: -> @set 'page', @get('page') + 1 prev: -> @set 'page', @get('page') - 1 module.exp...
_ = require 'underscore' Backbone = require 'backbone' { API_URL } = require('sharify').data Artworks = require '../../../collections/artworks.coffee' class Params extends Backbone.Model defaults: size: 9, page: 1 next: -> @set 'page', @get('page') + 1 prev: -> @set 'page', @get('page') - 1 module.exp...
Make sure the header appears on password pages
# For more information see: http://emberjs.com/guides/routing/ ETahi.Router.map ()-> @route('flow_manager') @resource 'paper', { path: '/papers/:paper_id' }, -> @route('edit') @route('manage') @route('submit') @route('task', {path: '/papers/:paper_id/tasks/:task_id'}) @route('paper_new', { path: '/...
# For more information see: http://emberjs.com/guides/routing/ ETahi.Router.map ()-> @route('flow_manager') @resource 'paper', { path: '/papers/:paper_id' }, -> @route('edit') @route('manage') @route('submit') @route('task', {path: '/papers/:paper_id/tasks/:task_id'}) @route('paper_new', { path: '/...
Rename variable for clarity (Refactor only)
# Place all the behaviors and hooks related to the matching controller here. # All this logic will automatically be available in application.js. # You can use CoffeeScript in this file: http://coffeescript.org/ formatNumberWithCommaDelimiter = (number) -> Math.ceil(number).toString().replace(/\B(?=(\d{3})+(?!\d))/g,...
# Place all the behaviors and hooks related to the matching controller here. # All this logic will automatically be available in application.js. # You can use CoffeeScript in this file: http://coffeescript.org/ formatNumberWithCommaDelimiter = (number) -> Math.ceil(number).toString().replace(/\B(?=(\d{3})+(?!\d))/g,...
Fix group for Atom project
[ { title: "Spyns" group: "Development" paths: [ "~/Development/spyns" ] } { title: "CSI-702: Homework02 Instructor Attempt" group: "Mason Fall 2017" paths: [ "~/Documents/work/teaching/2017_Spring_Semester/CSI-702_High_Performance_Computing/assignments/homework02-instructo...
[ { title: "Spyns" group: "Development" paths: [ "~/Development/spyns" ] }, { title: "CSI-702: Homework02 Instructor Attempt" group: "Mason Spring 2017" paths: [ "~/Documents/work/teaching/2017_Spring_Semester/CSI-702_High_Performance_Computing/assignments/homework02-instru...
Use scoped version of module
throttle = require 'lodash.throttle' events = require 'dom-events' listeners = [] exports.listen = (fn) -> listeners.push fn active = -> for fn in listeners fn() exports.active = throttledActive = throttle active, 5000, leading: true if typeof window isnt "undefined" # Listen to mouse movements. events...
throttle = require 'lodash.throttle' events = require '@kylemathews/dom-events' listeners = [] exports.listen = (fn) -> listeners.push fn active = -> for fn in listeners fn() exports.active = throttledActive = throttle active, 5000, leading: true if typeof window isnt "undefined" # Listen to mouse moveme...
Use single quote for className attribute
Link = require 'app/components/common/link' React = require 'kd-react' module.exports = class SidebarStackHeaderSection extends React.Component render: -> <div className='SidebarTeamSection'> <Link className='SidebarSection-headerTitle' href='/Stacks'> STACKS <span className="SidebarSe...
Link = require 'app/components/common/link' React = require 'kd-react' module.exports = class SidebarStackHeaderSection extends React.Component render: -> <div className='SidebarTeamSection'> <Link className='SidebarSection-headerTitle' href='/Stacks'> STACKS <span className='SidebarSe...
Add cmd-p to match sublime text's bindings
'body': 'meta-t': 'fuzzy-finder:toggle-file-finder' 'meta-b': 'fuzzy-finder:toggle-buffer-finder' 'ctrl-.': 'fuzzy-finder:find-under-cursor' 'meta-B': 'fuzzy-finder:toggle-git-status-finder'
'body': 'meta-t': 'fuzzy-finder:toggle-file-finder' 'meta-p': 'fuzzy-finder:toggle-file-finder' 'meta-b': 'fuzzy-finder:toggle-buffer-finder' 'ctrl-.': 'fuzzy-finder:find-under-cursor' 'meta-B': 'fuzzy-finder:toggle-git-status-finder'
Update test to respond to '/me'
define [ 'jquery' 'mockjax' ], ($) -> $.mockjax url: '/api/me' proxy: 'data/me.json' $.mockjax url: '/api/content' proxy: 'data/content.json' $.mockjax (settings) -> # url: '/api/content/<id>' id = settings.url.match(/\/api\/content\/(.*)$/); if id return {proxy: 'data/con...
define [ 'jquery' 'mockjax' ], ($) -> $.mockjax url: '/me' proxy: 'data/me.json' $.mockjax url: '/api/content' proxy: 'data/content.json' $.mockjax (settings) -> # url: '/api/content/<id>' id = settings.url.match(/\/api\/content\/(.*)$/); if id return {proxy: 'data/content...
Add suffix to update count
_ = require 'underscore-plus' {View} = require 'atom-space-pen-views' module.exports = class PackageUpdatesStatusView extends View @content: -> @div class: 'package-updates-status-view inline-block text text-info', => @span class: 'icon icon-package' @span outlet: 'countLabel', class: 'available-upda...
_ = require 'underscore-plus' {View} = require 'atom-space-pen-views' module.exports = class PackageUpdatesStatusView extends View @content: -> @div class: 'package-updates-status-view inline-block text text-info', => @span class: 'icon icon-package' @span outlet: 'countLabel', class: 'available-upda...
Fix for git pull in mac
git = require '../git' OutputView = require './output-view' BranchListView = require './branch-list-view' module.exports = # Extension of BranchListView # Takes the name of the remote to pull from class PullBranchListView extends BranchListView initialize: (@remote) -> git.cmd args: ['branch', ...
git = require '../git' OutputView = require './output-view' BranchListView = require './branch-list-view' module.exports = # Extension of BranchListView # Takes the name of the remote to pull from class PullBranchListView extends BranchListView initialize: (@remote) -> git.cmd args: ['branch', ...
Call service by intercepting form submit, not button or key presses
jQuery(document).ready -> writeanswer = (ans) -> jQuery("#answer").html(ans) answer = () -> question = jQuery("#question").val() jQuery.getJSON("/service/?question=#{question}", (data) -> writeanswer(data['answer'])) jQuery("#ask").click( (event) -> event.pr...
jQuery(document).ready -> writeanswer = (ans) -> jQuery("#answer").html(ans) answer = () -> question = jQuery("#question").val() jQuery.getJSON("/service/?question=#{question}", (data) -> writeanswer(data['answer'])) jQuery("form").submit( (event) -> eve...
Handle missing stylus node in style compilation
fs = require 'fs' stylus = require 'stylus' converter = require './converter' module.exports = build: (options, callback) -> if config = options.stylus fs.readFile config.main, 'utf8', (err, source) -> config.paths ?= [] config.paths.push "#{__dirname}/../../styles" renderer ...
fs = require 'fs' stylus = require 'stylus' converter = require './converter' module.exports = build: (options, callback) -> if config = options.stylus fs.readFile config.main, 'utf8', (err, source) -> config.paths ?= [] config.paths.push "#{__dirname}/../../styles" renderer ...
Set router location to hash.
VoluntaryOnEmberjs.Router.map -> @resource 'users' VoluntaryOnEmberjs.Router.reopen location: 'history'
VoluntaryOnEmberjs.Router.map -> @resource 'users' VoluntaryOnEmberjs.Router.reopen location: 'hash'
Add support for adding devices.
angular.module("hubud") .controller "MemberCtrl", ($scope, $state, Restangular) -> Restangular.one("members", $state.params.id).get().then (response) -> $scope.member = response Restangular.all("devices/types").getList().then (response) -> $scope.deviceTypes = response # Add device input ...
angular.module("hubud") .controller "MemberCtrl", ($scope, $state, $http, Restangular) -> Restangular.one("members", $state.params.id).get().then (response) -> $scope.member = response Restangular.all("devices/types").getList().then (response) -> $scope.deviceTypes = response # Add device i...
Use spawn instead of exec
cp = require '../../script/utils/child-process-wrapper.js' workDir = null module.exports = (grunt) -> grunt.registerTask 'bootstrap-atom', 'Bootstraps Atom', -> done = @async() process.chdir(grunt.config.get('workDir')) cp.safeExec 'node script/bootstrap --no-quiet', -> done()
cp = require '../../script/utils/child-process-wrapper.js' workDir = null module.exports = (grunt) -> grunt.registerTask 'bootstrap-atom', 'Bootstraps Atom', -> done = @async() process.chdir(grunt.config.get('workDir')) cp.safeSpawn 'node script/bootstrap --no-quiet', -> done()
Fix inevitable sending of lat lng in wrong order
class window.Farm constructor: (@name) -> @points = [] addPoint: (point) -> @points.push(point) removePoint: -> @points.pop() submitPoints: -> @throwIfInvalidGeom() @setLastPointToFirstPoint() console.log "Submitting polygon:" console.log @points query = @buildInsertQuery() ...
class window.Farm constructor: (@name) -> @points = [] addPoint: (point) -> @points.push(point) removePoint: -> @points.pop() submitPoints: -> @throwIfInvalidGeom() @setLastPointToFirstPoint() console.log "Submitting polygon:" console.log @points query = @buildInsertQuery() ...
Switch to a get request as it should have been
# Description # Notifies based on the results of xcode builds and controls xcode builds # # Dependencies # None # # Configuration # None # # Commands: # hubot build <bot name> - Start a build for bot named <bot name> UNIMPLEMENTED # # Author: # bmnick url = require('url') querystring = require('querystring')...
# Description # Notifies based on the results of xcode builds and controls xcode builds # # Dependencies # None # # Configuration # None # # Commands: # hubot build <bot name> - Start a build for bot named <bot name> UNIMPLEMENTED # # Author: # bmnick url = require('url') querystring = require('querystring')...
Use redirect setting instead of re-using setting that coincidentally would be flipped on the same day
Settings = require 'settings-sharelatex' module.exports = Features = externalAuthenticationSystemUsed: -> Settings.ldap? or Settings.saml? or Settings.overleaf?.oauth? hasFeature: (feature) -> switch feature when 'homepage' return Settings.enableHomepage when 'registration' return not Features.ext...
Settings = require 'settings-sharelatex' module.exports = Features = externalAuthenticationSystemUsed: -> Settings.ldap? or Settings.saml? or Settings.overleaf?.oauth? hasFeature: (feature) -> switch feature when 'homepage' return Settings.enableHomepage when 'registration' return not Features.ext...
Fix writing messages to database
Messages = new Meteor.Collection('messages') irc = Meteor.require 'irc' clients = {} Meteor.publish 'channel', (channel, nick) -> if channel && nick listen channel, nick Messages.find(channel : channel) listen = (channel, nick) -> console.log(channel, nick) client = clients[nick] = new irc.C...
Messages = new Meteor.Collection('messages') irc = Meteor.require 'irc' clients = {} Meteor.publish 'channel', (channel, nick) -> if channel && nick listen channel, nick Messages.find(channel : channel) listen = (channel, nick) -> console.log(channel, nick) client = clients[nick] = new irc.C...
Define the _rv object id as a non-enumerable, non-configurable, non-writable property on the object.
# The default `.` adapter thats comes with Rivets.js. Allows subscribing to # properties on POJSOs, implemented in ES5 natives using # `Object.defineProperty`. Rivets.adapters['.'] = id: '_rv' counter: 0 weakmap: {} subscribe: (obj, keypath, callback) -> unless obj[@id]? obj[@id] = @counter++ @...
# The default `.` adapter thats comes with Rivets.js. Allows subscribing to # properties on POJSOs, implemented in ES5 natives using # `Object.defineProperty`. Rivets.adapters['.'] = id: '_rv' counter: 0 weakmap: {} subscribe: (obj, keypath, callback) -> unless obj[@id]? id = @counter++ Object...
Fix for both vfilter syntax in OpenSSL
vfilter = require '../vfilter' exports.t = 'Install OpenSSL utility' exports._ = "#{vfilter.$6} [.]" exports.h = """ Install openssl.exe precompiled for Node.js project """ # Node.js v0.*.* contains OpenSSL binary exports.$ = (args)-> force = period args remote = vfilter [0] .last() unless remote ...
vFilter = require '../vfilter' exports.t = 'Install OpenSSL utility' exports._ = "#{vFilter.$6} [.]" exports.h = """ Install openssl.exe precompiled for Node.js project """ # Node.js v0.*.* contains OpenSSL binary exports.$ = (args)-> force = period args remote = vfilter [0] .last() unless remote ...
Use temp directory for core download.
fs = require('fs') request = require('request') unzip = require('unzip') getURL = (filename) -> baseurl = 'http://buildbot.libretro.com/' if process.platform == 'win32' if process.arch == 'ia32' baseurl += 'nightly/win-x86/latest' else if process.arch == 'x64' baseurl += 'nightly/win-x86_64/lat...
os = require('os') fs = require('fs') request = require('request') unzip = require('unzip') getURL = (filename) -> baseurl = 'http://buildbot.libretro.com/' if process.platform == 'win32' if process.arch == 'ia32' baseurl += 'nightly/win-x86/latest' else if process.arch == 'x64' baseurl += 'nig...
Use the API token instead of the plain password
# Description: # Domain availability via DNSimple. # # Dependencies: # None # # Configuration: # DNSIMPLE_USERNAME # DNSIMPLE_PASSWORD # # Commands: # check domain <domainname> - returns whether a domain is available # # Author: # jonmagic module.exports = (robot) -> robot.hear /check domain (.*)/i, (msg...
# Description: # Domain availability via DNSimple. # # Dependencies: # None # # Configuration: # DNSIMPLE_USERNAME # DNSIMPLE_API_TOKEN # # Commands: # check domain <domainname> - returns whether a domain is available # # Author: # jonmagic dnsimpleToken = new Buffer(process.env.DNSIMPLE_USERNAME + ':' + p...
Add support for MiKTeX 2.9
_ = require 'underscore-plus' path = require 'path' module.exports = class Builder constructor: -> @envPathKey = switch process.platform when 'win32' then 'Path' else 'PATH' run: (args, callback) -> undefined constructArgs: (filePath) -> undefined parseLogFile: (texFilePath) -> undefined co...
_ = require 'underscore-plus' path = require 'path' module.exports = class Builder constructor: -> @envPathKey = switch process.platform when 'win32' then 'Path' else 'PATH' run: (args, callback) -> undefined constructArgs: (filePath) -> undefined parseLogFile: (texFilePath) -> undefined co...
Check the existance of the child
EmberCart.CartItem = DS.Model.extend cartable_id: DS.attr('number') cartable_type: DS.attr('string') name: DS.attr('string') price: DS.attr('money') quantity: DS.attr('number') cart: DS.belongsTo('EmberCart.Cart') parent: DS.belongsTo('EmberCart.CartItem') children: DS.hasMany('EmberCart.CartItem', key:...
EmberCart.CartItem = DS.Model.extend cartable_id: DS.attr('number') cartable_type: DS.attr('string') name: DS.attr('string') price: DS.attr('money') quantity: DS.attr('number') cart: DS.belongsTo('EmberCart.Cart') parent: DS.belongsTo('EmberCart.CartItem') children: DS.hasMany('EmberCart.CartItem', key:...
Set beta tutorial subject ID
define (require, exports, module) -> {dev} = require 'zooniverse/config' module.exports = if dev project: 'bat_detective' workflow: '4fa0321854558f2fbf000003' tutorialSubject: '4ff8306854558fc372000001' else project: 'bat_detective' workflow: '4fff25b6516bcb41e7000002' tutorialSubject: 'T...
define (require, exports, module) -> {dev} = require 'zooniverse/config' module.exports = if dev project: 'bat_detective' workflow: '4fa0321854558f2fbf000003' tutorialSubject: '4ff8306854558fc372000001' else project: 'bat_detective' workflow: '4fff25b6516bcb41e7000002' tutorialSubject: '5...
Correct destination path for build to reflect docker name
# Core settings settings = port: 9000 # Source and Destination source = {} source.baseDir = 'frontend/src' source.scriptDir = "#{source.baseDir}/script" source.jsShimDir = "#{source.baseDir}/js-shim" source.jsDir = "#{source.baseDir}/js" source.sassDir = "#{source.baseDir}/sass" source.lessDir = "#{source.baseD...
# Core settings settings = port: 9000 # Source and Destination source = {} source.baseDir = 'frontend/src' source.scriptDir = "#{source.baseDir}/script" source.jsShimDir = "#{source.baseDir}/js-shim" source.jsDir = "#{source.baseDir}/js" source.sassDir = "#{source.baseDir}/sass" source.lessDir = "#{source.baseD...
Remove instead of detach on deactivate
BackgroundTipsView = require './background-tips-view' module.exports = activate: -> @backgroundTipsView = new BackgroundTipsView() deactivate: -> @backgroundTipsView.detach()
BackgroundTipsView = require './background-tips-view' module.exports = activate: -> @backgroundTipsView = new BackgroundTipsView() deactivate: -> @backgroundTipsView.remove()
Include error message in output
path = require 'path' _ = require 'underscore' CSON = require './cson' module.exports = (argv=[]) -> [inputFile, outputFile] = argv if inputFile?.length > 0 inputFile = path.resolve(process.cwd(), inputFile) else console.error("Input file must be first argument") process.exit(1) return if out...
path = require 'path' _ = require 'underscore' CSON = require './cson' module.exports = (argv=[]) -> [inputFile, outputFile] = argv if inputFile?.length > 0 inputFile = path.resolve(process.cwd(), inputFile) else console.error("Input file must be first argument") process.exit(1) return if out...
Add constants of tracker statuses to class Frame
_ = require 'underscore' Point2D = require './point2d' class Frame constructor: (data)-> @data = data @timestampString = data.timestamp @timestamp = data.time @state = data.state @raw = @rawCoordinates = new Point2D(data.raw) @avg = @smoothedCoordinates = new Point2D(data.avg) @leftEye...
_ = require 'underscore' Point2D = require './point2d' class Frame @STATE_TRACKING_GAZE = 1 @STATE_TRACKING_EYES = 1 << 1 @STATE_TRACKING_PRESENCE = 1 << 2 @STATE_TRACKING_FAIL = 1 << 3 @STATE_TRACKING_LOST = 1 << 4 constructor: (data)-> @data = data @timestampString = data.timestamp @timesta...
Set up selection vs. file args.
# Maps Atom Grammar names to the interpreter used by that language # As well as any special setup for arguments. module.exports = CoffeeScript: interpreter: "coffee" makeargs: (code) -> ['-e', code] JavaScript: interpreter: "node" makeargs: (code) -> ['-e', code] Ruby: interpreter: "ruby" ...
# Maps Atom Grammar names to the command used by that language # As well as any special setup for arguments. defaultFileArgs = (filename) -> [filename] module.exports = CoffeeScript: command: "coffee" bySelectionArgs: (code) -> ['-e', code] byFileArgs: defaultFileArgs JavaScript: command: "node" ...
Print paths to template files for template show action
fs = require 'fs' jade = require 'jade' path = require './utils/path-from-home' jsonFile = require './utils/json-file' error = require './utils/error' module.exports = save: -> jsonFile.write TEMPLATES_FILE, TEMPLATES getCompiled: (name) -> compile resolvePaths findTemplate name show: ...
fs = require 'fs' jade = require 'jade' path = require './utils/path-from-home' jsonFile = require './utils/json-file' error = require './utils/error' module.exports = save: -> jsonFile.write TEMPLATES_FILE, TEMPLATES getCompiled: (name) -> compile resolvePaths findTemplate name show: ...
Add spec for unrecognized command
fs = require 'fs' apm = require '../lib/apm-cli' describe 'apm command line interface', -> describe 'when no arguments are present', -> it 'prints a usage message', -> spyOn(console, 'log').andCallThrough() spyOn(console, 'error') apm.run([]) expect(console.log).not.toHaveBeenCalled() ...
fs = require 'fs' apm = require '../lib/apm-cli' describe 'apm command line interface', -> describe 'when no arguments are present', -> it 'prints a usage message', -> spyOn(console, 'log').andCallThrough() spyOn(console, 'error') apm.run([]) expect(console.log).not.toHaveBeenCalled() ...
Fix Bug in Onwards Concatenation
angular.module 'qbn.engine', ['qbn.quality', 'qbn.storylet', 'qbn.choice', 'qbn.resolve'] .controller 'QbnEngine', ($scope, qualities, storylets, frontalChoices, choiceFactory, resolveFilter) -> $scope.qualities = qualities.getAll() updateFrontalChoices = () -> $scope.choices = frontalChoices...
angular.module 'qbn.engine', ['qbn.quality', 'qbn.storylet', 'qbn.choice', 'qbn.resolve'] .controller 'QbnEngine', ($scope, qualities, storylets, frontalChoices, choiceFactory, resolveFilter) -> $scope.qualities = qualities.getAll() updateFrontalChoices = () -> $scope.choices = frontalChoices...
Fix load more on polls
angular.module('loomioApp').factory 'RecordLoader', (Records) -> class RecordLoader constructor: (opts = {}) -> @loadingFirst = true @collection = opts.collection @params = opts.params or {from: 0, per: 25, order: 'id'} @path = opts.path @numLoaded = opts.numLoaded or 0 ...
angular.module('loomioApp').factory 'RecordLoader', (Records) -> class RecordLoader constructor: (opts = {}) -> @loadingFirst = true @collection = opts.collection @params = _.merge({from: 0, per: 25, order: 'id'}, opts.params) @path = opts.path @numLoaded = opts.numLoaded ...
Remove hidden field and unneeded argument count
window.addAddressRow = -> count = $("[id^='organization_addresses_attributes']:text").length newRow = $ """ <div class="form-group"> <label for="organization_addresses_attributes_#{count}_address">Mailing Address</label> <input class="form-control" data-guard="different" type="text" value="" name="orga...
window.addAddressRow = -> count = $("[id^='organization_addresses_attributes']:text").length newRow = $ """ <div class="form-group"> <label for="organization_addresses_attributes_#{count}_address">Mailing Address</label> <input class="form-control" data-guard="different" type="text" value="" name="orga...
Make grunt watch .less files
module.exports = (grunt) -> grunt.initConfig pkg: '<json:package.json>' coffee: client: expand: true cwd: 'src' src: ['*.coffee'] dest: 'static/js/' ext: '.js' server: expand: true...
module.exports = (grunt) -> grunt.initConfig pkg: '<json:package.json>' coffee: client: expand: true cwd: 'src' src: ['*.coffee'] dest: 'static/js/' ext: '.js' server: expand: true...
Allow Hubot to suggest strategies to others, in multiple ways
# Description: # Display an oblique strategy # # Dependencies: # None # # Configuration: # None # # Commands: # hubot strategy - Returns an oblique strategy # # Author: # hakanensari module.exports = (robot) -> robot.respond /\W*(?:an? )?(?:oblique )?strategy\??$/i, (msg) -> msg.http('http://oblique.io...
# Description: # Suggests an oblique strategy # # Dependencies: # None # # Configuration: # None # # Commands: # hubot strategy - Suggests a strategy # hubot a strategy for <user> - Suggests a strategy to user # # Notes: # You can be as verbose as you want as long as you address Hubot and mention # the wo...
Create task shell that bootstraps worker
eval("window = {};") eval("console = {};") console.warn = -> self.postMessage type: 'warn' details: arguments console.log = -> self.postMessage type: 'warn' details: arguments eval("attachEvent = function(){};") self.addEventListener 'message', (event) -> switch event.data.type when 'start' ...
module.exports = loadTextmateSnippets: ({path}) -> fs = require 'fs' snippetsDirPath = fs.join(path, 'Snippets') snippets = fs.list(snippetsDirPath).map (snippetPath) -> fs.readPlist(snippetPath) self.postMessage type: 'loadSnippets' snippets: snippets loadAtomSnippets: ({path}) -...
Add ecosystem comments to book object
_ = require 'underscore' flux = require 'flux-react' LOADING = 'loading' FAILED = 'failed' EcosystemsActions = flux.createActions [ 'load' 'loaded' 'FAILED' ] EcosystemsStore = flux.createStore actions: _.values(EcosystemsActions) _asyncStatus: null load: -> # Used by API @_asyncStatus = LOADING ...
_ = require 'underscore' flux = require 'flux-react' LOADING = 'loading' FAILED = 'failed' EcosystemsActions = flux.createActions [ 'load' 'loaded' 'FAILED' ] EcosystemsStore = flux.createStore actions: _.values(EcosystemsActions) _asyncStatus: null load: -> # Used by API @_asyncStatus = LOADING ...
Fix bug - routes are now paths not route names
Handlebars.registerHelper( "accountButtons", -> return new Handlebars.SafeString(Template.entryAccountButtons()) ) Template.entryAccountButtons.helpers profileUrl: -> return false unless AccountsEntry.settings.profileRoute Router.path(AccountsEntry.settings.profileRoute) wrapLinks: -> Accounts...
Handlebars.registerHelper "accountButtons", -> return new Handlebars.SafeString(Template.entryAccountButtons()) Template.entryAccountButtons.helpers profileUrl: -> return false unless AccountsEntry.settings.profileRoute AccountsEntry.settings.profileRoute wrapLinks: -> AccountsEntry.settings.wra...
Change GitWrite success message to show 'all files' or filepath
{BufferedProcess} = require 'atom' StatusView = require './status-view' # if all param true, then 'git add .' gitWrite = (all=false)-> dir = atom.project.getRepo().getWorkingDirectory() currentFile = atom.workspace.getActiveEditor().getPath() toStage = if all then '.' else currentFile new BufferedProcess({ ...
{BufferedProcess} = require 'atom' StatusView = require './status-view' # if all param true, then 'git add .' gitWrite = (all=false)-> dir = atom.project.getRepo().getWorkingDirectory() currentFile = atom.workspace.getActiveEditor().getPath() toStage = if all then '.' else currentFile new BufferedProcess({ ...
Set displayName on App for prettier debugging.
React = require 'react' Router = require 'react-router' DocumentTitle = require 'react-document-title' RouteHandler = Router.RouteHandler Link = Router.Link module.exports = React.createClass render: -> title = 'Third Hand Information' <DocumentTitle title={ title }> <div className="wrapper"> <header role...
React = require 'react' Router = require 'react-router' DocumentTitle = require 'react-document-title' RouteHandler = Router.RouteHandler Link = Router.Link module.exports = React.createClass displayName: 'App' render: -> title = 'Third Hand Information' <DocumentTitle title={ title }> <div className="wrappe...
Fix missing reference to cilantro namespace
define ['../core', './field'], (c, field) -> class ConceptModel extends Backbone.Model parse: (resp) -> @fields = [] # Parse and attach field model instances to concept for attrs in resp.fields @fields.push(new field.FieldModel attrs, parse: true) ...
define ['../core', './field'], (c, field) -> class ConceptModel extends c.Backbone.Model parse: (resp) -> @fields = [] # Parse and attach field model instances to concept for attrs in resp.fields @fields.push(new field.FieldModel attrs, parse: true) ...
Convert configDefaults into config schema
Whitespace = require './whitespace' module.exports = configDefaults: removeTrailingWhitespace: true ignoreWhitespaceOnCurrentLine: true ignoreWhitespaceOnlyLines: false ensureSingleTrailingNewline: true activate: -> @whitespace = new Whitespace() deactivate: -> @whitespace?.destroy() ...
Whitespace = require './whitespace' module.exports = config: removeTrailingWhitespace: type: 'boolean' default: true scopes: '.source.jade': default: false ignoreWhitespaceOnCurrentLine: type: 'boolean' default: true ignoreWhitespaceOnlyLines: type: '...
Fix "total", set "status" not "pass"
#= require ./vendor/qunit QUnit.config.hidepassed = true QUnit.config.testTimeout = 5000 QUnit.begin (suiteDetails) -> Blade.suiteDidBegin(suiteDetails) failedAssertions = [] QUnit.testStart (testDetails) -> failedAssertions = [] QUnit.log (assertionDetails) -> unless assertionDetails.result failedAssert...
#= require ./vendor/qunit QUnit.config.hidepassed = true QUnit.config.testTimeout = 5000 QUnit.begin (suiteDetails) -> total = suiteDetails.totalTests Blade.suiteDidBegin({total}) failedAssertions = [] QUnit.testStart (testDetails) -> failedAssertions = [] QUnit.log (assertionDetails) -> unless assertionDe...
Move ready function into view.
window.bone = {} eventSplitter = /^(\S+)\s*(.*)$/ setupEvent = (eventName, rootSelector, selector, action) -> bone.view = (selector, options) -> view = {} events = options.events for eventSelector, functionName of events continue if functionName is 'events' do (eventSelector, functionNa...
window.bone = {} eventSplitter = /^(\S+)\s*(.*)$/ setupEvent = (eventName, rootSelector, selector, action) -> bone.view = (selector, options) -> view = {} events = options.events for eventSelector, functionName of events continue if functionName is 'events' do (eventSelector, functionNa...
Call parent to get events going for journal activities
noflo = require 'noflo' class IDBJournalStore extends noflo.journal.JournalStore constructor: (graph, @db) -> super graph @transactions = [] genKey: (revId) -> "#{@graph.properties.id}_#{revId}" putTransaction: (revId, entries) -> @lastRevision = revId if revId > @lastRevision trans = @db.trans...
noflo = require 'noflo' class IDBJournalStore extends noflo.journal.JournalStore constructor: (graph, @db) -> super graph @transactions = [] genKey: (revId) -> "#{@graph.properties.id}_#{revId}" putTransaction: (revId, entries) -> super revId, entries trans = @db.transaction ['journals'], 'rea...
Update Client-Logic (recieve feeds fromt the server)
entryModule = angular.module("entertain.io.app.entry", []) .controller 'EntryCtrl', ['$scope', '$http' ($scope, $http) -> $scope.entries = [] socket = io() $scope.userAmount = 0 $scope.yeah = -> socket.emit 'yeah', "foobar" false socket.on 'userAmount', (msg) -> $scope.userA...
entryModule = angular.module("entertain.io.app.entry", []) .controller 'EntryCtrl', ['$scope', '$http' ($scope, $http) -> $scope.entries = [] socket = io() $scope.updateFeed = -> socket.emit 'updateFeed' false socket.on 'feedUpdate', (feeds) -> $scope.entries.push feeds $sc...
Add some complexities to the conditional stubbing
describe 'when', -> Given -> @when = requireSubject('lib/when') Given -> @create = requireSubject('lib/create') describe 'unconditional stubbing', -> Given -> @testDouble = @create() context 'foo', -> Given -> @when(@testDouble()).thenReturn("foo") Then -> @testDouble() == "foo" context '...
describe 'when', -> Given -> @when = requireSubject('lib/when') Given -> @create = requireSubject('lib/create') describe 'unconditional stubbing', -> Given -> @testDouble = @create() context 'foo', -> Given -> @when(@testDouble()).thenReturn("foo") Then -> @testDouble() == "foo" context '...
Handle route to mount VM specific filetree.
do -> KD.registerRoutes 'IDE', '/:name?/IDE' : ({params:{name}, query})-> router = KD.getSingleton 'router' router.openSection 'IDE', name, query '/:name?/IDE/VM' : ({params:{name}, query})-> KD.singletons.router.handleRoute 'IDE' '/:name?/IDE/VM/:slug' : ({params:{name, slug}, query...
do -> KD.registerRoutes 'IDE', '/:name?/IDE' : ({params:{name}, query})-> router = KD.getSingleton 'router' router.openSection 'IDE', name, query '/:name?/IDE/VM/:slug' : ({params:{name, slug}, query})-> appManager = KD.getSingleton 'appManager' ideApps = appManager.appContro...
Add default test when checking Expected parameters to ensure that tests are being aware of 'required' option params
@expectRequiredParameters = (type, expectedParameterNames) -> originalType = type paramList = {} #check is this is an Abstract type if(type.isAbstract && type.isAbstract()) type = class A extends type #add the super classes parameters so that they arent in the tests if originalType.__super__ && origin...
@expectRequiredParameters = (type, expectedParameterNames) -> originalType = type paramList = {} baseExpectedParams = [] #check is this is an Abstract type if(type.isAbstract && type.isAbstract()) type = class A extends type #add the super classes parameters so that they arent in the tests if origin...
Make available as public interface
runtime = require '../src/runtime' ## Main program = require 'commander' main = () -> program .option('--host <hostname>', 'Host', String, 'localhost') .option('--port <port>', 'Port', Number, 3569) .option('--broker <uri>', 'Broker address', String, 'amqp://localhost') .option('--ide <uri>', 'FBP ...
runtime = require '../src/runtime' ## Main program = require 'commander' main = () -> program .option('--host <hostname>', 'Host', String, 'localhost') .option('--port <port>', 'Port', Number, 3569) .option('--broker <uri>', 'Broker address', String, 'amqp://localhost') .option('--ide <uri>', 'FBP ...
Reset PubSub after each spec
SYNC_RESPONSE = {} Lanes.Test.syncSucceedWith = (data) -> SYNC_RESPONSE.success = true SYNC_RESPONSE.total = data.length if _.isArray(data) SYNC_RESPONSE.data = _.cloneDeep(data) Lanes.Test.syncRespondWith = (obj) -> _.extend(SYNC_RESPONSE, obj) afterEach -> Lanes.current_user._events = @__user_e...
SYNC_RESPONSE = {} Lanes.Test.syncSucceedWith = (data) -> SYNC_RESPONSE.success = true SYNC_RESPONSE.total = data.length if _.isArray(data) SYNC_RESPONSE.data = _.cloneDeep(data) Lanes.Test.syncRespondWith = (obj) -> _.extend(SYNC_RESPONSE, obj) afterEach -> Lanes.current_user._events = @__user_e...
Call menu on menu button click, this should be a class.
class App Routers: {} Models: {} Collections: {} Views: {} init: -> window.flight = new Flight() new @Routers.AppRouter Backbone.history.start() @Collections.Activities.fetch() window.app = new App ` String.prototype.trim = function() { return this.replace(/^\s+|\s+$/g, ''); }; Str...
class App Routers: {} Models: {} Collections: {} Views: {} init: -> window.flight = new Flight() new @Routers.AppRouter Backbone.history.start() @Collections.Activities.fetch() $('#menu-button').click -> flight.slideOutMenu() window.app = new App ` String.prototype.trim = fu...
Use id's to transition page instead of rendered page element.
class AppRouter extends Backbone.Router routes: '': 'homePage' 'panel/:id': 'goToPanel' homePage: -> collection = new app.Collections.ActivityCollection @view = new app.Views.Home collection: collection collection.fetch() flight.goTo "#panel-1" goToPanel: (id)...
class AppRouter extends Backbone.Router routes: '': 'homePage' 'panel/:id': 'goToPanel' homePage: -> collection = new app.Collections.ActivityCollection @view = new app.Views.Home collection: collection collection.fetch() @view.render() flight.goTo "#panel-1" g...
Add save as HTML menu
'menu': [ 'label': 'Packages' 'submenu': [ 'label': 'Markdown' 'submenu': [ 'label': 'Toggle Preview' 'command': 'markdown-preview:toggle' ] ] ]
'menu': [ 'label': 'Packages' 'submenu': [ 'label': 'Markdown' 'submenu': [ 'label': 'Toggle Preview' 'command': 'markdown-preview:toggle' ] ] ] 'context-menu': '.markdown-preview': 'Save As HTML\u2026': 'core:save-as'
Add i18n when env.coffee isn't required
__ = window.i18n.data.__.bind(i18n.data) __n = window.i18n.data.__n.bind(i18n.data) types = "api_taik": "HP" "api_souk": "Armor" "api_houg": "Firepower" "api_raig": "Torpedo" "api_soku": "Speed" "api_baku": "Bombing" "api_tyku": "AA" "api_tais": "ASW" "api_houm": "Accuracy" "api_raim": "Torpedo Acc...
if window.i18n?.data? __ = window.i18n.data.__.bind(i18n.data) else path = require 'path-extra' i18n = new (require 'i18n-2') locales: ['en-US', 'ja-JP', 'zh-CN', 'zh-TW'] defaultLocale: 'zh-CN' directory: path.join ROOT, 'i18n', 'data' updateFiles: false indent: "\t" extension: '.json' ...
Make cosmetic improvements to the output
sys = require "sys" fs = require "fs" assert_module = require "assert" coffee = require "coffee-script" helpers = require("coffee-script/helpers").helpers # Parse our command-line arguments. test_file_paths = process.argv[1...process.argv.length] # Set up a basic test environment. This code is based on the code at #...
sys = require "sys" fs = require "fs" assert_module = require "assert" coffee = require "coffee-script" helpers = require("coffee-script/helpers").helpers # Parse our command-line arguments. test_file_paths = process.argv[1...process.argv.length] # ANSI color codes. Borrowed from # http://github.com/jashkenas/coffee...
Fix canonicalization of core modules
fs = require 'fs' path = require 'path' {sync: resolve} = require 'resolve' CORE_MODULES = require './core-modules' isCore = require './is-core' canonicalise = require './canonicalise' resolvePath = ({extensions, aliases, root, cwd, path: givenPath}, pkgMainField = 'browser') -> packageFilter = (pkg) -> if pkg...
fs = require 'fs' path = require 'path' {sync: resolve} = require 'resolve' CORE_MODULES = require './core-modules' isCore = require './is-core' canonicalise = require './canonicalise' resolvePath = ({extensions, aliases, root, cwd, path: givenPath}, pkgMainField = 'browser') -> packageFilter = (pkg) -> if pkg...
Add source.litcoffee to default grammars
url = require 'url' fs = require 'fs-plus' MarkdownPreviewView = require './markdown-preview-view' module.exports = configDefaults: grammars: [ 'source.gfm' 'text.plain' 'text.plain.null-grammar' ] activate: -> atom.workspaceView.command 'markdown-preview:show', => @show() ...
url = require 'url' fs = require 'fs-plus' MarkdownPreviewView = require './markdown-preview-view' module.exports = configDefaults: grammars: [ 'source.gfm' 'source.litcoffee' 'text.plain' 'text.plain.null-grammar' ] activate: -> atom.workspaceView.command 'markdown-preview:sh...
Fix method name in presenter spec
Presenters = require "../lib/presenters" helpers = require "./helpers" describe "Presenters", -> before -> @prediction1 = new helpers.PredictionStub stopName: "Michigan & 29th Street" @prediction2 = new helpers.PredictionStub {stopName: "Michigan & 28th Street", minutesFromNow: 1} @allPredictions = [@pr...
Presenters = require "../lib/presenters" helpers = require "./helpers" describe "Presenters", -> before -> @prediction1 = new helpers.PredictionStub stopName: "Michigan & 29th Street" @prediction2 = new helpers.PredictionStub {stopName: "Michigan & 28th Street", minutesFromNow: 1} @allPredictions = [@pr...
Use interpolated string for setting left offset
{View} = require 'space-pen' module.exports = class WrapGuide extends View @activate: (rootView) -> requireStylesheet 'wrap-guide.css' for editor in rootView.getEditors() @appendToEditorPane(rootView, editor) if rootView.parents('html').length rootView.on 'editor-open', (e, editor) => @appe...
{View} = require 'space-pen' module.exports = class WrapGuide extends View @activate: (rootView) -> requireStylesheet 'wrap-guide.css' for editor in rootView.getEditors() @appendToEditorPane(rootView, editor) if rootView.parents('html').length rootView.on 'editor-open', (e, editor) => @appe...
Allow images from any origin
logger = new Logger("browserpolicy") Meteor.startup(-> BrowserPolicy.content.allowImageOrigin( "https://s3-#{Meteor.settings.AWSRegion}.amazonaws.com") BrowserPolicy.content.allowImageOrigin("https://*.githubusercontent.com") BrowserPolicy.content.allowImageOrigin("blob:") BrowserPolicy.content.allowImageO...
logger = new Logger("browserpolicy") Meteor.startup(-> BrowserPolicy.content.allowImageOrigin( "https://s3-#{Meteor.settings.AWSRegion}.amazonaws.com") BrowserPolicy.content.allowImageOrigin("blob:") BrowserPolicy.content.allowImageOrigin("https://*") BrowserPolicy.content.allowImageOrigin("http://*") Br...
Use isFileSync instead of existsSync for checking file existence
SelectorLinter = require 'atom-selector-linter' CSON = require 'season' fs = require 'fs-plus' exports.getSelectorDeprecations = -> linter = new SelectorLinter(maxPerPackage: 50) linter.checkPackage(pkg) for pkg in atom.packages.getLoadedPackages() userKeymapPath = atom.keymaps.getUserKeymapPath() if fs....
SelectorLinter = require 'atom-selector-linter' CSON = require 'season' fs = require 'fs-plus' exports.getSelectorDeprecations = -> linter = new SelectorLinter(maxPerPackage: 50) linter.checkPackage(pkg) for pkg in atom.packages.getLoadedPackages() userKeymapPath = atom.keymaps.getUserKeymapPath() if fs....
Remove ac node module, handle new data being sent
# Description: # Listens for ac webhooks and post in chat # # Dependencies: # None # # Configuration: # None # # Commands: # None # # Notes: # None # # Author: # digitalsadhu ac = require('node-activecollab').init process.env.AC_API_URL, process.env.AC_API_KEY module.exports = (robot) -> robot.router.po...
# Description: # Listens for ac webhooks and post in chat # # Dependencies: # None # # Configuration: # None # # Commands: # None # # Notes: # None # # Author: # digitalsadhu module.exports = (robot) -> robot.router.post "/hubot/ac-webhooks", (req, res) -> data = JSON.parse req.body['data'] conso...
Remove trailing whitespace for jshint
angular .module("angularTodoList", ["ui.router"]) .config(['$stateProvider', '$urlMatcherFactoryProvider', ($stateProvider, $urlMatcherFactoryProvider) -> $urlMatcherFactoryProvider.strictMode(false) $stateProvider .state("index", url: "" templa...
angular .module("angularTodoList", ["ui.router"]) .config(['$stateProvider', '$urlMatcherFactoryProvider', ($stateProvider, $urlMatcherFactoryProvider) -> $urlMatcherFactoryProvider.strictMode(false) $stateProvider .state("index", url: "" templat...
Remove modernizr from app asset precompilation
# This is a manifest file that'll be compiled into including all the files listed below. # Add new JavaScript/Coffee code in separate files in this directory and they'll automatically # be included in the compiled file accessible from http://example.com/assets/application.js # It's not advisable to add code directly he...
# This is a manifest file that'll be compiled into including all the files listed below. # Add new JavaScript/Coffee code in separate files in this directory and they'll automatically # be included in the compiled file accessible from http://example.com/assets/application.js # It's not advisable to add code directly he...
Remove references to ember dependencies
# This is a manifest file that'll be compiled into application.js, which will include all the files # listed below. # Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, # or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path. # ...
# This is a manifest file that'll be compiled into application.js, which will include all the files # listed below. # Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, # or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path. # ...
Add ability to close tabs
React = require 'react' class Header extends React.Component @displayName = 'Header' @propTypes: menuItems: React.PropTypes.array constructor: (@props) -> render: => <div className="header-inner"> {@_renderLogo()} <ul className="list list-reset tabs-list"> {@_renderMenuItems()} ...
React = require 'react' class Header extends React.Component @displayName = 'Header' @propTypes: menuItems: React.PropTypes.array constructor: (@props) -> @state = menuItems: @props.menuItems render: => <div className="header-inner"> {@_renderLogo()} <ul className="list list-re...