Kevin Clark
dfaada43ad
Spec out ProtocolException
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668945 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:06:01 +00:00
Kevin Clark
4a2b841528
Spec out Thrift::Processor
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668944 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:05:47 +00:00
Kevin Clark
b397bbb6b6
Add pending spec for sequence-ids on Thrift::Client
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668943 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:05:32 +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
61387bf284
Fully spec out Thrift::Exception and Thrift::ApplicationException
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668940 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:04:48 +00:00
Kevin Clark
95833c5250
Start speccing exceptions and restore the (message) arg to super in Thrift::ApplicationException
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668939 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:04:34 +00:00
Kevin Clark
5d2e7a9bc6
Fix more deprecated name usages
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668933 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:03:03 +00:00
Kevin Clark
fe897d32f1
Use deprecate_module! where appropriate
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668931 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:02:31 +00:00
Kevin Clark
de7864e7d5
Solve the information leak problem between deprecations. Unfortunately this was caused by a nasty ruby bug.
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668930 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:02:14 +00:00
Kevin Clark
fc31164486
Add (currently failing) spec for information leak between deprecations
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668929 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:01:57 +00:00
Kevin Clark
eff97fc042
Use the correct name in deprecation warnings
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668928 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:01:40 +00:00
Kevin Clark
03a5fb1dd7
Implement deprecate_module! and fully spec it
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668927 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:01:25 +00:00
Kevin Clark
2a8a731203
deprecate_class! now sets up a proxy class that logs a warning when used
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668926 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:01:07 +00:00
Kevin Clark
74df0bf429
Finish renaming/deprecating classes. Change a few more filenames, like thrift/transport/ttransport -> thrift/transport
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668924 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:00:33 +00:00
Kevin Clark
f5754acff9
Add new spec for deprecate_class!
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668923 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:00:12 +00:00
Kevin Clark
0d45617ec2
Finish up the CamelCase -> ruby_style changes
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668921 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 00:59:37 +00:00
Kevin Clark
8943788f1f
Convert more CamelCase names to ruby_style
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668920 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 00:59:17 +00:00
Kevin Clark
e12b0f8445
Add comment and convert super(args)->super
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668919 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 00:58:58 +00:00
Kevin Clark
244b0d9c92
Stop re-defining deprecated methods in subclasses
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668918 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 00:58:40 +00:00
Kevin Clark
b8a7ad727e
Start renaming camelCase methods to ruby_style
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668917 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 00:58:23 +00:00
Kevin Clark
da40e8d27c
Add another spec for deprecate!
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668916 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 00:58:04 +00:00
Kevin Clark
fc964eed7a
Add caller info to the deprecation warning
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668915 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 00:57:46 +00:00
Kevin Clark
6fda4b76e2
Move thrift/protocol/tprotocol to thrift/protocol and thrift/protocol/tbinaryprotocol to thrift/protocol/binaryprotocol. Leave shim files behind for backwards compatibility
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668914 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 00:57:26 +00:00
Kevin Clark
c2a07b19ef
Make rake
run the ruby tests in test/rb as well as the new specs
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668913 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 00:57:06 +00:00
Kevin Clark
f85e793494
Fix up thrift/thrift to only require the the files that define the classes it used to hold. This fixes the existing tests
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668912 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 00:56:48 +00:00
Kevin Clark
c42231b6fa
Set up the class deprecations
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668911 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 00:56:30 +00:00
Kevin Clark
96cc516492
Actually turn off deprecation when Thrift::DEPRECATION is false
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668910 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 00:56:08 +00:00
Kevin Clark
6eaf814fcc
Remove requires of 'thrift/thrift' from library files
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668909 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 00:55:50 +00:00
Kevin Clark
0d1849d882
Add in hook to only provide the deprecated API when the client doesn't require 'thrift' directly
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668908 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 00:55:29 +00:00
Kevin Clark
5a7103ae5d
Add simple Rakefile for running specs
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668907 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 00:55:11 +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
Kevin Clark
4c69d3eecf
rb: TBinaryProtocol => Thrift::BinaryProtocol
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668905 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 00:54:33 +00:00
Kevin Clark
2960044415
rb: Add more classes/modules to the Thrift namespace. Provide backwards compatable mappings.
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668904 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 00:54:13 +00:00
Kevin Clark
10cdf10a7b
rb: Move client, processor, struct files for consistant naming.
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668903 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 00:53:48 +00:00
Kevin Clark
97d2166a34
rb: Move exceptions, types, processor, client, struct under Thrift module. Add constants for backwards compatability
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668902 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 00:53:28 +00:00
Kevin Clark
9bf3362ea5
Split out thrift/thrift.rb, add top level thrift.rb in prep for gemmification
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668901 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 00:53:07 +00:00
Kevin Clark
5e44bce98f
rb: Remove extra return statement
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668900 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 00:52:46 +00:00
Kevin Clark
c669efa48b
rb: Add deprecate! method Rename TTransport#readAll/isOpen, and deprecate
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668899 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 00:52:26 +00:00
Kevin Clark
aaf6e38fce
Style tweaks
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668895 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 00:51:06 +00:00
Kevin Clark
32a1114a64
add simple Ruby HTTP server and client classes
...
Using Mongrel for the server.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668894 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 00:50:44 +00:00
Kevin Clark
52f23fa2a8
Clean up Ruby TTransport defs
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668893 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 00:50:24 +00:00
Kevin Clark
a37d90e6cb
Add tests for Ruby TTransport. Only require .rb files in ruby tests.
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668892 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 00:50:00 +00:00
Kevin Clark
104584ee7f
add additional entrypoint to TThreadPoolServer with easy exception handling
...
An additional method #serve_rescuable is added, which relays any exceptions
that happen in worker threads to the caller, where they can be handled
directly. 'retry' works too, allowing code like:
begin
server.rescuable_serve
rescue StandardError => e
puts "got exception: #{e.inspect}"
## do something
retry
end
The semantics of TThreadPoolServer#serve remain the same.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668891 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 00:49:38 +00:00
David Reiss
68ccc699a3
Move Ruby fielded object creation from generated constructor to ThriftStruct
...
Rather than the generated code needing to handle simple fielded
creation of objects, the ThriftStruct module constructor is extended to
handle hash arguments. Statements such as
o = ThriftObject.new :field1 => value1, :field2 => value2, ...
are supported as before, and the string form,
o = ThriftObject.new "field1" => value1, "field2" => value2, ...
disabled by the previous patch now also works.
Placing this code in the module is also just a cleaner solution.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665502 13f79535-47bb-0310-9956-ffa450edef68
2008-02-26 06:40:22 +00:00
David Reiss
0c90f6f8af
Thrift: Whitespace cleanup.
...
Summary:
- Expanded tabs to spaces where spaces were the norm.
- Deleted almost all trailing whitespace.
- Added newlines to the ends of a few files.
- Ran dos2unix on one file or two.
Reviewed By: mcslee
Test Plan: git diff -b
Revert Plan: ok
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665467 13f79535-47bb-0310-9956-ffa450edef68
2008-02-06 22:18:40 +00:00
David Reiss
e4667378c4
Thrift/Ruby: Bug fix.
...
Summary:
Some member variables were actually being treated as local variables.
Reviewed By: mcslee
Test Plan: None.
Revert Plan: ok
Other Notes:
Actually reviewed by Kevin Clark.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665462 13f79535-47bb-0310-9956-ffa450edef68
2008-02-06 18:22:39 +00:00
David Reiss
f09b8a01b1
Thrift/Ruby: TSimpleServer closes its listen socket on an uncaught exception.
...
Submitted by William Morgan.
Approved by Kevin Clark.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665444 13f79535-47bb-0310-9956-ffa450edef68
2008-01-28 20:46:53 +00:00
David Reiss
fe6d1488eb
Thrift/Ruby: Remove a debugging message.
...
Submitted by William Morgan.
Approved by Kevin Clark.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665443 13f79535-47bb-0310-9956-ffa450edef68
2008-01-28 20:46:50 +00:00
David Reiss
41911a5166
Thrift: Better exception handling in Ruby.
...
Reviewed By: mcslee
Test Plan: None.
Revert Plan: ok
Other Notes:
Submitted by William Morgan.
Approved by Kevin Clark.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665442 13f79535-47bb-0310-9956-ffa450edef68
2008-01-25 20:12:26 +00:00
David Reiss
0e87ef7ae7
Thrift: Some sort of Ruby performance fix.
...
Reviewed By: mcslee
Test Plan: None.
Revert Plan: ok
Other Notes:
Submitted by Dave Simpson.
Approved by Kevin Clark.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665441 13f79535-47bb-0310-9956-ffa450edef68
2008-01-25 20:05:50 +00:00
Christopher Piro
a9a4d481e0
[thrift] Ruby TThreadedServer and TThreadPoolServer
...
Summary: They both use the same handler for all connections and thus assume the handler is thread-safe. The TThreadPoolServer preserves threads, so it wouldn't be too hard to make a variant that used a separate handler for each thread and thus didn't require thread safety.
Reviewed By: mcslee
Test Plan: loads without error
Revert Plan: ok
Other Notes: contributed by William Morgan (w@adap.tv )
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665438 13f79535-47bb-0310-9956-ffa450edef68
2008-01-18 21:35:34 +00:00
Mark Slee
89f5716421
Ruby default values patch
...
Summary: Submitted by Dan Sully, reviewed by Kevin Clark
Reviewed By: dreiss
Test Plan: New ruby generated code with default vals, and new test scripts
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665418 13f79535-47bb-0310-9956-ffa450edef68
2008-01-10 00:53:08 +00:00
Mark Slee
677ffc5044
Private methods called not via self.
...
Summary: Because self. puts you in public scope
Reviewed By: mcslee
Test Plan: Use Ruby framed transport
Other Notes: Submitted by Jake Luciani
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665397 13f79535-47bb-0310-9956-ffa450edef68
2007-12-18 02:06:44 +00:00
Mark Slee
3f14d3ebec
Merge Ruby framed transport
...
Summary: Submitted by Jake Luciani
Reviewed By: mcslee
Test Plan: Test code included in this commit
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665385 13f79535-47bb-0310-9956-ffa450edef68
2007-12-05 23:13:11 +00:00
Mark Slee
3e098b1757
Fix handling of ruby write parameters due to nil vs false
...
Summary: Need to check for != nil, not just boolean expression
Reviewed By: mcslee
Test Plan: Send a boolean "false" value
Other Notes: Patch submitted by Patrick Collison
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665310 13f79535-47bb-0310-9956-ffa450edef68
2007-10-30 16:55:47 +00:00
Mark Slee
58dfb4fbe8
Lots of Ruby code generation improvements
...
Summary: Submitted by Kevin Clark, Ruby guru from Powerset
Reviewed By: mcslee
Test Plan: He updated the tests in trunk/test/rb/
Notes: The code is now officially "ruby-ish" and idiomatic
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665151 13f79535-47bb-0310-9956-ffa450edef68
2007-07-06 02:45:25 +00:00
Christopher Piro
7ef673345b
[thrift] small typo in tserver.rb
...
Summary: s:procotol:protocol:g
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665149 13f79535-47bb-0310-9956-ffa450edef68
2007-07-02 06:35:10 +00:00
Mark Slee
0e1100c921
Ruby TBinaryProtocol fix
...
Summary: VERSION_1 | type, not &, wrong binary operator
Reviewed By: binary
Test Plan: TestClient.rb
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665141 13f79535-47bb-0310-9956-ffa450edef68
2007-06-23 00:08:13 +00:00
Mark Slee
808454ec63
Thrift TBinaryProtocol change
...
Summary: New Thrift TBinaryProtocol with a version identifier
Reviewed By: aditya, eugene
Test Plan: Modify your services to have strictRead_ and strictWrite_ both set to FALSE. Then redeploy your services and test running clients against them. Once you have clients and servers running stably on this new code, you should redploy versions with strictWrite_ set to TRUE. Once that's all good, we can set strictRead_ to TRUE as well, and eventually deprecate the old protocol code entirely.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665138 13f79535-47bb-0310-9956-ffa450edef68
2007-06-20 21:51:57 +00:00
Mark Slee
7679196f1c
Various Thrift fixes, including Application Exception support in Ruby, better errror messages across languages, etc.
...
Reviewed By: thrift
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665058 13f79535-47bb-0310-9956-ffa450edef68
2007-03-14 02:47:35 +00:00
Mark Slee
54b7ab9b53
READMEs and DOCs and ant tasks, oh my
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665048 13f79535-47bb-0310-9956-ffa450edef68
2007-03-06 00:06:27 +00:00
Mark Slee
5ea15f9e32
Get rid of all the using namespace and using boost:: declarations in Thrift header files
...
Summary: To remove upstream dependencies. Still keeping some specific using directives around.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665047 13f79535-47bb-0310-9956-ffa450edef68
2007-03-05 22:55:59 +00:00
Mark Slee
43df5c5b8a
Applying Thrift license to ruby source
...
Reviewed By: ruby
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665034 13f79535-47bb-0310-9956-ffa450edef68
2007-03-01 00:34:42 +00:00
Mark Slee
e1165d4b18
Implement TSimpleServer in Ruby
...
Summary: It Works!
Reviewed By: tbr-doug
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664992 13f79535-47bb-0310-9956-ffa450edef68
2007-02-07 06:05:28 +00:00
Mark Slee
6d7d595858
Ruby support for Thrift
...
Summary: Just client support so far.
Reviewed By: tbr-doug
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664953 13f79535-47bb-0310-9956-ffa450edef68
2007-01-27 01:44:22 +00:00