Commit Graph

366 Commits

Author SHA1 Message Date
Bryan Duxbury
6530f1dc88 THRIFT-1632. rb: ruby: data corruption in thrift_native implementation of MemoryBufferTransport
This patch fixes a subtle bug whereby the read buffer was being resized but the method continued to read from the original, unresized buffer but at the wrong location.



git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1355198 13f79535-47bb-0310-9956-ffa450edef68
2012-06-29 00:21:19 +00:00
Roger Meier
a30930f677 THRIFT-1599 Fixing HTTP client(Ruby)
Patch: Tomas

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1337323 13f79535-47bb-0310-9956-ffa450edef68
2012-05-11 18:08:58 +00:00
Ilya Maykov
a81b040ee0 THRIFT-369: sets and maps break equality
Client: ruby
Patch: Ilya Maykov
Added a unit test demonstrating that equality is not broken for structs with nested containers.



git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1294917 13f79535-47bb-0310-9956-ffa450edef68
2012-02-29 00:39:38 +00:00
Jake Farrell
6f0f527583 THRIFT-1510:There should be an implementation of the JsonProtocol for ruby
Client: ruby
Patch: Wim Crols

JSON impl for ruby



git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1238144 13f79535-47bb-0310-9956-ffa450edef68
2012-01-31 03:39:30 +00:00
Bryan Duxbury
3371925d18 THRIFT-1449. rb: Ruby client does not work on solaris (?)
This patch adds a new argument to the socket calls that seems to fix the problems while not causing any detriment to non-Solaris systems.

Patch: Erik Hetzner

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1213837 13f79535-47bb-0310-9956-ffa450edef68
2011-12-13 18:33:15 +00:00
Jake Farrell
9901069442 Updating trunk to 0.9.0 version.
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1208214 13f79535-47bb-0310-9956-ffa450edef68
2011-11-30 02:09:46 +00:00
Jake Farrell
8941458f72 Thrift-1424:Ruby specs fail when run with rake
Client: ruby
Patch: Peter Sanford

Fixes specs failing to load the spec_helper in ruby 1.9.2



git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1200070 13f79535-47bb-0310-9956-ffa450edef68
2011-11-10 00:53:17 +00:00
Jake Farrell
9e7a88267c Thrift-1382: Bundle install doesnot work because thrift crashes
Client: ruby

Fixing strlcpy header.



git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1198543 13f79535-47bb-0310-9956-ffa450edef68
2011-11-06 19:58:32 +00:00
Jake Farrell
d5df77a906 Thrift-1382: Bundle install doesnot work because thrift crashes
Client: ruby

Adding header for strlcpy.



git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1198503 13f79535-47bb-0310-9956-ffa450edef68
2011-11-06 17:43:44 +00:00
Jake Farrell
ceead00409 Thrift-1382: Bundle install doesnot work because thrift crashes
Client: ruby
Patch: Jake Farrell

Fixes strlcpy header include issue with ruby 1.9.x.



git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1198394 13f79535-47bb-0310-9956-ffa450edef68
2011-11-06 16:07:45 +00:00
Bryan Duxbury
bcbf6d6fcd THRIFT-1400. rb: Ruby native extension aborts with __stack_chk_fail in OSX
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1188248 13f79535-47bb-0310-9956-ffa450edef68
2011-10-24 17:29:16 +00:00
Bryan Duxbury
f35741729f inconsequential indentation fix to java compiler
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1176034 13f79535-47bb-0310-9956-ffa450edef68
2011-09-26 20:32:59 +00:00
Jake Farrell
5209237739 Thrift-1355: Running make in lib/rb doesn't build the native extensions
Client: rb
Patch: jfarrell

Builds extension prior to running spec calls to resolve test deps.




git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1174896 13f79535-47bb-0310-9956-ffa450edef68
2011-09-23 17:24:00 +00:00
Jake Farrell
4bd4f0ec25 Thrift-1354: Add rake task to build just the gem file
Client: rb
Patch: jfarrell

Updates ruby build to now build the gem by default and adds a rake task to create the gem.



git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1174393 13f79535-47bb-0310-9956-ffa450edef68
2011-09-22 21:15:02 +00:00
Bryan Duxbury
e80a194c47 THRIFT-1331. rb: Ruby library deserializes an empty map to nil
This patch properly detects when the metadata is omitted in Compact Protocol messages.

