2514 generator should detect require tree

Hi,

here you have my PR.

Note: Still missing the proper spec for all the options under install_spec.rb

Any advice how to simulate an user choose of an option? How avoid generating three different rails installation for each case?