prepare release v0.9.0

This commit is contained in:
Brian Vanderbusch 2016-06-17 18:09:24 -05:00
commit 1c9d6a2fea
5 changed files with 130 additions and 31 deletions

29
.github/CONTRIBUTING.md vendored Normal file
View file

@ -0,0 +1,29 @@
# Ex-Mode Contributing Guidelines
Current Maintainers:
- [@jazzpi](https://github.com/jazzpi)
- [@LongLiveCHIEF](https://github.com/LongLiveCHIEF)
This project is accepting new maintainers. Interested parties should
1. Open a new issue, titled: `New Maintainer Request`
2. Assign the issue to [@lloeki](https://github.com/lloeki)
3. The last line of your request should `/cc @jazzpi @LongLiveCHIEF`
## Pull Requests
- If the PR *fixes* or should result in the closure of any issues, use the `fixes #` or `closes #` syntax to ensure issue will
close when your PR is merged
- All pull-requests that fix a bug or add a new feature *must* have accompanying tests before they will be merged. If you want
to speed up the merge of your PR, please contribute these tests
- *note*: if you submit a PR but are unsure how to write tests, please begin your PR title with `[needs tests]`
- Please use the [pull request template](PULL_REQUEST_TEMPLATE.md) as a guide for submitting your PR.
- Include a `/cc` for @LongLiveCHIEF and @jazzpi the current maintainers
## Issues
- Be aware of the responsibilities of `ex-mode` vs `vim-mode`
- If you have identified a bug we would welcome any Pull Requests that either:
- Fix the issue
- Create failing tests to confirm the bug

14
.github/PULL_REQUEST_TEMPLATE.md vendored Normal file
View file

@ -0,0 +1,14 @@
Fixes # .
Changes Proposed in this Pull Request:
-
-
-
I have written tests for:
- [ ] New features introduced
- [ ] Bugs fixed
- [ ] Neither (I'm just enhancing tests!)
@jazzpi @LongLiveCHIEF

View file

@ -35,3 +35,15 @@ module.exports = ExMode =
consumeVim: (vim) ->
@vim = vim
@globalExState.setVim(vim)
config:
splitbelow:
title: 'Split below'
description: 'when splitting, split from below'
type: 'boolean'
default: 'false'
splitright:
title: 'Split right'
description: 'when splitting, split from right'
type: 'boolean'
default: 'false'

View file

@ -127,11 +127,11 @@ class Ex
tabe: (args) => @tabedit(args)
tabnew: ({ range, args }) =>
if args.trim() is ''
tabnew: (args) =>
if args.args.trim() is ''
atom.workspace.open()
else
@tabedit(range, args)
@tabedit(args)
tabclose: (args) => @quit(args)
@ -258,6 +258,15 @@ class Ex
filePaths = args.split(' ')
filePaths = undefined if filePaths.length is 1 and filePaths[0] is ''
pane = atom.workspace.getActivePane()
if atom.config.get('ex-mode.splitbelow')
if filePaths? and filePaths.length > 0
newPane = pane.splitDown()
for file in filePaths
do ->
atom.workspace.openURIInPane file, newPane
else
pane.splitDown(copyActiveItem: true)
else
if filePaths? and filePaths.length > 0
newPane = pane.splitUp()
for file in filePaths
@ -266,6 +275,7 @@ class Ex
else
pane.splitUp(copyActiveItem: true)
sp: (args) => @split(args)
substitute: ({ range, args, editor, vimState }) ->
@ -335,6 +345,15 @@ class Ex
filePaths = args.split(' ')
filePaths = undefined if filePaths.length is 1 and filePaths[0] is ''
pane = atom.workspace.getActivePane()
if atom.config.get('ex-mode.splitright')
if filePaths? and filePaths.length > 0
newPane = pane.splitRight()
for file in filePaths
do ->
atom.workspace.openURIInPane file, newPane
else
pane.splitRight(copyActiveItem: true)
else
if filePaths? and filePaths.length > 0
newPane = pane.splitLeft()
for file in filePaths

View file

@ -496,9 +496,25 @@ describe "the commands", ->
submitNormalModeInputText('tabnew')
expect(atom.workspace.open).toHaveBeenCalled()
it "opens a new tab for editing when provided an argument", ->
spyOn(Ex, 'tabnew').andCallThrough()
spyOn(Ex, 'tabedit')
keydown(':')
submitNormalModeInputText('tabnew tabnew-test')
expect(Ex.tabedit)
.toHaveBeenCalledWith(Ex.tabnew.calls[0].args...)
describe ":split", ->
it "splits the current file upwards", ->
it "splits the current file upwards/downward", ->
pane = atom.workspace.getActivePane()
if atom.config.get('ex-mode.splitbelow')
spyOn(pane, 'splitDown').andCallThrough()
filePath = projectPath('split')
editor.saveAs(filePath)
keydown(':')
submitNormalModeInputText('split')
expect(pane.splitDown).toHaveBeenCalled()
else
spyOn(pane, 'splitUp').andCallThrough()
filePath = projectPath('split')
editor.saveAs(filePath)
@ -509,7 +525,16 @@ describe "the commands", ->
# pointing to the same path
describe ":vsplit", ->
it "splits the current file to the left", ->
it "splits the current file to the left/right", ->
if atom.config.get('ex-mode.splitright')
pane = atom.workspace.getActivePane()
spyOn(pane, 'splitRight').andCallThrough()
filePath = projectPath('vsplit')
editor.saveAs(filePath)
keydown(':')
submitNormalModeInputText('vsplit')
expect(pane.splitLeft).toHaveBeenCalled()
else
pane = atom.workspace.getActivePane()
spyOn(pane, 'splitLeft').andCallThrough()
filePath = projectPath('vsplit')