Patch: Armaan Sarkar

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1173300 13f79535-47bb-0310-9956-ffa450edef68
2011-09-20 18:45:56 +00:00
Jake Farrell
9c39f7765e Thrift-1286: Modernize the Thrift Ruby Library Dev Environment
Client: Ruby
Patch: jfarrell

Updates to ruby build process with the following changes:
 - Removes dependency on echoe for spec generation
 - Adds gemfile for bulider and uses thrift.gemspec for dependency management.
 - Adds checks in configure for builder and only calls if available (make check-local on ci servers)
 - Adds checks in configure for Ruby and rake (bundler as well but this is optional for check-local and auto dependency management)
 - Still allows for rake to do its thing if all dependencies are in place
 - Removed Manifest and setup.rb
 - Adds a install task which will generate a gem and then install that gem to locally configured ruby path (no more prefix or destdir with this client)



git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1163341 13f79535-47bb-0310-9956-ffa450edef68
2011-08-30 19:12:10 +00:00
Jake Farrell
74362e0e8a Thrift-1263: Updating rb client Rakefile to add suport for publishing client to rubygems.org
Client: Ruby
Patch: Jfarrell

Updating Rakefile to remove deprecated functions and add support for publishing to rubgems.org




git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1158383 13f79535-47bb-0310-9956-ffa450edef68
2011-08-16 17:13:41 +00:00
Jake Farrell
9c76258564 updating trunk from 0.7.0-dev to 0.8.0-dev
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1157426 13f79535-47bb-0310-9956-ffa450edef68
2011-08-13 21:29:36 +00:00
Roger Meier
345ecc739a THRIFT-690 add new ApplicationExceptions (INTERNAL_ERROR, PROTOCOL_ERROR) to the following languages: as3, c_glib, cocoa, cpp, erl, hs, js, nodejs, ocaml, perl, py, rb
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1153412 13f79535-47bb-0310-9956-ffa450edef68
2011-08-03 09:49:27 +00:00
Roger Meier
472f9e190c THRIFT-1252 Segfault in Ruby deserializer
Patch: Ilya Maykov

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1153093 13f79535-47bb-0310-9956-ffa450edef68
2011-08-02 10:55:47 +00:00
Bryan Duxbury
ad0ad824d2 THRIFT-1189. rb: Ruby deserializer speed improvements
This patch gives the Ruby deserialization stack a healthy performance boost.

Patch: Ilya Maykov

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1140780 13f79535-47bb-0310-9956-ffa450edef68
2011-06-28 18:46:03 +00:00
Bryan Duxbury
d1df20a20d THRIFT-418. rb: Don't do runtime sorting of struct fields
A simpler version of the already-committed patch.

Patch: Ilya Maykov

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1136189 13f79535-47bb-0310-9956-ffa450edef68
2011-06-15 20:52:57 +00:00
Bryan Duxbury
6e292e5bfa THRIFT-1207. rb: Support DESTDIR on 'make install' of ruby libs
Patch: Brandon Philips

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1136180 13f79535-47bb-0310-9956-ffa450edef68
2011-06-15 20:34:53 +00:00
Bryan Duxbury
df8a0e6fca THRIFT-418. rb: Don't do runtime sorting of struct fields
Patch: Ilya Maykov

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1134122 13f79535-47bb-0310-9956-ffa450edef68
2011-06-09 22:46:28 +00:00
Bryan Duxbury
b7c69711e7 THRIFT-1193. rb: Potential infinite loop in nonblocking_server
Patch: Ilya Maykov

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1133593 13f79535-47bb-0310-9956-ffa450edef68
2011-06-08 22:53:11 +00:00
Bryan Duxbury
5218cc1742 THRIFT-1187. rb: nonblocking_server shutdown race under Ruby 1.9
This patch fixes a shutdown error that occurs under ruby 1.9.2

Patch: Ilya Maykov

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1130242 13f79535-47bb-0310-9956-ffa450edef68
2011-06-01 17:43:39 +00:00
Bryan Duxbury
fb1412d916 THRIFT-1183. rb: Pure-ruby CompactProtocol raises ArgumentError when deserializing under Ruby 1.9
Use #ord to ensure we get back an int

