Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Rspec2 compiler #16

Closed
wants to merge 4 commits into from

3 participants

@tooky

We've put together a simple rspec2 compiler. It picks up on basic error messages, but the pattern matching can probably be improved.

Steve and Tom

@tpope
Owner

What changes did you make to the 'errorformat', if any? (Other than the first line that was also in the other pull request, that will be addressed separately). I was actually thinking of just switching the rspec compiler plugin to rspec 2; by the time there's another Vim release I imagine virtually everyone will have switched.

@tooky

Its not quite the same as Tom's original change. The new rspec2 output appears to be indented, so we matched the whitespace at the start of the lines. Not sure if that's the best way to do it?

We were thinking that the patterns could all live in the same compiler, and perhaps have the executable as a configurable option? Default that for rspec2 and allow people to set it for rspec1.

@tpope
Owner

That's what I'm thinking, only instead of bothering with a configurable option, one could just compiler rspec | setl makeprg=spec.

@tooky

Yeah that would work fine, of course.

Latest version of this branch has combined the errorformat patterns and set makeprg as rspec.

Steve Tooke Add rspec2 errorformat to rspec compiler.
rspec compiler expects 'rspec' as makeprg - rspec2 executable.
d0cbf8f
@tpope
Owner

I have returned! It turns out the current compiler/rspec.vim doesn't work with the latest RSpec 1. I don't know when it broke but it's been untouched since 2007. So I'm cutting my losses there and making this one RSpec 2 only. I started with the version in the commit above and deleted things line by line to see what was no longer necessary. I also had to do some tweaking (the added RSpec 2 stuff featured some broad patterns that had to be tweaked and/or de-prioritized). I'm pushing the result. Let me know if you have issues with it.

Thanks!

@tpope tpope closed this
@tpope tpope closed this pull request from a commit
@tpope tpope Switch compiler to RSpec 2
Closes #16
b01237d
@tpope tpope closed this in b01237d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Oct 24, 2010
  1. @tcrayford
Commits on Oct 25, 2010
  1. Add basic rspec2 compiler.

    Tom Crayford and Steve Tooke authored Steve Tooke committed
  2. Merge remote branch 'tcrayford/master'

    Steve Tooke authored
  3. Add rspec2 errorformat to rspec compiler.

    Steve Tooke authored
    rspec compiler expects 'rspec' as makeprg - rspec2 executable.
This page is out of date. Refresh to see the latest.
Showing with 3 additions and 1 deletion.
  1. +3 −1 compiler/rspec.vim
View
4 compiler/rspec.vim
@@ -17,9 +17,11 @@ endif
let s:cpo_save = &cpo
set cpo-=C
-CompilerSet makeprg=spec
+CompilerSet makeprg=rspec
CompilerSet errorformat=
+ \%-Z\ \ \ \ \ \#\ %f:%l:%.%#,%E\ \ %\\d%\\+)%.%#,%C%m,%Z,
+ \%-Z%f:%l:%.%#,%E%\\d%\\+)%.%#,%C%m,%Z,
\%+W'%.%#'\ FAILED,
\%+I'%.%#'\ FIXED,
\%-Cexpected:%.%#,
Something went wrong with that request. Please try again.