Commit Graph

24 Commits

Author SHA1 Message Date
Jens Geyer
123258ba60 THRIFT-3364 Fix ruby binary field encoding in TJSONProtocol
Client: Ruby
Patch: Nobuaki Sukegawa <nsukeg@gmail.com>

This closes #633
2015-10-02 00:38:17 +02:00
jfarrell
4e16718e99 Thrift-2960: Fix namespace regression for Ruby
Client: rb
Patch: Jan Brauer

Add test that exposes the broken namespacing.

Fixes a bug introduced by #140.

This closes #363
2015-01-29 23:03:34 -05:00
Jake Farrell
5d6bd5a606 THRIFT-1645: Replace Object#tee with more conventional Object#tap in specs
Client: rb
Patch: Nathan Beyer

The spec_helper.rb defines an Object#tee method, which is functionally equivalent to Object#tap. Object#tap was added to Ruby 1.9 and to 1.8.7.



git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1392509 13f79535-47bb-0310-9956-ffa450edef68
2012-10-01 18:42:23 +00:00
Jake Farrell
a87810ff4b Thrift-1644:Upgrade RSpec to 2.11.x and refactor specs as needed
Client: rb
Patch: Nathan Beyer

Upgrading to rspec2.



git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1391280 13f79535-47bb-0310-9956-ffa450edef68
2012-09-28 01:59:04 +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
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
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
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
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
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
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
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
d815c218c8 THRIFT-332. rb: Compact Protocol in Ruby
This patch includes both a pure Ruby and C-extension port of the Compact Protocol described in THRIFT-110. It also fixes a bug in struct.c that was interfering with native protocol method calls, and adds some utility classes to the Java library for serializing/deserializing to a file for the purpose of testing protocols cross-language.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@756133 13f79535-47bb-0310-9956-ffa450edef68
2009-03-19 18:57:43 +00:00
Bryan Duxbury
c016628a8a THRIFT-248. ruby: Factor BinaryProtocolAccelerated into separate protocol and struct components
This patch replaces the "binaryprotocolaccelerated" c extension with the "thrift_native" c extension. This new extension creates native implementations for the struct.rb #write and #read methods, Thrift::BinaryProtocol, and Thrift::MemoryBuffer, but keeps ruby-level interfaces, allowing all protocols to benefit from the struct code and the memory buffer. There is however an additional cost associated with going through this ruby layer, but the increased interoperability seems to be well worth it.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@739895 13f79535-47bb-0310-9956-ffa450edef68
2009-02-02 00:48:17 +00:00
Kevin Clark
c8190174dc rb: Add ext/ to loadpath so BinaryProtocolAccelerated specs pass
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@680539 13f79535-47bb-0310-9956-ffa450edef68
2008-07-28 22:16:34 +00:00
David Reiss
72754e198f rb: Spec out Thrift::BinaryProtocolAccelerated [THRIFT-90]
Convert most of the BinaryProtocol spec into shared examples and
add specific specs for encode_binary/decode_binary.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@679898 13f79535-47bb-0310-9956-ffa450edef68
2008-07-25 21:06:03 +00:00
Kevin Clark
2bd3a30b91 rb: Use File.dirname(__FILE__) in generated requires [THRIFT-57]
This means you no longer have to put the gen-rb folder in $:

Author: Kevin Ballard <kevin@rapleaf.com>


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@671963 13f79535-47bb-0310-9956-ffa450edef68
2008-06-26 17:49:49 +00:00
Kevin Clark
c83d4451b7 rb: Add the path to gen-rb to $: in spec_helper instead of in multiple different specs
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669017 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:18:21 +00:00
Kevin Clark
c3783f4cdb rb: Don't type-check when given a nil value.
Turn on type-checking for all specs


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669016 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:18:14 +00:00
Kevin Clark
3c59aff0b9 rb: Add a hack to prevent fastthread from being loaded when executing specs
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669011 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:17:37 +00:00
Kevin Clark
356f861420 Rename spec wrapper classes to prevent cross-pollination of specs. Require rspec 1.1.4 or later to fix the "describe Module do" bug
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668954 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:08:05 +00:00
Kevin Clark
d47cd66f7d Add backwards-compatibility spec
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668942 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:05:17 +00:00
Kevin Clark
0ff9e8c55e Spec out Thrift::Client
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668941 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:05:03 +00:00
Kevin Clark
3eca078597 Re-define the semantics of deprecate! and add deprecate_class! Include full specs for deprecate!/deprecate_class!
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668906 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 00:54:53 +00:00