Patch: Ilya Maykov

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1130236 13f79535-47bb-0310-9956-ffa450edef68
2011-06-01 17:23:33 +00:00
Bryan Duxbury
911d2f1576 THRIFT-1182. rb: Native deserializer segfaults on incorrect list element type
This patch causes both the pure ruby and native extension code paths to check if the data in lists, sets, and maps is of the expected type before deserlizing it. When it's not the right type, it now skips the bad data correctly.

Patch: Ilya Maykov

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1129892 13f79535-47bb-0310-9956-ffa450edef68
2011-05-31 20:03:29 +00:00
Bryan Duxbury
5671a55f8e THRIFT-1149. ruby: Nonblocking server fails when client connection is reset
In some situations, a disconnecting client could cause the nonblocking server to trip on an exception and take the whole server down. This patch rescues such errors and cleans up only the disconnected client.

Patch: Alex

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1094667 13f79535-47bb-0310-9956-ffa450edef68
2011-04-18 17:29:06 +00:00
Roger Meier
062de1b0d3 THRIFT-987 ruby does not build on Debian based distro's
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1077930 13f79535-47bb-0310-9956-ffa450edef68
2011-03-04 13:10:58 +00:00
Bryan Duxbury
c216556bd6 update version numbers to 0.7.0-dev
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1056453 13f79535-47bb-0310-9956-ffa450edef68
2011-01-07 18:45:29 +00:00
Bryan Duxbury
c3affb3940 THRIFT-979. rb: ruby bindings used to work on jruby
Make a dummy makefile so that JRuby doesn't complain.

Patch: Jeff Hodges

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1036267 13f79535-47bb-0310-9956-ffa450edef68
2010-11-17 22:47:06 +00:00
Roger Meier
a8b52c7a8b THRIFT-6 TLP URL's and email's, haskell, more details
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1029964 13f79535-47bb-0310-9956-ffa450edef68
2010-11-02 07:33:30 +00:00
Roger Meier
2287278140 THRIFT-6 update Version Info for several languages, add print-version to Makefile.am
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@1026299 13f79535-47bb-0310-9956-ffa450edef68
2010-10-22 11:20:25 +00:00
Bryan Duxbury
e1ae6b45d5 bump versions to 0.6.0
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@1002294 13f79535-47bb-0310-9956-ffa450edef68
2010-09-28 17:44:45 +00:00
Bryan Duxbury
6a1fb17a25 THRIFT-909. rb: allow block argument to struct constructor
This patch allows the user to pass a block to generated structs' constructors. The block will receive and instance of the new object.

Patch: Michael Stockton

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@999487 13f79535-47bb-0310-9956-ffa450edef68
2010-09-21 16:30:58 +00:00
Bryan Duxbury
83c4795870 THRIFT-899. rb: Ruby read timeouts can sometimes be 2x what they should be
This patch makes sure that we don't wait longer than necessary for timeouts.

Patch: Ryan King

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@998303 13f79535-47bb-0310-9956-ffa450edef68
2010-09-17 20:17:21 +00:00
Bryan Duxbury
09d13c2edf THRIFT-664. rb: Ruby extension fails to build with Ruby 1.9.1
This change takes care of the 1.9 build issues and a few other c-extension niceties.

Patch: Rajesh Malepati

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@984524 13f79535-47bb-0310-9956-ffa450edef68
2010-08-11 18:37:25 +00:00
Bryan Duxbury
7e9ac7bf59 rb: Make MemoryTransport's inspect_buffer method work in Ruby 1.9
Patch: Rajesh Malepati

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@983680 13f79535-47bb-0310-9956-ffa450edef68
2010-08-09 15:25:34 +00:00
Bryan Duxbury
ad776c1425 THRIFT-811. rb: http_client_transport.rb: allow custom http headers
Allows setting of custom http headers in http_client_transport.rb 

Patch: Tony Kamenick

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@982804 13f79535-47bb-0310-9956-ffa450edef68
2010-08-05 22:12:01 +00:00
Bryan Duxbury
d2cc5bb39e THRIFT-699. rb: Excise unused 'native protocol method table' stuff from thrift_native
The code was completely unused and superfluous, and now it's gone.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@980209 13f79535-47bb-0310-9956-ffa450edef68
2010-07-28 21:00:06 +00:00
Bryan Duxbury
3f0b526d2d THRIFT-459. Ruby installation always tries to write to /Library/Ruby/site
This patch adds a RUBY_PREFIX option similiar to JAVA_PREFIX or PY_PREFIX.

