can not jump spec from view file to spec file #27

Merged
merged 2 commits into from Apr 8, 2012

Conversation

Projects
None yet
2 participants
@eiel

eiel commented Apr 7, 2012

I Changed the jump spec for views rspec.
Non-greedy regexp can match filename in view file.

For example.

  • viewfile "app/views/tweet.html.erb"
  • spec "app/\1" -> "app/\(.*?\)"
    • match-string 0 -> "app/"
    • match-string 1 -> ""
  • modify spec "app/\1$" -> "app/\(.*?\)"
    • match-string 0 -> "app/views/tweet.html.erb"
    • match-string 1 -> "views/tweet.html.erb"
rinari-find-rspec can jump from view file to spec file
Changed the jump spec for views rspec.
Non-greedy regexp can match filename in view file.
@purcell

This comment has been minimized.

Show comment Hide comment
@purcell

purcell Apr 7, 2012

Collaborator

Thanks for this. I'm just trying to make sure I understand the effects of the patch, and I'm wondering; are the other patterns still correct, e.g. spec/views/\\1_spec.rb etc.?

-Steve

Collaborator

purcell commented Apr 7, 2012

Thanks for this. I'm just trying to make sure I understand the effects of the patch, and I'm wondering; are the other patterns still correct, e.g. spec/views/\\1_spec.rb etc.?

-Steve

@eiel

This comment has been minimized.

Show comment Hide comment
@eiel

eiel Apr 7, 2012

spec/views/\1_spec.rb is no problem.

On a problem, the case where there is no suffix.

It is the following patterns that have the same problem.

  • app/cells/\1/\2.*
  • test/unit/\1_test.rb#test_\2
  • app/controllers/\1.rb#\2
  • app/models/\1.rb#\2"
  • app/controllers/\1_controller.rb#\2

It seems that this problem has occurred by 7982351c873ba2ce9fdf2ff80d0af9f0ffb6d70f of jump.el.

eiel commented Apr 7, 2012

spec/views/\1_spec.rb is no problem.

On a problem, the case where there is no suffix.

It is the following patterns that have the same problem.

  • app/cells/\1/\2.*
  • test/unit/\1_test.rb#test_\2
  • app/controllers/\1.rb#\2
  • app/models/\1.rb#\2"
  • app/controllers/\1_controller.rb#\2

It seems that this problem has occurred by 7982351c873ba2ce9fdf2ff80d0af9f0ffb6d70f of jump.el.

@purcell

This comment has been minimized.

Show comment Hide comment
@purcell

purcell Apr 8, 2012

Collaborator

Ah, okay. Could you please push a further commit which changes those patterns too, and then I can merge and release all the changes together?

-Steve

Collaborator

purcell commented Apr 8, 2012

Ah, okay. Could you please push a further commit which changes those patterns too, and then I can merge and release all the changes together?

-Steve

Modified spec for bad pattern
Added to '$' the bad pattern without suffix string
@eiel

This comment has been minimized.

Show comment Hide comment
@eiel

eiel Apr 8, 2012

I modified bad pattern.And, I pushed new commit.

Sincerely

eiel commented Apr 8, 2012

I modified bad pattern.And, I pushed new commit.

Sincerely

purcell added a commit that referenced this pull request Apr 8, 2012

Merge pull request #27 from eiel/master
Improved and unambiguous jump specs

@purcell purcell merged commit 0f4a601 into eschulte:master Apr 8, 2012

@purcell

This comment has been minimized.

Show comment Hide comment
@purcell

purcell Apr 8, 2012

Collaborator

Thanks! A new version (2.6) is now tagged and a package has been uploaded to Marmalade-Repo.org. A new snapshot package will be built on Melpa (http://melpa.milkbox.net) shortly.

-Steve

Collaborator

purcell commented Apr 8, 2012

Thanks! A new version (2.6) is now tagged and a package has been uploaded to Marmalade-Repo.org. A new snapshot package will be built on Melpa (http://melpa.milkbox.net) shortly.

-Steve

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment