RFC: Renaming

Jozef Zigmund jzigmund at redhat.com
Tue Jan 15 20:27:53 UTC 2013


Hi,

as you could notice on the mailing list we've reconciled names (upstream
- production) and we propose these names [1].

* What will be renamed ?

These strings will be refactored:

Image Template -> Component Outline
Deployable -> AppForm Blueprint
Deployment -> AppForm
Pool Family/Environment-> Cloud Environment
Pool -> Resource Zone
Provider -> Cloud Provider

* Where do we need to rename them ?

- Models, Controllers and Views (and their directory names)
- Used strings(i.e variable names, translations etc) in MVC
- Routes
- API (Controllers, Views)
- All tests (includes RSpec examples, Cucumber features, Factories, VCR)
- Javascript codes, other utils
- building specs

* What use to refactor them ? 

I found gem rails_refactor[2]. I has never used it before, but what I
tested and it seems that it handles only renaming model and
creating/deleting new/old files with new/old name.

My best approach is using some IDE (I'm using RubyMine[3]), that
supports Refactoring.

* Prerequisitions ?

Before we start to refactor names, after talking with Brno mates, we
should have pushed these patchsets: 

- TIM integration
- Gettext conversion

If those patchsets cause blocker to start refactor (it means that they
wont be pushed in master), we could create a separated branch for
refactoring.

* How to proceed with refactoring?

I propose to create a patchset(for every model/class), that will contain
all refactored files (mentioned in part 'Where do we need to rename
them?')
+  create new migration files to create tables for new named models,
move data from old tables to new ones, and delete old tables.


If you have any ideas to improve the renaming process or you find some
forgotten information, please reply.


Sources:
[1] https://dl.dropbox.com/u/5095754/AeolusGlossary.pdf
[2] https://github.com/jcrisp/rails_refactor
[3] http://www.jetbrains.com/ruby/

--
Jozef



More information about the aeolus-devel mailing list