Patch: Matthieu Imbert

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@943698 13f79535-47bb-0310-9956-ffa450edef68
2010-05-12 21:31:58 +00:00
Bryan Duxbury
3e60fa6a54 THRIFT-720. rb: HTTPClientTransport ignores url parameters
This patch causes the url parameters to be sent as expected. Patch by Tony Kamenick.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@918137 13f79535-47bb-0310-9956-ffa450edef68
2010-03-02 18:34:00 +00:00
Bryan Duxbury
30dd725952 THRIFT-715. rb: Add additional test case for serialization of false boolean fields
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@916911 13f79535-47bb-0310-9956-ffa450edef68
2010-02-27 05:47:15 +00:00
Bryan Duxbury
65073e5b11 add newline to the end of struct.c to make some whiney compilers happy
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@915398 13f79535-47bb-0310-9956-ffa450edef68
2010-02-23 15:46:46 +00:00
Bryan Duxbury
205e4500f9 THRIFT-553. rb: thrift structs should be comparable (<=>)
This patch adds the spaceship operator to the struct and union base classes, enabling object comparisons between objects without regenerating code.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@911644 13f79535-47bb-0310-9956-ffa450edef68
2010-02-18 23:19:42 +00:00
Bryan Duxbury
39dadd6656 THRIFT-712. rb: Inspect should print binary fields as hex instead of escaped string
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@911610 13f79535-47bb-0310-9956-ffa450edef68
2010-02-18 22:00:45 +00:00
Bryan Duxbury
0e4920c6b8 THRIFT-708. rb: Is set checking methods
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@911557 13f79535-47bb-0310-9956-ffa450edef68
2010-02-18 20:28:27 +00:00
Bryan Duxbury
3d03c527df THRIFT-709. Print enum value names in Ruby
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@911500 13f79535-47bb-0310-9956-ffa450edef68
2010-02-18 17:42:06 +00:00
Bryan Duxbury
25b851af36 add some missing files to Manifest
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@911217 13f79535-47bb-0310-9956-ffa450edef68
2010-02-17 23:10:48 +00:00
Bryan Duxbury
361ef34722 bump rev on ruby gem version
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@911200 13f79535-47bb-0310-9956-ffa450edef68
2010-02-17 22:29:49 +00:00
Bryan Duxbury
5af64f0346 THRIFT-707. Support old-style constructors for Union structs
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@911199 13f79535-47bb-0310-9956-ffa450edef68
2010-02-17 22:27:27 +00:00
Bryan Duxbury
33e190cd15 THRIFT-697. Union support in Ruby
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@910700 13f79535-47bb-0310-9956-ffa450edef68
2010-02-16 21:19:01 +00:00
Bryan Duxbury
8d41b643f9 THRIFT-604: rb: nonblocking_server assumes that socket.read returns exactly one message
This patch causes every message currently in the buffer to be processed before going on.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@899725 13f79535-47bb-0310-9956-ffa450edef68
2010-01-15 17:30:40 +00:00
Bryan Duxbury
35565a4719 THRIFT-671. rb: Ruby compact protocol implementation gets mixed up when there are fields that don't fit in the delta space
This patch adds a test and a fix for the problem.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@896712 13f79535-47bb-0310-9956-ffa450edef68
2010-01-06 23:12:09 +00:00
Bryan Duxbury
3076fb8d79 Bump rubygem version up to 0.2.0, now that we're released and all.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@896711 13f79535-47bb-0310-9956-ffa450edef68
2010-01-06 23:10:24 +00:00
Todd Lipcon
53ae9f39d5 THRIFT-622. Add appropriate licensing information to get Thrift ready for a release.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@887812 13f79535-47bb-0310-9956-ffa450edef68
2009-12-07 00:42:38 +00:00
Bryan Duxbury
834895d15c THRIFT-603. rb: Struct read method does not call validate
After reading a struct, we will now call the struct's validate method.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@825369 13f79535-47bb-0310-9956-ffa450edef68
2009-10-15 01:20:34 +00:00
Bryan Duxbury
3647fc62f5 THRIFT-569. rb: Segmentation Fault when using BinaryProtocolAccelerated in Ruby
This patch checks to make sure that a value is a string before treating it as one. 



git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@810689 13f79535-47bb-0310-9956-ffa450edef68
2009-09-02 20:05:07 +00:00
Bryan Duxbury
6f6318a652 THRIFT-572. rb: fix RSTRING for 1.9 compatibility
Use a macro compatible with Ruby 1.9.



git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@810303 13f79535-47bb-0310-9956-ffa450edef68
2009-09-01 23:18:34 +00:00
Bryan Duxbury
fd58c55dca THRIFT-571. rb: compact_protocol.c:89: warning: format not a string literal and no format arguments
This patch solves the issue for those of you on Ruby 1.9.1.



git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@810288 13f79535-47bb-0310-9956-ffa450edef68
2009-09-01 22:32:50 +00:00
Bryan Duxbury
293086cacc THRIFT-547. rb: Thrift deserializer hangs when deserializing empty string
Thrift::MemoryBuffer will now throw an EOFError when it cannot fulfill a request for data. 



git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@799696 13f79535-47bb-0310-9956-ffa450edef68
2009-07-31 18:53:14 +00:00
Bryan Duxbury
ccae884739 THRIFT-498. rb: Compact and Binary native protocols, used at the same time, can cause some issues
Disable native method table usage.



git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@799693 13f79535-47bb-0310-9956-ffa450edef68
2009-07-31 18:47:09 +00:00
Bryan Duxbury
0552813825 THRIFT-552. rb: gem requires exactly rubygems 1.2.0
The Thrift gem will now work with rubygems >= 1.2.0.



git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@799337 13f79535-47bb-0310-9956-ffa450edef68
2009-07-30 15:52:25 +00:00
Bryan Duxbury
2fb877a794 THRIFT-511. rb: Better performing hash method for generated structs
This patch uses a hash function that takes into account the hashes of struct elements, instead of just returning 0. This make hashes of Thrift structs O(1) instead of O(n).



git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@780094 13f79535-47bb-0310-9956-ffa450edef68
2009-05-29 20:18:58 +00:00
Bryan Duxbury
1deddc799a THRIFT-513. rb: spec test files broken, rake searching for misnamed files
This patch causes the right files to be required and cleans up a few odd or redundant requires that were in the specs.



git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@780090 13f79535-47bb-0310-9956-ffa450edef68
2009-05-29 20:11:27 +00:00
David Reiss
4b86e62eb6 THRIFT-373. Get some missing files into the release tarballs
- Added some stuff to EXTRA_DIST.
- Added some non-compiled sources to a C++ test.
- Made lib/perl/test a SUBDIR of lib/perl.

The last is a revert of r766558, but I moved the "Types.pm" rules in
lib/perl/test/Makefile.am to the check-local target, so it should still
work as expected (per THRIFT-461).

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@777681 13f79535-47bb-0310-9956-ffa450edef68
2009-05-22 19:52:06 +00:00
Kevin Clark
f93f7a6611 Add version number to Rakefile, update generated manifest (via rake)
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@771513 13f79535-47bb-0310-9956-ffa450edef68
2009-05-05 00:43:59 +00:00
Bryan Duxbury
def30a6072 THRIFT-387. Add appropriate Apache header to all code files
This hits all the documentation and some misc code files that have avoided the license up to this point.



git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@763048 13f79535-47bb-0310-9956-ffa450edef68
2009-04-08 00:19:37 +00:00
Bryan Duxbury
9e4c04125e THRIFT-444. rb: THRIFT-356 broke compact protocol spec
This patch cleans up the spec, removing some unncessary code.



git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@763043 13f79535-47bb-0310-9956-ffa450edef68
2009-04-07 23:45:15 +00:00
Bryan Duxbury
0bbef922ee THRIFT-437. rb: fix benchmarking tools to require proper file names
A few scripts in benchmark/ and script/ were using old-style require statments.



git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@763003 13f79535-47bb-0310-9956-ffa450edef68
2009-04-07 22:23:40 +00:00
Kevin Clark
19f8d1febe Thrift-421. rb: Underscore output file names and require file statments
Breaks compatiblity

Author: Michael Stockton

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@762907 13f79535-47bb-0310-9956-ffa450edef68
2009-04-07 19:09:28 +00:00
Bryan Duxbury
8407cfd466 THRIFT-433. rb: 'rake spec' sort of fails
This patch allows the process to exit cleanly. Yay!



git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@762840 13f79535-47bb-0310-9956-ffa450edef68
2009-04-07 16:35:49 +00:00
Bryan Duxbury
ec47358d23 THRIFT-175. Specs in Ruby library should be run during make check
This patch makes 'make check' run 'rake spec' in the appropriate scenarios. There is still another bug that will break the build though.



git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@762838 13f79535-47bb-0310-9956-ffa450edef68
2009-04-07 16:31:04 +00:00
Bryan Duxbury
d1d1542e1e THRIFT-276. rb: Ruby libraries should have one class per file
This monster of a patch moves all the classes into their own files and specs as appropriate. Additionally, it concentrates all the requires into thrift.rb, removing the need to require any other file. (Changes were made to the compiler to reflect this reduced requirement.)

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@761849 13f79535-47bb-0310-9956-ffa450edef68
2009-04-04 00:58:03 +00:00
David Reiss
deda141392 THRIFT-388. Create a "ONEWAY" message type that is an alias for "CALL"
Pave the way for a new message type for oneway function calls.
For now, just define the constant in all languages and make
server implementations treat it the same way as a normal call.
Only C++ and Erlang currently check the message type (on the
server side).

There is a little bit of redundancy in the Erlang code, but
the alternative is a bit gross, and this split-up will be
necessary eventually when we start handling one-way calls
differently.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@761389 13f79535-47bb-0310-9956-ffa450edef68
2009-04-02 19:22:31 +00:00
David Reiss
b5714ef91e Get rid of missing LICENSE files from some Makefile.am
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@761137 13f79535-47bb-0310-9956-ffa450edef68
2009-04-02 00:48:11 +00:00
Bryan Duxbury
5b8b484548 THRIFT-417. rb: BufferedTransport can enter an infinite loop
Switch native proto implementations to use read_all instead of read. Add a bunch of tests to verify. 

