Last active
December 12, 2015 08:48
-
-
Save zroger/4746387 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Generated by rprotoc. DO NOT EDIT! | |
### <proto file: test/proto/addressbook_ext.proto> | |
# import "test/proto/addressbook_base.proto"; | |
# package tutorial_ext; | |
# | |
# extend Person { | |
# optional int32 age = 100; | |
# } | |
require 'protobuf/message/message' | |
require 'protobuf/message/enum' | |
require 'protobuf/message/extend' | |
require 'test/proto/addressbook_base.pb' | |
module TutorialExt | |
class Person < ::Protobuf::Message | |
defined_in __FILE__ | |
optional :int32, :age, 100, :extension => true | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd ~/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/protobuf-2.6.4 | |
mkdir tmp | |
rprotoc --ruby_out=tmp test/proto/addressbook*.proto | |
diff test/proto/addressbook_ext.pb.rb tmp/test/proto/addressbook_ext.pb.rb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## | |
# This file is auto-generated. DO NOT EDIT! | |
# | |
## | |
# Imports | |
# | |
require 'test/proto/addressbook_base.pb' | |
module Tutorial_Ext | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment