Skip to content

Commit

Permalink
Update README, add empty LICENSE, update Rakefile
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Palmer committed Dec 23, 2009
1 parent ee21c4c commit d62d3fd
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 5 deletions.
1 change: 1 addition & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
TBD: Probably MIT. Don't release until this file has content. :)
48 changes: 46 additions & 2 deletions README
Original file line number Diff line number Diff line change
@@ -1,2 +1,46 @@
To checkout, use "git clone [email protected]:ruby-protobufs.git".
You may need to visit http:https://labs.dechocorp.com/my/account to set up your SSH key first.
= Ruby Protocol Buffers

Protocol Buffers are a way of encoding structured data in an efficient yet
extensible format. Google uses Protocol Buffers for almost all of its internal
RPC protocols and file formats.

Ruby Protocol Buffers has two components: a compiler to turn .proto definitions
into Ruby modules (extension .pb.rb), and a runtime to use protocol buffers
defined by these modules. The compiler relies on Google's C++ based protoc
compiler for much of the heavy lifting -- this has huge advantages in ensuring
correctness.

Simple usage example:

$ echo "package Test; message MyMessage { optional string myField = 1; }" > test.proto
$ ruby-protoc test.proto
$ irb -rtest.pb
> msg = Test::MyMessage.new(:myField => 'zomgkittenz')
=> #<Test::MyMessage myField="zomgkittenz">
> Test::MyMessage.parse(StringIO.new(msg.to_s)) == msg
=> true

== Authors

Brian Palmer ([email protected])

== Installation

You'll need protoc version >= 2.2 (the Google Protocol Buffer compiler)
installed in the environment where you will be compiling protocol buffers. This
is only needed for compiling, you don't need it installed to use the generated
.pb.rb files.

If you use RubyGems, you can install via:

$ sudo gem install ruby-protocol-buffers

== Source

The source is available on GitHub somewhere. Once I know where, I'll update the
README :)

== License

See the LICENSE file included with the distribution for licensing and
copyright details.
10 changes: 7 additions & 3 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,23 @@ require 'rubygems'
require 'rake/gempackagetask'

spec = Gem::Specification.new do |s|
s.name = "ruby-protobuf"
s.name = "ruby-protocol-buffers"
s.version = "0.1.0"
s.author = "Brian Palmer"
s.email = "[email protected]"
s.homepage = "http:https://todo"
s.platform = Gem::Platform::RUBY
s.summary = "Ruby compiler and runtime for the google protocol buffers library. Currently includes a compiler that utilizes protoc, as well as a highly experimental pure-ruby compiler."
s.summary = "Ruby compiler and runtime for the google protocol buffers library. Currently includes a compiler that utilizes protoc."

s.required_ruby_version = ">=1.8.6"

s.files = FileList["{bin,lib,ext}/**/*"].to_a
s.require_path = 'lib'
s.extensions << 'ext/extconf.rb'
s.executables << 'ruby-protoc'
# disabled to avoid needing to compile a C extension just to boost
# performance. TODO: is there a way to tell gems to make the extension
# optional?
# s.extensions << 'ext/extconf.rb'
end

Rake::GemPackageTask.new(spec) do |pkg|
Expand Down

0 comments on commit d62d3fd

Please sign in to comment.