* trying out container type
This commit is contained in:
parent
47322c2be5
commit
00dd36a8f7
2
Gemfile
2
Gemfile
|
|
@ -1,3 +1,3 @@
|
||||||
source 'https://rubygems.org'
|
source 'https://rubygems.org'
|
||||||
|
|
||||||
gem 'ruby_protobuf', '0.4.11'
|
gem 'ruby-protocol-buffers'
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
GEM
|
GEM
|
||||||
remote: https://rubygems.org/
|
remote: https://rubygems.org/
|
||||||
specs:
|
specs:
|
||||||
ruby_protobuf (0.4.11)
|
ruby-protocol-buffers (1.2.2)
|
||||||
|
|
||||||
PLATFORMS
|
PLATFORMS
|
||||||
ruby
|
ruby
|
||||||
|
|
||||||
DEPENDENCIES
|
DEPENDENCIES
|
||||||
ruby_protobuf (= 0.4.11)
|
ruby-protocol-buffers
|
||||||
|
|
|
||||||
2
build
2
build
|
|
@ -14,6 +14,8 @@ PROTO_FILES=`find src -name *.proto`
|
||||||
# make variables available to sub-scripts
|
# make variables available to sub-scripts
|
||||||
export SRC TARGET PROTO_FILES
|
export SRC TARGET PROTO_FILES
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
# cpp/java/python supported by protoc
|
# cpp/java/python supported by protoc
|
||||||
./build_protoc
|
./build_protoc
|
||||||
# ruby supported by rprotoc
|
# ruby supported by rprotoc
|
||||||
|
|
|
||||||
|
|
@ -7,8 +7,6 @@ TARGET_CPP="$TARGET/cpp"
|
||||||
|
|
||||||
mkdir -p "$TARGET_CPP"
|
mkdir -p "$TARGET_CPP"
|
||||||
|
|
||||||
PROTOC_ARGS="--cpp_out=$TARGET/cpp"
|
|
||||||
|
|
||||||
# if you don't want to put protoc on the command line,
|
# if you don't want to put protoc on the command line,
|
||||||
# then set a PROTOC environment variable
|
# then set a PROTOC environment variable
|
||||||
if [ -z $PROTOC] ; then
|
if [ -z $PROTOC] ; then
|
||||||
|
|
@ -20,4 +18,5 @@ command -v $PROTOC >/dev/null 2>&1 || { echo >&2 "protoc is required but not ins
|
||||||
# die on error at this point
|
# die on error at this point
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
$PROTOC $PROTO_FILES --cpp_out=$TARGET/cpp --proto_path=$SRC
|
echo "building cpp protocol buffers"
|
||||||
|
$PROTOC $PROTO_FILES --cpp_out=$TARGET_CPP --proto_path=$SRC
|
||||||
|
|
|
||||||
|
|
@ -19,4 +19,5 @@ command -v $PROTOCC >/dev/null 2>&1 || { echo >&2 "protoc-c is required but not
|
||||||
# die on error at this point
|
# die on error at this point
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
echo "building c protocol buffers"
|
||||||
$PROTOCC $PROTO_FILES --c_out=$TARGET_C --proto_path=$SRC
|
$PROTOCC $PROTO_FILES --c_out=$TARGET_C --proto_path=$SRC
|
||||||
|
|
|
||||||
|
|
@ -8,14 +8,12 @@ RUBY_OUT=$TARGET/ruby
|
||||||
command -v "bundle" >/dev/null 2>&1 || { echo >&2 "bundle is required but not installed. Skipping ruby protocol buffers."; exit 0; }
|
command -v "bundle" >/dev/null 2>&1 || { echo >&2 "bundle is required but not installed. Skipping ruby protocol buffers."; exit 0; }
|
||||||
|
|
||||||
# creates a bin folder with 'rprotoc' command inside
|
# creates a bin folder with 'rprotoc' command inside
|
||||||
bundle install --binstubs
|
bundle install --binstubs > /dev/null
|
||||||
|
|
||||||
# die on error at this point
|
# die on error at this point
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
for i in "${PROTO_FILES[@]}"
|
echo "building ruby protocol buffers"
|
||||||
do
|
bin/ruby-protoc $PROTO_FILES --proto_path $SRC --ruby_out $RUBY_OUT
|
||||||
bin/rprotoc --proto_path $SRC --out $RUBY_OUT "$i"
|
|
||||||
done
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
message Login {
|
message Login {
|
||||||
required string session_id = 1;
|
optional string username = 1; // username
|
||||||
required string username = 2;
|
optional string token = 2; // a token provided by the server that validates this user
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue