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
Glavin001/atom-beautify:src/beautifiers/rubocop.coffee:2:completion
completion
"--stdin", relativePath || temp.path({suffix: '.rb'}) ] rubocopArguments.push("--config", tempConfig) if tempConfig? @debug("rubocop arguments", rubocopArguments) @run(rubocopPath, rubocopArguments, { ignoreReturnCode: true, cwd: projectPath,
onStdin: (stdin) -> stdin.end text }).then((stdout) => @debug("rubocop output", stdout) # Rubocop output an error if stdout is empty return text if stdout.length == 0 result = stdout.split("====================\n") result[result.length - 1] )
CoffeeScript
CoffeeScript
Glavin001/atom-beautify
src/beautifiers/rubocop.coffee
MIT
2d595f2a20e917b68490a5d98866f8f2e7f61c9f
1,503
https://github.com/Glavin001/atom-beautify/blob/2d595f2a20e917b68490a5d98866f8f2e7f61c9f/src/beautifiers/rubocop.coffee
51
67
Glavin001/atom-beautify:src/beautifiers/rubocop.coffee:1:raw_corpus
raw_corpus
### Requires https://github.com/bbatsov/rubocop ### "use strict" Beautifier = require('./beautifier') path = require('path') temp = require('temp').track() module.exports = class Rubocop extends Beautifier name: "Rubocop" link: "https://github.com/bbatsov/rubocop" isPreInstalled: false options: { Ruby: ...
CoffeeScript
Glavin001/atom-beautify
src/beautifiers/rubocop.coffee
MIT
bd93afa64c5d4a91fdf3767afe058ea2d0af5449
1,503
https://github.com/Glavin001/atom-beautify/blob/bd93afa64c5d4a91fdf3767afe058ea2d0af5449/src/beautifiers/rubocop.coffee
1
50
Glavin001/atom-beautify:src/beautifiers/rubocop.coffee:1:completion
completion
### Requires https://github.com/bbatsov/rubocop ### "use strict" Beautifier = require('./beautifier') path = require('path') temp = require('temp').track() module.exports = class Rubocop extends Beautifier name: "Rubocop" link: "https://github.com/bbatsov/rubocop" isPreInstalled: false options: { Ruby: ...
rubocopPath = "rubocop" @Promise.all([ @which(options.rubocop_path) if options.rubocop_path @which('rubocop') ]) .then((paths) => @debug('rubocop paths', paths) # Get first valid, absolute path rubocopPath = paths.find((p) -> p and path.isAbsolute(p)) @verbose('rubocopPat...
CoffeeScript
CoffeeScript
Glavin001/atom-beautify
src/beautifiers/rubocop.coffee
MIT
bd93afa64c5d4a91fdf3767afe058ea2d0af5449
1,503
https://github.com/Glavin001/atom-beautify/blob/bd93afa64c5d4a91fdf3767afe058ea2d0af5449/src/beautifiers/rubocop.coffee
1
50
Glavin001/atom-beautify:src/beautifiers/rubocop.coffee:2:raw_corpus
raw_corpus
"--force-exclusion" "--stdin", relativePath || temp.path({suffix: '.rb'}) ] rubocopArguments.push("--config", tempConfig) if tempConfig? @debug("rubocop arguments", rubocopArguments) @run(rubocopPath, rubocopArguments, { ignoreReturnCode: true, cwd: projectPath, onStdin: (stdin)...
CoffeeScript
Glavin001/atom-beautify
src/beautifiers/rubocop.coffee
MIT
bd93afa64c5d4a91fdf3767afe058ea2d0af5449
1,503
https://github.com/Glavin001/atom-beautify/blob/bd93afa64c5d4a91fdf3767afe058ea2d0af5449/src/beautifiers/rubocop.coffee
51
68
Glavin001/atom-beautify:src/beautifiers/rubocop.coffee:2:completion
completion
"--force-exclusion" "--stdin", relativePath || temp.path({suffix: '.rb'}) ] rubocopArguments.push("--config", tempConfig) if tempConfig? @debug("rubocop arguments", rubocopArguments) @run(rubocopPath, rubocopArguments, { ignoreReturnCode: true, cwd: projectPath,
onStdin: (stdin) -> stdin.end text }).then((stdout) => @debug("rubocop output", stdout) # Rubocop output an error if stdout is empty return text if stdout.length == 0 result = stdout.split("====================\n") result[result.length - 1] )
CoffeeScript
CoffeeScript
Glavin001/atom-beautify
src/beautifiers/rubocop.coffee
MIT
bd93afa64c5d4a91fdf3767afe058ea2d0af5449
1,503
https://github.com/Glavin001/atom-beautify/blob/bd93afa64c5d4a91fdf3767afe058ea2d0af5449/src/beautifiers/rubocop.coffee
51
68
Glavin001/atom-beautify:src/beautifiers/rubocop.coffee:1:raw_corpus
raw_corpus
### Requires https://github.com/bbatsov/rubocop ### "use strict" Beautifier = require('./beautifier') path = require('path') temp = require('temp').track() module.exports = class Rubocop extends Beautifier name: "Rubocop" link: "https://github.com/bbatsov/rubocop" isPreInstalled: false options: { Ruby: ...
CoffeeScript
Glavin001/atom-beautify
src/beautifiers/rubocop.coffee
MIT
8188719685ac8cda4c5fd701074144638081cc83
1,503
https://github.com/Glavin001/atom-beautify/blob/8188719685ac8cda4c5fd701074144638081cc83/src/beautifiers/rubocop.coffee
1
50
Glavin001/atom-beautify:src/beautifiers/rubocop.coffee:1:completion
completion
### Requires https://github.com/bbatsov/rubocop ### "use strict" Beautifier = require('./beautifier') path = require('path') temp = require('temp').track() module.exports = class Rubocop extends Beautifier name: "Rubocop" link: "https://github.com/bbatsov/rubocop" isPreInstalled: false options: { Ruby: ...
rubocopPath = "rubocop" @Promise.all([ @which(options.rubocop_path) if options.rubocop_path @which('rubocop') ]) .then((paths) => @debug('rubocop paths', paths) # Get first valid, absolute path rubocopPath = paths.find((p) -> p and path.isAbsolute(p)) @verbose('rubocopPat...
CoffeeScript
CoffeeScript
Glavin001/atom-beautify
src/beautifiers/rubocop.coffee
MIT
8188719685ac8cda4c5fd701074144638081cc83
1,503
https://github.com/Glavin001/atom-beautify/blob/8188719685ac8cda4c5fd701074144638081cc83/src/beautifiers/rubocop.coffee
1
50
Glavin001/atom-beautify:src/beautifiers/rubocop.coffee:1:raw_corpus
raw_corpus
### Requires https://github.com/bbatsov/rubocop ### "use strict" Beautifier = require('./beautifier') path = require('path') module.exports = class Rubocop extends Beautifier name: "Rubocop" link: "https://github.com/bbatsov/rubocop" isPreInstalled: false options: { Ruby: indent_size: true ru...
CoffeeScript
Glavin001/atom-beautify
src/beautifiers/rubocop.coffee
MIT
c842af63bc8096201d3e0489c8d652a40f424b59
1,503
https://github.com/Glavin001/atom-beautify/blob/c842af63bc8096201d3e0489c8d652a40f424b59/src/beautifiers/rubocop.coffee
1
50
Glavin001/atom-beautify:src/beautifiers/rubocop.coffee:1:completion
completion
### Requires https://github.com/bbatsov/rubocop ### "use strict" Beautifier = require('./beautifier') path = require('path') module.exports = class Rubocop extends Beautifier name: "Rubocop" link: "https://github.com/bbatsov/rubocop" isPreInstalled: false options: { Ruby: indent_size: true ru...
@Promise.all([ @which(options.rubocop_path) if options.rubocop_path @which('rubocop') ]) .then((paths) => @debug('rubocop paths', paths) # Get first valid, absolute path rubocopPath = paths.find((p) -> p and path.isAbsolute(p)) @verbose('rubocopPath', rubocopPath) @debu...
CoffeeScript
CoffeeScript
Glavin001/atom-beautify
src/beautifiers/rubocop.coffee
MIT
c842af63bc8096201d3e0489c8d652a40f424b59
1,503
https://github.com/Glavin001/atom-beautify/blob/c842af63bc8096201d3e0489c8d652a40f424b59/src/beautifiers/rubocop.coffee
1
50
Glavin001/atom-beautify:src/beautifiers/rubocop.coffee:2:raw_corpus
raw_corpus
] rubocopArguments.push("--config", tempConfig) if tempConfig? @debug("rubocop arguments", rubocopArguments) @run(rubocopPath, rubocopArguments, { ignoreReturnCode: true, cwd: projectPath, onStdin: (stdin) -> stdin.end text }).then((stdout) => @debug("rubocop output", stdout) ...
CoffeeScript
Glavin001/atom-beautify
src/beautifiers/rubocop.coffee
MIT
c842af63bc8096201d3e0489c8d652a40f424b59
1,503
https://github.com/Glavin001/atom-beautify/blob/c842af63bc8096201d3e0489c8d652a40f424b59/src/beautifiers/rubocop.coffee
51
66
Glavin001/atom-beautify:src/beautifiers/rubocop.coffee:2:completion
completion
] rubocopArguments.push("--config", tempConfig) if tempConfig? @debug("rubocop arguments", rubocopArguments) @run(rubocopPath, rubocopArguments, { ignoreReturnCode: true, cwd: projectPath, onStdin: (stdin) -> stdin.end text
}).then((stdout) => @debug("rubocop output", stdout) # Rubocop output an error if stdout is empty return text if stdout.length == 0 result = stdout.split("====================\n") result[result.length - 1] )
CoffeeScript
CoffeeScript
Glavin001/atom-beautify
src/beautifiers/rubocop.coffee
MIT
c842af63bc8096201d3e0489c8d652a40f424b59
1,503
https://github.com/Glavin001/atom-beautify/blob/c842af63bc8096201d3e0489c8d652a40f424b59/src/beautifiers/rubocop.coffee
51
66
Glavin001/atom-beautify:src/beautifiers/rubocop.coffee:1:raw_corpus
raw_corpus
### Requires https://github.com/bbatsov/rubocop ### "use strict" Beautifier = require('./beautifier') path = require('path') module.exports = class Rubocop extends Beautifier name: "Rubocop" link: "https://github.com/bbatsov/rubocop" isPreInstalled: false options: { Ruby: indent_size: true ru...
CoffeeScript
Glavin001/atom-beautify
src/beautifiers/rubocop.coffee
MIT
851a24f16037d26f4afef480f470403dd0071797
1,503
https://github.com/Glavin001/atom-beautify/blob/851a24f16037d26f4afef480f470403dd0071797/src/beautifiers/rubocop.coffee
1
50
Glavin001/atom-beautify:src/beautifiers/rubocop.coffee:1:completion
completion
### Requires https://github.com/bbatsov/rubocop ### "use strict" Beautifier = require('./beautifier') path = require('path') module.exports = class Rubocop extends Beautifier name: "Rubocop" link: "https://github.com/bbatsov/rubocop" isPreInstalled: false options: { Ruby: indent_size: true ru...
@Promise.all([ @which(options.rubocop_path) if options.rubocop_path @which('rubocop') ]) .then((paths) => @debug('rubocop paths', paths) # Get first valid, absolute path rubocopPath = paths.find((p) -> p and path.isAbsolute(p)) @verbose('rubocopPath', rubocopPath) @debu...
CoffeeScript
CoffeeScript
Glavin001/atom-beautify
src/beautifiers/rubocop.coffee
MIT
851a24f16037d26f4afef480f470403dd0071797
1,503
https://github.com/Glavin001/atom-beautify/blob/851a24f16037d26f4afef480f470403dd0071797/src/beautifiers/rubocop.coffee
1
50
Glavin001/atom-beautify:src/beautifiers/rubocop.coffee:2:raw_corpus
raw_corpus
"--stdin", relativePath ] rubocopArguments.push("--config", tempConfig) if tempConfig? @debug("rubocop arguments", rubocopArguments) @run(rubocopPath, rubocopArguments, { ignoreReturnCode: true, cwd: projectPath, onStdin: (stdin) -> stdin.end text }).then((stdout) => @debug(...
CoffeeScript
Glavin001/atom-beautify
src/beautifiers/rubocop.coffee
MIT
851a24f16037d26f4afef480f470403dd0071797
1,503
https://github.com/Glavin001/atom-beautify/blob/851a24f16037d26f4afef480f470403dd0071797/src/beautifiers/rubocop.coffee
51
67
Glavin001/atom-beautify:src/beautifiers/rubocop.coffee:2:completion
completion
"--stdin", relativePath ] rubocopArguments.push("--config", tempConfig) if tempConfig? @debug("rubocop arguments", rubocopArguments) @run(rubocopPath, rubocopArguments, { ignoreReturnCode: true, cwd: projectPath,
onStdin: (stdin) -> stdin.end text }).then((stdout) => @debug("rubocop output", stdout) # Rubocop output an error if stdout is empty return text if stdout.length == 0 result = stdout.split("====================\n") result[result.length - 1] )
CoffeeScript
CoffeeScript
Glavin001/atom-beautify
src/beautifiers/rubocop.coffee
MIT
851a24f16037d26f4afef480f470403dd0071797
1,503
https://github.com/Glavin001/atom-beautify/blob/851a24f16037d26f4afef480f470403dd0071797/src/beautifiers/rubocop.coffee
51
67
Glavin001/atom-beautify:src/beautifiers/rubocop.coffee:1:raw_corpus
raw_corpus
### Requires https://github.com/bbatsov/rubocop ### "use strict" Beautifier = require('./beautifier') path = require('path') module.exports = class Rubocop extends Beautifier name: "Rubocop" link: "https://github.com/bbatsov/rubocop" isPreInstalled: false options: { Ruby: indent_size: true ru...
CoffeeScript
Glavin001/atom-beautify
src/beautifiers/rubocop.coffee
MIT
a719fa224174d6b12d1142a249a883e2db4e7e28
1,503
https://github.com/Glavin001/atom-beautify/blob/a719fa224174d6b12d1142a249a883e2db4e7e28/src/beautifiers/rubocop.coffee
1
50
Glavin001/atom-beautify:src/beautifiers/rubocop.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript ### Requires https://github.com/bbatsov/rubocop ### "use strict" Beautifier = require('./beautifier') path = require('path') module.exports = class Rubocop extends Beautifier name: "Rubocop" link: "https://github.com/bbatsov/rubocop" isPreInstalled: false...
/* Requires https://github.com/bbatsov/rubocop */ "use strict"; var Beautifier, Rubocop, path; Beautifier = require('./beautifier'); path = require('path'); module.exports = Rubocop = (function() { class Rubocop extends Beautifier { beautify(text, language, options) { var config, configFile, editor, full...
CoffeeScript
JavaScript
Glavin001/atom-beautify
src/beautifiers/rubocop.coffee
MIT
a719fa224174d6b12d1142a249a883e2db4e7e28
1,503
https://github.com/Glavin001/atom-beautify/blob/a719fa224174d6b12d1142a249a883e2db4e7e28/src/beautifiers/rubocop.coffee
1
50
Glavin001/atom-beautify:src/beautifiers/rubocop.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript /* Requires https://github.com/bbatsov/rubocop */ "use strict"; var Beautifier, Rubocop, path; Beautifier = require('./beautifier'); path = require('path'); module.exports = Rubocop = (function() { class Rubocop extends Beautifier { beautify(text, language...
### Requires https://github.com/bbatsov/rubocop ### "use strict" Beautifier = require('./beautifier') path = require('path') module.exports = class Rubocop extends Beautifier name: "Rubocop" link: "https://github.com/bbatsov/rubocop" isPreInstalled: false options: { Ruby: indent_size: true ru...
JavaScript
CoffeeScript
Glavin001/atom-beautify
src/beautifiers/rubocop.coffee
MIT
a719fa224174d6b12d1142a249a883e2db4e7e28
1,503
https://github.com/Glavin001/atom-beautify/blob/a719fa224174d6b12d1142a249a883e2db4e7e28/src/beautifiers/rubocop.coffee
1
50
Glavin001/atom-beautify:src/beautifiers/rubocop.coffee:1:completion
completion
### Requires https://github.com/bbatsov/rubocop ### "use strict" Beautifier = require('./beautifier') path = require('path') module.exports = class Rubocop extends Beautifier name: "Rubocop" link: "https://github.com/bbatsov/rubocop" isPreInstalled: false options: { Ruby: indent_size: true ru...
throw new Error("No active editor found!") # Find the rubocop path rubocopPath = "rubocop" @Promise.all([ @which(options.rubocop_path) if options.rubocop_path @which('rubocop') ]) .then((paths) => @debug('rubocop paths', paths) # Get first valid, absolute path rubocopP...
CoffeeScript
CoffeeScript
Glavin001/atom-beautify
src/beautifiers/rubocop.coffee
MIT
a719fa224174d6b12d1142a249a883e2db4e7e28
1,503
https://github.com/Glavin001/atom-beautify/blob/a719fa224174d6b12d1142a249a883e2db4e7e28/src/beautifiers/rubocop.coffee
1
50
Glavin001/atom-beautify:src/beautifiers/rubocop.coffee:2:raw_corpus
raw_corpus
rubocopArguments = [ "--auto-correct" "--force-exclusion" "--stdin", relativePath ] rubocopArguments.push("--config", tempConfig) if tempConfig? @debug("rubocop arguments", rubocopArguments) @run(rubocopPath, rubocopArguments, { ignoreReturnCode: true, cwd: projectPath, ...
CoffeeScript
Glavin001/atom-beautify
src/beautifiers/rubocop.coffee
MIT
a719fa224174d6b12d1142a249a883e2db4e7e28
1,503
https://github.com/Glavin001/atom-beautify/blob/a719fa224174d6b12d1142a249a883e2db4e7e28/src/beautifiers/rubocop.coffee
51
71
Glavin001/atom-beautify:src/beautifiers/rubocop.coffee:2:completion
completion
rubocopArguments = [ "--auto-correct" "--force-exclusion" "--stdin", relativePath ] rubocopArguments.push("--config", tempConfig) if tempConfig? @debug("rubocop arguments", rubocopArguments) @run(rubocopPath, rubocopArguments, { ignoreReturnCode: true,
cwd: projectPath, onStdin: (stdin) -> stdin.end text }).then((stdout) => @debug("rubocop output", stdout) # Rubocop output an error if stdout is empty return text if stdout.length == 0 result = stdout.split("====================\n") result[result.length - 1] )
CoffeeScript
CoffeeScript
Glavin001/atom-beautify
src/beautifiers/rubocop.coffee
MIT
a719fa224174d6b12d1142a249a883e2db4e7e28
1,503
https://github.com/Glavin001/atom-beautify/blob/a719fa224174d6b12d1142a249a883e2db4e7e28/src/beautifiers/rubocop.coffee
51
71
Glavin001/atom-beautify:src/beautifiers/rubocop.coffee:2:raw_corpus
raw_corpus
rubocopArguments = [ "--auto-correct" "--force-exclusion" "--stdin", relativePath ] rubocopArguments.push("--config", tempConfig) if tempConfig? @debug("rubocop arguments", rubocopArguments) @run(rubocopPath, rubocopArguments, { ignoreReturnCode: true, cwd: projectPath, ...
CoffeeScript
Glavin001/atom-beautify
src/beautifiers/rubocop.coffee
MIT
82706a4dc89dfb7175067315a6983e187d7d707c
1,503
https://github.com/Glavin001/atom-beautify/blob/82706a4dc89dfb7175067315a6983e187d7d707c/src/beautifiers/rubocop.coffee
51
68
Glavin001/atom-beautify:src/beautifiers/rubocop.coffee:2:completion
completion
rubocopArguments = [ "--auto-correct" "--force-exclusion" "--stdin", relativePath ] rubocopArguments.push("--config", tempConfig) if tempConfig? @debug("rubocop arguments", rubocopArguments)
@run(rubocopPath, rubocopArguments, { ignoreReturnCode: true, cwd: projectPath, onStdin: (stdin) -> stdin.end text }).then((stdout) => @debug("rubocop output", stdout) result = stdout.split("====================\n") result[result.length - 1] )
CoffeeScript
CoffeeScript
Glavin001/atom-beautify
src/beautifiers/rubocop.coffee
MIT
82706a4dc89dfb7175067315a6983e187d7d707c
1,503
https://github.com/Glavin001/atom-beautify/blob/82706a4dc89dfb7175067315a6983e187d7d707c/src/beautifiers/rubocop.coffee
51
68
Glavin001/atom-beautify:src/beautifiers/rubocop.coffee:1:raw_corpus
raw_corpus
module.exports = class Rubocop extends Beautifier name: "Rubocop" link: "https://github.com/bbatsov/rubocop" isPreInstalled: false options: { Ruby: indent_size: true rubocop_path: true } createTempFile: (originalFile) -> new @Promise((resolve, reject) => tempOptions = { p...
CoffeeScript
Glavin001/atom-beautify
src/beautifiers/rubocop.coffee
MIT
4f8f4d68f8ca5941cc4b9015f1df067c93eb1399
1,503
https://github.com/Glavin001/atom-beautify/blob/4f8f4d68f8ca5941cc4b9015f1df067c93eb1399/src/beautifiers/rubocop.coffee
11
60
Glavin001/atom-beautify:src/beautifiers/rubocop.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript module.exports = class Rubocop extends Beautifier name: "Rubocop" link: "https://github.com/bbatsov/rubocop" isPreInstalled: false options: { Ruby: indent_size: true rubocop_path: true } createTempFile: (originalFile) -> new @Pro...
var Rubocop; module.exports = Rubocop = (function() { class Rubocop extends Beautifier { createTempFile(originalFile) { return new this.Promise((resolve, reject) => { var tempOptions; tempOptions = { prefix: "_beautify", suffix: path.basename(originalFile), dir...
CoffeeScript
JavaScript
Glavin001/atom-beautify
src/beautifiers/rubocop.coffee
MIT
4f8f4d68f8ca5941cc4b9015f1df067c93eb1399
1,503
https://github.com/Glavin001/atom-beautify/blob/4f8f4d68f8ca5941cc4b9015f1df067c93eb1399/src/beautifiers/rubocop.coffee
11
60
Glavin001/atom-beautify:src/beautifiers/rubocop.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var Rubocop; module.exports = Rubocop = (function() { class Rubocop extends Beautifier { createTempFile(originalFile) { return new this.Promise((resolve, reject) => { var tempOptions; tempOptions = { prefix: "_beautify", ...
module.exports = class Rubocop extends Beautifier name: "Rubocop" link: "https://github.com/bbatsov/rubocop" isPreInstalled: false options: { Ruby: indent_size: true rubocop_path: true } createTempFile: (originalFile) -> new @Promise((resolve, reject) => tempOptions = { p...
JavaScript
CoffeeScript
Glavin001/atom-beautify
src/beautifiers/rubocop.coffee
MIT
4f8f4d68f8ca5941cc4b9015f1df067c93eb1399
1,503
https://github.com/Glavin001/atom-beautify/blob/4f8f4d68f8ca5941cc4b9015f1df067c93eb1399/src/beautifiers/rubocop.coffee
11
60
Glavin001/atom-beautify:src/beautifiers/rubocop.coffee:1:completion
completion
module.exports = class Rubocop extends Beautifier name: "Rubocop" link: "https://github.com/bbatsov/rubocop" isPreInstalled: false options: { Ruby: indent_size: true rubocop_path: true } createTempFile: (originalFile) -> new @Promise((resolve, reject) => tempOptions = { p...
@debug("unlinking rubocop temp file", filename) fs.unlink(filename) ) beautify: (text, language, options) -> editor = atom?.workspace?.getActiveTextEditor() if editor? fullPath = editor.getPath() projectPath = atom.project.relativizePath(fullPath)[0] else throw new Error("No...
CoffeeScript
CoffeeScript
Glavin001/atom-beautify
src/beautifiers/rubocop.coffee
MIT
4f8f4d68f8ca5941cc4b9015f1df067c93eb1399
1,503
https://github.com/Glavin001/atom-beautify/blob/4f8f4d68f8ca5941cc4b9015f1df067c93eb1399/src/beautifiers/rubocop.coffee
11
60
Glavin001/atom-beautify:src/beautifiers/rubocop.coffee:2:raw_corpus
raw_corpus
# Find or generate a config file if non exists configFile = @findFile(path.dirname(fullPath), ".rubocop.yml") if !configFile? yaml = require("yaml-front-matter") config = { "Style/IndentationWidth": "Width": options.indent_size } tempConfig = @tempFile("rubocop-config",...
CoffeeScript
Glavin001/atom-beautify
src/beautifiers/rubocop.coffee
MIT
4f8f4d68f8ca5941cc4b9015f1df067c93eb1399
1,503
https://github.com/Glavin001/atom-beautify/blob/4f8f4d68f8ca5941cc4b9015f1df067c93eb1399/src/beautifiers/rubocop.coffee
61
88
Glavin001/atom-beautify:src/beautifiers/rubocop.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript # Find or generate a config file if non exists configFile = @findFile(path.dirname(fullPath), ".rubocop.yml") if !configFile? yaml = require("yaml-front-matter") config = { "Style/IndentationWidth": "Width": options.indent_si...
// Find or generate a config file if non exists var config, configFile, tempConfig, yaml; configFile = this.findFile(path.dirname(fullPath), ".rubocop.yml"); if (configFile == null) { yaml = require("yaml-front-matter"); config = { "Style/IndentationWidth": { "Width": options.indent_size } }; te...
CoffeeScript
JavaScript
Glavin001/atom-beautify
src/beautifiers/rubocop.coffee
MIT
4f8f4d68f8ca5941cc4b9015f1df067c93eb1399
1,503
https://github.com/Glavin001/atom-beautify/blob/4f8f4d68f8ca5941cc4b9015f1df067c93eb1399/src/beautifiers/rubocop.coffee
61
88
Glavin001/atom-beautify:src/beautifiers/rubocop.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript // Find or generate a config file if non exists var config, configFile, tempConfig, yaml; configFile = this.findFile(path.dirname(fullPath), ".rubocop.yml"); if (configFile == null) { yaml = require("yaml-front-matter"); config = { "Style/IndentationWidth...
# Find or generate a config file if non exists configFile = @findFile(path.dirname(fullPath), ".rubocop.yml") if !configFile? yaml = require("yaml-front-matter") config = { "Style/IndentationWidth": "Width": options.indent_size } tempConfig = @tempFile("rubocop-config",...
JavaScript
CoffeeScript
Glavin001/atom-beautify
src/beautifiers/rubocop.coffee
MIT
4f8f4d68f8ca5941cc4b9015f1df067c93eb1399
1,503
https://github.com/Glavin001/atom-beautify/blob/4f8f4d68f8ca5941cc4b9015f1df067c93eb1399/src/beautifiers/rubocop.coffee
61
88
Glavin001/atom-beautify:src/beautifiers/rubocop.coffee:2:completion
completion
# Find or generate a config file if non exists configFile = @findFile(path.dirname(fullPath), ".rubocop.yml") if !configFile? yaml = require("yaml-front-matter") config = { "Style/IndentationWidth": "Width": options.indent_size } tempConfig = @tempFile("rubocop-config",...
resolve tempFileName ) ) .then(=> rubocopArguments = [ "--auto-correct" "--force-exclusion" tempFileName ] rubocopArguments.push("--config", tempConfig) if tempConfig? @run(rubocopPath, rubocopArguments, {ignoreReturnCode: true, cwd: proj...
CoffeeScript
CoffeeScript
Glavin001/atom-beautify
src/beautifiers/rubocop.coffee
MIT
4f8f4d68f8ca5941cc4b9015f1df067c93eb1399
1,503
https://github.com/Glavin001/atom-beautify/blob/4f8f4d68f8ca5941cc4b9015f1df067c93eb1399/src/beautifiers/rubocop.coffee
61
88
Glavin001/atom-beautify:src/beautifiers/rubocop.coffee:1:raw_corpus
raw_corpus
### Requires https://github.com/bbatsov/rubocop ### "use strict" Beautifier = require('./beautifier') module.exports = class Rubocop extends Beautifier name: "Rubocop" link: "https://github.com/bbatsov/rubocop" isPreInstalled: false options: { Ruby: indent_size: true rubocop_path: true } ...
CoffeeScript
Glavin001/atom-beautify
src/beautifiers/rubocop.coffee
MIT
ec27053a29cf55104242cfb4bca6e5896cb0414a
1,503
https://github.com/Glavin001/atom-beautify/blob/ec27053a29cf55104242cfb4bca6e5896cb0414a/src/beautifiers/rubocop.coffee
1
50
Glavin001/atom-beautify:src/beautifiers/rubocop.coffee:1:completion
completion
### Requires https://github.com/bbatsov/rubocop ### "use strict" Beautifier = require('./beautifier') module.exports = class Rubocop extends Beautifier name: "Rubocop" link: "https://github.com/bbatsov/rubocop" isPreInstalled: false options: { Ruby: indent_size: true rubocop_path: true } ...
path = require 'path' # Get first valid, absolute path rubocopPath = _.find(paths, (p) -> p and path.isAbsolute(p) ) @verbose('rubocopPath', rubocopPath) @debug('rubocopPath', rubocopPath, paths) configFile = path.join(atom.project.getPaths()[0], ".rubocop.yml") fs = require 'fs' ...
CoffeeScript
CoffeeScript
Glavin001/atom-beautify
src/beautifiers/rubocop.coffee
MIT
ec27053a29cf55104242cfb4bca6e5896cb0414a
1,503
https://github.com/Glavin001/atom-beautify/blob/ec27053a29cf55104242cfb4bca6e5896cb0414a/src/beautifiers/rubocop.coffee
1
50
Glavin001/atom-beautify:src/beautifiers/rubocop.coffee:2:raw_corpus
raw_corpus
@run(rubocopPath, [ "--auto-correct" "--config", configFile tempFile = @tempFile("temp", text, '.rb') ], {ignoreReturnCode: true}) .then(=> @readFile(tempFile) ) else @run("rubocop", [ "--auto-correct" "--config", ...
CoffeeScript
Glavin001/atom-beautify
src/beautifiers/rubocop.coffee
MIT
ec27053a29cf55104242cfb4bca6e5896cb0414a
1,503
https://github.com/Glavin001/atom-beautify/blob/ec27053a29cf55104242cfb4bca6e5896cb0414a/src/beautifiers/rubocop.coffee
51
68
Glavin001/atom-beautify:src/beautifiers/rubocop.coffee:2:completion
completion
@run(rubocopPath, [ "--auto-correct" "--config", configFile tempFile = @tempFile("temp", text, '.rb') ], {ignoreReturnCode: true}) .then(=> @readFile(tempFile) ) else
@run("rubocop", [ "--auto-correct" "--config", configFile tempFile = @tempFile("temp", text, '.rb') ], {ignoreReturnCode: true}) .then(=> @readFile(tempFile) ) )
CoffeeScript
CoffeeScript
Glavin001/atom-beautify
src/beautifiers/rubocop.coffee
MIT
ec27053a29cf55104242cfb4bca6e5896cb0414a
1,503
https://github.com/Glavin001/atom-beautify/blob/ec27053a29cf55104242cfb4bca6e5896cb0414a/src/beautifiers/rubocop.coffee
51
68
Glavin001/atom-beautify:src/beautifiers/rubocop.coffee:2:raw_corpus
raw_corpus
@run(rubocopPath, [ "--auto-correct" "--config", configFile tempFile = @tempFile("temp", text) ], {ignoreReturnCode: true}) .then(=> @readFile(tempFile) ) else @run("rubocop", [ "--auto-correct" "--config", configF...
CoffeeScript
Glavin001/atom-beautify
src/beautifiers/rubocop.coffee
MIT
ba2198675cbcc1ecd05f18e28e97133cdd2d5319
1,503
https://github.com/Glavin001/atom-beautify/blob/ba2198675cbcc1ecd05f18e28e97133cdd2d5319/src/beautifiers/rubocop.coffee
51
68
Glavin001/atom-beautify:src/beautifiers/rubocop.coffee:2:completion
completion
@run(rubocopPath, [ "--auto-correct" "--config", configFile tempFile = @tempFile("temp", text) ], {ignoreReturnCode: true}) .then(=> @readFile(tempFile) ) else
@run("rubocop", [ "--auto-correct" "--config", configFile tempFile = @tempFile("temp", text) ], {ignoreReturnCode: true}) .then(=> @readFile(tempFile) ) )
CoffeeScript
CoffeeScript
Glavin001/atom-beautify
src/beautifiers/rubocop.coffee
MIT
ba2198675cbcc1ecd05f18e28e97133cdd2d5319
1,503
https://github.com/Glavin001/atom-beautify/blob/ba2198675cbcc1ecd05f18e28e97133cdd2d5319/src/beautifiers/rubocop.coffee
51
68
jnordberg/wintersmith:lib/cli/index.coffee:1:raw_corpus
raw_corpus
flatiron = require 'flatiron' path = require 'path' {logger, transports, readJSON} = require './../common' usage = """ usage: wintersmith [options] [command] commands: #{ 'build'.bold } [options] - build a site #{ 'preview'.bold } [options] - run local webserver #{ 'new'.bold } <location> - create a...
CoffeeScript
jnordberg/wintersmith
lib/cli/index.coffee
MIT
f01b0c9862c0cb38dbd62af492e2955581fd974e
3,484
https://github.com/jnordberg/wintersmith/blob/f01b0c9862c0cb38dbd62af492e2955581fd974e/lib/cli/index.coffee
1
50
jnordberg/wintersmith:lib/cli/index.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript flatiron = require 'flatiron' path = require 'path' {logger, transports, readJSON} = require './../common' usage = """ usage: wintersmith [options] [command] commands: #{ 'build'.bold } [options] - build a site #{ 'preview'.bold } [options] - run ...
var flatiron, logger, main, path, readJSON, transports, usage; flatiron = require('flatiron'); path = require('path'); ({logger, transports, readJSON} = require('./../common')); usage = ` usage: wintersmith [options] [command] commands: ${'build'.bold} [options] - build a site ${'preview'.bold} [options] - ru...
CoffeeScript
JavaScript
jnordberg/wintersmith
lib/cli/index.coffee
MIT
f01b0c9862c0cb38dbd62af492e2955581fd974e
3,484
https://github.com/jnordberg/wintersmith/blob/f01b0c9862c0cb38dbd62af492e2955581fd974e/lib/cli/index.coffee
1
50
jnordberg/wintersmith:lib/cli/index.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var flatiron, logger, main, path, readJSON, transports, usage; flatiron = require('flatiron'); path = require('path'); ({logger, transports, readJSON} = require('./../common')); usage = ` usage: wintersmith [options] [command] commands: ${'build'.bold} [opt...
flatiron = require 'flatiron' path = require 'path' {logger, transports, readJSON} = require './../common' usage = """ usage: wintersmith [options] [command] commands: #{ 'build'.bold } [options] - build a site #{ 'preview'.bold } [options] - run local webserver #{ 'new'.bold } <location> - create a...
JavaScript
CoffeeScript
jnordberg/wintersmith
lib/cli/index.coffee
MIT
f01b0c9862c0cb38dbd62af492e2955581fd974e
3,484
https://github.com/jnordberg/wintersmith/blob/f01b0c9862c0cb38dbd62af492e2955581fd974e/lib/cli/index.coffee
1
50
jnordberg/wintersmith:lib/cli/index.coffee:1:completion
completion
flatiron = require 'flatiron' path = require 'path' {logger, transports, readJSON} = require './../common' usage = """ usage: wintersmith [options] [command] commands: #{ 'build'.bold } [options] - build a site #{ 'preview'.bold } [options] - run local webserver #{ 'new'.bold } <location> - create a...
main = -> process.on 'uncaughtException', (error) -> # flatiron hooks into this somewhere and outputs json.. ¿que? logger.error error.message, error process.exit 0 app = flatiron.app app.use flatiron.plugins.cli, dir: __dirname argv: verbose: alias: 'v' quiet: alias: 'q' ve...
CoffeeScript
CoffeeScript
jnordberg/wintersmith
lib/cli/index.coffee
MIT
f01b0c9862c0cb38dbd62af492e2955581fd974e
3,484
https://github.com/jnordberg/wintersmith/blob/f01b0c9862c0cb38dbd62af492e2955581fd974e/lib/cli/index.coffee
1
50
jnordberg/wintersmith:lib/cli/index.coffee:2:raw_corpus
raw_corpus
if app.argv.verbose logger.transports.cli.level = 'verbose' if app.argv.quiet logger.transports.cli.quiet = true app.start log: {transports: transports} module.exports.main = main
CoffeeScript
jnordberg/wintersmith
lib/cli/index.coffee
MIT
f01b0c9862c0cb38dbd62af492e2955581fd974e
3,484
https://github.com/jnordberg/wintersmith/blob/f01b0c9862c0cb38dbd62af492e2955581fd974e/lib/cli/index.coffee
51
60
jnordberg/wintersmith:lib/cli/index.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript if app.argv.verbose logger.transports.cli.level = 'verbose' if app.argv.quiet logger.transports.cli.quiet = true app.start log: {transports: transports} module.exports.main = main ```
if (app.argv.verbose) { logger.transports.cli.level = 'verbose'; } if (app.argv.quiet) { logger.transports.cli.quiet = true; } app.start({ log: { transports: transports } }); module.exports.main = main;
CoffeeScript
JavaScript
jnordberg/wintersmith
lib/cli/index.coffee
MIT
f01b0c9862c0cb38dbd62af492e2955581fd974e
3,484
https://github.com/jnordberg/wintersmith/blob/f01b0c9862c0cb38dbd62af492e2955581fd974e/lib/cli/index.coffee
51
60
jnordberg/wintersmith:lib/cli/index.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript if (app.argv.verbose) { logger.transports.cli.level = 'verbose'; } if (app.argv.quiet) { logger.transports.cli.quiet = true; } app.start({ log: { transports: transports } }); module.exports.main = main; ```
if app.argv.verbose logger.transports.cli.level = 'verbose' if app.argv.quiet logger.transports.cli.quiet = true app.start log: {transports: transports} module.exports.main = main
JavaScript
CoffeeScript
jnordberg/wintersmith
lib/cli/index.coffee
MIT
f01b0c9862c0cb38dbd62af492e2955581fd974e
3,484
https://github.com/jnordberg/wintersmith/blob/f01b0c9862c0cb38dbd62af492e2955581fd974e/lib/cli/index.coffee
51
60
jnordberg/wintersmith:lib/cli/index.coffee:2:completion
completion
if app.argv.verbose logger.transports.cli.level = 'verbose' if app.argv.quiet logger.transports.cli.quiet = true
app.start log: {transports: transports} module.exports.main = main
CoffeeScript
CoffeeScript
jnordberg/wintersmith
lib/cli/index.coffee
MIT
f01b0c9862c0cb38dbd62af492e2955581fd974e
3,484
https://github.com/jnordberg/wintersmith/blob/f01b0c9862c0cb38dbd62af492e2955581fd974e/lib/cli/index.coffee
51
60
ichord/At.js:spec/javascripts/atwho.spec.coffee:1:raw_corpus
raw_corpus
describe "jquery.atwho", -> $inputor = null fixtures = null KEY_CODE = DOWN: 40 UP: 38 ESC: 27 TAB: 9 ENTER: 13 trigger_atwho = -> $inputor.data("atwho").current_flag = "@" $inputor.caretPos(31) e = $.Event("keydown.atwho", keyCode: KEY_CODE.ENTER) $inputor.trigger("keyup....
CoffeeScript
ichord/At.js
spec/javascripts/atwho.spec.coffee
MIT
57e92122a729c22357e049643ccd8c0d541d2cbf
5,250
https://github.com/ichord/At.js/blob/57e92122a729c22357e049643ccd8c0d541d2cbf/spec/javascripts/atwho.spec.coffee
1
41
ichord/At.js:spec/javascripts/atwho.spec.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript describe "jquery.atwho", -> $inputor = null fixtures = null KEY_CODE = DOWN: 40 UP: 38 ESC: 27 TAB: 9 ENTER: 13 trigger_atwho = -> $inputor.data("atwho").current_flag = "@" $inputor.caretPos(31) e = $.Event("keydown.atwh...
describe("jquery.atwho", function() { var $inputor, KEY_CODE, fixtures, trigger_atwho; $inputor = null; fixtures = null; KEY_CODE = { DOWN: 40, UP: 38, ESC: 27, TAB: 9, ENTER: 13 }; trigger_atwho = function() { var e; $inputor.data("atwho").current_flag = "@"; $inputor.caretP...
CoffeeScript
JavaScript
ichord/At.js
spec/javascripts/atwho.spec.coffee
MIT
57e92122a729c22357e049643ccd8c0d541d2cbf
5,250
https://github.com/ichord/At.js/blob/57e92122a729c22357e049643ccd8c0d541d2cbf/spec/javascripts/atwho.spec.coffee
1
41
ichord/At.js:spec/javascripts/atwho.spec.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript describe("jquery.atwho", function() { var $inputor, KEY_CODE, fixtures, trigger_atwho; $inputor = null; fixtures = null; KEY_CODE = { DOWN: 40, UP: 38, ESC: 27, TAB: 9, ENTER: 13 }; trigger_atwho = function() { var e; $inputo...
describe "jquery.atwho", -> $inputor = null fixtures = null KEY_CODE = DOWN: 40 UP: 38 ESC: 27 TAB: 9 ENTER: 13 trigger_atwho = -> $inputor.data("atwho").current_flag = "@" $inputor.caretPos(31) e = $.Event("keydown.atwho", keyCode: KEY_CODE.ENTER) $inputor.trigger("keyup....
JavaScript
CoffeeScript
ichord/At.js
spec/javascripts/atwho.spec.coffee
MIT
57e92122a729c22357e049643ccd8c0d541d2cbf
5,250
https://github.com/ichord/At.js/blob/57e92122a729c22357e049643ccd8c0d541d2cbf/spec/javascripts/atwho.spec.coffee
1
41
ichord/At.js:spec/javascripts/atwho.spec.coffee:1:completion
completion
describe "jquery.atwho", -> $inputor = null fixtures = null KEY_CODE = DOWN: 40 UP: 38 ESC: 27 TAB: 9 ENTER: 13 trigger_atwho = -> $inputor.data("atwho").current_flag = "@" $inputor.caretPos(31) e = $.Event("keydown.atwho", keyCode: KEY_CODE.ENTER) $inputor.trigger("keyup....
beforeEach -> loadFixtures("inputors.html") fixtures = loadJSONFixtures("data.json")["data.json"] $inputor = $("#inputor").atwho "@", data: fixtures["names"] describe "default callbacks", -> callbacks = null controller = null text = null beforeEach -> text = $.trim $inputor.t...
CoffeeScript
CoffeeScript
ichord/At.js
spec/javascripts/atwho.spec.coffee
MIT
57e92122a729c22357e049643ccd8c0d541d2cbf
5,250
https://github.com/ichord/At.js/blob/57e92122a729c22357e049643ccd8c0d541d2cbf/spec/javascripts/atwho.spec.coffee
1
41
ichord/At.js:spec/javascripts/atwho.spec.coffee:2:raw_corpus
raw_corpus
it "should match the key word following @", -> query = callbacks.matcher.call(controller, "@", text) expect(query).toBe("Jobs") it "filter the data without data_refactor", -> items = callbacks.filter.call(controller, "jo", fixtures["names"]) expect(items).toContain("Joshua") it "filter...
CoffeeScript
ichord/At.js
spec/javascripts/atwho.spec.coffee
MIT
57e92122a729c22357e049643ccd8c0d541d2cbf
5,250
https://github.com/ichord/At.js/blob/57e92122a729c22357e049643ccd8c0d541d2cbf/spec/javascripts/atwho.spec.coffee
43
81
ichord/At.js:spec/javascripts/atwho.spec.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript it "should match the key word following @", -> query = callbacks.matcher.call(controller, "@", text) expect(query).toBe("Jobs") it "filter the data without data_refactor", -> items = callbacks.filter.call(controller, "jo", fixtures["names"]...
it("should match the key word following @", function() { var query; query = callbacks.matcher.call(controller, "@", text); return expect(query).toBe("Jobs"); }); it("filter the data without data_refactor", function() { var items; items = callbacks.filter.call(controller, "jo", fixtures["names"]); return ex...
CoffeeScript
JavaScript
ichord/At.js
spec/javascripts/atwho.spec.coffee
MIT
57e92122a729c22357e049643ccd8c0d541d2cbf
5,250
https://github.com/ichord/At.js/blob/57e92122a729c22357e049643ccd8c0d541d2cbf/spec/javascripts/atwho.spec.coffee
43
81
ichord/At.js:spec/javascripts/atwho.spec.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript it("should match the key word following @", function() { var query; query = callbacks.matcher.call(controller, "@", text); return expect(query).toBe("Jobs"); }); it("filter the data without data_refactor", function() { var items; items = callbacks.filter...
it "should match the key word following @", -> query = callbacks.matcher.call(controller, "@", text) expect(query).toBe("Jobs") it "filter the data without data_refactor", -> items = callbacks.filter.call(controller, "jo", fixtures["names"]) expect(items).toContain("Joshua") it "filter...
JavaScript
CoffeeScript
ichord/At.js
spec/javascripts/atwho.spec.coffee
MIT
57e92122a729c22357e049643ccd8c0d541d2cbf
5,250
https://github.com/ichord/At.js/blob/57e92122a729c22357e049643ccd8c0d541d2cbf/spec/javascripts/atwho.spec.coffee
43
81
ichord/At.js:spec/javascripts/atwho.spec.coffee:2:completion
completion
it "should match the key word following @", -> query = callbacks.matcher.call(controller, "@", text) expect(query).toBe("Jobs") it "filter the data without data_refactor", -> items = callbacks.filter.call(controller, "jo", fixtures["names"]) expect(items).toContain("Joshua") it "filter...
request = mostRecentAjaxRequest() # response_data = ["Jacob", "Joshua", "Jayden"] response_data = [{"name":"Jacob"}, {"name":"Joshua"}, {"name":"Jayden"}] request.response status: 200 responseText: JSON.stringify(response_data) expect(render_callback).toHaveBeenCalled() na...
CoffeeScript
CoffeeScript
ichord/At.js
spec/javascripts/atwho.spec.coffee
MIT
57e92122a729c22357e049643ccd8c0d541d2cbf
5,250
https://github.com/ichord/At.js/blob/57e92122a729c22357e049643ccd8c0d541d2cbf/spec/javascripts/atwho.spec.coffee
43
81
ichord/At.js:spec/javascripts/atwho.spec.coffee:3:raw_corpus
raw_corpus
result = callbacks.tpl_eval.call(controller, tpl, map) expect(result).toBe(html) it "can highlight the query", -> html = '<li data-value="username">Ethan</li>' highlighted = callbacks.highlighter.call(controller, html, "e") result = '<li data-value="username"> <strong>E</strong>than </li>' ...
CoffeeScript
ichord/At.js
spec/javascripts/atwho.spec.coffee
MIT
57e92122a729c22357e049643ccd8c0d541d2cbf
5,250
https://github.com/ichord/At.js/blob/57e92122a729c22357e049643ccd8c0d541d2cbf/spec/javascripts/atwho.spec.coffee
83
123
ichord/At.js:spec/javascripts/atwho.spec.coffee:3:completion
completion
result = callbacks.tpl_eval.call(controller, tpl, map) expect(result).toBe(html) it "can highlight the query", -> html = '<li data-value="username">Ethan</li>' highlighted = callbacks.highlighter.call(controller, html, "e") result = '<li data-value="username"> <strong>E</strong>than </li>' ...
controller = $inputor.data("atwho") callbacks = $.fn.atwho.default.callbacks it "update common settings", -> $inputor.atwho limit: 8 expect(controller.common_settings.limit).toBe(8) it "update specific settings", -> $inputor.atwho "@", limit: 3 expect(controller.settings["@"].lim...
CoffeeScript
CoffeeScript
ichord/At.js
spec/javascripts/atwho.spec.coffee
MIT
57e92122a729c22357e049643ccd8c0d541d2cbf
5,250
https://github.com/ichord/At.js/blob/57e92122a729c22357e049643ccd8c0d541d2cbf/spec/javascripts/atwho.spec.coffee
83
123
ichord/At.js:spec/javascripts/atwho.spec.coffee:4:raw_corpus
raw_corpus
it "setting data as url", -> jasmine.Ajax.useMock() spyOn(callbacks, "remote_filter") $inputor.atwho "@", data: "/" trigger_atwho() mostRecentAjaxRequest().response status: 200 expect(callbacks.remote_filter).toHaveBeenCalled() describe "jquery events", -> controller = null...
CoffeeScript
ichord/At.js
spec/javascripts/atwho.spec.coffee
MIT
57e92122a729c22357e049643ccd8c0d541d2cbf
5,250
https://github.com/ichord/At.js/blob/57e92122a729c22357e049643ccd8c0d541d2cbf/spec/javascripts/atwho.spec.coffee
125
168
ichord/At.js:spec/javascripts/atwho.spec.coffee:4:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript it "setting data as url", -> jasmine.Ajax.useMock() spyOn(callbacks, "remote_filter") $inputor.atwho "@", data: "/" trigger_atwho() mostRecentAjaxRequest().response status: 200 expect(callbacks.remote_filter).toHaveBeenCalle...
it("setting data as url", function() { jasmine.Ajax.useMock(); spyOn(callbacks, "remote_filter"); $inputor.atwho("@", { data: "/" }); trigger_atwho(); mostRecentAjaxRequest().response({ status: 200 }); return expect(callbacks.remote_filter).toHaveBeenCalled(); }); describe("jquery events", func...
CoffeeScript
JavaScript
ichord/At.js
spec/javascripts/atwho.spec.coffee
MIT
57e92122a729c22357e049643ccd8c0d541d2cbf
5,250
https://github.com/ichord/At.js/blob/57e92122a729c22357e049643ccd8c0d541d2cbf/spec/javascripts/atwho.spec.coffee
125
168
ichord/At.js:spec/javascripts/atwho.spec.coffee:4:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript it("setting data as url", function() { jasmine.Ajax.useMock(); spyOn(callbacks, "remote_filter"); $inputor.atwho("@", { data: "/" }); trigger_atwho(); mostRecentAjaxRequest().response({ status: 200 }); return expect(callbacks.remote_filter)....
it "setting data as url", -> jasmine.Ajax.useMock() spyOn(callbacks, "remote_filter") $inputor.atwho "@", data: "/" trigger_atwho() mostRecentAjaxRequest().response status: 200 expect(callbacks.remote_filter).toHaveBeenCalled() describe "jquery events", -> controller = null...
JavaScript
CoffeeScript
ichord/At.js
spec/javascripts/atwho.spec.coffee
MIT
57e92122a729c22357e049643ccd8c0d541d2cbf
5,250
https://github.com/ichord/At.js/blob/57e92122a729c22357e049643ccd8c0d541d2cbf/spec/javascripts/atwho.spec.coffee
125
168
ichord/At.js:spec/javascripts/atwho.spec.coffee:4:completion
completion
it "setting data as url", -> jasmine.Ajax.useMock() spyOn(callbacks, "remote_filter") $inputor.atwho "@", data: "/" trigger_atwho() mostRecentAjaxRequest().response status: 200 expect(callbacks.remote_filter).toHaveBeenCalled() describe "jquery events", -> controller = null...
esc_event = $.Event("keyup.atwho", keyCode: KEY_CODE.ESC) $inputor.trigger(esc_event) expect(controller.view.visible()).toBe(false) it "trigger tab", -> spyOn(callbacks, "selector").andCallThrough() tab_event = $.Event("keydown.atwho", keyCode: KEY_CODE.TAB) $inputor.trigger(tab_event...
CoffeeScript
CoffeeScript
ichord/At.js
spec/javascripts/atwho.spec.coffee
MIT
57e92122a729c22357e049643ccd8c0d541d2cbf
5,250
https://github.com/ichord/At.js/blob/57e92122a729c22357e049643ccd8c0d541d2cbf/spec/javascripts/atwho.spec.coffee
125
168
ichord/At.js:spec/javascripts/atwho.spec.coffee:5:raw_corpus
raw_corpus
it "trigger down", -> spyOn(controller.view, "next").andCallThrough() down_event = $.Event("keydown.atwho", keyCode: KEY_CODE.DOWN) $inputor.trigger(down_event) expect(controller.view.next).toHaveBeenCalled() describe "atwho events", -> it "trigger matched", -> matched_event = spyO...
CoffeeScript
ichord/At.js
spec/javascripts/atwho.spec.coffee
MIT
57e92122a729c22357e049643ccd8c0d541d2cbf
5,250
https://github.com/ichord/At.js/blob/57e92122a729c22357e049643ccd8c0d541d2cbf/spec/javascripts/atwho.spec.coffee
170
191
ichord/At.js:spec/javascripts/atwho.spec.coffee:5:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript it "trigger down", -> spyOn(controller.view, "next").andCallThrough() down_event = $.Event("keydown.atwho", keyCode: KEY_CODE.DOWN) $inputor.trigger(down_event) expect(controller.view.next).toHaveBeenCalled() describe "atwho events", ->...
it("trigger down", function() { var down_event; spyOn(controller.view, "next").andCallThrough(); down_event = $.Event("keydown.atwho", { keyCode: KEY_CODE.DOWN }); $inputor.trigger(down_event); return expect(controller.view.next).toHaveBeenCalled(); }); describe("atwho events", function() { it("trigg...
CoffeeScript
JavaScript
ichord/At.js
spec/javascripts/atwho.spec.coffee
MIT
57e92122a729c22357e049643ccd8c0d541d2cbf
5,250
https://github.com/ichord/At.js/blob/57e92122a729c22357e049643ccd8c0d541d2cbf/spec/javascripts/atwho.spec.coffee
170
191
ichord/At.js:spec/javascripts/atwho.spec.coffee:5:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript it("trigger down", function() { var down_event; spyOn(controller.view, "next").andCallThrough(); down_event = $.Event("keydown.atwho", { keyCode: KEY_CODE.DOWN }); $inputor.trigger(down_event); return expect(controller.view.next).toHaveBeenCalled();...
it "trigger down", -> spyOn(controller.view, "next").andCallThrough() down_event = $.Event("keydown.atwho", keyCode: KEY_CODE.DOWN) $inputor.trigger(down_event) expect(controller.view.next).toHaveBeenCalled() describe "atwho events", -> it "trigger matched", -> matched_event = spyO...
JavaScript
CoffeeScript
ichord/At.js
spec/javascripts/atwho.spec.coffee
MIT
57e92122a729c22357e049643ccd8c0d541d2cbf
5,250
https://github.com/ichord/At.js/blob/57e92122a729c22357e049643ccd8c0d541d2cbf/spec/javascripts/atwho.spec.coffee
170
191
ichord/At.js:spec/javascripts/atwho.spec.coffee:5:completion
completion
it "trigger down", -> spyOn(controller.view, "next").andCallThrough() down_event = $.Event("keydown.atwho", keyCode: KEY_CODE.DOWN) $inputor.trigger(down_event) expect(controller.view.next).toHaveBeenCalled() describe "atwho events", -> it "trigger matched", -> matched_event = spyO...
expect(matched_event).toHaveBeenTriggered() it "trigger choose", -> choose_event = spyOnEvent($inputor, "choose.atwho") trigger_atwho() expect(choose_event).toHaveBeenTriggered() it "trigger reposition", -> reposition_event = spyOnEvent($inputor, "reposition.atwho") trigger_atwho...
CoffeeScript
CoffeeScript
ichord/At.js
spec/javascripts/atwho.spec.coffee
MIT
57e92122a729c22357e049643ccd8c0d541d2cbf
5,250
https://github.com/ichord/At.js/blob/57e92122a729c22357e049643ccd8c0d541d2cbf/spec/javascripts/atwho.spec.coffee
170
191
ichord/At.js:spec/javascripts/atwho.spec.coffee:1:raw_corpus
raw_corpus
describe "jquery.atwho", -> $inputor = null fixtures = null KEY_CODE = DOWN: 40 UP: 38 ESC: 27 TAB: 9 ENTER: 13 trigger_atwho = -> $inputor.data("AtWho").current_flag = "@" $inputor.caretPos(31) e = $.Event("keydown.atwho", keyCode: KEY_CODE.ENTER) $inputor.trigger("keyup....
CoffeeScript
ichord/At.js
spec/javascripts/atwho.spec.coffee
MIT
a48d26e22e6b5ba50433853c2c817498337a163d
5,250
https://github.com/ichord/At.js/blob/a48d26e22e6b5ba50433853c2c817498337a163d/spec/javascripts/atwho.spec.coffee
1
41
ichord/At.js:spec/javascripts/atwho.spec.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript describe "jquery.atwho", -> $inputor = null fixtures = null KEY_CODE = DOWN: 40 UP: 38 ESC: 27 TAB: 9 ENTER: 13 trigger_atwho = -> $inputor.data("AtWho").current_flag = "@" $inputor.caretPos(31) e = $.Event("keydown.atwh...
describe("jquery.atwho", function() { var $inputor, KEY_CODE, fixtures, trigger_atwho; $inputor = null; fixtures = null; KEY_CODE = { DOWN: 40, UP: 38, ESC: 27, TAB: 9, ENTER: 13 }; trigger_atwho = function() { var e; $inputor.data("AtWho").current_flag = "@"; $inputor.caretP...
CoffeeScript
JavaScript
ichord/At.js
spec/javascripts/atwho.spec.coffee
MIT
a48d26e22e6b5ba50433853c2c817498337a163d
5,250
https://github.com/ichord/At.js/blob/a48d26e22e6b5ba50433853c2c817498337a163d/spec/javascripts/atwho.spec.coffee
1
41
ichord/At.js:spec/javascripts/atwho.spec.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript describe("jquery.atwho", function() { var $inputor, KEY_CODE, fixtures, trigger_atwho; $inputor = null; fixtures = null; KEY_CODE = { DOWN: 40, UP: 38, ESC: 27, TAB: 9, ENTER: 13 }; trigger_atwho = function() { var e; $inputo...
describe "jquery.atwho", -> $inputor = null fixtures = null KEY_CODE = DOWN: 40 UP: 38 ESC: 27 TAB: 9 ENTER: 13 trigger_atwho = -> $inputor.data("AtWho").current_flag = "@" $inputor.caretPos(31) e = $.Event("keydown.atwho", keyCode: KEY_CODE.ENTER) $inputor.trigger("keyup....
JavaScript
CoffeeScript
ichord/At.js
spec/javascripts/atwho.spec.coffee
MIT
a48d26e22e6b5ba50433853c2c817498337a163d
5,250
https://github.com/ichord/At.js/blob/a48d26e22e6b5ba50433853c2c817498337a163d/spec/javascripts/atwho.spec.coffee
1
41
ichord/At.js:spec/javascripts/atwho.spec.coffee:1:completion
completion
describe "jquery.atwho", -> $inputor = null fixtures = null KEY_CODE = DOWN: 40 UP: 38 ESC: 27 TAB: 9 ENTER: 13 trigger_atwho = -> $inputor.data("AtWho").current_flag = "@" $inputor.caretPos(31) e = $.Event("keydown.atwho", keyCode: KEY_CODE.ENTER) $inputor.trigger("keyup....
beforeEach -> loadFixtures("inputors.html") fixtures = loadJSONFixtures("data.json")["data.json"] $inputor = $("#inputor").atwho "@", data: fixtures["names"] describe "default callbacks", -> callbacks = null controller = null text = null beforeEach -> text = $.trim $inputor.t...
CoffeeScript
CoffeeScript
ichord/At.js
spec/javascripts/atwho.spec.coffee
MIT
a48d26e22e6b5ba50433853c2c817498337a163d
5,250
https://github.com/ichord/At.js/blob/a48d26e22e6b5ba50433853c2c817498337a163d/spec/javascripts/atwho.spec.coffee
1
41
ichord/At.js:spec/javascripts/atwho.spec.coffee:3:raw_corpus
raw_corpus
result = callbacks.tpl_eval.call(controller, tpl, map) expect(result).toBe(html) it "can highlight the query", -> html = '<li data-value="username">Ethan</li>' highlighted = callbacks.highlighter.call(controller, html, "e") result = '<li data-value="username"> <strong>E</strong>than </li>' ...
CoffeeScript
ichord/At.js
spec/javascripts/atwho.spec.coffee
MIT
a48d26e22e6b5ba50433853c2c817498337a163d
5,250
https://github.com/ichord/At.js/blob/a48d26e22e6b5ba50433853c2c817498337a163d/spec/javascripts/atwho.spec.coffee
83
124
ichord/At.js:spec/javascripts/atwho.spec.coffee:3:completion
completion
result = callbacks.tpl_eval.call(controller, tpl, map) expect(result).toBe(html) it "can highlight the query", -> html = '<li data-value="username">Ethan</li>' highlighted = callbacks.highlighter.call(controller, html, "e") result = '<li data-value="username"> <strong>E</strong>than </li>' ...
controller = $inputor.data("AtWho") callbacks = $.fn.atwho.default.callbacks it "update common settings", -> $inputor.atwho limit: 8 expect(controller.common_settings.limit).toBe(8) it "update specific settings", -> $inputor.atwho "@", limit: 3 expect(controller.settings["@"].lim...
CoffeeScript
CoffeeScript
ichord/At.js
spec/javascripts/atwho.spec.coffee
MIT
a48d26e22e6b5ba50433853c2c817498337a163d
5,250
https://github.com/ichord/At.js/blob/a48d26e22e6b5ba50433853c2c817498337a163d/spec/javascripts/atwho.spec.coffee
83
124
ichord/At.js:spec/javascripts/atwho.spec.coffee:4:raw_corpus
raw_corpus
it "setting data as url", -> jasmine.Ajax.useMock() spyOn(callbacks, "remote_filter") $inputor.atwho "@", data: "/" trigger_atwho() mostRecentAjaxRequest().response status: 200 expect(callbacks.remote_filter).toHaveBeenCalled() describe "jquery events", -> controller = nul...
CoffeeScript
ichord/At.js
spec/javascripts/atwho.spec.coffee
MIT
a48d26e22e6b5ba50433853c2c817498337a163d
5,250
https://github.com/ichord/At.js/blob/a48d26e22e6b5ba50433853c2c817498337a163d/spec/javascripts/atwho.spec.coffee
126
164
ichord/At.js:spec/javascripts/atwho.spec.coffee:4:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript it "setting data as url", -> jasmine.Ajax.useMock() spyOn(callbacks, "remote_filter") $inputor.atwho "@", data: "/" trigger_atwho() mostRecentAjaxRequest().response status: 200 expect(callbacks.remote_filter).toHaveBeenCalle...
it("setting data as url", function() { jasmine.Ajax.useMock(); spyOn(callbacks, "remote_filter"); $inputor.atwho("@", { data: "/" }); trigger_atwho(); mostRecentAjaxRequest().response({ status: 200 }); return expect(callbacks.remote_filter).toHaveBeenCalled(); }); describe("jquery events", func...
CoffeeScript
JavaScript
ichord/At.js
spec/javascripts/atwho.spec.coffee
MIT
a48d26e22e6b5ba50433853c2c817498337a163d
5,250
https://github.com/ichord/At.js/blob/a48d26e22e6b5ba50433853c2c817498337a163d/spec/javascripts/atwho.spec.coffee
126
164
ichord/At.js:spec/javascripts/atwho.spec.coffee:4:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript it("setting data as url", function() { jasmine.Ajax.useMock(); spyOn(callbacks, "remote_filter"); $inputor.atwho("@", { data: "/" }); trigger_atwho(); mostRecentAjaxRequest().response({ status: 200 }); return expect(callbacks.remote_filter)....
it "setting data as url", -> jasmine.Ajax.useMock() spyOn(callbacks, "remote_filter") $inputor.atwho "@", data: "/" trigger_atwho() mostRecentAjaxRequest().response status: 200 expect(callbacks.remote_filter).toHaveBeenCalled() describe "jquery events", -> controller = nul...
JavaScript
CoffeeScript
ichord/At.js
spec/javascripts/atwho.spec.coffee
MIT
a48d26e22e6b5ba50433853c2c817498337a163d
5,250
https://github.com/ichord/At.js/blob/a48d26e22e6b5ba50433853c2c817498337a163d/spec/javascripts/atwho.spec.coffee
126
164
ichord/At.js:spec/javascripts/atwho.spec.coffee:4:completion
completion
it "setting data as url", -> jasmine.Ajax.useMock() spyOn(callbacks, "remote_filter") $inputor.atwho "@", data: "/" trigger_atwho() mostRecentAjaxRequest().response status: 200 expect(callbacks.remote_filter).toHaveBeenCalled() describe "jquery events", -> controller = nul...
$inputor.caretPos(31) $inputor.trigger("keyup.atwho") it "trigger esc", -> esc_event = $.Event("keyup.atwho", keyCode: KEY_CODE.ESC) $inputor.trigger(esc_event) expect(controller.view.visible()).toBe(false) it "trigger tab", -> spyOn(callbacks, "selector").andCallThrough() ...
CoffeeScript
CoffeeScript
ichord/At.js
spec/javascripts/atwho.spec.coffee
MIT
a48d26e22e6b5ba50433853c2c817498337a163d
5,250
https://github.com/ichord/At.js/blob/a48d26e22e6b5ba50433853c2c817498337a163d/spec/javascripts/atwho.spec.coffee
126
164
ichord/At.js:spec/javascripts/atwho.spec.coffee:5:raw_corpus
raw_corpus
it "trigger up", -> spyOn(controller.view, "prev").andCallThrough() up_event = $.Event("keydown.atwho", keyCode: KEY_CODE.UP) $inputor.trigger(up_event) expect(controller.view.prev).toHaveBeenCalled() it "trigger down", -> spyOn(controller.view, "next").andCallThrough() down_eve...
CoffeeScript
ichord/At.js
spec/javascripts/atwho.spec.coffee
MIT
a48d26e22e6b5ba50433853c2c817498337a163d
5,250
https://github.com/ichord/At.js/blob/a48d26e22e6b5ba50433853c2c817498337a163d/spec/javascripts/atwho.spec.coffee
166
176
ichord/At.js:spec/javascripts/atwho.spec.coffee:5:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript it "trigger up", -> spyOn(controller.view, "prev").andCallThrough() up_event = $.Event("keydown.atwho", keyCode: KEY_CODE.UP) $inputor.trigger(up_event) expect(controller.view.prev).toHaveBeenCalled() it "trigger down", -> spyOn...
it("trigger up", function() { var up_event; spyOn(controller.view, "prev").andCallThrough(); up_event = $.Event("keydown.atwho", { keyCode: KEY_CODE.UP }); $inputor.trigger(up_event); return expect(controller.view.prev).toHaveBeenCalled(); }); it("trigger down", function() { var down_event; spyOn(c...
CoffeeScript
JavaScript
ichord/At.js
spec/javascripts/atwho.spec.coffee
MIT
a48d26e22e6b5ba50433853c2c817498337a163d
5,250
https://github.com/ichord/At.js/blob/a48d26e22e6b5ba50433853c2c817498337a163d/spec/javascripts/atwho.spec.coffee
166
176
ichord/At.js:spec/javascripts/atwho.spec.coffee:5:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript it("trigger up", function() { var up_event; spyOn(controller.view, "prev").andCallThrough(); up_event = $.Event("keydown.atwho", { keyCode: KEY_CODE.UP }); $inputor.trigger(up_event); return expect(controller.view.prev).toHaveBeenCalled(); }); it("...
it "trigger up", -> spyOn(controller.view, "prev").andCallThrough() up_event = $.Event("keydown.atwho", keyCode: KEY_CODE.UP) $inputor.trigger(up_event) expect(controller.view.prev).toHaveBeenCalled() it "trigger down", -> spyOn(controller.view, "next").andCallThrough() down_eve...
JavaScript
CoffeeScript
ichord/At.js
spec/javascripts/atwho.spec.coffee
MIT
a48d26e22e6b5ba50433853c2c817498337a163d
5,250
https://github.com/ichord/At.js/blob/a48d26e22e6b5ba50433853c2c817498337a163d/spec/javascripts/atwho.spec.coffee
166
176
ichord/At.js:spec/javascripts/atwho.spec.coffee:5:completion
completion
it "trigger up", -> spyOn(controller.view, "prev").andCallThrough() up_event = $.Event("keydown.atwho", keyCode: KEY_CODE.UP) $inputor.trigger(up_event) expect(controller.view.prev).toHaveBeenCalled()
it "trigger down", -> spyOn(controller.view, "next").andCallThrough() down_event = $.Event("keydown.atwho", keyCode: KEY_CODE.DOWN) $inputor.trigger(down_event) expect(controller.view.next).toHaveBeenCalled()
CoffeeScript
CoffeeScript
ichord/At.js
spec/javascripts/atwho.spec.coffee
MIT
a48d26e22e6b5ba50433853c2c817498337a163d
5,250
https://github.com/ichord/At.js/blob/a48d26e22e6b5ba50433853c2c817498337a163d/spec/javascripts/atwho.spec.coffee
166
176
ichord/At.js:spec/javascripts/atwho.spec.coffee:4:raw_corpus
raw_corpus
it "setting data as url", -> jasmine.Ajax.useMock() spyOn(callbacks, "remote_filter") $inputor.atwho "@", data: "/" trigger_atwho() mostRecentAjaxRequest().response status: 200 expect(callbacks.remote_filter).toHaveBeenCalled() describe "events", -> controller = null c...
CoffeeScript
ichord/At.js
spec/javascripts/atwho.spec.coffee
MIT
f659ae4651f9ef042160426673e166c43aa911ee
5,250
https://github.com/ichord/At.js/blob/f659ae4651f9ef042160426673e166c43aa911ee/spec/javascripts/atwho.spec.coffee
126
164
ichord/At.js:spec/javascripts/atwho.spec.coffee:4:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript it "setting data as url", -> jasmine.Ajax.useMock() spyOn(callbacks, "remote_filter") $inputor.atwho "@", data: "/" trigger_atwho() mostRecentAjaxRequest().response status: 200 expect(callbacks.remote_filter).toHaveBeenCalle...
it("setting data as url", function() { jasmine.Ajax.useMock(); spyOn(callbacks, "remote_filter"); $inputor.atwho("@", { data: "/" }); trigger_atwho(); mostRecentAjaxRequest().response({ status: 200 }); return expect(callbacks.remote_filter).toHaveBeenCalled(); }); describe("events", function() ...
CoffeeScript
JavaScript
ichord/At.js
spec/javascripts/atwho.spec.coffee
MIT
f659ae4651f9ef042160426673e166c43aa911ee
5,250
https://github.com/ichord/At.js/blob/f659ae4651f9ef042160426673e166c43aa911ee/spec/javascripts/atwho.spec.coffee
126
164
ichord/At.js:spec/javascripts/atwho.spec.coffee:4:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript it("setting data as url", function() { jasmine.Ajax.useMock(); spyOn(callbacks, "remote_filter"); $inputor.atwho("@", { data: "/" }); trigger_atwho(); mostRecentAjaxRequest().response({ status: 200 }); return expect(callbacks.remote_filter)....
it "setting data as url", -> jasmine.Ajax.useMock() spyOn(callbacks, "remote_filter") $inputor.atwho "@", data: "/" trigger_atwho() mostRecentAjaxRequest().response status: 200 expect(callbacks.remote_filter).toHaveBeenCalled() describe "events", -> controller = null c...
JavaScript
CoffeeScript
ichord/At.js
spec/javascripts/atwho.spec.coffee
MIT
f659ae4651f9ef042160426673e166c43aa911ee
5,250
https://github.com/ichord/At.js/blob/f659ae4651f9ef042160426673e166c43aa911ee/spec/javascripts/atwho.spec.coffee
126
164
ichord/At.js:spec/javascripts/atwho.spec.coffee:4:completion
completion
it "setting data as url", -> jasmine.Ajax.useMock() spyOn(callbacks, "remote_filter") $inputor.atwho "@", data: "/" trigger_atwho() mostRecentAjaxRequest().response status: 200 expect(callbacks.remote_filter).toHaveBeenCalled() describe "events", -> controller = null c...
$inputor.caretPos(31) $inputor.trigger("keyup.atwho") it "trigger esc", -> esc_event = $.Event("keyup.atwho", keyCode: KEY_CODE.ESC) $inputor.trigger(esc_event) expect(controller.view.visible()).toBe(false) it "trigger tab", -> spyOn(callbacks, "selector").andCallThrough() ...
CoffeeScript
CoffeeScript
ichord/At.js
spec/javascripts/atwho.spec.coffee
MIT
f659ae4651f9ef042160426673e166c43aa911ee
5,250
https://github.com/ichord/At.js/blob/f659ae4651f9ef042160426673e166c43aa911ee/spec/javascripts/atwho.spec.coffee
126
164
ichord/At.js:spec/javascripts/atwho.spec.coffee:1:raw_corpus
raw_corpus
describe "jquery.atWho", -> $inputor = null fixtures = null KEY_CODE = DOWN: 40 UP: 38 ESC: 27 TAB: 9 ENTER: 13 trigger_atwho = -> $inputor.data("AtWho").current_flag = "@" $inputor.caretPos(31) e = $.Event("keydown.atWho", keyCode: KEY_CODE.ENTER) $inputor.trigger("keyup....
CoffeeScript
ichord/At.js
spec/javascripts/atwho.spec.coffee
MIT
d2e513257a29d95cfcf94fd1af17df21fa871c38
5,250
https://github.com/ichord/At.js/blob/d2e513257a29d95cfcf94fd1af17df21fa871c38/spec/javascripts/atwho.spec.coffee
1
41
ichord/At.js:spec/javascripts/atwho.spec.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript describe "jquery.atWho", -> $inputor = null fixtures = null KEY_CODE = DOWN: 40 UP: 38 ESC: 27 TAB: 9 ENTER: 13 trigger_atwho = -> $inputor.data("AtWho").current_flag = "@" $inputor.caretPos(31) e = $.Event("keydown.atWh...
describe("jquery.atWho", function() { var $inputor, KEY_CODE, fixtures, trigger_atwho; $inputor = null; fixtures = null; KEY_CODE = { DOWN: 40, UP: 38, ESC: 27, TAB: 9, ENTER: 13 }; trigger_atwho = function() { var e; $inputor.data("AtWho").current_flag = "@"; $inputor.caretP...
CoffeeScript
JavaScript
ichord/At.js
spec/javascripts/atwho.spec.coffee
MIT
d2e513257a29d95cfcf94fd1af17df21fa871c38
5,250
https://github.com/ichord/At.js/blob/d2e513257a29d95cfcf94fd1af17df21fa871c38/spec/javascripts/atwho.spec.coffee
1
41
ichord/At.js:spec/javascripts/atwho.spec.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript describe("jquery.atWho", function() { var $inputor, KEY_CODE, fixtures, trigger_atwho; $inputor = null; fixtures = null; KEY_CODE = { DOWN: 40, UP: 38, ESC: 27, TAB: 9, ENTER: 13 }; trigger_atwho = function() { var e; $inputo...
describe "jquery.atWho", -> $inputor = null fixtures = null KEY_CODE = DOWN: 40 UP: 38 ESC: 27 TAB: 9 ENTER: 13 trigger_atwho = -> $inputor.data("AtWho").current_flag = "@" $inputor.caretPos(31) e = $.Event("keydown.atWho", keyCode: KEY_CODE.ENTER) $inputor.trigger("keyup....
JavaScript
CoffeeScript
ichord/At.js
spec/javascripts/atwho.spec.coffee
MIT
d2e513257a29d95cfcf94fd1af17df21fa871c38
5,250
https://github.com/ichord/At.js/blob/d2e513257a29d95cfcf94fd1af17df21fa871c38/spec/javascripts/atwho.spec.coffee
1
41
ichord/At.js:spec/javascripts/atwho.spec.coffee:1:completion
completion
describe "jquery.atWho", -> $inputor = null fixtures = null KEY_CODE = DOWN: 40 UP: 38 ESC: 27 TAB: 9 ENTER: 13 trigger_atwho = -> $inputor.data("AtWho").current_flag = "@" $inputor.caretPos(31) e = $.Event("keydown.atWho", keyCode: KEY_CODE.ENTER) $inputor.trigger("keyup....
beforeEach -> loadFixtures("inputors.html") fixtures = loadJSONFixtures("data.json")["data.json"] $inputor = $("#inputor").atWho "@", data: fixtures["names"] describe "default callbacks", -> callbacks = null controller = null text = null beforeEach -> text = $.trim $inputor.t...
CoffeeScript
CoffeeScript
ichord/At.js
spec/javascripts/atwho.spec.coffee
MIT
d2e513257a29d95cfcf94fd1af17df21fa871c38
5,250
https://github.com/ichord/At.js/blob/d2e513257a29d95cfcf94fd1af17df21fa871c38/spec/javascripts/atwho.spec.coffee
1
41
ichord/At.js:spec/javascripts/atwho.spec.coffee:3:raw_corpus
raw_corpus
result = callbacks.tpl_eval.call(controller, tpl, map) expect(result).toBe(html) it "can highlight the query", -> html = '<li data-value="username">Ethan</li>' highlighted = callbacks.highlighter.call(controller, html, "e") result = '<li data-value="username"> <strong>E</strong>than </li>' ...
CoffeeScript
ichord/At.js
spec/javascripts/atwho.spec.coffee
MIT
d2e513257a29d95cfcf94fd1af17df21fa871c38
5,250
https://github.com/ichord/At.js/blob/d2e513257a29d95cfcf94fd1af17df21fa871c38/spec/javascripts/atwho.spec.coffee
83
124
ichord/At.js:spec/javascripts/atwho.spec.coffee:3:completion
completion
result = callbacks.tpl_eval.call(controller, tpl, map) expect(result).toBe(html) it "can highlight the query", -> html = '<li data-value="username">Ethan</li>' highlighted = callbacks.highlighter.call(controller, html, "e") result = '<li data-value="username"> <strong>E</strong>than </li>' ...
controller = $inputor.data("AtWho") callbacks = $.fn.atWho.default.callbacks it "update common settings", -> $inputor.atWho limit: 8 expect(controller.common_settings.limit).toBe(8) it "update specific settings", -> $inputor.atWho "@", limit: 3 expect(controller.settings["@"].lim...
CoffeeScript
CoffeeScript
ichord/At.js
spec/javascripts/atwho.spec.coffee
MIT
d2e513257a29d95cfcf94fd1af17df21fa871c38
5,250
https://github.com/ichord/At.js/blob/d2e513257a29d95cfcf94fd1af17df21fa871c38/spec/javascripts/atwho.spec.coffee
83
124
ichord/At.js:spec/javascripts/atwho.spec.coffee:4:raw_corpus
raw_corpus
it "setting data as url", -> jasmine.Ajax.useMock() spyOn(callbacks, "remote_filter") $inputor.atWho "@", data: "/" trigger_atwho() mostRecentAjaxRequest().response status: 200 expect(callbacks.remote_filter).toHaveBeenCalled() describe "events", -> controller = null c...
CoffeeScript
ichord/At.js
spec/javascripts/atwho.spec.coffee
MIT
d2e513257a29d95cfcf94fd1af17df21fa871c38
5,250
https://github.com/ichord/At.js/blob/d2e513257a29d95cfcf94fd1af17df21fa871c38/spec/javascripts/atwho.spec.coffee
126
164
ichord/At.js:spec/javascripts/atwho.spec.coffee:4:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript it "setting data as url", -> jasmine.Ajax.useMock() spyOn(callbacks, "remote_filter") $inputor.atWho "@", data: "/" trigger_atwho() mostRecentAjaxRequest().response status: 200 expect(callbacks.remote_filter).toHaveBeenCalle...
it("setting data as url", function() { jasmine.Ajax.useMock(); spyOn(callbacks, "remote_filter"); $inputor.atWho("@", { data: "/" }); trigger_atwho(); mostRecentAjaxRequest().response({ status: 200 }); return expect(callbacks.remote_filter).toHaveBeenCalled(); }); describe("events", function() ...
CoffeeScript
JavaScript
ichord/At.js
spec/javascripts/atwho.spec.coffee
MIT
d2e513257a29d95cfcf94fd1af17df21fa871c38
5,250
https://github.com/ichord/At.js/blob/d2e513257a29d95cfcf94fd1af17df21fa871c38/spec/javascripts/atwho.spec.coffee
126
164
ichord/At.js:spec/javascripts/atwho.spec.coffee:4:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript it("setting data as url", function() { jasmine.Ajax.useMock(); spyOn(callbacks, "remote_filter"); $inputor.atWho("@", { data: "/" }); trigger_atwho(); mostRecentAjaxRequest().response({ status: 200 }); return expect(callbacks.remote_filter)....
it "setting data as url", -> jasmine.Ajax.useMock() spyOn(callbacks, "remote_filter") $inputor.atWho "@", data: "/" trigger_atwho() mostRecentAjaxRequest().response status: 200 expect(callbacks.remote_filter).toHaveBeenCalled() describe "events", -> controller = null c...
JavaScript
CoffeeScript
ichord/At.js
spec/javascripts/atwho.spec.coffee
MIT
d2e513257a29d95cfcf94fd1af17df21fa871c38
5,250
https://github.com/ichord/At.js/blob/d2e513257a29d95cfcf94fd1af17df21fa871c38/spec/javascripts/atwho.spec.coffee
126
164
ichord/At.js:spec/javascripts/atwho.spec.coffee:4:completion
completion
it "setting data as url", -> jasmine.Ajax.useMock() spyOn(callbacks, "remote_filter") $inputor.atWho "@", data: "/" trigger_atwho() mostRecentAjaxRequest().response status: 200 expect(callbacks.remote_filter).toHaveBeenCalled() describe "events", -> controller = null c...
$inputor.caretPos(31) $inputor.trigger("keyup.atWho") it "trigger esc", -> esc_event = $.Event("keyup.atWho", keyCode: KEY_CODE.ESC) $inputor.trigger(esc_event) expect(controller.view.visible()).toBe(false) it "trigger tab", -> spyOn(callbacks, "selector").andCallThrough() ...
CoffeeScript
CoffeeScript
ichord/At.js
spec/javascripts/atwho.spec.coffee
MIT
d2e513257a29d95cfcf94fd1af17df21fa871c38
5,250
https://github.com/ichord/At.js/blob/d2e513257a29d95cfcf94fd1af17df21fa871c38/spec/javascripts/atwho.spec.coffee
126
164
ichord/At.js:spec/javascripts/atwho.spec.coffee:5:raw_corpus
raw_corpus
it "trigger up", -> spyOn(controller.view, "prev").andCallThrough() up_event = $.Event("keydown.atWho", keyCode: KEY_CODE.UP) $inputor.trigger(up_event) expect(controller.view.prev).toHaveBeenCalled() it "trigger down", -> spyOn(controller.view, "next").andCallThrough() down_eve...
CoffeeScript
ichord/At.js
spec/javascripts/atwho.spec.coffee
MIT
d2e513257a29d95cfcf94fd1af17df21fa871c38
5,250
https://github.com/ichord/At.js/blob/d2e513257a29d95cfcf94fd1af17df21fa871c38/spec/javascripts/atwho.spec.coffee
166
176
ichord/At.js:spec/javascripts/atwho.spec.coffee:5:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript it "trigger up", -> spyOn(controller.view, "prev").andCallThrough() up_event = $.Event("keydown.atWho", keyCode: KEY_CODE.UP) $inputor.trigger(up_event) expect(controller.view.prev).toHaveBeenCalled() it "trigger down", -> spyOn...
it("trigger up", function() { var up_event; spyOn(controller.view, "prev").andCallThrough(); up_event = $.Event("keydown.atWho", { keyCode: KEY_CODE.UP }); $inputor.trigger(up_event); return expect(controller.view.prev).toHaveBeenCalled(); }); it("trigger down", function() { var down_event; spyOn(c...
CoffeeScript
JavaScript
ichord/At.js
spec/javascripts/atwho.spec.coffee
MIT
d2e513257a29d95cfcf94fd1af17df21fa871c38
5,250
https://github.com/ichord/At.js/blob/d2e513257a29d95cfcf94fd1af17df21fa871c38/spec/javascripts/atwho.spec.coffee
166
176
ichord/At.js:spec/javascripts/atwho.spec.coffee:5:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript it("trigger up", function() { var up_event; spyOn(controller.view, "prev").andCallThrough(); up_event = $.Event("keydown.atWho", { keyCode: KEY_CODE.UP }); $inputor.trigger(up_event); return expect(controller.view.prev).toHaveBeenCalled(); }); it("...
it "trigger up", -> spyOn(controller.view, "prev").andCallThrough() up_event = $.Event("keydown.atWho", keyCode: KEY_CODE.UP) $inputor.trigger(up_event) expect(controller.view.prev).toHaveBeenCalled() it "trigger down", -> spyOn(controller.view, "next").andCallThrough() down_eve...
JavaScript
CoffeeScript
ichord/At.js
spec/javascripts/atwho.spec.coffee
MIT
d2e513257a29d95cfcf94fd1af17df21fa871c38
5,250
https://github.com/ichord/At.js/blob/d2e513257a29d95cfcf94fd1af17df21fa871c38/spec/javascripts/atwho.spec.coffee
166
176
ichord/At.js:spec/javascripts/atwho.spec.coffee:5:completion
completion
it "trigger up", -> spyOn(controller.view, "prev").andCallThrough() up_event = $.Event("keydown.atWho", keyCode: KEY_CODE.UP) $inputor.trigger(up_event) expect(controller.view.prev).toHaveBeenCalled()
it "trigger down", -> spyOn(controller.view, "next").andCallThrough() down_event = $.Event("keydown.atWho", keyCode: KEY_CODE.DOWN) $inputor.trigger(down_event) expect(controller.view.next).toHaveBeenCalled()
CoffeeScript
CoffeeScript
ichord/At.js
spec/javascripts/atwho.spec.coffee
MIT
d2e513257a29d95cfcf94fd1af17df21fa871c38
5,250
https://github.com/ichord/At.js/blob/d2e513257a29d95cfcf94fd1af17df21fa871c38/spec/javascripts/atwho.spec.coffee
166
176
ichord/At.js:spec/javascripts/atwho.spec.coffee:1:raw_corpus
raw_corpus
describe "jquery.atWho", -> $inputor = null fixtures = null trigger_atwho = -> $inputor.data("AtWho").current_flag = "@" $inputor.caretPos(31) e = $.Event("keydown.atWho", keyCode: 13) $inputor.trigger("keyup.atWho").trigger(e) it "should be defined", -> expect($.fn.atWho).toBeDefined() ...
CoffeeScript
ichord/At.js
spec/javascripts/atwho.spec.coffee
MIT
322f24a56f14dd9ee372612363745bcd52c5e774
5,250
https://github.com/ichord/At.js/blob/322f24a56f14dd9ee372612363745bcd52c5e774/spec/javascripts/atwho.spec.coffee
1
42
ichord/At.js:spec/javascripts/atwho.spec.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript describe "jquery.atWho", -> $inputor = null fixtures = null trigger_atwho = -> $inputor.data("AtWho").current_flag = "@" $inputor.caretPos(31) e = $.Event("keydown.atWho", keyCode: 13) $inputor.trigger("keyup.atWho").trigger(e) it "shou...
describe("jquery.atWho", function() { var $inputor, fixtures, trigger_atwho; $inputor = null; fixtures = null; trigger_atwho = function() { var e; $inputor.data("AtWho").current_flag = "@"; $inputor.caretPos(31); e = $.Event("keydown.atWho", { keyCode: 13 }); return $inputor.trigge...
CoffeeScript
JavaScript
ichord/At.js
spec/javascripts/atwho.spec.coffee
MIT
322f24a56f14dd9ee372612363745bcd52c5e774
5,250
https://github.com/ichord/At.js/blob/322f24a56f14dd9ee372612363745bcd52c5e774/spec/javascripts/atwho.spec.coffee
1
42
ichord/At.js:spec/javascripts/atwho.spec.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript describe("jquery.atWho", function() { var $inputor, fixtures, trigger_atwho; $inputor = null; fixtures = null; trigger_atwho = function() { var e; $inputor.data("AtWho").current_flag = "@"; $inputor.caretPos(31); e = $.Event("keydown.atWho",...
describe "jquery.atWho", -> $inputor = null fixtures = null trigger_atwho = -> $inputor.data("AtWho").current_flag = "@" $inputor.caretPos(31) e = $.Event("keydown.atWho", keyCode: 13) $inputor.trigger("keyup.atWho").trigger(e) it "should be defined", -> expect($.fn.atWho).toBeDefined() ...
JavaScript
CoffeeScript
ichord/At.js
spec/javascripts/atwho.spec.coffee
MIT
322f24a56f14dd9ee372612363745bcd52c5e774
5,250
https://github.com/ichord/At.js/blob/322f24a56f14dd9ee372612363745bcd52c5e774/spec/javascripts/atwho.spec.coffee
1
42
ichord/At.js:spec/javascripts/atwho.spec.coffee:1:completion
completion
describe "jquery.atWho", -> $inputor = null fixtures = null trigger_atwho = -> $inputor.data("AtWho").current_flag = "@" $inputor.caretPos(31) e = $.Event("keydown.atWho", keyCode: 13) $inputor.trigger("keyup.atWho").trigger(e) it "should be defined", -> expect($.fn.atWho).toBeDefined() ...
callbacks = null controller = null text = null beforeEach -> text = $.trim $inputor.text() callbacks = $.fn.atWho.default.callbacks controller = $inputor.data("AtWho") it "refactor the data", -> items = callbacks.data_refactor.call(controller, fixtures["names"]) expect(it...
CoffeeScript
CoffeeScript
ichord/At.js
spec/javascripts/atwho.spec.coffee
MIT
322f24a56f14dd9ee372612363745bcd52c5e774
5,250
https://github.com/ichord/At.js/blob/322f24a56f14dd9ee372612363745bcd52c5e774/spec/javascripts/atwho.spec.coffee
1
42
ichord/At.js:spec/javascripts/atwho.spec.coffee:2:raw_corpus
raw_corpus
it "filter data after data_refactor", -> names = callbacks.data_refactor.call(controller, fixtures["names"]) names = callbacks.filter.call(controller, "jo", fixtures["names"]) expect(names).toContain("Joshua") it "request data from remote by ajax", -> jasmine.Ajax.useMock() render_ca...
CoffeeScript
ichord/At.js
spec/javascripts/atwho.spec.coffee
MIT
322f24a56f14dd9ee372612363745bcd52c5e774
5,250
https://github.com/ichord/At.js/blob/322f24a56f14dd9ee372612363745bcd52c5e774/spec/javascripts/atwho.spec.coffee
44
83