s-mage/rush — pull request #7 by najamelan (2014-05-23 19:30:09+00:00)
Title: Create Entry::chown and Entry::chown_R

Rush didn't have a method for changing ownership of files and directories. This adds Entry::chown which takes 3 parameters:
user, group and options

It is a simple frontend for FileUtils.chown and chown_R, to integrate their functionality with the Rush syntax.

Currently not very tested. The problem is that tests for this will have to run as sudo usually, because unprivileged you can't do much with chmod. Also, I currently didn't have a remote setup which would be practical for testing, so remote testing has not been done at all.

Towards the future I would like to add more sys admin functionality to Rush, so it's not only an interface to filesystem and bash, but also to user management. Obviously a growing number of features would require root access to be used, and thus also to be tested. I will think about a way to create an optional set of tests that will be run only if the specs are being run as root. That way, we can have our tests, but peopl who can't be bothered to run it as root can still run all the other tests.

Btw: I discovered another problem. I wanted to test this at least manually with a remote, so I tried to install mongrel, but that seems to be no longer supported. Mongrel doesn't run after ruby 1.9.1 and seems to be an abandoned project. I think it is appropriate to consider completely redesigning rush, and think of a better way to run commands on the remote. I also proposed some design changes for the filesystem in adamwiggins/rush#21. Today I also discovered [vfs](https://github.com/najamelan/vfs) and vos by alexey petrushkin. This is an interesting design as well, which uses a concept of Drivers, which is better and more extendible that the "connection" rush uses. I'm going to test vfs for a while and then think of a solution.