Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust names for CoffeeScript naming convention #4

Merged
merged 2 commits into from
Mar 5, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions lib/rspec-view.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -57,16 +57,16 @@ class RSpecView extends ScrollView
promise.done (editor) ->
editor.setCursorBufferPosition([line-1, 0])

run: (line_number) ->
run: (lineNumber) ->
@spinner.show()
@output.empty()
project_path = atom.project.getRootDirectory().getPath()
projectPath = atom.project.getRootDirectory().getPath()

spawn = ChildProcess.spawn

specCommand = atom.config.get("rspec.command")
command = "#{specCommand} #{@filePath}"
command = "#{command} -l #{line_number}" if line_number
command = "#{command} -l #{lineNumber}" if lineNumber

console.log "[RSpec] running: #{command}"

Expand All @@ -77,7 +77,7 @@ class RSpecView extends ScrollView
terminal.stdout.on 'data', @onStdOut
terminal.stderr.on 'data', @onStdErr

terminal.stdin.write("cd #{project_path} && #{command}\n")
terminal.stdin.write("cd #{projectPath} && #{command}\n")
terminal.stdin.write("exit\n")

addOutput: (output) =>
Expand Down
6 changes: 3 additions & 3 deletions lib/rspec.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ module.exports =
lastFile: @lastFile
lastLine: @lastLine

openUriFor: (file, line_number) ->
openUriFor: (file, lineNumber) ->
@lastFile = file
@lastLine = line_number
@lastLine = lineNumber

previousActivePane = atom.workspace.getActivePane()
uri = "rspec-output://#{file}"
atom.workspace.open(uri, split: 'right', changeFocus: false, searchAllPanes: true).done (rspecView) ->
if rspecView instanceof RSpecView
rspecView.run(line_number)
rspecView.run(lineNumber)
previousActivePane.activate()

runForLine: ->
Expand Down