localshred/protobuf — pull request #216 by localshred (2014-09-02 05:22:57+00:00)
Title: Add support for deprecated Enum and Enum values

Converts the following definition:

```protobuf
package test;

enum DeprecatedEnum {
option deprecated = true;

A_DEPRECATED_VALUE = 1 [deprecated = true];
}
```

... into ...

```ruby
module Test
class DeprecatedEnum < ::Protobuf::Enum
def self.deprecated?
true
end

define :A_DEPRECATED_VALUE, 1, :deprecated => true
end
end
```

You can query an enum value if it is deprecated or not:

```ruby
Test::DeprecatedEnum.deprecated? # => true
Test::DeprecatedEnum::A_DEPRECATED_VALUE.deprecated? # => true
```

In the future deprecating an enum will auto-deprecate all of it's defined
values as well.

Relates to #211, #212, and #215.