https://github.com/codesnik/ruby_class_renamer
dirty and buggy script for renaming a lot of ruby classes
https://github.com/codesnik/ruby_class_renamer
Last synced: 8 months ago
JSON representation
dirty and buggy script for renaming a lot of ruby classes
- Host: GitHub
- URL: https://github.com/codesnik/ruby_class_renamer
- Owner: codesnik
- Created: 2015-05-25T04:25:47.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-06-05T16:32:09.000Z (over 10 years ago)
- Last Synced: 2025-06-01T14:20:24.663Z (9 months ago)
- Language: Ruby
- Size: 133 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Naive ruby/rails refactoring tool
git mv many ruby files at once according to a refactor plan.
rename, add/remove namespaces(modules), indent/outindent accordingly,
replace constants globally on all the project afterwards.
Usage:
make a YAML file like this:
```yaml
---
-
from: app/models/foo.rb
to: app/services/subname/foo.rb
-
from: app/models/bar.rb
to: app/processes/damns/not_given.rb
from_class: BAR
to_class Damns::NotGiven
...
```
or simply
```yaml
---
app/models/foo.rb: app/services/subname/foo.rb
app/models/bar.rb: app/processes/damns/not_given.rb
...
```
then
```bash
cd my_project
/path/to/ruby_class_renamer.rb plan.yml
```