-
Notifications
You must be signed in to change notification settings - Fork 20
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
spec folder dones't exists #10
Comments
I have forked the gem and have fixed the issue, when I am trying to add gem from my forked repo like when running bundle its giving me error
|
Hi! Thanks for your interest in Rails Refactor. If you send me a pull request, I can merge in your change and re-publish the gem with a new version. |
I'd suggest it does not fail but does print out a warning if a file is missing. |
I'm doing some updates now to bring it into rails 4 |
I too tried but got stuck here |
Hi @wonderer007 I've made quite a few updates now, and brought it across to use a modern gem setup. I suspect it'll work for you now, but you'll need to merge in the new changes into your fork.After you feel your change is ready (including a test for it), please send me a pull request and I'll review and merge it in and re-publish the gem with a new version. As an aside, you can always install the gem just on your filesystem. If you run |
@scrisp i was working on pull request to change spec folder to test ( rails 4 and 5 have test folder instead of spec folder) I notices that the dummy app project you have inside gem is of rails 3 as well. Do we really need rails project inside the gem itself just to run our test cases ? Also we at the moment have rails 5.1 and lots of structure has changed from rails 3 and I would suggest to add features like renaming serializes, uploaders, workers, activejobs as well. |
@wonderer007 so I've already updated the included Dummy app to rails 4 (re-generated it and updated refactor tests) and it is no longer included in the gem file, though it is in the github repo for testing purposes. Adding more renamers sounds good to me. I think the way to go is to support both rails 4 (still popular, I use it at work) and rails 5. Ie, add a dummy5 rails app which is a vanilla rails 5 app for test purposes, and also run the tests against that to make sure they work there too. Also the rename of files should handle missing files with a warning. Which bit(s) are you interested in working on? For pull requests, please make them small and self contained, doing one thing. That way it'll be easy for me to review and merge (and they'll be neat!). Thanks for your interest in the gem :-) Cheers |
Bumping this. I'm using Minitest and not RSpec and encountered the same issue when trying to rename a model. |
Hi @johnpitchko, would you be interested in writing a PR for this to provide Minitest support? The switch could happen automatically based on if the spec folder existed. |
I would be; won't have a chance to work on this in the near future, but I will add it to my overall 'to-do' list. |
I want to change deals table to services so when I run
rails_refactor rename Deal Service
I got this error
I read the documentation and came to know that
rails_refactor rename OldModel NewModel
command rename model, spec and migration files. since i didn't have spec folder I am getting this error. How can I get rid of this error ?Thanks
The text was updated successfully, but these errors were encountered: