Sha256: 47d97383e06787750541395a25bd50acb6cdc98c53c026bc69eeae41b8f92a95

Contents?: true

Size: 750 Bytes

Versions: 9

Compression:

Stored size: 750 Bytes

Contents

#!/usr/bin/env ruby

# Before requiring protobuf, ensure that we will not load any
# server or client code.
#
ENV['PB_NO_NETWORKING'] = '1'

$LOAD_PATH << ::File.expand_path("../../lib", __FILE__)
require 'protobuf'

# Setup the loadpath so that plugin.pb will
# be able to require the descriptor.pb file.
#
$LOAD_PATH << ::File.expand_path("../../lib/protobuf/descriptors", __FILE__)
require 'google/protobuf/compiler/plugin.pb'

# Read the request bytes from STDIN, pass to the CodeGenerator, and
# write to STDOUT the generated response_bytes.
#
require 'protobuf/code_generator'

request_bytes = STDIN.read
code_generator = ::Protobuf::CodeGenerator.new(request_bytes)
response_bytes = code_generator.response_bytes
STDOUT.print(response_bytes)

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
protobuf-2.8.8 bin/protoc-gen-ruby
protobuf-2.8.7 bin/protoc-gen-ruby
protobuf-2.8.6 bin/protoc-gen-ruby
protobuf-2.8.5 bin/protoc-gen-ruby
protobuf-2.8.4 bin/protoc-gen-ruby
protobuf-2.8.3 bin/protoc-gen-ruby
protobuf-2.8.2 bin/protoc-gen-ruby
protobuf-2.8.1 bin/protoc-gen-ruby
protobuf-2.8.0 bin/protoc-gen-ruby