id stringlengths 34 124 | type stringclasses 4
values | prompt stringlengths 0 4.95k | response stringlengths 21 4.89k | source_lang stringclasses 3
values | target_lang stringclasses 2
values | repo stringclasses 75
values | path stringlengths 10 88 | license stringclasses 1
value | commit stringlengths 40 40 | stars int64 431 18.7k | source_url stringlengths 86 176 | line_start int64 1 214 | line_end int64 3 253 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
lmaccherone/node-localstorage:LocalStorage.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var LocalStorage, _emptyDirectory, _rm, fs, path;
path = require('path');
fs = require('fs');
_emptyDirectory = function(target) {
var i, len, p, ref, results;
ref = fs.readdirSync(target);
results = [];
for (i = 0, len = ref.length; i < len; i++) {
... | path = require('path')
fs = require('fs')
_emptyDirectory = (target) ->
_rm(path.join(target, p)) for p in fs.readdirSync(target)
_rm = (target) ->
if fs.statSync(target).isDirectory()
_emptyDirectory(target)
fs.rmdirSync(target)
else
fs.unlinkSync(target)
class LocalStorage
constructor: (@locati... | JavaScript | CoffeeScript | lmaccherone/node-localstorage | LocalStorage.coffee | MIT | 2ff017439b39c854c5c1d5a6af45f8ca7b3af8d9 | 460 | https://github.com/lmaccherone/node-localstorage/blob/2ff017439b39c854c5c1d5a6af45f8ca7b3af8d9/LocalStorage.coffee | 1 | 50 |
lmaccherone/node-localstorage:LocalStorage.coffee:1:completion | completion | path = require('path')
fs = require('fs')
_emptyDirectory = (target) ->
_rm(path.join(target, p)) for p in fs.readdirSync(target)
_rm = (target) ->
if fs.statSync(target).isDirectory()
_emptyDirectory(target)
fs.rmdirSync(target)
else
fs.unlinkSync(target)
class LocalStorage
constructor: (@locati... | @keys = fs.readdirSync(@location)
@length = @keys.length
setItem: (key, value) ->
key = key.toString()
filename = path.join(@location, key)
existsBeforeSet = fs.existsSync(filename)
fs.writeFileSync(filename, value.toString(), 'utf8')
unless existsBeforeSet
@keys.push(key)
@length... | CoffeeScript | CoffeeScript | lmaccherone/node-localstorage | LocalStorage.coffee | MIT | 2ff017439b39c854c5c1d5a6af45f8ca7b3af8d9 | 460 | https://github.com/lmaccherone/node-localstorage/blob/2ff017439b39c854c5c1d5a6af45f8ca7b3af8d9/LocalStorage.coffee | 1 | 50 |
lmaccherone/node-localstorage:LocalStorage.coffee:2:raw_corpus | raw_corpus | @_init() # !TODO: Find a faster way to set @keys and length
key: (n) ->
return @keys[n]
clear: () ->
_emptyDirectory(@location)
@keys = []
@length = 0
_deleteLocation: () ->
_rm(@location)
@keys = []
@length = 0
exports.LocalStorage = LocalStorage | CoffeeScript | lmaccherone/node-localstorage | LocalStorage.coffee | MIT | 2ff017439b39c854c5c1d5a6af45f8ca7b3af8d9 | 460 | https://github.com/lmaccherone/node-localstorage/blob/2ff017439b39c854c5c1d5a6af45f8ca7b3af8d9/LocalStorage.coffee | 51 | 66 | ||
lmaccherone/node-localstorage:LocalStorage.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
@_init() # !TODO: Find a faster way to set @keys and length
key: (n) ->
return @keys[n]
clear: () ->
_emptyDirectory(@location)
@keys = []
@length = 0
_deleteLocation: () ->
_rm(@location)
@keys = []
@length = 0
exports.Loca... | this._init()({ // !TODO: Find a faster way to set @keys and length
key: function(n) {
return this.keys[n];
},
clear: function() {
_emptyDirectory(this.location);
this.keys = [];
return this.length = 0;
},
_deleteLocation: function() {
_rm(this.location);
this.keys = [];
return this... | CoffeeScript | JavaScript | lmaccherone/node-localstorage | LocalStorage.coffee | MIT | 2ff017439b39c854c5c1d5a6af45f8ca7b3af8d9 | 460 | https://github.com/lmaccherone/node-localstorage/blob/2ff017439b39c854c5c1d5a6af45f8ca7b3af8d9/LocalStorage.coffee | 51 | 66 |
lmaccherone/node-localstorage:LocalStorage.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
this._init()({ // !TODO: Find a faster way to set @keys and length
key: function(n) {
return this.keys[n];
},
clear: function() {
_emptyDirectory(this.location);
this.keys = [];
return this.length = 0;
},
_deleteLocation: function() {
... | @_init() # !TODO: Find a faster way to set @keys and length
key: (n) ->
return @keys[n]
clear: () ->
_emptyDirectory(@location)
@keys = []
@length = 0
_deleteLocation: () ->
_rm(@location)
@keys = []
@length = 0
exports.LocalStorage = LocalStorage | JavaScript | CoffeeScript | lmaccherone/node-localstorage | LocalStorage.coffee | MIT | 2ff017439b39c854c5c1d5a6af45f8ca7b3af8d9 | 460 | https://github.com/lmaccherone/node-localstorage/blob/2ff017439b39c854c5c1d5a6af45f8ca7b3af8d9/LocalStorage.coffee | 51 | 66 |
lmaccherone/node-localstorage:LocalStorage.coffee:2:completion | completion | @_init() # !TODO: Find a faster way to set @keys and length
key: (n) ->
return @keys[n]
clear: () ->
_emptyDirectory(@location)
@keys = [] | @length = 0
_deleteLocation: () ->
_rm(@location)
@keys = []
@length = 0
exports.LocalStorage = LocalStorage | CoffeeScript | CoffeeScript | lmaccherone/node-localstorage | LocalStorage.coffee | MIT | 2ff017439b39c854c5c1d5a6af45f8ca7b3af8d9 | 460 | https://github.com/lmaccherone/node-localstorage/blob/2ff017439b39c854c5c1d5a6af45f8ca7b3af8d9/LocalStorage.coffee | 51 | 66 |
lmaccherone/node-localstorage:LocalStorage.coffee:1:raw_corpus | raw_corpus | path = require('path')
fs = require('fs')
_emptyDirectory = (target) ->
_rm(path.join(target, p)) for p in fs.readdirSync(target)
_rm = (target) ->
if fs.statSync(target).isDirectory()
_emptyDirectory(target)
fs.rmdirSync(target)
else
fs.unlinkSync(target)
class LocalStorage
constructor: (@locati... | CoffeeScript | lmaccherone/node-localstorage | LocalStorage.coffee | MIT | 19496596646f366c2d200a60905d2e4fc87d50d3 | 460 | https://github.com/lmaccherone/node-localstorage/blob/19496596646f366c2d200a60905d2e4fc87d50d3/LocalStorage.coffee | 1 | 50 | ||
lmaccherone/node-localstorage:LocalStorage.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
path = require('path')
fs = require('fs')
_emptyDirectory = (target) ->
_rm(path.join(target, p)) for p in fs.readdirSync(target)
_rm = (target) ->
if fs.statSync(target).isDirectory()
_emptyDirectory(target)
fs.rmdirSync(target)
else
fs.unlin... | var LocalStorage, _emptyDirectory, _rm, fs, path;
path = require('path');
fs = require('fs');
_emptyDirectory = function(target) {
var i, len, p, ref, results;
ref = fs.readdirSync(target);
results = [];
for (i = 0, len = ref.length; i < len; i++) {
p = ref[i];
results.push(_rm(path.join(target, p)))... | CoffeeScript | JavaScript | lmaccherone/node-localstorage | LocalStorage.coffee | MIT | 19496596646f366c2d200a60905d2e4fc87d50d3 | 460 | https://github.com/lmaccherone/node-localstorage/blob/19496596646f366c2d200a60905d2e4fc87d50d3/LocalStorage.coffee | 1 | 50 |
lmaccherone/node-localstorage:LocalStorage.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var LocalStorage, _emptyDirectory, _rm, fs, path;
path = require('path');
fs = require('fs');
_emptyDirectory = function(target) {
var i, len, p, ref, results;
ref = fs.readdirSync(target);
results = [];
for (i = 0, len = ref.length; i < len; i++) {
... | path = require('path')
fs = require('fs')
_emptyDirectory = (target) ->
_rm(path.join(target, p)) for p in fs.readdirSync(target)
_rm = (target) ->
if fs.statSync(target).isDirectory()
_emptyDirectory(target)
fs.rmdirSync(target)
else
fs.unlinkSync(target)
class LocalStorage
constructor: (@locati... | JavaScript | CoffeeScript | lmaccherone/node-localstorage | LocalStorage.coffee | MIT | 19496596646f366c2d200a60905d2e4fc87d50d3 | 460 | https://github.com/lmaccherone/node-localstorage/blob/19496596646f366c2d200a60905d2e4fc87d50d3/LocalStorage.coffee | 1 | 50 |
lmaccherone/node-localstorage:LocalStorage.coffee:1:completion | completion | path = require('path')
fs = require('fs')
_emptyDirectory = (target) ->
_rm(path.join(target, p)) for p in fs.readdirSync(target)
_rm = (target) ->
if fs.statSync(target).isDirectory()
_emptyDirectory(target)
fs.rmdirSync(target)
else
fs.unlinkSync(target)
class LocalStorage
constructor: (@locati... | @keys = fs.readdirSync(@location)
@length = @keys.length
setItem: (key, value) ->
key = key.toString()
filename = path.join(@location, key)
existsBeforeSet = fs.existsSync(filename)
fs.writeFileSync(filename, value.toString(), 'utf8')
unless existsBeforeSet
@keys.push(key)
@length... | CoffeeScript | CoffeeScript | lmaccherone/node-localstorage | LocalStorage.coffee | MIT | 19496596646f366c2d200a60905d2e4fc87d50d3 | 460 | https://github.com/lmaccherone/node-localstorage/blob/19496596646f366c2d200a60905d2e4fc87d50d3/LocalStorage.coffee | 1 | 50 |
lmaccherone/node-localstorage:LocalStorage.coffee:1:raw_corpus | raw_corpus | class LocalStorage
constructor: (@location) ->
exports.LocalStorage = LocalStorage | CoffeeScript | lmaccherone/node-localstorage | LocalStorage.coffee | MIT | b41bbbe96caef6e32b6ed5dcb328f737dc2dfd32 | 460 | https://github.com/lmaccherone/node-localstorage/blob/b41bbbe96caef6e32b6ed5dcb328f737dc2dfd32/LocalStorage.coffee | 1 | 4 | ||
lmaccherone/node-localstorage:LocalStorage.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
class LocalStorage
constructor: (@location) ->
exports.LocalStorage = LocalStorage
``` | var LocalStorage;
LocalStorage = class LocalStorage {
constructor(location) {
this.location = location;
}
};
exports.LocalStorage = LocalStorage; | CoffeeScript | JavaScript | lmaccherone/node-localstorage | LocalStorage.coffee | MIT | b41bbbe96caef6e32b6ed5dcb328f737dc2dfd32 | 460 | https://github.com/lmaccherone/node-localstorage/blob/b41bbbe96caef6e32b6ed5dcb328f737dc2dfd32/LocalStorage.coffee | 1 | 4 |
lmaccherone/node-localstorage:LocalStorage.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var LocalStorage;
LocalStorage = class LocalStorage {
constructor(location) {
this.location = location;
}
};
exports.LocalStorage = LocalStorage;
``` | class LocalStorage
constructor: (@location) ->
exports.LocalStorage = LocalStorage | JavaScript | CoffeeScript | lmaccherone/node-localstorage | LocalStorage.coffee | MIT | b41bbbe96caef6e32b6ed5dcb328f737dc2dfd32 | 460 | https://github.com/lmaccherone/node-localstorage/blob/b41bbbe96caef6e32b6ed5dcb328f737dc2dfd32/LocalStorage.coffee | 1 | 4 |
lmaccherone/node-localstorage:LocalStorage.coffee:1:completion | completion | class LocalStorage
constructor: (@location) -> | exports.LocalStorage = LocalStorage | CoffeeScript | CoffeeScript | lmaccherone/node-localstorage | LocalStorage.coffee | MIT | b41bbbe96caef6e32b6ed5dcb328f737dc2dfd32 | 460 | https://github.com/lmaccherone/node-localstorage/blob/b41bbbe96caef6e32b6ed5dcb328f737dc2dfd32/LocalStorage.coffee | 1 | 4 |
CaryLandholt/AngularFun:scripts/directives/tabs.coffee:1:raw_corpus | raw_corpus | ###global define###
define ['libs/angular', 'directives/directives', 'libs/text!partials/tabs.html'], (angular, directives, template) ->
'use strict'
directives.directive 'tabs', [->
controller = ['$scope', '$element', '$rootScope', ($scope, $element, $rootScope) ->
$scope.tabs = []
$scope.select = (tab) -... | CoffeeScript | CaryLandholt/AngularFun | scripts/directives/tabs.coffee | MIT | 0ae299ec8a05ddbfb2e26f04898245b95f7ab37c | 672 | https://github.com/CaryLandholt/AngularFun/blob/0ae299ec8a05ddbfb2e26f04898245b95f7ab37c/scripts/directives/tabs.coffee | 1 | 34 | ||
CaryLandholt/AngularFun:scripts/directives/tabs.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
###global define###
define ['libs/angular', 'directives/directives', 'libs/text!partials/tabs.html'], (angular, directives, template) ->
'use strict'
directives.directive 'tabs', [->
controller = ['$scope', '$element', '$rootScope', ($scope, $element, $root... | /*global define*/
define(['libs/angular', 'directives/directives', 'libs/text!partials/tabs.html'], function(angular, directives, template) {
'use strict';
return directives.directive('tabs', [
function() {
var controller;
controller = [
'$scope',
'$element',
'$rootScope',
... | CoffeeScript | JavaScript | CaryLandholt/AngularFun | scripts/directives/tabs.coffee | MIT | 0ae299ec8a05ddbfb2e26f04898245b95f7ab37c | 672 | https://github.com/CaryLandholt/AngularFun/blob/0ae299ec8a05ddbfb2e26f04898245b95f7ab37c/scripts/directives/tabs.coffee | 1 | 34 |
CaryLandholt/AngularFun:scripts/directives/tabs.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
/*global define*/
define(['libs/angular', 'directives/directives', 'libs/text!partials/tabs.html'], function(angular, directives, template) {
'use strict';
return directives.directive('tabs', [
function() {
var controller;
controller = [
... | ###global define###
define ['libs/angular', 'directives/directives', 'libs/text!partials/tabs.html'], (angular, directives, template) ->
'use strict'
directives.directive 'tabs', [->
controller = ['$scope', '$element', '$rootScope', ($scope, $element, $rootScope) ->
$scope.tabs = []
$scope.select = (tab) -... | JavaScript | CoffeeScript | CaryLandholt/AngularFun | scripts/directives/tabs.coffee | MIT | 0ae299ec8a05ddbfb2e26f04898245b95f7ab37c | 672 | https://github.com/CaryLandholt/AngularFun/blob/0ae299ec8a05ddbfb2e26f04898245b95f7ab37c/scripts/directives/tabs.coffee | 1 | 34 |
CaryLandholt/AngularFun:scripts/directives/tabs.coffee:1:completion | completion | ###global define###
define ['libs/angular', 'directives/directives', 'libs/text!partials/tabs.html'], (angular, directives, template) ->
'use strict'
directives.directive 'tabs', [->
controller = ['$scope', '$element', '$rootScope', ($scope, $element, $rootScope) ->
$scope.tabs = []
$scope.select = (tab) -... | @addTab = (tab, tabId) ->
$scope.select tab if $scope.tabs.length is 0
$scope.tabs.push tab
if tabId
$rootScope.$on "changeTab##{tabId}", ->
$scope.select tab
]
controller: controller
replace: true
restrict: 'E'
scope: {}
template: template
transclude: true
] | CoffeeScript | CoffeeScript | CaryLandholt/AngularFun | scripts/directives/tabs.coffee | MIT | 0ae299ec8a05ddbfb2e26f04898245b95f7ab37c | 672 | https://github.com/CaryLandholt/AngularFun/blob/0ae299ec8a05ddbfb2e26f04898245b95f7ab37c/scripts/directives/tabs.coffee | 1 | 34 |
CaryLandholt/AngularFun:scripts/directives/tabs.coffee:1:raw_corpus | raw_corpus | ###global define###
define ['angular', 'directives/directives', 'text!partials/tabs.html'], (angular, directives, template) ->
'use strict'
directives.directive 'ngTabs', [->
restrict: 'E'
transclude: true
scope: {}
controller: ['$scope', '$element', ($scope, $element) ->
tabs = $scope.tabs = []
$sc... | CoffeeScript | CaryLandholt/AngularFun | scripts/directives/tabs.coffee | MIT | 20684f2b95cc0bd6b2c11651a2837ed604b15b77 | 672 | https://github.com/CaryLandholt/AngularFun/blob/20684f2b95cc0bd6b2c11651a2837ed604b15b77/scripts/directives/tabs.coffee | 1 | 27 | ||
CaryLandholt/AngularFun:scripts/directives/tabs.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
###global define###
define ['angular', 'directives/directives', 'text!partials/tabs.html'], (angular, directives, template) ->
'use strict'
directives.directive 'ngTabs', [->
restrict: 'E'
transclude: true
scope: {}
controller: ['$scope', '$element',... | /*global define*/
define(['angular', 'directives/directives', 'text!partials/tabs.html'], function(angular, directives, template) {
'use strict';
return directives.directive('ngTabs', [
function() {
return {
restrict: 'E',
transclude: true,
scope: {},
controller: [
... | CoffeeScript | JavaScript | CaryLandholt/AngularFun | scripts/directives/tabs.coffee | MIT | 20684f2b95cc0bd6b2c11651a2837ed604b15b77 | 672 | https://github.com/CaryLandholt/AngularFun/blob/20684f2b95cc0bd6b2c11651a2837ed604b15b77/scripts/directives/tabs.coffee | 1 | 27 |
CaryLandholt/AngularFun:scripts/directives/tabs.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
/*global define*/
define(['angular', 'directives/directives', 'text!partials/tabs.html'], function(angular, directives, template) {
'use strict';
return directives.directive('ngTabs', [
function() {
return {
restrict: 'E',
transclude: ... | ###global define###
define ['angular', 'directives/directives', 'text!partials/tabs.html'], (angular, directives, template) ->
'use strict'
directives.directive 'ngTabs', [->
restrict: 'E'
transclude: true
scope: {}
controller: ['$scope', '$element', ($scope, $element) ->
tabs = $scope.tabs = []
$sc... | JavaScript | CoffeeScript | CaryLandholt/AngularFun | scripts/directives/tabs.coffee | MIT | 20684f2b95cc0bd6b2c11651a2837ed604b15b77 | 672 | https://github.com/CaryLandholt/AngularFun/blob/20684f2b95cc0bd6b2c11651a2837ed604b15b77/scripts/directives/tabs.coffee | 1 | 27 |
CaryLandholt/AngularFun:scripts/directives/tabs.coffee:1:completion | completion | ###global define###
define ['angular', 'directives/directives', 'text!partials/tabs.html'], (angular, directives, template) ->
'use strict'
directives.directive 'ngTabs', [->
restrict: 'E'
transclude: true
scope: {}
controller: ['$scope', '$element', ($scope, $element) ->
tabs = $scope.tabs = [] | $scope.select = (tab) ->
angular.forEach tabs, (tab) ->
tab.selected = false
tab.selected = true
this.addTab = (tab) ->
$scope.select tab if tabs.length is 0
tabs.push tab
]
template: template
replace: true
] | CoffeeScript | CoffeeScript | CaryLandholt/AngularFun | scripts/directives/tabs.coffee | MIT | 20684f2b95cc0bd6b2c11651a2837ed604b15b77 | 672 | https://github.com/CaryLandholt/AngularFun/blob/20684f2b95cc0bd6b2c11651a2837ed604b15b77/scripts/directives/tabs.coffee | 1 | 27 |
CaryLandholt/AngularFun:scripts/directives/tabs.coffee:1:raw_corpus | raw_corpus | ###global define###
define ['angular', 'directives/directives', 'text!partials/tabs.html'], (angular, directives, template) ->
'use strict'
directives.directive 'ngTabs', [->
restrict: 'E'
transclude: true
scope: {}
controller: ($scope, $element) ->
tabs = $scope.tabs = []
$scope.select = (tab) ->
... | CoffeeScript | CaryLandholt/AngularFun | scripts/directives/tabs.coffee | MIT | d1cdd10b75a390445a1180aeef6460f89f7bfedb | 672 | https://github.com/CaryLandholt/AngularFun/blob/d1cdd10b75a390445a1180aeef6460f89f7bfedb/scripts/directives/tabs.coffee | 1 | 26 | ||
CaryLandholt/AngularFun:scripts/directives/tabs.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
###global define###
define ['angular', 'directives/directives', 'text!partials/tabs.html'], (angular, directives, template) ->
'use strict'
directives.directive 'ngTabs', [->
restrict: 'E'
transclude: true
scope: {}
controller: ($scope, $element) ->
... | /*global define*/
define(['angular', 'directives/directives', 'text!partials/tabs.html'], function(angular, directives, template) {
'use strict';
return directives.directive('ngTabs', [
function() {
return {
restrict: 'E',
transclude: true,
scope: {},
controller: function($... | CoffeeScript | JavaScript | CaryLandholt/AngularFun | scripts/directives/tabs.coffee | MIT | d1cdd10b75a390445a1180aeef6460f89f7bfedb | 672 | https://github.com/CaryLandholt/AngularFun/blob/d1cdd10b75a390445a1180aeef6460f89f7bfedb/scripts/directives/tabs.coffee | 1 | 26 |
CaryLandholt/AngularFun:scripts/directives/tabs.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
/*global define*/
define(['angular', 'directives/directives', 'text!partials/tabs.html'], function(angular, directives, template) {
'use strict';
return directives.directive('ngTabs', [
function() {
return {
restrict: 'E',
transclude: ... | ###global define###
define ['angular', 'directives/directives', 'text!partials/tabs.html'], (angular, directives, template) ->
'use strict'
directives.directive 'ngTabs', [->
restrict: 'E'
transclude: true
scope: {}
controller: ($scope, $element) ->
tabs = $scope.tabs = []
$scope.select = (tab) ->
... | JavaScript | CoffeeScript | CaryLandholt/AngularFun | scripts/directives/tabs.coffee | MIT | d1cdd10b75a390445a1180aeef6460f89f7bfedb | 672 | https://github.com/CaryLandholt/AngularFun/blob/d1cdd10b75a390445a1180aeef6460f89f7bfedb/scripts/directives/tabs.coffee | 1 | 26 |
CaryLandholt/AngularFun:scripts/directives/tabs.coffee:1:completion | completion | ###global define###
define ['angular', 'directives/directives', 'text!partials/tabs.html'], (angular, directives, template) ->
'use strict'
directives.directive 'ngTabs', [->
restrict: 'E'
transclude: true
scope: {}
controller: ($scope, $element) ->
tabs = $scope.tabs = [] | $scope.select = (tab) ->
angular.forEach tabs, (tab) ->
tab.selected = false
tab.selected = true
this.addTab = (tab) ->
$scope.select tab if tabs.length is 0
tabs.push tab
template: template
replace: true
] | CoffeeScript | CoffeeScript | CaryLandholt/AngularFun | scripts/directives/tabs.coffee | MIT | d1cdd10b75a390445a1180aeef6460f89f7bfedb | 672 | https://github.com/CaryLandholt/AngularFun/blob/d1cdd10b75a390445a1180aeef6460f89f7bfedb/scripts/directives/tabs.coffee | 1 | 26 |
jianliaoim/talk-os:talk-web/client/actions/notify.coffee:1:raw_corpus | raw_corpus | shortid = require 'shortid'
time = require '../util/time'
dispatcher = require '../dispatcher'
['warn', 'error', 'info', 'success'].forEach (method) ->
exports[method] = (text, config = {}) ->
_id = shortid.generate()
dispatcher.handleViewAction
type: 'notify/create'
data:
_id: _id
... | CoffeeScript | jianliaoim/talk-os | talk-web/client/actions/notify.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/actions/notify.coffee | 1 | 25 | ||
jianliaoim/talk-os:talk-web/client/actions/notify.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
shortid = require 'shortid'
time = require '../util/time'
dispatcher = require '../dispatcher'
['warn', 'error', 'info', 'success'].forEach (method) ->
exports[method] = (text, config = {}) ->
_id = shortid.generate()
dispatcher.handleViewAction
... | var dispatcher, shortid, time;
shortid = require('shortid');
time = require('../util/time');
dispatcher = require('../dispatcher');
['warn', 'error', 'info', 'success'].forEach(function(method) {
return exports[method] = function(text, config = {}) {
var _id;
_id = shortid.generate();
dispatcher.handl... | CoffeeScript | JavaScript | jianliaoim/talk-os | talk-web/client/actions/notify.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/actions/notify.coffee | 1 | 25 |
jianliaoim/talk-os:talk-web/client/actions/notify.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var dispatcher, shortid, time;
shortid = require('shortid');
time = require('../util/time');
dispatcher = require('../dispatcher');
['warn', 'error', 'info', 'success'].forEach(function(method) {
return exports[method] = function(text, config = {}) {
var ... | shortid = require 'shortid'
time = require '../util/time'
dispatcher = require '../dispatcher'
['warn', 'error', 'info', 'success'].forEach (method) ->
exports[method] = (text, config = {}) ->
_id = shortid.generate()
dispatcher.handleViewAction
type: 'notify/create'
data:
_id: _id
... | JavaScript | CoffeeScript | jianliaoim/talk-os | talk-web/client/actions/notify.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/actions/notify.coffee | 1 | 25 |
jianliaoim/talk-os:talk-web/client/actions/notify.coffee:1:completion | completion | shortid = require 'shortid'
time = require '../util/time'
dispatcher = require '../dispatcher'
['warn', 'error', 'info', 'success'].forEach (method) ->
exports[method] = (text, config = {}) ->
_id = shortid.generate()
dispatcher.handleViewAction
type: 'notify/create'
data: | _id: _id
type: method
text: text
config: config
time.delay 3000, ->
exports.remove _id
exports.remove = (_id) ->
dispatcher.handleViewAction
type: 'notify/remove'
data:
_id: _id | CoffeeScript | CoffeeScript | jianliaoim/talk-os | talk-web/client/actions/notify.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/actions/notify.coffee | 1 | 25 |
technoweenie/coffee-resque:test/worker_wildcard_queues.coffee:1:raw_corpus | raw_corpus | require './helper'
conn = resque()
conn.enqueue 'abc', 'def'
conn.enqueue 'def', 'ghi'
queues = []
conn.on 'error', (err, worker, queue) ->
queues.push queue.toString()
if queues.length == 2
worker.end()
conn.end()
assert.deepEqual ['abc', 'def'], queues
conn.worker('*').start()
process.on 'exit', -... | CoffeeScript | technoweenie/coffee-resque | test/worker_wildcard_queues.coffee | MIT | 4e86df8f93267d9cc4d85cddd85e18c7bea5a17b | 542 | https://github.com/technoweenie/coffee-resque/blob/4e86df8f93267d9cc4d85cddd85e18c7bea5a17b/test/worker_wildcard_queues.coffee | 1 | 18 | ||
technoweenie/coffee-resque:test/worker_wildcard_queues.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
require './helper'
conn = resque()
conn.enqueue 'abc', 'def'
conn.enqueue 'def', 'ghi'
queues = []
conn.on 'error', (err, worker, queue) ->
queues.push queue.toString()
if queues.length == 2
worker.end()
conn.end()
assert.deepEqual ['abc', 'def'... | var conn, queues;
require('./helper');
conn = resque();
conn.enqueue('abc', 'def');
conn.enqueue('def', 'ghi');
queues = [];
conn.on('error', function(err, worker, queue) {
queues.push(queue.toString());
if (queues.length === 2) {
worker.end();
conn.end();
return assert.deepEqual(['abc', 'def'], q... | CoffeeScript | JavaScript | technoweenie/coffee-resque | test/worker_wildcard_queues.coffee | MIT | 4e86df8f93267d9cc4d85cddd85e18c7bea5a17b | 542 | https://github.com/technoweenie/coffee-resque/blob/4e86df8f93267d9cc4d85cddd85e18c7bea5a17b/test/worker_wildcard_queues.coffee | 1 | 18 |
technoweenie/coffee-resque:test/worker_wildcard_queues.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var conn, queues;
require('./helper');
conn = resque();
conn.enqueue('abc', 'def');
conn.enqueue('def', 'ghi');
queues = [];
conn.on('error', function(err, worker, queue) {
queues.push(queue.toString());
if (queues.length === 2) {
worker.end();
co... | require './helper'
conn = resque()
conn.enqueue 'abc', 'def'
conn.enqueue 'def', 'ghi'
queues = []
conn.on 'error', (err, worker, queue) ->
queues.push queue.toString()
if queues.length == 2
worker.end()
conn.end()
assert.deepEqual ['abc', 'def'], queues
conn.worker('*').start()
process.on 'exit', -... | JavaScript | CoffeeScript | technoweenie/coffee-resque | test/worker_wildcard_queues.coffee | MIT | 4e86df8f93267d9cc4d85cddd85e18c7bea5a17b | 542 | https://github.com/technoweenie/coffee-resque/blob/4e86df8f93267d9cc4d85cddd85e18c7bea5a17b/test/worker_wildcard_queues.coffee | 1 | 18 |
technoweenie/coffee-resque:test/worker_wildcard_queues.coffee:1:completion | completion | require './helper'
conn = resque()
conn.enqueue 'abc', 'def'
conn.enqueue 'def', 'ghi'
queues = []
conn.on 'error', (err, worker, queue) ->
queues.push queue.toString() | if queues.length == 2
worker.end()
conn.end()
assert.deepEqual ['abc', 'def'], queues
conn.worker('*').start()
process.on 'exit', ->
console.log '.' | CoffeeScript | CoffeeScript | technoweenie/coffee-resque | test/worker_wildcard_queues.coffee | MIT | 4e86df8f93267d9cc4d85cddd85e18c7bea5a17b | 542 | https://github.com/technoweenie/coffee-resque/blob/4e86df8f93267d9cc4d85cddd85e18c7bea5a17b/test/worker_wildcard_queues.coffee | 1 | 18 |
linemanjs/lineman:tasks/spec-ci.coffee:1:raw_corpus | raw_corpus | ###
Task: spec-ci
Description: run specs in ci mode
Dependencies: grunt
Contributor: @davemo
###
_ = require("lodash")
path = require("path")
net = require('net')
spawn = require("child_process").spawn
testemRunnerPath = require("./../lib/testem-utils").testemRunnerPath
findsForwardedArgs = require("./../lib/finds-for... | CoffeeScript | linemanjs/lineman | tasks/spec-ci.coffee | MIT | 61d681532d9621e578d319c279006bbb728ece4b | 1,168 | https://github.com/linemanjs/lineman/blob/61d681532d9621e578d319c279006bbb728ece4b/tasks/spec-ci.coffee | 1 | 50 | ||
linemanjs/lineman:tasks/spec-ci.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
###
Task: spec-ci
Description: run specs in ci mode
Dependencies: grunt
Contributor: @davemo
###
_ = require("lodash")
path = require("path")
net = require('net')
spawn = require("child_process").spawn
testemRunnerPath = require("./../lib/testem-utils").testemRu... | /*
Task: spec-ci
Description: run specs in ci mode
Dependencies: grunt
Contributor: @davemo
*/
var AccumulatesStreams, _, findsForwardedArgs, net, path, spawn, testemRunnerPath;
_ = require("lodash");
path = require("path");
net = require('net');
spawn = require("child_process").spawn;
testemRunnerPath = require("... | CoffeeScript | JavaScript | linemanjs/lineman | tasks/spec-ci.coffee | MIT | 61d681532d9621e578d319c279006bbb728ece4b | 1,168 | https://github.com/linemanjs/lineman/blob/61d681532d9621e578d319c279006bbb728ece4b/tasks/spec-ci.coffee | 1 | 50 |
linemanjs/lineman:tasks/spec-ci.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
/*
Task: spec-ci
Description: run specs in ci mode
Dependencies: grunt
Contributor: @davemo
*/
var AccumulatesStreams, _, findsForwardedArgs, net, path, spawn, testemRunnerPath;
_ = require("lodash");
path = require("path");
net = require('net');
spawn = requir... | ###
Task: spec-ci
Description: run specs in ci mode
Dependencies: grunt
Contributor: @davemo
###
_ = require("lodash")
path = require("path")
net = require('net')
spawn = require("child_process").spawn
testemRunnerPath = require("./../lib/testem-utils").testemRunnerPath
findsForwardedArgs = require("./../lib/finds-for... | JavaScript | CoffeeScript | linemanjs/lineman | tasks/spec-ci.coffee | MIT | 61d681532d9621e578d319c279006bbb728ece4b | 1,168 | https://github.com/linemanjs/lineman/blob/61d681532d9621e578d319c279006bbb728ece4b/tasks/spec-ci.coffee | 1 | 50 |
linemanjs/lineman:tasks/spec-ci.coffee:1:completion | completion | ###
Task: spec-ci
Description: run specs in ci mode
Dependencies: grunt
Contributor: @davemo
###
_ = require("lodash")
path = require("path")
net = require('net')
spawn = require("child_process").spawn
testemRunnerPath = require("./../lib/testem-utils").testemRunnerPath
findsForwardedArgs = require("./../lib/finds-for... | concat(findsForwardedArgs.find()).
concat(["-R", reporter.type] if reporter.type?).
compact().value()
grunt.log.writeln("Will write spec-ci report results to `#{reporter.dest}`") if reporter.dest?
child = spawn(testemRunnerPath(), args)
stdout = new AccumulatesStreams(child.stdout).a... | CoffeeScript | CoffeeScript | linemanjs/lineman | tasks/spec-ci.coffee | MIT | 61d681532d9621e578d319c279006bbb728ece4b | 1,168 | https://github.com/linemanjs/lineman/blob/61d681532d9621e578d319c279006bbb728ece4b/tasks/spec-ci.coffee | 1 | 50 |
linemanjs/lineman:tasks/spec-ci.coffee:1:raw_corpus | raw_corpus | ###
Task: spec-ci
Description: run specs in ci mode
Dependencies: grunt
Contributor: @davemo
###
_ = require("lodash")
path = require("path")
net = require('net')
spawn = require("child_process").spawn
testemRunnerPath = require("./../lib/testem-utils").testemRunnerPath
findsForwardedArgs = require("./../lib/finds-for... | CoffeeScript | linemanjs/lineman | tasks/spec-ci.coffee | MIT | 1ba51ba4034b67a26392a06921ed94ff85fa6736 | 1,168 | https://github.com/linemanjs/lineman/blob/1ba51ba4034b67a26392a06921ed94ff85fa6736/tasks/spec-ci.coffee | 1 | 50 | ||
linemanjs/lineman:tasks/spec-ci.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
###
Task: spec-ci
Description: run specs in ci mode
Dependencies: grunt
Contributor: @davemo
###
_ = require("lodash")
path = require("path")
net = require('net')
spawn = require("child_process").spawn
testemRunnerPath = require("./../lib/testem-utils").testemRu... | /*
Task: spec-ci
Description: run specs in ci mode
Dependencies: grunt
Contributor: @davemo
*/
var AccumulatesStreams, _, findsForwardedArgs, net, path, spawn, testemRunnerPath;
_ = require("lodash");
path = require("path");
net = require('net');
spawn = require("child_process").spawn;
testemRunnerPath = require("... | CoffeeScript | JavaScript | linemanjs/lineman | tasks/spec-ci.coffee | MIT | 1ba51ba4034b67a26392a06921ed94ff85fa6736 | 1,168 | https://github.com/linemanjs/lineman/blob/1ba51ba4034b67a26392a06921ed94ff85fa6736/tasks/spec-ci.coffee | 1 | 50 |
linemanjs/lineman:tasks/spec-ci.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
/*
Task: spec-ci
Description: run specs in ci mode
Dependencies: grunt
Contributor: @davemo
*/
var AccumulatesStreams, _, findsForwardedArgs, net, path, spawn, testemRunnerPath;
_ = require("lodash");
path = require("path");
net = require('net');
spawn = requir... | ###
Task: spec-ci
Description: run specs in ci mode
Dependencies: grunt
Contributor: @davemo
###
_ = require("lodash")
path = require("path")
net = require('net')
spawn = require("child_process").spawn
testemRunnerPath = require("./../lib/testem-utils").testemRunnerPath
findsForwardedArgs = require("./../lib/finds-for... | JavaScript | CoffeeScript | linemanjs/lineman | tasks/spec-ci.coffee | MIT | 1ba51ba4034b67a26392a06921ed94ff85fa6736 | 1,168 | https://github.com/linemanjs/lineman/blob/1ba51ba4034b67a26392a06921ed94ff85fa6736/tasks/spec-ci.coffee | 1 | 50 |
linemanjs/lineman:tasks/spec-ci.coffee:1:completion | completion | ###
Task: spec-ci
Description: run specs in ci mode
Dependencies: grunt
Contributor: @davemo
###
_ = require("lodash")
path = require("path")
net = require('net')
spawn = require("child_process").spawn
testemRunnerPath = require("./../lib/testem-utils").testemRunnerPath
findsForwardedArgs = require("./../lib/finds-for... | concat(findsForwardedArgs.find()).
concat(["-R", reporter.type] if reporter.type?).
compact().value()
grunt.log.writeln("Will write spec-ci report results to `#{reporter.dest}`") if reporter.dest?
child = spawn(testemRunnerPath(), args)
stdout = new AccumulatesStreams(child.stdout).a... | CoffeeScript | CoffeeScript | linemanjs/lineman | tasks/spec-ci.coffee | MIT | 1ba51ba4034b67a26392a06921ed94ff85fa6736 | 1,168 | https://github.com/linemanjs/lineman/blob/1ba51ba4034b67a26392a06921ed94ff85fa6736/tasks/spec-ci.coffee | 1 | 50 |
linemanjs/lineman:tasks/spec-ci.coffee:1:raw_corpus | raw_corpus | ###
Task: spec-ci
Description: run specs in ci mode
Dependencies: grunt
Contributor: @davemo
###
_ = require("lodash")
path = require("path")
net = require('net')
spawn = require("child_process").spawn
testemRunnerPath = require("./../lib/testem-utils").testemRunnerPath
findsForwardedArgs = require("./../lib/finds-for... | CoffeeScript | linemanjs/lineman | tasks/spec-ci.coffee | MIT | 5b704eb9e1dbf0ca8b81f227b174e25220589675 | 1,168 | https://github.com/linemanjs/lineman/blob/5b704eb9e1dbf0ca8b81f227b174e25220589675/tasks/spec-ci.coffee | 1 | 50 | ||
linemanjs/lineman:tasks/spec-ci.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
###
Task: spec-ci
Description: run specs in ci mode
Dependencies: grunt
Contributor: @davemo
###
_ = require("lodash")
path = require("path")
net = require('net')
spawn = require("child_process").spawn
testemRunnerPath = require("./../lib/testem-utils").testemRu... | /*
Task: spec-ci
Description: run specs in ci mode
Dependencies: grunt
Contributor: @davemo
*/
var AccumulatesStreams, _, findsForwardedArgs, net, path, spawn, testemRunnerPath;
_ = require("lodash");
path = require("path");
net = require('net');
spawn = require("child_process").spawn;
testemRunnerPath = require("... | CoffeeScript | JavaScript | linemanjs/lineman | tasks/spec-ci.coffee | MIT | 5b704eb9e1dbf0ca8b81f227b174e25220589675 | 1,168 | https://github.com/linemanjs/lineman/blob/5b704eb9e1dbf0ca8b81f227b174e25220589675/tasks/spec-ci.coffee | 1 | 50 |
linemanjs/lineman:tasks/spec-ci.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
/*
Task: spec-ci
Description: run specs in ci mode
Dependencies: grunt
Contributor: @davemo
*/
var AccumulatesStreams, _, findsForwardedArgs, net, path, spawn, testemRunnerPath;
_ = require("lodash");
path = require("path");
net = require('net');
spawn = requir... | ###
Task: spec-ci
Description: run specs in ci mode
Dependencies: grunt
Contributor: @davemo
###
_ = require("lodash")
path = require("path")
net = require('net')
spawn = require("child_process").spawn
testemRunnerPath = require("./../lib/testem-utils").testemRunnerPath
findsForwardedArgs = require("./../lib/finds-for... | JavaScript | CoffeeScript | linemanjs/lineman | tasks/spec-ci.coffee | MIT | 5b704eb9e1dbf0ca8b81f227b174e25220589675 | 1,168 | https://github.com/linemanjs/lineman/blob/5b704eb9e1dbf0ca8b81f227b174e25220589675/tasks/spec-ci.coffee | 1 | 50 |
linemanjs/lineman:tasks/spec-ci.coffee:1:completion | completion | ###
Task: spec-ci
Description: run specs in ci mode
Dependencies: grunt
Contributor: @davemo
###
_ = require("lodash")
path = require("path")
net = require('net')
spawn = require("child_process").spawn
testemRunnerPath = require("./../lib/testem-utils").testemRunnerPath
findsForwardedArgs = require("./../lib/finds-for... | "-p", getRandomPort()
].concat(findsForwardedArgs.find())
args.push("-R", reporter.type) if reporter.type?
grunt.log.writeln("Will write spec-ci report results to `#{reporter.dest}`") if reporter.dest?
child = spawn(testemRunnerPath(), args)
stdout = new AccumulatesStreams(child.stdout).... | CoffeeScript | CoffeeScript | linemanjs/lineman | tasks/spec-ci.coffee | MIT | 5b704eb9e1dbf0ca8b81f227b174e25220589675 | 1,168 | https://github.com/linemanjs/lineman/blob/5b704eb9e1dbf0ca8b81f227b174e25220589675/tasks/spec-ci.coffee | 1 | 50 |
linemanjs/lineman:tasks/spec-ci.coffee:1:raw_corpus | raw_corpus | ###
Task: spec-ci
Description: run specs in ci mode
Dependencies: grunt
Contributor: @davemo
###
_ = require("lodash")
path = require("path")
net = require('net')
spawn = require("child_process").spawn
testemRunnerPath = require("./../lib/testem-utils").testemRunnerPath
findsForwardedArgs = require("./../lib/finds-for... | CoffeeScript | linemanjs/lineman | tasks/spec-ci.coffee | MIT | 0686722c7675dc5054614e62826b16e3a46370f5 | 1,168 | https://github.com/linemanjs/lineman/blob/0686722c7675dc5054614e62826b16e3a46370f5/tasks/spec-ci.coffee | 1 | 50 | ||
linemanjs/lineman:tasks/spec-ci.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
###
Task: spec-ci
Description: run specs in ci mode
Dependencies: grunt
Contributor: @davemo
###
_ = require("lodash")
path = require("path")
net = require('net')
spawn = require("child_process").spawn
testemRunnerPath = require("./../lib/testem-utils").testemRu... | /*
Task: spec-ci
Description: run specs in ci mode
Dependencies: grunt
Contributor: @davemo
*/
var AccumulatesStreams, _, findsForwardedArgs, net, path, spawn, testemRunnerPath;
_ = require("lodash");
path = require("path");
net = require('net');
spawn = require("child_process").spawn;
testemRunnerPath = require("... | CoffeeScript | JavaScript | linemanjs/lineman | tasks/spec-ci.coffee | MIT | 0686722c7675dc5054614e62826b16e3a46370f5 | 1,168 | https://github.com/linemanjs/lineman/blob/0686722c7675dc5054614e62826b16e3a46370f5/tasks/spec-ci.coffee | 1 | 50 |
linemanjs/lineman:tasks/spec-ci.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
/*
Task: spec-ci
Description: run specs in ci mode
Dependencies: grunt
Contributor: @davemo
*/
var AccumulatesStreams, _, findsForwardedArgs, net, path, spawn, testemRunnerPath;
_ = require("lodash");
path = require("path");
net = require('net');
spawn = requir... | ###
Task: spec-ci
Description: run specs in ci mode
Dependencies: grunt
Contributor: @davemo
###
_ = require("lodash")
path = require("path")
net = require('net')
spawn = require("child_process").spawn
testemRunnerPath = require("./../lib/testem-utils").testemRunnerPath
findsForwardedArgs = require("./../lib/finds-for... | JavaScript | CoffeeScript | linemanjs/lineman | tasks/spec-ci.coffee | MIT | 0686722c7675dc5054614e62826b16e3a46370f5 | 1,168 | https://github.com/linemanjs/lineman/blob/0686722c7675dc5054614e62826b16e3a46370f5/tasks/spec-ci.coffee | 1 | 50 |
linemanjs/lineman:tasks/spec-ci.coffee:1:completion | completion | ###
Task: spec-ci
Description: run specs in ci mode
Dependencies: grunt
Contributor: @davemo
###
_ = require("lodash")
path = require("path")
net = require('net')
spawn = require("child_process").spawn
testemRunnerPath = require("./../lib/testem-utils").testemRunnerPath
findsForwardedArgs = require("./../lib/finds-for... | "-p", getRandomPort()
].concat(findsForwardedArgs.find())
args.push("-R", reporter.type) if reporter.type?
child = spawn(testemRunnerPath(), args)
stdout = new AccumulatesStreams(child.stdout).accumulate()
child.on "exit", (code, signal) ->
writeReport(stdout.getValue(), reporter... | CoffeeScript | CoffeeScript | linemanjs/lineman | tasks/spec-ci.coffee | MIT | 0686722c7675dc5054614e62826b16e3a46370f5 | 1,168 | https://github.com/linemanjs/lineman/blob/0686722c7675dc5054614e62826b16e3a46370f5/tasks/spec-ci.coffee | 1 | 50 |
linemanjs/lineman:tasks/spec-ci.coffee:1:raw_corpus | raw_corpus | ###
Task: spec-ci
Description: run specs in ci mode
Dependencies: grunt
Contributor: @davemo
###
findsForwardedArgs = require("./../lib/finds-forwarded-args")
AccumulatesStreams = require("./../lib/accumulates_streams")
getRandomPort = ->
server = require('net').createServer()
port = server.listen(0).address().po... | CoffeeScript | linemanjs/lineman | tasks/spec-ci.coffee | MIT | fd78530bb1f4a4b50136bd06159b361329691389 | 1,168 | https://github.com/linemanjs/lineman/blob/fd78530bb1f4a4b50136bd06159b361329691389/tasks/spec-ci.coffee | 1 | 50 | ||
linemanjs/lineman:tasks/spec-ci.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
###
Task: spec-ci
Description: run specs in ci mode
Dependencies: grunt
Contributor: @davemo
###
findsForwardedArgs = require("./../lib/finds-forwarded-args")
AccumulatesStreams = require("./../lib/accumulates_streams")
getRandomPort = ->
server = require('ne... | /*
Task: spec-ci
Description: run specs in ci mode
Dependencies: grunt
Contributor: @davemo
*/
var AccumulatesStreams, findsForwardedArgs, getRandomPort;
findsForwardedArgs = require("./../lib/finds-forwarded-args");
AccumulatesStreams = require("./../lib/accumulates_streams");
getRandomPort = function() {
var por... | CoffeeScript | JavaScript | linemanjs/lineman | tasks/spec-ci.coffee | MIT | fd78530bb1f4a4b50136bd06159b361329691389 | 1,168 | https://github.com/linemanjs/lineman/blob/fd78530bb1f4a4b50136bd06159b361329691389/tasks/spec-ci.coffee | 1 | 50 |
linemanjs/lineman:tasks/spec-ci.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
/*
Task: spec-ci
Description: run specs in ci mode
Dependencies: grunt
Contributor: @davemo
*/
var AccumulatesStreams, findsForwardedArgs, getRandomPort;
findsForwardedArgs = require("./../lib/finds-forwarded-args");
AccumulatesStreams = require("./../lib/accumul... | ###
Task: spec-ci
Description: run specs in ci mode
Dependencies: grunt
Contributor: @davemo
###
findsForwardedArgs = require("./../lib/finds-forwarded-args")
AccumulatesStreams = require("./../lib/accumulates_streams")
getRandomPort = ->
server = require('net').createServer()
port = server.listen(0).address().po... | JavaScript | CoffeeScript | linemanjs/lineman | tasks/spec-ci.coffee | MIT | fd78530bb1f4a4b50136bd06159b361329691389 | 1,168 | https://github.com/linemanjs/lineman/blob/fd78530bb1f4a4b50136bd06159b361329691389/tasks/spec-ci.coffee | 1 | 50 |
linemanjs/lineman:tasks/spec-ci.coffee:1:completion | completion | ###
Task: spec-ci
Description: run specs in ci mode
Dependencies: grunt
Contributor: @davemo
###
findsForwardedArgs = require("./../lib/finds-forwarded-args")
AccumulatesStreams = require("./../lib/accumulates_streams")
getRandomPort = ->
server = require('net').createServer()
port = server.listen(0).address().po... | done = @async()
args = [
"ci",
"-f", path.resolve("#{process.cwd()}/config/spec.json"),
"-p", getRandomPort()
].concat(findsForwardedArgs.find())
args.push("-R", reporter.type) if reporter.type?
child = spawn(testemRunnerPath(), args)
stdout = new AccumulatesStream... | CoffeeScript | CoffeeScript | linemanjs/lineman | tasks/spec-ci.coffee | MIT | fd78530bb1f4a4b50136bd06159b361329691389 | 1,168 | https://github.com/linemanjs/lineman/blob/fd78530bb1f4a4b50136bd06159b361329691389/tasks/spec-ci.coffee | 1 | 50 |
linemanjs/lineman:tasks/spec-ci.coffee:1:raw_corpus | raw_corpus | ###
Task: spec-ci
Description: run specs in ci mode
Dependencies: grunt
Contributor: @davemo
###
findsForwardedArgs = require("./../lib/finds-forwarded-args")
getRandomPort = ->
server = require('net').createServer()
port = server.listen(0).address().port
server.close()
port
module.exports = (grunt) ->
pat... | CoffeeScript | linemanjs/lineman | tasks/spec-ci.coffee | MIT | b866771b1ec2cace9a9f503f00911cbb165cb321 | 1,168 | https://github.com/linemanjs/lineman/blob/b866771b1ec2cace9a9f503f00911cbb165cb321/tasks/spec-ci.coffee | 1 | 50 | ||
linemanjs/lineman:tasks/spec-ci.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
###
Task: spec-ci
Description: run specs in ci mode
Dependencies: grunt
Contributor: @davemo
###
findsForwardedArgs = require("./../lib/finds-forwarded-args")
getRandomPort = ->
server = require('net').createServer()
port = server.listen(0).address().port
... | /*
Task: spec-ci
Description: run specs in ci mode
Dependencies: grunt
Contributor: @davemo
*/
var findsForwardedArgs, getRandomPort;
findsForwardedArgs = require("./../lib/finds-forwarded-args");
getRandomPort = function() {
var port, server;
server = require('net').createServer();
port = server.listen(0).addr... | CoffeeScript | JavaScript | linemanjs/lineman | tasks/spec-ci.coffee | MIT | b866771b1ec2cace9a9f503f00911cbb165cb321 | 1,168 | https://github.com/linemanjs/lineman/blob/b866771b1ec2cace9a9f503f00911cbb165cb321/tasks/spec-ci.coffee | 1 | 50 |
linemanjs/lineman:tasks/spec-ci.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
/*
Task: spec-ci
Description: run specs in ci mode
Dependencies: grunt
Contributor: @davemo
*/
var findsForwardedArgs, getRandomPort;
findsForwardedArgs = require("./../lib/finds-forwarded-args");
getRandomPort = function() {
var port, server;
server = requir... | ###
Task: spec-ci
Description: run specs in ci mode
Dependencies: grunt
Contributor: @davemo
###
findsForwardedArgs = require("./../lib/finds-forwarded-args")
getRandomPort = ->
server = require('net').createServer()
port = server.listen(0).address().port
server.close()
port
module.exports = (grunt) ->
pat... | JavaScript | CoffeeScript | linemanjs/lineman | tasks/spec-ci.coffee | MIT | b866771b1ec2cace9a9f503f00911cbb165cb321 | 1,168 | https://github.com/linemanjs/lineman/blob/b866771b1ec2cace9a9f503f00911cbb165cb321/tasks/spec-ci.coffee | 1 | 50 |
linemanjs/lineman:tasks/spec-ci.coffee:1:completion | completion | ###
Task: spec-ci
Description: run specs in ci mode
Dependencies: grunt
Contributor: @davemo
###
findsForwardedArgs = require("./../lib/finds-forwarded-args")
getRandomPort = ->
server = require('net').createServer()
port = server.listen(0).address().port
server.close()
port
module.exports = (grunt) ->
pat... | done = @async()
args = [
"ci",
"-f", path.resolve("#{process.cwd()}/config/spec.json"),
"-p", getRandomPort()
].concat(findsForwardedArgs.find())
args.push("-R", reporter.type) if reporter.type?
child = spawn(testemRunnerPath(), args)
output = ""
child.stdou... | CoffeeScript | CoffeeScript | linemanjs/lineman | tasks/spec-ci.coffee | MIT | b866771b1ec2cace9a9f503f00911cbb165cb321 | 1,168 | https://github.com/linemanjs/lineman/blob/b866771b1ec2cace9a9f503f00911cbb165cb321/tasks/spec-ci.coffee | 1 | 50 |
linemanjs/lineman:tasks/spec-ci.coffee:2:raw_corpus | raw_corpus | writeReport = (report, dest) ->
return unless dest?
grunt.file.mkdir(path.dirname(dest))
grunt.file.write(dest, report, encoding: 'utf-8')
grunt.log.writeln("Wrote spec-ci report results to `#{dest}`") | CoffeeScript | linemanjs/lineman | tasks/spec-ci.coffee | MIT | b866771b1ec2cace9a9f503f00911cbb165cb321 | 1,168 | https://github.com/linemanjs/lineman/blob/b866771b1ec2cace9a9f503f00911cbb165cb321/tasks/spec-ci.coffee | 51 | 55 | ||
linemanjs/lineman:tasks/spec-ci.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
writeReport = (report, dest) ->
return unless dest?
grunt.file.mkdir(path.dirname(dest))
grunt.file.write(dest, report, encoding: 'utf-8')
grunt.log.writeln("Wrote spec-ci report results to `#{dest}`")
``` | var writeReport;
writeReport = function(report, dest) {
if (dest == null) {
return;
}
grunt.file.mkdir(path.dirname(dest));
grunt.file.write(dest, report, {
encoding: 'utf-8'
});
return grunt.log.writeln(`Wrote spec-ci report results to \`${dest}\``);
}; | CoffeeScript | JavaScript | linemanjs/lineman | tasks/spec-ci.coffee | MIT | b866771b1ec2cace9a9f503f00911cbb165cb321 | 1,168 | https://github.com/linemanjs/lineman/blob/b866771b1ec2cace9a9f503f00911cbb165cb321/tasks/spec-ci.coffee | 51 | 55 |
linemanjs/lineman:tasks/spec-ci.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var writeReport;
writeReport = function(report, dest) {
if (dest == null) {
return;
}
grunt.file.mkdir(path.dirname(dest));
grunt.file.write(dest, report, {
encoding: 'utf-8'
});
return grunt.log.writeln(`Wrote spec-ci report results to \`${des... | writeReport = (report, dest) ->
return unless dest?
grunt.file.mkdir(path.dirname(dest))
grunt.file.write(dest, report, encoding: 'utf-8')
grunt.log.writeln("Wrote spec-ci report results to `#{dest}`") | JavaScript | CoffeeScript | linemanjs/lineman | tasks/spec-ci.coffee | MIT | b866771b1ec2cace9a9f503f00911cbb165cb321 | 1,168 | https://github.com/linemanjs/lineman/blob/b866771b1ec2cace9a9f503f00911cbb165cb321/tasks/spec-ci.coffee | 51 | 55 |
linemanjs/lineman:tasks/spec-ci.coffee:2:completion | completion | writeReport = (report, dest) ->
return unless dest? | grunt.file.mkdir(path.dirname(dest))
grunt.file.write(dest, report, encoding: 'utf-8')
grunt.log.writeln("Wrote spec-ci report results to `#{dest}`") | CoffeeScript | CoffeeScript | linemanjs/lineman | tasks/spec-ci.coffee | MIT | b866771b1ec2cace9a9f503f00911cbb165cb321 | 1,168 | https://github.com/linemanjs/lineman/blob/b866771b1ec2cace9a9f503f00911cbb165cb321/tasks/spec-ci.coffee | 51 | 55 |
linemanjs/lineman:tasks/spec-ci.coffee:1:raw_corpus | raw_corpus | ###
Task: spec-ci
Description: run specs in ci mode
Dependencies: grunt
Contributor: @davemo
###
findsForwardedArgs = require("./../lib/finds-forwarded-args")
getRandomPort = ->
server = require('net').createServer()
port = server.listen(0).address().port
server.close()
port
module.exports = (grunt) ->
pat... | CoffeeScript | linemanjs/lineman | tasks/spec-ci.coffee | MIT | 7e181f43514d5e25283ae72881b923f42926635d | 1,168 | https://github.com/linemanjs/lineman/blob/7e181f43514d5e25283ae72881b923f42926635d/tasks/spec-ci.coffee | 1 | 50 | ||
linemanjs/lineman:tasks/spec-ci.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
###
Task: spec-ci
Description: run specs in ci mode
Dependencies: grunt
Contributor: @davemo
###
findsForwardedArgs = require("./../lib/finds-forwarded-args")
getRandomPort = ->
server = require('net').createServer()
port = server.listen(0).address().port
... | /*
Task: spec-ci
Description: run specs in ci mode
Dependencies: grunt
Contributor: @davemo
*/
var findsForwardedArgs, getRandomPort;
findsForwardedArgs = require("./../lib/finds-forwarded-args");
getRandomPort = function() {
var port, server;
server = require('net').createServer();
port = server.listen(0).addr... | CoffeeScript | JavaScript | linemanjs/lineman | tasks/spec-ci.coffee | MIT | 7e181f43514d5e25283ae72881b923f42926635d | 1,168 | https://github.com/linemanjs/lineman/blob/7e181f43514d5e25283ae72881b923f42926635d/tasks/spec-ci.coffee | 1 | 50 |
linemanjs/lineman:tasks/spec-ci.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
/*
Task: spec-ci
Description: run specs in ci mode
Dependencies: grunt
Contributor: @davemo
*/
var findsForwardedArgs, getRandomPort;
findsForwardedArgs = require("./../lib/finds-forwarded-args");
getRandomPort = function() {
var port, server;
server = requir... | ###
Task: spec-ci
Description: run specs in ci mode
Dependencies: grunt
Contributor: @davemo
###
findsForwardedArgs = require("./../lib/finds-forwarded-args")
getRandomPort = ->
server = require('net').createServer()
port = server.listen(0).address().port
server.close()
port
module.exports = (grunt) ->
pat... | JavaScript | CoffeeScript | linemanjs/lineman | tasks/spec-ci.coffee | MIT | 7e181f43514d5e25283ae72881b923f42926635d | 1,168 | https://github.com/linemanjs/lineman/blob/7e181f43514d5e25283ae72881b923f42926635d/tasks/spec-ci.coffee | 1 | 50 |
linemanjs/lineman:tasks/spec-ci.coffee:1:completion | completion | ###
Task: spec-ci
Description: run specs in ci mode
Dependencies: grunt
Contributor: @davemo
###
findsForwardedArgs = require("./../lib/finds-forwarded-args")
getRandomPort = ->
server = require('net').createServer()
port = server.listen(0).address().port
server.close()
port
module.exports = (grunt) ->
pat... | "ci",
"-f", path.resolve("#{process.cwd()}/config/spec.json"),
"-p", getRandomPort()
].concat(findsForwardedArgs.find())
if this.options().reporter
args.push "-R"
args.push this.options().reporter
child = spawn(testemRunnerPath(), args)
child.stdout.on "data", (d... | CoffeeScript | CoffeeScript | linemanjs/lineman | tasks/spec-ci.coffee | MIT | 7e181f43514d5e25283ae72881b923f42926635d | 1,168 | https://github.com/linemanjs/lineman/blob/7e181f43514d5e25283ae72881b923f42926635d/tasks/spec-ci.coffee | 1 | 50 |
linemanjs/lineman:tasks/spec-ci.coffee:1:raw_corpus | raw_corpus | ###
Task: spec-ci
Description: run specs in ci mode
Dependencies: grunt
Contributor: @davemo
###
findsForwardedArgs = require("./../lib/finds-forwarded-args")
getRandomPort = ->
server = require('net').createServer()
port = server.listen(0).address().port
server.close()
port
module.exports = (grunt) ->
pat... | CoffeeScript | linemanjs/lineman | tasks/spec-ci.coffee | MIT | 359de83946173a230f44e34403046157ee1f7074 | 1,168 | https://github.com/linemanjs/lineman/blob/359de83946173a230f44e34403046157ee1f7074/tasks/spec-ci.coffee | 1 | 40 | ||
linemanjs/lineman:tasks/spec-ci.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
###
Task: spec-ci
Description: run specs in ci mode
Dependencies: grunt
Contributor: @davemo
###
findsForwardedArgs = require("./../lib/finds-forwarded-args")
getRandomPort = ->
server = require('net').createServer()
port = server.listen(0).address().port
... | /*
Task: spec-ci
Description: run specs in ci mode
Dependencies: grunt
Contributor: @davemo
*/
var findsForwardedArgs, getRandomPort;
findsForwardedArgs = require("./../lib/finds-forwarded-args");
getRandomPort = function() {
var port, server;
server = require('net').createServer();
port = server.listen(0).addr... | CoffeeScript | JavaScript | linemanjs/lineman | tasks/spec-ci.coffee | MIT | 359de83946173a230f44e34403046157ee1f7074 | 1,168 | https://github.com/linemanjs/lineman/blob/359de83946173a230f44e34403046157ee1f7074/tasks/spec-ci.coffee | 1 | 40 |
linemanjs/lineman:tasks/spec-ci.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
/*
Task: spec-ci
Description: run specs in ci mode
Dependencies: grunt
Contributor: @davemo
*/
var findsForwardedArgs, getRandomPort;
findsForwardedArgs = require("./../lib/finds-forwarded-args");
getRandomPort = function() {
var port, server;
server = requir... | ###
Task: spec-ci
Description: run specs in ci mode
Dependencies: grunt
Contributor: @davemo
###
findsForwardedArgs = require("./../lib/finds-forwarded-args")
getRandomPort = ->
server = require('net').createServer()
port = server.listen(0).address().port
server.close()
port
module.exports = (grunt) ->
pat... | JavaScript | CoffeeScript | linemanjs/lineman | tasks/spec-ci.coffee | MIT | 359de83946173a230f44e34403046157ee1f7074 | 1,168 | https://github.com/linemanjs/lineman/blob/359de83946173a230f44e34403046157ee1f7074/tasks/spec-ci.coffee | 1 | 40 |
linemanjs/lineman:tasks/spec-ci.coffee:1:completion | completion | ###
Task: spec-ci
Description: run specs in ci mode
Dependencies: grunt
Contributor: @davemo
###
findsForwardedArgs = require("./../lib/finds-forwarded-args")
getRandomPort = ->
server = require('net').createServer()
port = server.listen(0).address().port
server.close()
port
module.exports = (grunt) ->
pat... | grunt.registerTask "spec-ci", "run specs in ci mode", (target) ->
try
done = @async()
args = [
"ci",
"-f", path.resolve("#{process.cwd()}/config/spec.json"),
"-p", getRandomPort()
].concat(findsForwardedArgs.find())
options = { stdio: 'inherit'}
child = spawn(te... | CoffeeScript | CoffeeScript | linemanjs/lineman | tasks/spec-ci.coffee | MIT | 359de83946173a230f44e34403046157ee1f7074 | 1,168 | https://github.com/linemanjs/lineman/blob/359de83946173a230f44e34403046157ee1f7074/tasks/spec-ci.coffee | 1 | 40 |
linemanjs/lineman:tasks/spec-ci.coffee:1:raw_corpus | raw_corpus | ###
Task: spec-ci
Description: run specs in ci mode
Dependencies: grunt
Contributor: @davemo
###
getRandomPort = ->
server = require('net').createServer()
port = server.listen(0).address().port
server.close()
port
module.exports = (grunt) ->
path = require("path")
spawn = require("child_process").spawn
t... | CoffeeScript | linemanjs/lineman | tasks/spec-ci.coffee | MIT | d556ec182affe0f066c215ae3834d3910a2e4286 | 1,168 | https://github.com/linemanjs/lineman/blob/d556ec182affe0f066c215ae3834d3910a2e4286/tasks/spec-ci.coffee | 1 | 37 | ||
linemanjs/lineman:tasks/spec-ci.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
###
Task: spec-ci
Description: run specs in ci mode
Dependencies: grunt
Contributor: @davemo
###
getRandomPort = ->
server = require('net').createServer()
port = server.listen(0).address().port
server.close()
port
module.exports = (grunt) ->
path = req... | /*
Task: spec-ci
Description: run specs in ci mode
Dependencies: grunt
Contributor: @davemo
*/
var getRandomPort;
getRandomPort = function() {
var port, server;
server = require('net').createServer();
port = server.listen(0).address().port;
server.close();
return port;
};
module.exports = function(grunt) {
... | CoffeeScript | JavaScript | linemanjs/lineman | tasks/spec-ci.coffee | MIT | d556ec182affe0f066c215ae3834d3910a2e4286 | 1,168 | https://github.com/linemanjs/lineman/blob/d556ec182affe0f066c215ae3834d3910a2e4286/tasks/spec-ci.coffee | 1 | 37 |
linemanjs/lineman:tasks/spec-ci.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
/*
Task: spec-ci
Description: run specs in ci mode
Dependencies: grunt
Contributor: @davemo
*/
var getRandomPort;
getRandomPort = function() {
var port, server;
server = require('net').createServer();
port = server.listen(0).address().port;
server.close();... | ###
Task: spec-ci
Description: run specs in ci mode
Dependencies: grunt
Contributor: @davemo
###
getRandomPort = ->
server = require('net').createServer()
port = server.listen(0).address().port
server.close()
port
module.exports = (grunt) ->
path = require("path")
spawn = require("child_process").spawn
t... | JavaScript | CoffeeScript | linemanjs/lineman | tasks/spec-ci.coffee | MIT | d556ec182affe0f066c215ae3834d3910a2e4286 | 1,168 | https://github.com/linemanjs/lineman/blob/d556ec182affe0f066c215ae3834d3910a2e4286/tasks/spec-ci.coffee | 1 | 37 |
linemanjs/lineman:tasks/spec-ci.coffee:1:completion | completion | ###
Task: spec-ci
Description: run specs in ci mode
Dependencies: grunt
Contributor: @davemo
###
getRandomPort = ->
server = require('net').createServer()
port = server.listen(0).address().port
server.close()
port
module.exports = (grunt) ->
path = require("path")
spawn = require("child_process").spawn
t... | try
done = @async()
args = [
"ci",
"-f", path.resolve("#{process.cwd()}/config/spec.json"),
"-p", getRandomPort()
]
options = { stdio: 'inherit'}
child = spawn(testemRunnerPath(), args, options)
child.on "exit", (code, signal) ->
if code != 0
... | CoffeeScript | CoffeeScript | linemanjs/lineman | tasks/spec-ci.coffee | MIT | d556ec182affe0f066c215ae3834d3910a2e4286 | 1,168 | https://github.com/linemanjs/lineman/blob/d556ec182affe0f066c215ae3834d3910a2e4286/tasks/spec-ci.coffee | 1 | 37 |
linemanjs/lineman:tasks/spec-ci.coffee:1:raw_corpus | raw_corpus | ###
Task: spec-ci
Description: run specs in ci mode
Dependencies: grunt
Contributor: @davemo
###
module.exports = (grunt) ->
path = require("path")
spawn = require("child_process").spawn
testemRunnerPath = require("./../lib/testem-utils").testemRunnerPath
grunt.registerTask "spec-ci", "run specs in ci mode", (... | CoffeeScript | linemanjs/lineman | tasks/spec-ci.coffee | MIT | c60ae6883e711d4b42fb912a40c1dc7e465f00bc | 1,168 | https://github.com/linemanjs/lineman/blob/c60ae6883e711d4b42fb912a40c1dc7e465f00bc/tasks/spec-ci.coffee | 1 | 27 | ||
linemanjs/lineman:tasks/spec-ci.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
###
Task: spec-ci
Description: run specs in ci mode
Dependencies: grunt
Contributor: @davemo
###
module.exports = (grunt) ->
path = require("path")
spawn = require("child_process").spawn
testemRunnerPath = require("./../lib/testem-utils").testemRunnerPath
... | /*
Task: spec-ci
Description: run specs in ci mode
Dependencies: grunt
Contributor: @davemo
*/
module.exports = function(grunt) {
var path, spawn, testemRunnerPath;
path = require("path");
spawn = require("child_process").spawn;
testemRunnerPath = require("./../lib/testem-utils").testemRunnerPath;
return grun... | CoffeeScript | JavaScript | linemanjs/lineman | tasks/spec-ci.coffee | MIT | c60ae6883e711d4b42fb912a40c1dc7e465f00bc | 1,168 | https://github.com/linemanjs/lineman/blob/c60ae6883e711d4b42fb912a40c1dc7e465f00bc/tasks/spec-ci.coffee | 1 | 27 |
linemanjs/lineman:tasks/spec-ci.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
/*
Task: spec-ci
Description: run specs in ci mode
Dependencies: grunt
Contributor: @davemo
*/
module.exports = function(grunt) {
var path, spawn, testemRunnerPath;
path = require("path");
spawn = require("child_process").spawn;
testemRunnerPath = require("... | ###
Task: spec-ci
Description: run specs in ci mode
Dependencies: grunt
Contributor: @davemo
###
module.exports = (grunt) ->
path = require("path")
spawn = require("child_process").spawn
testemRunnerPath = require("./../lib/testem-utils").testemRunnerPath
grunt.registerTask "spec-ci", "run specs in ci mode", (... | JavaScript | CoffeeScript | linemanjs/lineman | tasks/spec-ci.coffee | MIT | c60ae6883e711d4b42fb912a40c1dc7e465f00bc | 1,168 | https://github.com/linemanjs/lineman/blob/c60ae6883e711d4b42fb912a40c1dc7e465f00bc/tasks/spec-ci.coffee | 1 | 27 |
linemanjs/lineman:tasks/spec-ci.coffee:1:completion | completion | ###
Task: spec-ci
Description: run specs in ci mode
Dependencies: grunt
Contributor: @davemo
###
module.exports = (grunt) ->
path = require("path")
spawn = require("child_process").spawn
testemRunnerPath = require("./../lib/testem-utils").testemRunnerPath
grunt.registerTask "spec-ci", "run specs in ci mode", (... | done = @async()
args = ["ci", "-f", path.resolve("#{process.cwd()}/config/spec.json")]
options = { stdio: 'inherit'}
child = spawn(testemRunnerPath(), args, options)
child.on "exit", (code, signal) ->
if code != 0
grunt.warn("Spec execution appears to have failed.")
... | CoffeeScript | CoffeeScript | linemanjs/lineman | tasks/spec-ci.coffee | MIT | c60ae6883e711d4b42fb912a40c1dc7e465f00bc | 1,168 | https://github.com/linemanjs/lineman/blob/c60ae6883e711d4b42fb912a40c1dc7e465f00bc/tasks/spec-ci.coffee | 1 | 27 |
linemanjs/lineman:tasks/spec-ci.coffee:1:raw_corpus | raw_corpus | ###
Task: spec-ci
Description: run specs in ci mode
Dependencies: grunt
Contributor: @davemo
###
module.exports = (grunt) ->
path = require("path")
spawn = require("child_process").spawn
testemRunnerPath = require("./../lib/testem-utils").testemRunnerPath
grunt.registerTask "spec-ci", "run specs in ci mode", (... | CoffeeScript | linemanjs/lineman | tasks/spec-ci.coffee | MIT | 4d41a7084fc9bd0ab5948873d2dbc731ddb3d683 | 1,168 | https://github.com/linemanjs/lineman/blob/4d41a7084fc9bd0ab5948873d2dbc731ddb3d683/tasks/spec-ci.coffee | 1 | 27 | ||
linemanjs/lineman:tasks/spec-ci.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
###
Task: spec-ci
Description: run specs in ci mode
Dependencies: grunt
Contributor: @davemo
###
module.exports = (grunt) ->
path = require("path")
spawn = require("child_process").spawn
testemRunnerPath = require("./../lib/testem-utils").testemRunnerPath
... | /*
Task: spec-ci
Description: run specs in ci mode
Dependencies: grunt
Contributor: @davemo
*/
module.exports = function(grunt) {
var path, spawn, testemRunnerPath;
path = require("path");
spawn = require("child_process").spawn;
testemRunnerPath = require("./../lib/testem-utils").testemRunnerPath;
return grun... | CoffeeScript | JavaScript | linemanjs/lineman | tasks/spec-ci.coffee | MIT | 4d41a7084fc9bd0ab5948873d2dbc731ddb3d683 | 1,168 | https://github.com/linemanjs/lineman/blob/4d41a7084fc9bd0ab5948873d2dbc731ddb3d683/tasks/spec-ci.coffee | 1 | 27 |
linemanjs/lineman:tasks/spec-ci.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
/*
Task: spec-ci
Description: run specs in ci mode
Dependencies: grunt
Contributor: @davemo
*/
module.exports = function(grunt) {
var path, spawn, testemRunnerPath;
path = require("path");
spawn = require("child_process").spawn;
testemRunnerPath = require("... | ###
Task: spec-ci
Description: run specs in ci mode
Dependencies: grunt
Contributor: @davemo
###
module.exports = (grunt) ->
path = require("path")
spawn = require("child_process").spawn
testemRunnerPath = require("./../lib/testem-utils").testemRunnerPath
grunt.registerTask "spec-ci", "run specs in ci mode", (... | JavaScript | CoffeeScript | linemanjs/lineman | tasks/spec-ci.coffee | MIT | 4d41a7084fc9bd0ab5948873d2dbc731ddb3d683 | 1,168 | https://github.com/linemanjs/lineman/blob/4d41a7084fc9bd0ab5948873d2dbc731ddb3d683/tasks/spec-ci.coffee | 1 | 27 |
linemanjs/lineman:tasks/spec-ci.coffee:1:completion | completion | ###
Task: spec-ci
Description: run specs in ci mode
Dependencies: grunt
Contributor: @davemo
###
module.exports = (grunt) ->
path = require("path")
spawn = require("child_process").spawn
testemRunnerPath = require("./../lib/testem-utils").testemRunnerPath
grunt.registerTask "spec-ci", "run specs in ci mode", (... | done = @async()
args = ["ci", "-f", path.resolve("#{process.cwd()}/config/spec.json")]
options = { stdio: 'ignore'}
child = spawn(testemRunnerPath(), args, options)
child.on "exit", (code, signal) ->
if code != 0
grunt.warn("Spec execution appears to have failed.")
d... | CoffeeScript | CoffeeScript | linemanjs/lineman | tasks/spec-ci.coffee | MIT | 4d41a7084fc9bd0ab5948873d2dbc731ddb3d683 | 1,168 | https://github.com/linemanjs/lineman/blob/4d41a7084fc9bd0ab5948873d2dbc731ddb3d683/tasks/spec-ci.coffee | 1 | 27 |
linemanjs/lineman:tasks/spec-ci.coffee:1:raw_corpus | raw_corpus | ###
Task: spec-ci
Description: run specs in ci mode
Dependencies: grunt
Contributor: @davemo
###
module.exports = (grunt) ->
path = require("path")
spawn = require("child_process").spawn
testemRunnerPath = require("./../lib/testem-utils").testemRunnerPath
grunt.registerTask "spec-ci", "run specs in ci mode", (... | CoffeeScript | linemanjs/lineman | tasks/spec-ci.coffee | MIT | a4551a6fc64def8525ad90d78ebd72a1cb529dbe | 1,168 | https://github.com/linemanjs/lineman/blob/a4551a6fc64def8525ad90d78ebd72a1cb529dbe/tasks/spec-ci.coffee | 1 | 30 | ||
linemanjs/lineman:tasks/spec-ci.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
###
Task: spec-ci
Description: run specs in ci mode
Dependencies: grunt
Contributor: @davemo
###
module.exports = (grunt) ->
path = require("path")
spawn = require("child_process").spawn
testemRunnerPath = require("./../lib/testem-utils").testemRunnerPath
... | /*
Task: spec-ci
Description: run specs in ci mode
Dependencies: grunt
Contributor: @davemo
*/
module.exports = function(grunt) {
var path, spawn, testemRunnerPath;
path = require("path");
spawn = require("child_process").spawn;
testemRunnerPath = require("./../lib/testem-utils").testemRunnerPath;
return grun... | CoffeeScript | JavaScript | linemanjs/lineman | tasks/spec-ci.coffee | MIT | a4551a6fc64def8525ad90d78ebd72a1cb529dbe | 1,168 | https://github.com/linemanjs/lineman/blob/a4551a6fc64def8525ad90d78ebd72a1cb529dbe/tasks/spec-ci.coffee | 1 | 30 |
linemanjs/lineman:tasks/spec-ci.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
/*
Task: spec-ci
Description: run specs in ci mode
Dependencies: grunt
Contributor: @davemo
*/
module.exports = function(grunt) {
var path, spawn, testemRunnerPath;
path = require("path");
spawn = require("child_process").spawn;
testemRunnerPath = require("... | ###
Task: spec-ci
Description: run specs in ci mode
Dependencies: grunt
Contributor: @davemo
###
module.exports = (grunt) ->
path = require("path")
spawn = require("child_process").spawn
testemRunnerPath = require("./../lib/testem-utils").testemRunnerPath
grunt.registerTask "spec-ci", "run specs in ci mode", (... | JavaScript | CoffeeScript | linemanjs/lineman | tasks/spec-ci.coffee | MIT | a4551a6fc64def8525ad90d78ebd72a1cb529dbe | 1,168 | https://github.com/linemanjs/lineman/blob/a4551a6fc64def8525ad90d78ebd72a1cb529dbe/tasks/spec-ci.coffee | 1 | 30 |
linemanjs/lineman:tasks/spec-ci.coffee:1:completion | completion | ###
Task: spec-ci
Description: run specs in ci mode
Dependencies: grunt
Contributor: @davemo
###
module.exports = (grunt) ->
path = require("path")
spawn = require("child_process").spawn
testemRunnerPath = require("./../lib/testem-utils").testemRunnerPath
grunt.registerTask "spec-ci", "run specs in ci mode", (... | child = spawn(testemRunnerPath(), args)
output = ""
child.stdout.on "data", (chunk) ->
process.stdout.write(chunk)
output += chunk
child.on "exit", (code, signal) ->
if code != 0
grunt.warn("Spec execution appears to have failed.")
done(false)
else
... | CoffeeScript | CoffeeScript | linemanjs/lineman | tasks/spec-ci.coffee | MIT | a4551a6fc64def8525ad90d78ebd72a1cb529dbe | 1,168 | https://github.com/linemanjs/lineman/blob/a4551a6fc64def8525ad90d78ebd72a1cb529dbe/tasks/spec-ci.coffee | 1 | 30 |
mojotech/pioneer:test/integration/steps/list_steps.coffee:1:raw_corpus | raw_corpus | module.exports = ->
@Given /^I should see "([^"]*)" items in a list$/, (count) ->
new @Widgets.List().items()
.should.eventually.have.length(count)
@Given /^I should get the identity "([^"]*)" for the item with a super-hero class$/, (identity)->
new @Widgets.List().items().then (items)->
for item... | CoffeeScript | mojotech/pioneer | test/integration/steps/list_steps.coffee | MIT | 2d3ade85e18e3ea1dfff2545bad4142aa9c496e4 | 523 | https://github.com/mojotech/pioneer/blob/2d3ade85e18e3ea1dfff2545bad4142aa9c496e4/test/integration/steps/list_steps.coffee | 4 | 53 | ||
mojotech/pioneer:test/integration/steps/list_steps.coffee:1:completion | completion | module.exports = ->
@Given /^I should see "([^"]*)" items in a list$/, (count) ->
new @Widgets.List().items()
.should.eventually.have.length(count)
@Given /^I should get the identity "([^"]*)" for the item with a super-hero class$/, (identity)->
new @Widgets.List().items().then (items)->
for item... | @Then /^I should see the following list:$/, (table) ->
new @Widgets.List().toArray()
.should.eventually.eql(_.flatten(table.raw()))
@Then /^I should see stuff$/, (table) ->
new @Widgets.List().toHtml()
@When /^I find with "([^"]*)" I should see "([^"]*)"$/, (string, content) ->
new @Widgets.List()... | CoffeeScript | CoffeeScript | mojotech/pioneer | test/integration/steps/list_steps.coffee | MIT | 2d3ade85e18e3ea1dfff2545bad4142aa9c496e4 | 523 | https://github.com/mojotech/pioneer/blob/2d3ade85e18e3ea1dfff2545bad4142aa9c496e4/test/integration/steps/list_steps.coffee | 4 | 53 |
mojotech/pioneer:test/integration/steps/list_steps.coffee:2:raw_corpus | raw_corpus | root: root
itemSelector: itemSelector
}).items().should.eventually.have.length(+count)
@When /^I find the "([^"]*)" child "([^"]*)" within "([^"]*)" and then I read the "([^"]*)" I should see "([^"]*)"$/, (index, itemSelector, root, childSelector, value) ->
new @Widgets.List({
root: root
it... | CoffeeScript | mojotech/pioneer | test/integration/steps/list_steps.coffee | MIT | 2d3ade85e18e3ea1dfff2545bad4142aa9c496e4 | 523 | https://github.com/mojotech/pioneer/blob/2d3ade85e18e3ea1dfff2545bad4142aa9c496e4/test/integration/steps/list_steps.coffee | 54 | 103 | ||
mojotech/pioneer:test/integration/steps/list_steps.coffee:2:completion | completion | root: root
itemSelector: itemSelector
}).items().should.eventually.have.length(+count)
@When /^I find the "([^"]*)" child "([^"]*)" within "([^"]*)" and then I read the "([^"]*)" I should see "([^"]*)"$/, (index, itemSelector, root, childSelector, value) ->
new @Widgets.List({
root: root
it... | selector: childSelector
})
.should.eventually.eql(expected)
@When /^I click on the "([^"]*)" child of "([^"]*)" I should read "([^"]*)"$/, (index, rootSelector, expected) ->
_this = this
new @Widgets.List({
root: rootSelector
})
.at(index - 1)
.then (item) ->
item.click()
... | CoffeeScript | CoffeeScript | mojotech/pioneer | test/integration/steps/list_steps.coffee | MIT | 2d3ade85e18e3ea1dfff2545bad4142aa9c496e4 | 523 | https://github.com/mojotech/pioneer/blob/2d3ade85e18e3ea1dfff2545bad4142aa9c496e4/test/integration/steps/list_steps.coffee | 54 | 103 |
mojotech/pioneer:test/integration/steps/list_steps.coffee:3:raw_corpus | raw_corpus | .then ->
new _this.Widget({
root: '#onSubmit'
})
.read()
.should.eventually.eql(expected)
@When /^I click at the "([^"]*)" index with selector "([^"]*)" I should read "([^"]*)"$/, (index, selector, expected) ->
_this = this
new @Widgets.List()
.clickAt({
index: index... | CoffeeScript | mojotech/pioneer | test/integration/steps/list_steps.coffee | MIT | 2d3ade85e18e3ea1dfff2545bad4142aa9c496e4 | 523 | https://github.com/mojotech/pioneer/blob/2d3ade85e18e3ea1dfff2545bad4142aa9c496e4/test/integration/steps/list_steps.coffee | 104 | 153 | ||
mojotech/pioneer:test/integration/steps/list_steps.coffee:3:completion | completion | .then ->
new _this.Widget({
root: '#onSubmit'
})
.read()
.should.eventually.eql(expected)
@When /^I click at the "([^"]*)" index with selector "([^"]*)" I should read "([^"]*)"$/, (index, selector, expected) ->
_this = this
new @Widgets.List()
.clickAt({
index: index... | transformer: (val) -> val.toUpperCase()
})
.should.eventually.eql("JOHN CRICHTON")
@Given /^I should be able to read with a subselector and transform an item at an index$/, ->
new @Widgets.List()
.readAt({
index: 4,
selector: "p",
transformer: (val) -> val.toUpperCase()
})
.... | CoffeeScript | CoffeeScript | mojotech/pioneer | test/integration/steps/list_steps.coffee | MIT | 2d3ade85e18e3ea1dfff2545bad4142aa9c496e4 | 523 | https://github.com/mojotech/pioneer/blob/2d3ade85e18e3ea1dfff2545bad4142aa9c496e4/test/integration/steps/list_steps.coffee | 104 | 153 |
mojotech/pioneer:test/integration/steps/list_steps.coffee:4:raw_corpus | raw_corpus | new @Widgets.List({root: "ul.click-list"}).invoke(@Widget::click)
@Given /^I can invoke read on each widget in the list with a transformer and selector$/, ->
new @Widgets.List({
root: ".nested",
itemSelector: "span"
})
.invoke({
method: "read",
arguments: [{
transformer: (... | CoffeeScript | mojotech/pioneer | test/integration/steps/list_steps.coffee | MIT | 2d3ade85e18e3ea1dfff2545bad4142aa9c496e4 | 523 | https://github.com/mojotech/pioneer/blob/2d3ade85e18e3ea1dfff2545bad4142aa9c496e4/test/integration/steps/list_steps.coffee | 154 | 177 | ||
mojotech/pioneer:test/integration/steps/list_steps.coffee:4:completion | completion | new @Widgets.List({root: "ul.click-list"}).invoke(@Widget::click)
@Given /^I can invoke read on each widget in the list with a transformer and selector$/, ->
new @Widgets.List({
root: ".nested",
itemSelector: "span"
})
.invoke({
method: "read",
arguments: [{
transformer: (... | }]
}).should.eventually.eql(["ORC", "HUMAN", "PROTOSS"])
@Given /^I can check the visibility on a list's items$/, ->
new @Widgets.List({
root: ".nested",
itemSelector: "span"
})
.map (w) ->
w.isVisible()
.should.eventually
.eql([true, true, true]) | CoffeeScript | CoffeeScript | mojotech/pioneer | test/integration/steps/list_steps.coffee | MIT | 2d3ade85e18e3ea1dfff2545bad4142aa9c496e4 | 523 | https://github.com/mojotech/pioneer/blob/2d3ade85e18e3ea1dfff2545bad4142aa9c496e4/test/integration/steps/list_steps.coffee | 154 | 177 |
mojotech/pioneer:test/integration/steps/list_steps.coffee:1:raw_corpus | raw_corpus | module.exports = ->
@Given /^I should see "([^"]*)" items in a list$/, (count) ->
new @Widgets.List().items()
.should.eventually.have.length(count)
@Given /^I should see "([^"]*)" in position "([^"]*)" of the list$/, (content, position) ->
new @Widgets.List().at(+position-1)
.then (item) -> item.fi... | CoffeeScript | mojotech/pioneer | test/integration/steps/list_steps.coffee | MIT | 60080e556c0f1977ab77addd185b3fc2df81dc79 | 523 | https://github.com/mojotech/pioneer/blob/60080e556c0f1977ab77addd185b3fc2df81dc79/test/integration/steps/list_steps.coffee | 4 | 53 | ||
mojotech/pioneer:test/integration/steps/list_steps.coffee:1:completion | completion | module.exports = ->
@Given /^I should see "([^"]*)" items in a list$/, (count) ->
new @Widgets.List().items()
.should.eventually.have.length(count)
@Given /^I should see "([^"]*)" in position "([^"]*)" of the list$/, (content, position) ->
new @Widgets.List().at(+position-1)
.then (item) -> item.fi... | new @Widgets.List().toHtml()
@When /^I find with "([^"]*)" I should see "([^"]*)"$/, (string, content) ->
new @Widgets.List().findBy(string)
.then (item) -> item.getHtml()
.should.eventually.eql(content)
@When /^I call length I should receive (\d+)$/, (expectedLength) ->
new @Widgets.List().length... | CoffeeScript | CoffeeScript | mojotech/pioneer | test/integration/steps/list_steps.coffee | MIT | 60080e556c0f1977ab77addd185b3fc2df81dc79 | 523 | https://github.com/mojotech/pioneer/blob/60080e556c0f1977ab77addd185b3fc2df81dc79/test/integration/steps/list_steps.coffee | 4 | 53 |
mojotech/pioneer:test/integration/steps/list_steps.coffee:2:raw_corpus | raw_corpus | root: root
itemSelector: itemSelector
})
.at(+index-1)
.then (child) ->
child.read(childSelector).should.eventually.eql(value)
@When /^I read at the "([^"]*)" index of ul I should see "([^"]*)"$/, (index, expected) ->
new @Widgets.List()
.readAt(+index-1)
.should.eventually.eql(ex... | CoffeeScript | mojotech/pioneer | test/integration/steps/list_steps.coffee | MIT | 60080e556c0f1977ab77addd185b3fc2df81dc79 | 523 | https://github.com/mojotech/pioneer/blob/60080e556c0f1977ab77addd185b3fc2df81dc79/test/integration/steps/list_steps.coffee | 54 | 103 | ||
mojotech/pioneer:test/integration/steps/list_steps.coffee:2:completion | completion | root: root
itemSelector: itemSelector
})
.at(+index-1)
.then (child) ->
child.read(childSelector).should.eventually.eql(value)
@When /^I read at the "([^"]*)" index of ul I should see "([^"]*)"$/, (index, expected) ->
new @Widgets.List()
.readAt(+index-1)
.should.eventually.eql(ex... | new @Widgets.List({
root: rootSelector
})
.at(index - 1)
.then (item) ->
item.click()
.then ->
new _this.Widget({
root: '#onSubmit'
})
.read()
.should.eventually.eql(expected)
@When /^I click at the "([^"]*)" index of "([^"]*)" I should read "... | CoffeeScript | CoffeeScript | mojotech/pioneer | test/integration/steps/list_steps.coffee | MIT | 60080e556c0f1977ab77addd185b3fc2df81dc79 | 523 | https://github.com/mojotech/pioneer/blob/60080e556c0f1977ab77addd185b3fc2df81dc79/test/integration/steps/list_steps.coffee | 54 | 103 |
mojotech/pioneer:test/integration/steps/list_steps.coffee:3:raw_corpus | raw_corpus | @When /^I click at the "([^"]*)" index with selector "([^"]*)" I should read "([^"]*)"$/, (index, selector, expected) ->
_this = this
new @Widgets.List()
.clickAt({
index: index - 1,
selector: selector
})
.then ->
new _this.Widget({
root: '#onSubmit'
})
.read()
... | CoffeeScript | mojotech/pioneer | test/integration/steps/list_steps.coffee | MIT | 60080e556c0f1977ab77addd185b3fc2df81dc79 | 523 | https://github.com/mojotech/pioneer/blob/60080e556c0f1977ab77addd185b3fc2df81dc79/test/integration/steps/list_steps.coffee | 104 | 153 | ||
mojotech/pioneer:test/integration/steps/list_steps.coffee:3:completion | completion | @When /^I click at the "([^"]*)" index with selector "([^"]*)" I should read "([^"]*)"$/, (index, selector, expected) ->
_this = this
new @Widgets.List()
.clickAt({
index: index - 1,
selector: selector
})
.then ->
new _this.Widget({
root: '#onSubmit'
})
.read()
... | .readAt({
index: 4,
selector: "p",
transformer: (val) -> val.toUpperCase()
})
.should.eventually.eql("JOHN CRICHTON")
@When /^I click on each item in the list$/, ->
new @Widgets.List({root: "ul.click-list"}).clickEach()
@Then /^I should see that each list item was clicked$/, ->
n... | CoffeeScript | CoffeeScript | mojotech/pioneer | test/integration/steps/list_steps.coffee | MIT | 60080e556c0f1977ab77addd185b3fc2df81dc79 | 523 | https://github.com/mojotech/pioneer/blob/60080e556c0f1977ab77addd185b3fc2df81dc79/test/integration/steps/list_steps.coffee | 104 | 153 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.