mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-12-28 17:13:45 +03:00
Merge branch 'win-specs' of https://github.com/atom/atom into win-specs
This commit is contained in:
commit
1fe6a2974d
@ -17,13 +17,13 @@ atom][download].
|
|||||||
* Install the [latest 32bit Node 0.10.x][win-node]
|
* Install the [latest 32bit Node 0.10.x][win-node]
|
||||||
* Install the [latest Python 2.7.x][win-python]
|
* Install the [latest Python 2.7.x][win-python]
|
||||||
* Install [Github for Windows][win-github]
|
* Install [Github for Windows][win-github]
|
||||||
* Clone [atom/atom][atom-git] to `C:\Users\<user>\Documents\GitHub\atom\`
|
* Clone [atom/atom][atom-git] to `C:\Users\<user>\github\atom\`
|
||||||
* Add `C:\Python27;C:\Program Files\nodejs;C:\Users\<user>\Documents\GitHub\atom\node_modules\`
|
* Add `C:\Python27;C:\Program Files\nodejs;C:\Users\<user>\github\atom\node_modules\`
|
||||||
to your PATH
|
to your PATH
|
||||||
* Set ATOM_ACCESS_TOKEN to your oauth2 credentials (run `security -q
|
* Set ATOM_ACCESS_TOKEN to your oauth2 credentials (run `security -q
|
||||||
find-generic-password -ws 'GitHub API Token'` on OSX to get your
|
find-generic-password -ws 'GitHub API Token'` on OSX to get your
|
||||||
credentials).
|
credentials).
|
||||||
* Use the Windows GitHub shell and cd into `C:\Users\<user>\Documents\GitHub\atom`
|
* Use the Windows GitHub shell and cd into `C:\Users\<user>\github\atom`
|
||||||
* Run `node script/bootstrap`
|
* Run `node script/bootstrap`
|
||||||
|
|
||||||
[download]: http://www.atom.io
|
[download]: http://www.atom.io
|
||||||
|
@ -43,8 +43,8 @@
|
|||||||
'meta-w': 'core:close'
|
'meta-w': 'core:close'
|
||||||
'meta-ctrl-f': 'window:toggle-full-screen'
|
'meta-ctrl-f': 'window:toggle-full-screen'
|
||||||
'meta-z': 'core:undo'
|
'meta-z': 'core:undo'
|
||||||
'meta-Z': 'corey:redo'
|
'meta-Z': 'core:redo'
|
||||||
'meta-y': 'corey:redo'
|
'meta-y': 'core:redo'
|
||||||
'meta-x': 'core:cut'
|
'meta-x': 'core:cut'
|
||||||
'meta-c': 'core:copy'
|
'meta-c': 'core:copy'
|
||||||
'meta-v': 'core:paste'
|
'meta-v': 'core:paste'
|
||||||
|
@ -154,11 +154,6 @@
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
|
||||||
label: 'Collaboration'
|
|
||||||
submenu: []
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
{
|
||||||
label: 'Packages'
|
label: 'Packages'
|
||||||
submenu: []
|
submenu: []
|
||||||
|
15
package.json
15
package.json
@ -9,7 +9,7 @@
|
|||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://github.com/atom/atom/issues"
|
"url": "https://github.com/atom/atom/issues"
|
||||||
},
|
},
|
||||||
"atomShellVersion": "0.6.6",
|
"atomShellVersion": "0.6.7",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"async": "0.2.6",
|
"async": "0.2.6",
|
||||||
"bootstrap": "git://github.com/twbs/bootstrap.git#v3.0.0",
|
"bootstrap": "git://github.com/twbs/bootstrap.git#v3.0.0",
|
||||||
@ -35,7 +35,7 @@
|
|||||||
"season": "0.14.0",
|
"season": "0.14.0",
|
||||||
"semver": "1.1.4",
|
"semver": "1.1.4",
|
||||||
"space-pen": "2.0.0",
|
"space-pen": "2.0.0",
|
||||||
"telepath": "0.19.0",
|
"telepath": "0.20.0",
|
||||||
"temp": "0.5.0",
|
"temp": "0.5.0",
|
||||||
"underscore-plus": "0.2.0"
|
"underscore-plus": "0.2.0"
|
||||||
},
|
},
|
||||||
@ -58,11 +58,12 @@
|
|||||||
"json-front-matter": "~0.1.3",
|
"json-front-matter": "~0.1.3",
|
||||||
"grunt-shell": "~0.3.1",
|
"grunt-shell": "~0.3.1",
|
||||||
"jasmine-node": "git://github.com/kevinsawicki/jasmine-node.git#short-stacks",
|
"jasmine-node": "git://github.com/kevinsawicki/jasmine-node.git#short-stacks",
|
||||||
|
"jasmine-tagged": "0.1.0",
|
||||||
"request": "~2.27.0",
|
"request": "~2.27.0",
|
||||||
"unzip": "~0.1.9"
|
"unzip": "~0.1.9"
|
||||||
},
|
},
|
||||||
"packageDependencies" : {
|
"packageDependencies" : {
|
||||||
"atom-light-ui": "0.5.0",
|
"atom-light-ui": "0.6.0",
|
||||||
"atom-light-syntax": "0.5.0",
|
"atom-light-syntax": "0.5.0",
|
||||||
"atom-dark-ui": "0.5.0",
|
"atom-dark-ui": "0.5.0",
|
||||||
"atom-dark-syntax": "0.5.0",
|
"atom-dark-syntax": "0.5.0",
|
||||||
@ -74,7 +75,7 @@
|
|||||||
"autoflow": "0.5.0",
|
"autoflow": "0.5.0",
|
||||||
"autosave": "0.6.0",
|
"autosave": "0.6.0",
|
||||||
"bookmarks": "0.10.0",
|
"bookmarks": "0.10.0",
|
||||||
"bracket-matcher": "0.8.0",
|
"bracket-matcher": "0.9.0",
|
||||||
"command-logger": "0.6.0",
|
"command-logger": "0.6.0",
|
||||||
"command-palette": "0.7.0",
|
"command-palette": "0.7.0",
|
||||||
"dev-live-reload": "0.13.0",
|
"dev-live-reload": "0.13.0",
|
||||||
@ -91,7 +92,7 @@
|
|||||||
"link": "0.7.0",
|
"link": "0.7.0",
|
||||||
"markdown-preview": "0.15.0",
|
"markdown-preview": "0.15.0",
|
||||||
"metrics": "0.8.0",
|
"metrics": "0.8.0",
|
||||||
"package-generator": "0.14.0",
|
"package-generator": "0.17.0",
|
||||||
"release-notes": "0.11.0",
|
"release-notes": "0.11.0",
|
||||||
"settings-view": "0.37.0",
|
"settings-view": "0.37.0",
|
||||||
"snippets": "0.13.0",
|
"snippets": "0.13.0",
|
||||||
@ -99,7 +100,7 @@
|
|||||||
"status-bar": "0.15.1",
|
"status-bar": "0.15.1",
|
||||||
"styleguide": "0.9.0",
|
"styleguide": "0.9.0",
|
||||||
"symbols-view": "0.18.0",
|
"symbols-view": "0.18.0",
|
||||||
"tabs": "0.7.2",
|
"tabs": "0.8.0",
|
||||||
"terminal": "0.15.0",
|
"terminal": "0.15.0",
|
||||||
"timecop": "0.9.0",
|
"timecop": "0.9.0",
|
||||||
"to-the-hubs": "0.8.0",
|
"to-the-hubs": "0.8.0",
|
||||||
@ -110,7 +111,7 @@
|
|||||||
|
|
||||||
"language-c": "0.2.0",
|
"language-c": "0.2.0",
|
||||||
"language-clojure": "0.1.0",
|
"language-clojure": "0.1.0",
|
||||||
"language-coffee-script": "0.1.0",
|
"language-coffee-script": "0.2.0",
|
||||||
"language-css": "0.2.0",
|
"language-css": "0.2.0",
|
||||||
"language-gfm": "0.8.0",
|
"language-gfm": "0.8.0",
|
||||||
"language-git": "0.2.0",
|
"language-git": "0.2.0",
|
||||||
|
@ -24,6 +24,7 @@ var commands = [
|
|||||||
joinCommands('cd vendor/apm', 'npm install --silent .'),
|
joinCommands('cd vendor/apm', 'npm install --silent .'),
|
||||||
'npm install --silent vendor/apm',
|
'npm install --silent vendor/apm',
|
||||||
echoNewLine,
|
echoNewLine,
|
||||||
|
'node node_modules/atom-package-manager/bin/apm clean',
|
||||||
'node node_modules/atom-package-manager/bin/apm install --silent',
|
'node node_modules/atom-package-manager/bin/apm install --silent',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -32,7 +32,6 @@ cp.safeExec.bind(global, 'node script/bootstrap', function(error) {
|
|||||||
async.series([
|
async.series([
|
||||||
require('rimraf').bind(global, path.join(homeDir, '.atom')),
|
require('rimraf').bind(global, path.join(homeDir, '.atom')),
|
||||||
cp.safeExec.bind(global, 'git clean -dff'),
|
cp.safeExec.bind(global, 'git clean -dff'),
|
||||||
cp.safeExec.bind(global, 'node node_modules/atom-package-manager/bin/apm clean'),
|
|
||||||
cp.safeExec.bind(global, 'node node_modules/grunt-cli/bin/grunt ci --stack --no-color'),
|
cp.safeExec.bind(global, 'node node_modules/grunt-cli/bin/grunt ci --stack --no-color'),
|
||||||
], function(error) {
|
], function(error) {
|
||||||
process.exit(error ? 1 : 0);
|
process.exit(error ? 1 : 0);
|
||||||
|
@ -7,9 +7,16 @@ exports.safeExec = function(command, options, callback) {
|
|||||||
callback = options;
|
callback = options;
|
||||||
options = {};
|
options = {};
|
||||||
}
|
}
|
||||||
|
if (!options)
|
||||||
|
options = {};
|
||||||
|
|
||||||
|
// This needed to be increase for `apm test` runs that generate tons of failures
|
||||||
|
// The default is 200KB.
|
||||||
|
options.maxBuffer = 1024 * 1024;
|
||||||
|
|
||||||
var child = childProcess.exec(command, options, function(error, stdout, stderr) {
|
var child = childProcess.exec(command, options, function(error, stdout, stderr) {
|
||||||
if (error)
|
if (error)
|
||||||
process.exit(error.code);
|
process.exit(error.code || 1);
|
||||||
else
|
else
|
||||||
callback(null);
|
callback(null);
|
||||||
});
|
});
|
||||||
|
@ -3,6 +3,7 @@ module.exports.runSpecSuite = (specSuite, logErrors=true) ->
|
|||||||
window[key] = value for key, value of require '../vendor/jasmine'
|
window[key] = value for key, value of require '../vendor/jasmine'
|
||||||
|
|
||||||
require 'jasmine-focused'
|
require 'jasmine-focused'
|
||||||
|
require 'jasmine-tagged'
|
||||||
|
|
||||||
TimeReporter = require './time-reporter'
|
TimeReporter = require './time-reporter'
|
||||||
timeReporter = new TimeReporter()
|
timeReporter = new TimeReporter()
|
||||||
@ -27,6 +28,7 @@ module.exports.runSpecSuite = (specSuite, logErrors=true) ->
|
|||||||
jasmineEnv = jasmine.getEnv()
|
jasmineEnv = jasmine.getEnv()
|
||||||
jasmineEnv.addReporter(reporter)
|
jasmineEnv.addReporter(reporter)
|
||||||
jasmineEnv.addReporter(timeReporter)
|
jasmineEnv.addReporter(timeReporter)
|
||||||
|
jasmineEnv.setIncludedTags([process.platform])
|
||||||
|
|
||||||
$('body').append $$ -> @div id: 'jasmine-content'
|
$('body').append $$ -> @div id: 'jasmine-content'
|
||||||
|
|
||||||
|
@ -62,6 +62,22 @@ describe "Project", ->
|
|||||||
expect(project.getEditSessions()[0]).toBe editSession1
|
expect(project.getEditSessions()[0]).toBe editSession1
|
||||||
expect(project.getEditSessions()[1]).toBe editSession2
|
expect(project.getEditSessions()[1]).toBe editSession2
|
||||||
|
|
||||||
|
describe "when an edit session is copied", ->
|
||||||
|
it "emits an 'edit-session-created' event and stores the edit session", ->
|
||||||
|
handler = jasmine.createSpy('editSessionCreatedHandler')
|
||||||
|
project.on 'edit-session-created', handler
|
||||||
|
|
||||||
|
editSession1 = project.openSync("a")
|
||||||
|
expect(handler.callCount).toBe 1
|
||||||
|
expect(project.getEditSessions().length).toBe 1
|
||||||
|
expect(project.getEditSessions()[0]).toBe editSession1
|
||||||
|
|
||||||
|
editSession2 = editSession1.copy()
|
||||||
|
expect(handler.callCount).toBe 2
|
||||||
|
expect(project.getEditSessions().length).toBe 2
|
||||||
|
expect(project.getEditSessions()[0]).toBe editSession1
|
||||||
|
expect(project.getEditSessions()[1]).toBe editSession2
|
||||||
|
|
||||||
describe ".openSync(path)", ->
|
describe ".openSync(path)", ->
|
||||||
[fooOpener, barOpener, absolutePath, newBufferHandler, newEditSessionHandler] = []
|
[fooOpener, barOpener, absolutePath, newBufferHandler, newEditSessionHandler] = []
|
||||||
beforeEach ->
|
beforeEach ->
|
||||||
|
@ -279,11 +279,3 @@ $.fn.textInput = (data) ->
|
|||||||
event.initTextEvent('textInput', true, true, window, data)
|
event.initTextEvent('textInput', true, true, window, data)
|
||||||
event = $.event.fix(event)
|
event = $.event.fix(event)
|
||||||
$(this).trigger(event)
|
$(this).trigger(event)
|
||||||
|
|
||||||
if process.platform is 'win32'
|
|
||||||
unmodifiedHash = '15b13ffbc8d1c1ba5af845e5902ae67c'
|
|
||||||
else
|
|
||||||
unmodifiedHash = "dd38087d0d7e3e4802a6d3f9b9745f2b"
|
|
||||||
|
|
||||||
unless fs.md5ForPath(require.resolve('./fixtures/sample.js')) is unmodifiedHash
|
|
||||||
throw new Error("Sample.js is modified")
|
|
||||||
|
@ -162,6 +162,7 @@ class EditSession
|
|||||||
newEditSession.setScrollLeft(@getScrollLeft())
|
newEditSession.setScrollLeft(@getScrollLeft())
|
||||||
for marker in @findMarkers(editSessionId: @id)
|
for marker in @findMarkers(editSessionId: @id)
|
||||||
marker.copy(editSessionId: newEditSession.id, preserveFolds: true)
|
marker.copy(editSessionId: newEditSession.id, preserveFolds: true)
|
||||||
|
project.addEditSession(newEditSession)
|
||||||
newEditSession
|
newEditSession
|
||||||
|
|
||||||
# Public: Retrieves the filename of the open file.
|
# Public: Retrieves the filename of the open file.
|
||||||
|
@ -720,9 +720,9 @@ class Editor extends View
|
|||||||
selectedText = @getSelectedText()
|
selectedText = @getSelectedText()
|
||||||
@hiddenInput.css('width', '100%')
|
@hiddenInput.css('width', '100%')
|
||||||
@hiddenInput.on 'compositionupdate', (e) =>
|
@hiddenInput.on 'compositionupdate', (e) =>
|
||||||
@insertText(e.originalEvent.data, {select: true, skipUndo: true})
|
@insertText(e.originalEvent.data, {select: true, undo: 'skip'})
|
||||||
@hiddenInput.on 'compositionend', =>
|
@hiddenInput.on 'compositionend', =>
|
||||||
@insertText(selectedText, {select: true, skipUndo: true})
|
@insertText(selectedText, {select: true, undo: 'skip'})
|
||||||
@hiddenInput.css('width', '1px')
|
@hiddenInput.css('width', '1px')
|
||||||
|
|
||||||
lastInput = ''
|
lastInput = ''
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
{Range} = require 'telepath'
|
{Range} = require 'telepath'
|
||||||
{Emitter} = require 'emissary'
|
{Emitter} = require 'emissary'
|
||||||
|
{pick} = require 'underscore-plus'
|
||||||
|
|
||||||
# Public: Represents a selection in the {EditSession}.
|
# Public: Represents a selection in the {EditSession}.
|
||||||
module.exports =
|
module.exports =
|
||||||
@ -297,8 +298,8 @@ class Selection
|
|||||||
# + autoDecreaseIndent:
|
# + autoDecreaseIndent:
|
||||||
# if `true`, decreases indent level appropriately (for example, when a
|
# if `true`, decreases indent level appropriately (for example, when a
|
||||||
# closing bracket is inserted)
|
# closing bracket is inserted)
|
||||||
# + skipUndo:
|
# + undo:
|
||||||
# if `true`, skips the undo stack for this operation.
|
# if `skip`, skips the undo stack for this operation.
|
||||||
insertText: (text, options={}) ->
|
insertText: (text, options={}) ->
|
||||||
oldBufferRange = @getBufferRange()
|
oldBufferRange = @getBufferRange()
|
||||||
@editSession.destroyFoldsContainingBufferRow(oldBufferRange.end.row)
|
@editSession.destroyFoldsContainingBufferRow(oldBufferRange.end.row)
|
||||||
@ -309,7 +310,7 @@ class Selection
|
|||||||
if options.indentBasis? and not options.autoIndent
|
if options.indentBasis? and not options.autoIndent
|
||||||
text = @normalizeIndents(text, options.indentBasis)
|
text = @normalizeIndents(text, options.indentBasis)
|
||||||
|
|
||||||
newBufferRange = @editSession.buffer.change(oldBufferRange, text, skipUndo: options.skipUndo)
|
newBufferRange = @editSession.buffer.change(oldBufferRange, text, pick(options, 'undo'))
|
||||||
if options.select
|
if options.select
|
||||||
@setBufferRange(newBufferRange, isReversed: wasReversed)
|
@setBufferRange(newBufferRange, isReversed: wasReversed)
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user