Also:
- removed some commented code in binary_protocol_accelerated.c
- struct.c was missing one of the possible native method calls
- updates gem manifest (included files that didn't exist)
- fixed svn:ignores of test/rb/gen-rb and lib/java/gen-java

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@761037 13f79535-47bb-0310-9956-ffa450edef68
2009-04-01 20:10:15 +00:00
Bryan Duxbury
16b29a989e THRIFT-410. rb: Ruby lib should have no checked in generated code
Forgot the gen-rb in lib/rb/benchmark. 



git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@760739 13f79535-47bb-0310-9956-ffa450edef68
2009-03-31 23:51:07 +00:00
Bryan Duxbury
ac002d32a7 THRIFT-415. rb: BinaryProtocolAccelerated does not behave properly when strict reads are turned off
This patch adds the appropriate test for the behavior and fixes the thrift_native project to do the right thing. 



git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@760735 13f79535-47bb-0310-9956-ffa450edef68
2009-03-31 23:48:36 +00:00
Bryan Duxbury
1adbab031d rb: The shared binary protocol specs lacked a test for read_message_begin
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@760637 13f79535-47bb-0310-9956-ffa450edef68
2009-03-31 21:09:26 +00:00
David Reiss
ea2cba8ba8 THRIFT-387. Add license headers to a bunch of files
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@760189 13f79535-47bb-0310-9956-ffa450edef68
2009-03-30 21:35:00 +00:00
Bryan Duxbury
4bc4231040 Fix up Manifest again to include the proper files for gem building
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@760184 13f79535-47bb-0310-9956-ffa450edef68
2009-03-30 21:25:20 +00:00
Bryan Duxbury
ea0d126f32 Needed a newline at the end of the file to avoid warnings when compiling on linux.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@760183 13f79535-47bb-0310-9956-ffa450edef68
2009-03-30 21:24:34 +00:00
Bryan Duxbury
72737e4c96 Need a newline at the end of the file for it to compile.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@760143 13f79535-47bb-0310-9956-ffa450edef68
2009-03-30 20:11:45 +00:00
Bryan Duxbury
0f2ad6069a Get rid of gem Manifest entries for files that don't exist anymore
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@760129 13f79535-47bb-0310-9956-ffa450edef68
2009-03-30 19:52:39 +00:00
Bryan Duxbury
f0377e2ffe THRIFT-410. rb: Ruby lib should have no checked in generated code
This patch deletes the existing checked in ruby code, adds all the generated ruby code directories to svn:ignore, and updates the Rakefile so that "rake spec" generates the ruby code automatically.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@760050 13f79535-47bb-0310-9956-ffa450edef68
2009-03-30 17:14:06 +00:00
Bryan Duxbury
8852720e70 THRIFT-372. rb: Ruby lib doesn't rescue properly from lack of native_thrift extension
This patch adds a new thrift/thrift_native.rb which should be the require point for application users. It also removes some unnecessary code from a few files and cleans up requires in some specs.



git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@758794 13f79535-47bb-0310-9956-ffa450edef68
2009-03-26 18:41:44 +00:00
Bryan Duxbury
6b771d2c62 THRIFT-408. rb: Ruby C extension doesn't build on 1.8.5
This patch redefines the important macros so 1.8.5 is compatible.



git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@758517 13f79535-47bb-0310-9956-ffa450edef68
2009-03-26 04:55:34 +00:00
Kevin Clark
264e9426b9 THRIFT-401. rb: Speed up FramedTransport
Author: Tyler Kovacs

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@758510 13f79535-47bb-0310-9956-ffa450edef68
2009-03-26 03:46:58 +00:00
Bryan Duxbury
e3ab50d0f3 THRIFT-374. rb: ruby 1.9 compatibility
This patch updates the thrift_native package to use 1.9 compatible macros and fixes the pure ruby stuff to behave equally well in ruby1.8.6-ruby1.9.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@758435 13f79535-47bb-0310-9956-ffa450edef68
2009-03-25 21:06:53 +00:00
Bryan Duxbury
2f20ae45fb THRIFT-402. rb: MemoryBuffer > 4096 bytes will truncate remaining bytes
This patch fixes the issue, preserving the remaining bytes.



git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@758024 13f79535-47bb-0310-9956-ffa450edef68
2009-03-24 21:10:14 +00:00
David Reiss
cecbed81c8 THRIFT-136. s/async/oneway/ in the Thrift IDL
This is the real change.  The lexer now recognizes "oneway"
and warns on "async".  All example and test IDLs have been
updated, as have the syntax files.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@757994 13f79535-47bb-0310-9956-ffa450edef68
2009-03-24 20:02:22 +00:00
Bryan Duxbury
e8ae5d3728 THRIFT-275. rb: Remove deprecated classes from Ruby library
This patch removes all the deprecation stuff and the t*.rb classes that were only placeholders. In addition, I've changed the implementations of some "abstract" methods to throw NotImplementedError instead of returning nil, and fixed the test accordingly. Finally, I removed the no longer required borrow and consume methods from all the transport implementations that had them. (Borrow and consume have been supplanted by the thrift_native package.) 


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@757668 13f79535-47bb-0310-9956-ffa450edef68
2009-03-24 05:23:52 +00:00
Bryan Duxbury
4287c36aab THRIFT-312. rb: Ruby unit tests fail due to change in BinaryProtocolAccelerated interface
Couldn't find any broken tests anymore, but did remove some dead code that had been commented in the binary protocol spec.



git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@757610 13f79535-47bb-0310-9956-ffa450edef68
2009-03-24 00:08:45 +00:00
Bryan Duxbury
6e26d3d9d2 THRIFT-396. rb: BinaryProtocol missing method implementations
Added missing implementations of write_struct_begin and read_struct_begin to BinaryProtocol.



git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@757599 13f79535-47bb-0310-9956-ffa450edef68
2009-03-23 23:36:16 +00:00
Bryan Duxbury
74c3de61a1 THRIFT-375. rb: syntax error in benchmark.rb
Fixed the syntax error.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@756617 13f79535-47bb-0310-9956-ffa450edef68
2009-03-20 16:54:33 +00:00
Kevin Clark
916f353f9f Add Apache headers to Ruby libs and remove a few remaining Facebook notices
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@756322 13f79535-47bb-0310-9956-ffa450edef68
2009-03-20 04:21:39 +00:00
Bryan Duxbury
d40731edb2 THRIFT-313. rb: BinaryProtocolAccelerated and BinaryProtocol don't produce the same bytes when writes aren't strict
A Fixnum was not properly being converted to its native value before being written. This patch rectifies that problem.



git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@756308 13f79535-47bb-0310-9956-ffa450edef68
2009-03-20 02:21:05 +00:00
Bryan Duxbury
ae0631a844 THRIFT-260. rb: Some Protocol methods shouldn't have default nil implementations
This patch makes most of the methods in Thrift::Protocol throw NotImplementedExceptions.



git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@756293 13f79535-47bb-0310-9956-ffa450edef68
2009-03-20 01:49:53 +00:00