GitXplorerGitXplorer
g

thrifty

public
2 stars
1 forks
0 issues

Commits

List of commits on branch master.
Unverified
be31054ae7a5fd595a1ea026a31cda9344397202

Bump version

ggdb committed 11 years ago
Unverified
79f2603011407c86d84ddd7274d34c0d1a2668f6

Move log.debug out of the line of fire for require

ggdb committed 11 years ago
Unverified
803e49faf01b9774de68cdee72b4eb4040120fcd

Bump version

ggdb committed 11 years ago
Unverified
541275758f235612951702d981eec7c65f212ba6

Get rid of thrift chunder

ggdb committed 11 years ago
Unverified
4c3ac656c253145b25d0e4997a0fc1b707a09730

Bump version

ggdb committed 11 years ago
Unverified
92c97d04f68620773cfa40599857bbf980cffdb4

Merge pull request #1 from ebroder/includes

ggdb committed 11 years ago

README

The README file for this repository.

Thrifty

Tired of manually regenerating your Thrift interface code every time the definition changes? Thrifty manages your Thrift interface definitions behind the scenes.

Usage

require 'thrifty'
Thrifty.register('my_interface.thrift')

Thrifty.require('generated_service')
GeneratedService.do_things

See the examples directory for a complete working example.

Precompiling

When using Thrifty in production, you'll likely want to precompile your Thrift IDLs. The way I'd recommend doing this is as follows:

In lib/myapp/thrift.rb:

require 'thrifty'
Thrifty.register('my_interface.thrift', relative_to: __FILE__, build_root: 'build')

Your build step will then just be:

require 'myapp/thrift'
Thrifty.compile_all

Caveats

You must have a working thrift compiler on your PATH. (That is, you should be able to just type 'thrift'.) Thrifty does not currently statically check that this is the case.

TODO

  • Statically ensure there's a thrift compiler on the PATH.
  • Autorequire of all generated Thrift files?