Merge branch 'win-specs' of https://github.com/atom/atom into win-specs

This commit is contained in:
Matt Colyer 2013-11-05 15:46:34 -08:00
commit 1fe6a2974d
14 changed files with 47 additions and 32 deletions

View File

View File

@ -17,13 +17,13 @@ atom][download].
* Install the [latest 32bit Node 0.10.x][win-node]
* Install the [latest Python 2.7.x][win-python]
* Install [Github for Windows][win-github]
* Clone [atom/atom][atom-git] to `C:\Users\<user>\Documents\GitHub\atom\`
* Add `C:\Python27;C:\Program Files\nodejs;C:\Users\<user>\Documents\GitHub\atom\node_modules\`
* Clone [atom/atom][atom-git] to `C:\Users\<user>\github\atom\`
* Add `C:\Python27;C:\Program Files\nodejs;C:\Users\<user>\github\atom\node_modules\`
to your PATH
* Set ATOM_ACCESS_TOKEN to your oauth2 credentials (run `security -q
find-generic-password -ws 'GitHub API Token'` on OSX to get your
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`
[download]: http://www.atom.io

View File

@ -43,8 +43,8 @@
'meta-w': 'core:close'
'meta-ctrl-f': 'window:toggle-full-screen'
'meta-z': 'core:undo'
'meta-Z': 'corey:redo'
'meta-y': 'corey:redo'
'meta-Z': 'core:redo'
'meta-y': 'core:redo'
'meta-x': 'core:cut'
'meta-c': 'core:copy'
'meta-v': 'core:paste'

View File

