localshred/protobuf — pull request #142 by localshred (2014-02-06 17:54:08+00:00)
Title: Add protobuf:clean and protobuf:clean rake tasks for external use

To get these tasks simply `require 'protobuf/tasks'` in your Rakefile.

The `compile` task accepts three arguments: package, source, and
destination. Package does not have a default value and must be specified.
Source's default is 'defintitions'. Destination's default is
`lib`. Plugin's default is `ruby`, and is overridable in case you want to
utilize the descriptors to make your own plugin generator.

The composed command to protoc is printed to the terminal and then the
process is exec'd with that command.

The `clean` task will ask for confirmation of removing previously compiled pb.rb
source files. You can skip the confirmation step by providing
`PB_FORCE_CLEAN=1`. A force clean is automatically invoked from the
`compile` task unless `PB_NO_CLEAN=1` is specified.

The package argument must be specified. The destination argument defaults
to `lib`.