@ -154,11 +154,6 @@
]
}
{
label: 'Collaboration'
submenu: []
}
{
label: 'Packages'
submenu: []

View File

@ -9,7 +9,7 @@
"bugs": {
"url": "https://github.com/atom/atom/issues"
},
"atomShellVersion": "0.6.6",
"atomShellVersion": "0.6.7",
"dependencies": {
"async": "0.2.6",
"bootstrap": "git://github.com/twbs/bootstrap.git#v3.0.0",
@ -35,7 +35,7 @@
"season": "0.14.0",
"semver": "1.1.4",
"space-pen": "2.0.0",
"telepath": "0.19.0",
"telepath": "0.20.0",
"temp": "0.5.0",
"underscore-plus": "0.2.0"
},
@ -58,11 +58,12 @@
"json-front-matter": "~0.1.3",
"grunt-shell": "~0.3.1",
"jasmine-node": "git://github.com/kevinsawicki/jasmine-node.git#short-stacks",
"jasmine-tagged": "0.1.0",
"request": "~2.27.0",
"unzip": "~0.1.9"
},
"packageDependencies" : {
"atom-light-ui": "0.5.0",
"atom-light-ui": "0.6.0",
"atom-light-syntax": "0.5.0",
"atom-dark-ui": "0.5.0",
"atom-dark-syntax": "0.5.0",
@ -74,7 +75,7 @@
"autoflow": "0.5.0",
"autosave": "0.6.0",
"bookmarks": "0.10.0",
"bracket-matcher": "0.8.0",
"bracket-matcher": "0.9.0",
"command-logger": "0.6.0",
"command-palette": "0.7.0",
"dev-live-reload": "0.13.0",
@ -91,7 +92,7 @@
"link": "0.7.0",
"markdown-preview": "0.15.0",
"metrics": "0.8.0",
"package-generator": "0.14.0",
"package-generator": "0.17.0",
"release-notes": "0.11.0",
"settings-view": "0.37.0",
"snippets": "0.13.0",
@ -99,7 +100,7 @@
"status-bar": "0.15.1",
"styleguide": "0.9.0",
"symbols-view": "0.18.0",
"tabs": "0.7.2",
"tabs": "0.8.0",
"terminal": "0.15.0",
"timecop": "0.9.0",
"to-the-hubs": "0.8.0",
@ -110,7 +111,7 @@
"language-c": "0.2.0",
"language-clojure": "0.1.0",
"language-coffee-script": "0.1.0",
"language-coffee-script": "0.2.0",
"language-css": "0.2.0",
"language-gfm": "0.8.0",
"language-git": "0.2.0",

View File

@ -24,6 +24,7 @@ var commands = [
joinCommands('cd vendor/apm', 'npm install --silent .'),
'npm install --silent vendor/apm',
echoNewLine,
'node node_modules/atom-package-manager/bin/apm clean',
'node node_modules/atom-package-manager/bin/apm install --silent',
];

View File

@ -32,7 +32,6 @@ cp.safeExec.bind(global, 'node script/bootstrap', function(error) {
async.series([
require('rimraf').bind(global, path.join(homeDir, '.atom')),
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'),
], function(error) {
process.exit(error ? 1 : 0);

View File

@ -7,9 +7,16 @@ exports.safeExec = function(command, options, callback) {
callback = 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) {
if (error)
process.exit(error.code);
process.exit(error.code || 1);
else
callback(null);
});

View File

@ -3,6 +3,7 @@ module.exports.runSpecSuite = (specSuite, logErrors=true) ->
window[key] = value for key, value of require '../vendor/jasmine'
require 'jasmine-focused'
require 'jasmine-tagged'
TimeReporter = require './time-reporter'
timeReporter = new TimeReporter()
@ -27,6 +28,7 @@ module.exports.runSpecSuite = (specSuite, logErrors=true) ->
jasmineEnv = jasmine.getEnv()
jasmineEnv.addReporter(reporter)
jasmineEnv.addReporter(timeReporter)
jasmineEnv.setIncludedTags([process.platform])
$('body').append $$ -> @div id: 'jasmine-content'

View File

@ -62,6 +62,22 @@ describe "Project", ->
expect(project.getEditSessions()[0]).toBe editSession1
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)", ->
[fooOpener, barOpener, absolutePath, newBufferHandler, newEditSessionHandler] = []
beforeEach ->

View File

@ -279,11 +279,3 @@ $.fn.textInput = (data) ->
event.initTextEvent('textInput', true, true, window, data)
event = $.event.fix(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")

View File

@ -162,6 +162,7 @@ class EditSession
newEditSession.setScrollLeft(@getScrollLeft())
for marker in @findMarkers(editSessionId: @id)
marker.copy(editSessionId: newEditSession.id, preserveFolds: true)
project.addEditSession(newEditSession)
newEditSession
# Public: Retrieves the filename of the open file.

View File

@ -720,9 +720,9 @@ class Editor extends View
selectedText = @getSelectedText()
@hiddenInput.css('width', '100%')
@hiddenInput.on 'compositionupdate', (e) =>
@insertText(e.originalEvent.data, {select: true, skipUndo: true})
@insertText(e.originalEvent.data, {select: true, undo: 'skip'})
@hiddenInput.on 'compositionend', =>
@insertText(selectedText, {select: true, skipUndo: true})
@insertText(selectedText, {select: true, undo: 'skip'})
@hiddenInput.css('width', '1px')
lastInput = ''

View File

@ -1,5 +1,6 @@
{Range} = require 'telepath'
{Emitter} = require 'emissary'
{pick} = require 'underscore-plus'
# Public: Represents a selection in the {EditSession}.
module.exports =
@ -297,8 +298,8 @@ class Selection
# + autoDecreaseIndent:
# if `true`, decreases indent level appropriately (for example, when a
# closing bracket is inserted)
# + skipUndo:
# if `true`, skips the undo stack for this operation.
# + undo:
# if `skip`, skips the undo stack for this operation.
insertText: (text, options={}) ->
oldBufferRange = @getBufferRange()
@editSession.destroyFoldsContainingBufferRow(oldBufferRange.end.row)
@ -309,7 +310,7 @@ class Selection
if options.indentBasis? and not options.autoIndent
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
@setBufferRange(newBufferRange, isReversed: wasReversed)
else