thrift 0.0.751142 → 0.0.810255.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (113) hide show
  1. data/CHANGELOG +3 -1
  2. data/Manifest +47 -44
  3. data/README +19 -6
  4. data/Rakefile +1 -1
  5. data/benchmark/Benchmark.thrift +19 -0
  6. data/benchmark/benchmark.rb +20 -3
  7. data/benchmark/client.rb +20 -2
  8. data/benchmark/server.rb +22 -4
  9. data/benchmark/thin_server.rb +22 -4
  10. data/ext/binary_protocol_accelerated.c +32 -21
  11. data/ext/binary_protocol_accelerated.h +19 -0
  12. data/ext/compact_protocol.c +665 -0
  13. data/ext/compact_protocol.h +20 -0
  14. data/ext/constants.h +19 -1
  15. data/ext/extconf.rb +19 -0
  16. data/ext/macros.h +41 -0
  17. data/ext/memory_buffer.c +29 -5
  18. data/ext/memory_buffer.h +19 -0
  19. data/ext/protocol.c +20 -1
  20. data/ext/protocol.h +19 -0
  21. data/ext/struct.c +115 -83
  22. data/ext/struct.h +19 -0
  23. data/ext/thrift_native.c +23 -2
  24. data/lib/thrift/client.rb +19 -1
  25. data/lib/thrift/core_ext/fixnum.rb +29 -0
  26. data/lib/thrift/core_ext.rb +23 -0
  27. data/lib/thrift/exceptions.rb +19 -2
  28. data/lib/thrift/processor.rb +19 -1
  29. data/lib/thrift/protocol/base_protocol.rb +290 -0
  30. data/lib/thrift/protocol/{binaryprotocol.rb → binary_protocol.rb} +27 -15
  31. data/lib/thrift/protocol/binary_protocol_accelerated.rb +35 -0
  32. data/lib/thrift/protocol/compact_protocol.rb +422 -0
  33. data/lib/thrift/serializer/deserializer.rb +33 -0
  34. data/lib/thrift/serializer/serializer.rb +34 -0
  35. data/lib/thrift/server/base_server.rb +31 -0
  36. data/lib/thrift/server/{httpserver.rb → mongrel_http_server.rb} +19 -5
  37. data/lib/thrift/server/{nonblockingserver.rb → nonblocking_server.rb} +42 -24
  38. data/lib/thrift/server/simple_server.rb +43 -0
  39. data/lib/thrift/server/thread_pool_server.rb +75 -0
  40. data/lib/thrift/server/threaded_server.rb +47 -0
  41. data/lib/thrift/struct.rb +73 -47
  42. data/lib/thrift/thrift_native.rb +24 -0
  43. data/lib/thrift/transport/base_server_transport.rb +37 -0
  44. data/lib/thrift/transport/base_transport.rb +70 -0
  45. data/lib/thrift/transport/buffered_transport.rb +77 -0
  46. data/lib/thrift/transport/framed_transport.rb +90 -0
  47. data/lib/thrift/transport/http_client_transport.rb +45 -0
  48. data/lib/thrift/transport/io_stream_transport.rb +39 -0
  49. data/lib/thrift/transport/memory_buffer_transport.rb +96 -0
  50. data/lib/thrift/transport/server_socket.rb +63 -0
  51. data/lib/thrift/transport/socket.rb +22 -53
  52. data/lib/thrift/transport/unix_server_socket.rb +60 -0
  53. data/lib/thrift/transport/unix_socket.rb +40 -0
  54. data/lib/thrift/types.rb +20 -2
  55. data/lib/thrift.rb +50 -19
  56. data/script/proto_benchmark.rb +121 -0
  57. data/script/read_struct.rb +43 -0
  58. data/script/write_struct.rb +30 -0
  59. data/spec/ThriftSpec.thrift +40 -2
  60. data/spec/{protocol_spec.rb → base_protocol_spec.rb} +25 -7
  61. data/spec/{transport_spec.rb → base_transport_spec.rb} +44 -52
  62. data/spec/binary_protocol_accelerated_spec.rb +41 -0
  63. data/spec/{binaryprotocol_spec.rb → binary_protocol_spec.rb} +20 -2
  64. data/spec/{binaryprotocol_spec_shared.rb → binary_protocol_spec_shared.rb} +117 -16
  65. data/spec/client_spec.rb +23 -4
  66. data/spec/compact_protocol_spec.rb +117 -0
  67. data/spec/exception_spec.rb +19 -0
  68. data/spec/http_client_spec.rb +49 -0
  69. data/spec/{httpserver_spec.rb → mongrel_http_server_spec.rb} +26 -7
  70. data/spec/{nonblockingserver_spec.rb → nonblocking_server_spec.rb} +25 -5
  71. data/spec/processor_spec.rb +19 -0
  72. data/spec/serializer_spec.rb +27 -10
  73. data/spec/server_socket_spec.rb +80 -0
  74. data/spec/server_spec.rb +35 -16
  75. data/spec/socket_spec.rb +19 -55
  76. data/spec/socket_spec_shared.rb +19 -0
  77. data/spec/spec_helper.rb +34 -9
  78. data/spec/struct_spec.rb +26 -18
  79. data/spec/types_spec.rb +19 -1
  80. data/spec/{unixsocket_spec.rb → unix_socket_spec.rb} +19 -1
  81. data/thrift.gemspec +6 -6
  82. data.tar.gz.sig +0 -0
  83. metadata +80 -70
  84. metadata.gz.sig +0 -0
  85. data/COPYING +0 -14
  86. data/LICENSE +0 -14
  87. data/Makefile.am +0 -15
  88. data/benchmark/gen-rb/BenchmarkService.rb +0 -81
  89. data/benchmark/gen-rb/Benchmark_constants.rb +0 -11
  90. data/benchmark/gen-rb/Benchmark_types.rb +0 -10
  91. data/lib/thrift/deprecation.rb +0 -155
  92. data/lib/thrift/protocol/binaryprotocolaccelerated.rb +0 -19
  93. data/lib/thrift/protocol/tbinaryprotocol.rb +0 -2
  94. data/lib/thrift/protocol/tprotocol.rb +0 -2
  95. data/lib/thrift/protocol.rb +0 -270
  96. data/lib/thrift/serializer.rb +0 -27
  97. data/lib/thrift/server/thttpserver.rb +0 -2
  98. data/lib/thrift/server/tserver.rb +0 -2
  99. data/lib/thrift/server.rb +0 -135
  100. data/lib/thrift/thrift.rb +0 -14
  101. data/lib/thrift/transport/httpclient.rb +0 -29
  102. data/lib/thrift/transport/thttpclient.rb +0 -2
  103. data/lib/thrift/transport/tsocket.rb +0 -2
  104. data/lib/thrift/transport/ttransport.rb +0 -2
  105. data/lib/thrift/transport/unixsocket.rb +0 -58
  106. data/lib/thrift/transport.rb +0 -319
  107. data/spec/backwards_compatibility_spec.rb +0 -136
  108. data/spec/binaryprotocolaccelerated_spec.rb +0 -101
  109. data/spec/deprecation_spec.rb +0 -443
  110. data/spec/gen-rb/NonblockingService.rb +0 -268
  111. data/spec/gen-rb/ThriftSpec_constants.rb +0 -11
  112. data/spec/gen-rb/ThriftSpec_types.rb +0 -134
  113. data/spec/httpclient_spec.rb +0 -31
@@ -1,3 +1,22 @@
1
+ #
2
+ # Licensed to the Apache Software Foundation (ASF) under one
3
+ # or more contributor license agreements. See the NOTICE file
4
+ # distributed with this work for additional information
5
+ # regarding copyright ownership. The ASF licenses this file
6
+ # to you under the Apache License, Version 2.0 (the
7
+ # "License"); you may not use this file except in compliance
8
+ # with the License. You may obtain a copy of the License at
9
+ #
10
+ # http://www.apache.org/licenses/LICENSE-2.0
11
+ #
12
+ # Unless required by applicable law or agreed to in writing,
13
+ # software distributed under the License is distributed on an
14
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15
+ # KIND, either express or implied. See the License for the
16
+ # specific language governing permissions and limitations
17
+ # under the License.
18
+ #
19
+
1
20
  require File.dirname(__FILE__) + '/spec_helper'
2
21
 
3
22
  shared_examples_for "a socket" do
data/spec/spec_helper.rb CHANGED
@@ -1,3 +1,22 @@
1
+ #
2
+ # Licensed to the Apache Software Foundation (ASF) under one
3
+ # or more contributor license agreements. See the NOTICE file
4
+ # distributed with this work for additional information
5
+ # regarding copyright ownership. The ASF licenses this file
6
+ # to you under the Apache License, Version 2.0 (the
7
+ # "License"); you may not use this file except in compliance
8
+ # with the License. You may obtain a copy of the License at
9
+ #
10
+ # http://www.apache.org/licenses/LICENSE-2.0
11
+ #
12
+ # Unless required by applicable law or agreed to in writing,
13
+ # software distributed under the License is distributed on an
14
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15
+ # KIND, either express or implied. See the License for the
16
+ # specific language governing permissions and limitations
17
+ # under the License.
18
+ #
19
+
1
20
  require 'rubygems'
2
21
  # require at least 1.1.4 to fix a bug with describing Modules
3
22
  gem 'rspec', '>= 1.1.4'
@@ -5,17 +24,10 @@ require 'spec'
5
24
 
6
25
  $:.unshift File.join(File.dirname(__FILE__), *%w[.. ext])
7
26
 
8
- # pretend we already loaded fastthread, otherwise the nonblockingserver_spec
27
+ # pretend we already loaded fastthread, otherwise the nonblocking_server_spec
9
28
  # will get screwed up
10
29
  # $" << 'fastthread.bundle'
11
30
 
12
- # turn on deprecation so we can test it
13
- module Thrift
14
- # squelch any warnings if we happen to get required twice
15
- remove_const(:DEPRECATION) if const_defined? :DEPRECATION
16
- DEPRECATION = true
17
- end
18
-
19
31
  require File.dirname(__FILE__) + '/../lib/thrift'
20
32
 
21
33
  class Object
@@ -32,4 +44,17 @@ Spec::Runner.configure do |configuration|
32
44
  end
33
45
  end
34
46
 
35
- require "thrift_native"
47
+ $:.unshift File.join(File.dirname(__FILE__), *%w[.. debug_proto_test gen-rb])
48
+ require "srv"
49
+ require "debug_proto_test_constants"
50
+
51
+ $:.unshift File.join(File.dirname(__FILE__), *%w[gen-rb])
52
+ require 'thrift_spec_types'
53
+ require 'nonblocking_service'
54
+
55
+ module Fixtures
56
+ COMPACT_PROTOCOL_TEST_STRUCT = COMPACT_TEST.dup
57
+ COMPACT_PROTOCOL_TEST_STRUCT.a_binary = [0,1,2,3,4,5,6,7,8].pack('c*')
58
+ COMPACT_PROTOCOL_TEST_STRUCT.set_byte_map = nil
59
+ COMPACT_PROTOCOL_TEST_STRUCT.map_byte_map = nil
60
+ end
data/spec/struct_spec.rb CHANGED
@@ -1,7 +1,23 @@
1
- require File.dirname(__FILE__) + '/spec_helper'
2
- require File.dirname(__FILE__) + '/gen-rb/ThriftSpec_types'
1
+ #
2
+ # Licensed to the Apache Software Foundation (ASF) under one
3
+ # or more contributor license agreements. See the NOTICE file
4
+ # distributed with this work for additional information
5
+ # regarding copyright ownership. The ASF licenses this file
6
+ # to you under the Apache License, Version 2.0 (the
7
+ # "License"); you may not use this file except in compliance
8
+ # with the License. You may obtain a copy of the License at
9
+ #
10
+ # http://www.apache.org/licenses/LICENSE-2.0
11
+ #
12
+ # Unless required by applicable law or agreed to in writing,
13
+ # software distributed under the License is distributed on an
14
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15
+ # KIND, either express or implied. See the License for the
16
+ # specific language governing permissions and limitations
17
+ # under the License.
18
+ #
3
19
 
4
- # require "binaryprotocolaccelerated"
20
+ require File.dirname(__FILE__) + '/spec_helper'
5
21
 
6
22
  class ThriftStructSpec < Spec::ExampleGroup
7
23
  include Thrift
@@ -10,16 +26,8 @@ class ThriftStructSpec < Spec::ExampleGroup
10
26
  describe Struct do
11
27
  it "should iterate over all fields properly" do
12
28
  fields = {}
13
- Foo.new.each_field { |fid,type,name,default,optional| fields[fid] = [type,name,default,optional] }
14
- fields.should == {
15
- 1 => [Types::I32, 'simple', 53, nil],
16
- 2 => [Types::STRING, 'words', "words", nil],
17
- 3 => [Types::STRUCT, 'hello', Hello.new(:greeting => 'hello, world!'), nil],
18
- 4 => [Types::LIST, 'ints', [1, 2, 2, 3], nil],
19
- 5 => [Types::MAP, 'complex', nil, nil],
20
- 6 => [Types::SET, 'shorts', Set.new([5, 17, 239]), nil],
21
- 7 => [Types::STRING, 'opt_string', nil, true]
22
- }
29
+ Foo.new.each_field { |fid,field_info| fields[fid] = field_info }
30
+ fields.should == Foo::FIELDS
23
31
  end
24
32
 
25
33
  it "should initialize all fields to defaults" do
@@ -56,7 +64,7 @@ class ThriftStructSpec < Spec::ExampleGroup
56
64
 
57
65
  it "should read itself off the wire" do
58
66
  struct = Foo.new
59
- prot = Protocol.new(mock("transport"))
67
+ prot = BaseProtocol.new(mock("transport"))
60
68
  prot.should_receive(:read_struct_begin).twice
61
69
  prot.should_receive(:read_struct_end).twice
62
70
  prot.should_receive(:read_field_begin).and_return(
@@ -102,7 +110,7 @@ class ThriftStructSpec < Spec::ExampleGroup
102
110
 
103
111
  it "should skip unexpected fields in structs and use default values" do
104
112
  struct = Foo.new
105
- prot = Protocol.new(mock("transport"))
113
+ prot = BaseProtocol.new(mock("transport"))
106
114
  prot.should_receive(:read_struct_begin)
107
115
  prot.should_receive(:read_struct_end)
108
116
  prot.should_receive(:read_field_begin).and_return(
@@ -132,7 +140,7 @@ class ThriftStructSpec < Spec::ExampleGroup
132
140
  end
133
141
 
134
142
  it "should write itself to the wire" do
135
- prot = Protocol.new(mock("transport")) #mock("Protocol")
143
+ prot = BaseProtocol.new(mock("transport")) #mock("Protocol")
136
144
  prot.should_receive(:write_struct_begin).with("SpecNamespace::Foo")
137
145
  prot.should_receive(:write_struct_begin).with("SpecNamespace::Hello")
138
146
  prot.should_receive(:write_struct_end).twice
@@ -207,7 +215,7 @@ class ThriftStructSpec < Spec::ExampleGroup
207
215
  e.message.should == "something happened"
208
216
  e.code.should == 1
209
217
  # ensure it gets serialized properly, this is the really important part
210
- prot = Protocol.new(mock("trans"))
218
+ prot = BaseProtocol.new(mock("trans"))
211
219
  prot.should_receive(:write_struct_begin).with("SpecNamespace::Xception")
212
220
  prot.should_receive(:write_struct_end)
213
221
  prot.should_receive(:write_field_begin).with('message', Types::STRING, 1)#, "something happened")
@@ -227,7 +235,7 @@ class ThriftStructSpec < Spec::ExampleGroup
227
235
  rescue Thrift::Exception => e
228
236
  e.message.should == "something happened"
229
237
  e.code.should == 5
230
- prot = Protocol.new(mock("trans"))
238
+ prot = BaseProtocol.new(mock("trans"))
231
239
  prot.should_receive(:write_struct_begin).with("SpecNamespace::Xception")
232
240
  prot.should_receive(:write_struct_end)
233
241
  prot.should_receive(:write_field_begin).with('message', Types::STRING, 1)
data/spec/types_spec.rb CHANGED
@@ -1,5 +1,23 @@
1
+ #
2
+ # Licensed to the Apache Software Foundation (ASF) under one
3
+ # or more contributor license agreements. See the NOTICE file
4
+ # distributed with this work for additional information
5
+ # regarding copyright ownership. The ASF licenses this file
6
+ # to you under the Apache License, Version 2.0 (the
7
+ # "License"); you may not use this file except in compliance
8
+ # with the License. You may obtain a copy of the License at
9
+ #
10
+ # http://www.apache.org/licenses/LICENSE-2.0
11
+ #
12
+ # Unless required by applicable law or agreed to in writing,
13
+ # software distributed under the License is distributed on an
14
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15
+ # KIND, either express or implied. See the License for the
16
+ # specific language governing permissions and limitations
17
+ # under the License.
18
+ #
19
+
1
20
  require File.dirname(__FILE__) + '/spec_helper'
2
- require File.dirname(__FILE__) + '/gen-rb/ThriftSpec_types'
3
21
 
4
22
  class ThriftTypesSpec < Spec::ExampleGroup
5
23
  include Thrift
@@ -1,5 +1,23 @@
1
+ #
2
+ # Licensed to the Apache Software Foundation (ASF) under one
3
+ # or more contributor license agreements. See the NOTICE file
4
+ # distributed with this work for additional information
5
+ # regarding copyright ownership. The ASF licenses this file
6
+ # to you under the Apache License, Version 2.0 (the
7
+ # "License"); you may not use this file except in compliance
8
+ # with the License. You may obtain a copy of the License at
9
+ #
10
+ # http://www.apache.org/licenses/LICENSE-2.0
11
+ #
12
+ # Unless required by applicable law or agreed to in writing,
13
+ # software distributed under the License is distributed on an
14
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15
+ # KIND, either express or implied. See the License for the
16
+ # specific language governing permissions and limitations
17
+ # under the License.
18
+ #
19
+
1
20
  require File.dirname(__FILE__) + '/spec_helper'
2
- require 'thrift/transport/unixsocket'
3
21
  require File.dirname(__FILE__) + "/socket_spec_shared"
4
22
 
5
23
  class ThriftUNIXSocketSpec < Spec::ExampleGroup
data/thrift.gemspec CHANGED
@@ -2,24 +2,24 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{thrift}
5
- s.version = "0.0.751142"
5
+ s.version = "0.0.810255.1"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Kevin Ballard, Kevin Clark, Mark Slee, Evan Weaver"]
9
9
  s.cert_chain = ["/Users/eweaver/p/configuration/gem_certificates/evan_weaver-original-public_cert.pem"]
10
- s.date = %q{2010-02-22}
11
- s.description = %q{Ruby libraries for Thrift (a language-agnostic RPC system)}
10
+ s.date = %q{2009-11-18}
11
+ s.description = %q{Ruby libraries for Thrift, with fixes.}
12
12
  s.email = %q{}
13
13
  s.extensions = ["ext/extconf.rb"]
14
- s.extra_rdoc_files = ["CHANGELOG", "COPYING", "LICENSE", "README", "ext/binary_protocol_accelerated.c", "ext/binary_protocol_accelerated.h", "ext/constants.h", "ext/extconf.rb", "ext/memory_buffer.c", "ext/memory_buffer.h", "ext/protocol.c", "ext/protocol.h", "ext/struct.c", "ext/struct.h", "ext/thrift_native.c", "lib/thrift.rb", "lib/thrift/client.rb", "lib/thrift/deprecation.rb", "lib/thrift/exceptions.rb", "lib/thrift/processor.rb", "lib/thrift/protocol.rb", "lib/thrift/protocol/binaryprotocol.rb", "lib/thrift/protocol/binaryprotocolaccelerated.rb", "lib/thrift/protocol/tbinaryprotocol.rb", "lib/thrift/protocol/tprotocol.rb", "lib/thrift/serializer.rb", "lib/thrift/server.rb", "lib/thrift/server/httpserver.rb", "lib/thrift/server/nonblockingserver.rb", "lib/thrift/server/thttpserver.rb", "lib/thrift/server/tserver.rb", "lib/thrift/struct.rb", "lib/thrift/thrift.rb", "lib/thrift/transport.rb", "lib/thrift/transport/httpclient.rb", "lib/thrift/transport/socket.rb", "lib/thrift/transport/thttpclient.rb", "lib/thrift/transport/tsocket.rb", "lib/thrift/transport/ttransport.rb", "lib/thrift/transport/unixsocket.rb", "lib/thrift/types.rb"]
15
- s.files = ["CHANGELOG", "COPYING", "LICENSE", "Makefile.am", "Manifest", "README", "Rakefile", "benchmark/Benchmark.thrift", "benchmark/benchmark.rb", "benchmark/client.rb", "benchmark/gen-rb/BenchmarkService.rb", "benchmark/gen-rb/Benchmark_constants.rb", "benchmark/gen-rb/Benchmark_types.rb", "benchmark/server.rb", "benchmark/thin_server.rb", "ext/binary_protocol_accelerated.c", "ext/binary_protocol_accelerated.h", "ext/constants.h", "ext/extconf.rb", "ext/memory_buffer.c", "ext/memory_buffer.h", "ext/protocol.c", "ext/protocol.h", "ext/struct.c", "ext/struct.h", "ext/thrift_native.c", "lib/thrift.rb", "lib/thrift/client.rb", "lib/thrift/deprecation.rb", "lib/thrift/exceptions.rb", "lib/thrift/processor.rb", "lib/thrift/protocol.rb", "lib/thrift/protocol/binaryprotocol.rb", "lib/thrift/protocol/binaryprotocolaccelerated.rb", "lib/thrift/protocol/tbinaryprotocol.rb", "lib/thrift/protocol/tprotocol.rb", "lib/thrift/serializer.rb", "lib/thrift/server.rb", "lib/thrift/server/httpserver.rb", "lib/thrift/server/nonblockingserver.rb", "lib/thrift/server/thttpserver.rb", "lib/thrift/server/tserver.rb", "lib/thrift/struct.rb", "lib/thrift/thrift.rb", "lib/thrift/transport.rb", "lib/thrift/transport/httpclient.rb", "lib/thrift/transport/socket.rb", "lib/thrift/transport/thttpclient.rb", "lib/thrift/transport/tsocket.rb", "lib/thrift/transport/ttransport.rb", "lib/thrift/transport/unixsocket.rb", "lib/thrift/types.rb", "setup.rb", "spec/ThriftSpec.thrift", "spec/backwards_compatibility_spec.rb", "spec/binaryprotocol_spec.rb", "spec/binaryprotocol_spec_shared.rb", "spec/binaryprotocolaccelerated_spec.rb", "spec/client_spec.rb", "spec/deprecation_spec.rb", "spec/exception_spec.rb", "spec/gen-rb/NonblockingService.rb", "spec/gen-rb/ThriftSpec_constants.rb", "spec/gen-rb/ThriftSpec_types.rb", "spec/httpclient_spec.rb", "spec/httpserver_spec.rb", "spec/nonblockingserver_spec.rb", "spec/processor_spec.rb", "spec/protocol_spec.rb", "spec/serializer_spec.rb", "spec/server_spec.rb", "spec/socket_spec.rb", "spec/socket_spec_shared.rb", "spec/spec_helper.rb", "spec/struct_spec.rb", "spec/transport_spec.rb", "spec/types_spec.rb", "spec/unixsocket_spec.rb", "thrift.gemspec"]
14
+ s.extra_rdoc_files = ["CHANGELOG", "README", "ext/binary_protocol_accelerated.c", "ext/binary_protocol_accelerated.h", "ext/compact_protocol.c", "ext/compact_protocol.h", "ext/constants.h", "ext/extconf.rb", "ext/macros.h", "ext/memory_buffer.c", "ext/memory_buffer.h", "ext/protocol.c", "ext/protocol.h", "ext/struct.c", "ext/struct.h", "ext/thrift_native.c", "lib/thrift.rb", "lib/thrift/client.rb", "lib/thrift/core_ext.rb", "lib/thrift/exceptions.rb", "lib/thrift/processor.rb", "lib/thrift/struct.rb", "lib/thrift/thrift_native.rb", "lib/thrift/types.rb", "lib/thrift/core_ext/fixnum.rb", "lib/thrift/protocol/base_protocol.rb", "lib/thrift/protocol/binary_protocol.rb", "lib/thrift/protocol/binary_protocol_accelerated.rb", "lib/thrift/protocol/compact_protocol.rb", "lib/thrift/serializer/deserializer.rb", "lib/thrift/serializer/serializer.rb", "lib/thrift/server/base_server.rb", "lib/thrift/server/mongrel_http_server.rb", "lib/thrift/server/nonblocking_server.rb", "lib/thrift/server/simple_server.rb", "lib/thrift/server/thread_pool_server.rb", "lib/thrift/server/threaded_server.rb", "lib/thrift/transport/base_server_transport.rb", "lib/thrift/transport/base_transport.rb", "lib/thrift/transport/buffered_transport.rb", "lib/thrift/transport/framed_transport.rb", "lib/thrift/transport/http_client_transport.rb", "lib/thrift/transport/io_stream_transport.rb", "lib/thrift/transport/memory_buffer_transport.rb", "lib/thrift/transport/server_socket.rb", "lib/thrift/transport/socket.rb", "lib/thrift/transport/unix_server_socket.rb", "lib/thrift/transport/unix_socket.rb"]
15
+ s.files = ["CHANGELOG", "Manifest", "Rakefile", "README", "setup.rb", "benchmark/benchmark.rb", "benchmark/Benchmark.thrift", "benchmark/client.rb", "benchmark/server.rb", "benchmark/thin_server.rb", "ext/binary_protocol_accelerated.c", "ext/binary_protocol_accelerated.h", "ext/compact_protocol.c", "ext/compact_protocol.h", "ext/constants.h", "ext/extconf.rb", "ext/macros.h", "ext/memory_buffer.c", "ext/memory_buffer.h", "ext/protocol.c", "ext/protocol.h", "ext/struct.c", "ext/struct.h", "ext/thrift_native.c", "lib/thrift.rb", "lib/thrift/client.rb", "lib/thrift/core_ext.rb", "lib/thrift/exceptions.rb", "lib/thrift/processor.rb", "lib/thrift/struct.rb", "lib/thrift/thrift_native.rb", "lib/thrift/types.rb", "lib/thrift/core_ext/fixnum.rb", "lib/thrift/protocol/base_protocol.rb", "lib/thrift/protocol/binary_protocol.rb", "lib/thrift/protocol/binary_protocol_accelerated.rb", "lib/thrift/protocol/compact_protocol.rb", "lib/thrift/serializer/deserializer.rb", "lib/thrift/serializer/serializer.rb", "lib/thrift/server/base_server.rb", "lib/thrift/server/mongrel_http_server.rb", "lib/thrift/server/nonblocking_server.rb", "lib/thrift/server/simple_server.rb", "lib/thrift/server/thread_pool_server.rb", "lib/thrift/server/threaded_server.rb", "lib/thrift/transport/base_server_transport.rb", "lib/thrift/transport/base_transport.rb", "lib/thrift/transport/buffered_transport.rb", "lib/thrift/transport/framed_transport.rb", "lib/thrift/transport/http_client_transport.rb", "lib/thrift/transport/io_stream_transport.rb", "lib/thrift/transport/memory_buffer_transport.rb", "lib/thrift/transport/server_socket.rb", "lib/thrift/transport/socket.rb", "lib/thrift/transport/unix_server_socket.rb", "lib/thrift/transport/unix_socket.rb", "script/proto_benchmark.rb", "script/read_struct.rb", "script/write_struct.rb", "spec/base_protocol_spec.rb", "spec/base_transport_spec.rb", "spec/binary_protocol_accelerated_spec.rb", "spec/binary_protocol_spec.rb", "spec/binary_protocol_spec_shared.rb", "spec/client_spec.rb", "spec/compact_protocol_spec.rb", "spec/exception_spec.rb", "spec/http_client_spec.rb", "spec/mongrel_http_server_spec.rb", "spec/nonblocking_server_spec.rb", "spec/processor_spec.rb", "spec/serializer_spec.rb", "spec/server_socket_spec.rb", "spec/server_spec.rb", "spec/socket_spec.rb", "spec/socket_spec_shared.rb", "spec/spec_helper.rb", "spec/struct_spec.rb", "spec/ThriftSpec.thrift", "spec/types_spec.rb", "spec/unix_socket_spec.rb", "thrift.gemspec"]
16
16
  s.homepage = %q{http://blog.evanweaver.com/files/doc/fauna/thrift/}
17
17
  s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Thrift", "--main", "README"]
18
18
  s.require_paths = ["lib", "ext"]
19
19
  s.rubyforge_project = %q{fauna}
20
20
  s.rubygems_version = %q{1.3.5}
21
21
  s.signing_key = %q{/Users/eweaver/p/configuration/gem_certificates/evan_weaver-original-private_key.pem}
22
- s.summary = %q{Ruby libraries for Thrift (a language-agnostic RPC system)}
22
+ s.summary = %q{Ruby libraries for Thrift, with fixes.}
23
23
 
24
24
  if s.respond_to? :specification_version then
25
25
  current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thrift
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.751142
4
+ version: 0.0.810255.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin Ballard, Kevin Clark, Mark Slee, Evan Weaver
@@ -30,11 +30,11 @@ cert_chain:
30
30
  yZ0=
31
31
  -----END CERTIFICATE-----
32
32
 
33
- date: 2010-02-22 00:00:00 -08:00
33
+ date: 2009-11-18 00:00:00 -08:00
34
34
  default_executable:
35
35
  dependencies: []
36
36
 
37
- description: Ruby libraries for Thrift (a language-agnostic RPC system)
37
+ description: Ruby libraries for Thrift, with fixes.
38
38
  email: ""
39
39
  executables: []
40
40
 
@@ -42,13 +42,14 @@ extensions:
42
42
  - ext/extconf.rb
43
43
  extra_rdoc_files:
44
44
  - CHANGELOG
45
- - COPYING
46
- - LICENSE
47
45
  - README
48
46
  - ext/binary_protocol_accelerated.c
49
47
  - ext/binary_protocol_accelerated.h
48
+ - ext/compact_protocol.c
49
+ - ext/compact_protocol.h
50
50
  - ext/constants.h
51
51
  - ext/extconf.rb
52
+ - ext/macros.h
52
53
  - ext/memory_buffer.c
53
54
  - ext/memory_buffer.h
54
55
  - ext/protocol.c
@@ -58,50 +59,54 @@ extra_rdoc_files:
58
59
  - ext/thrift_native.c
59
60
  - lib/thrift.rb
60
61
  - lib/thrift/client.rb
61
- - lib/thrift/deprecation.rb
62
+ - lib/thrift/core_ext.rb
62
63
  - lib/thrift/exceptions.rb
63
64
  - lib/thrift/processor.rb
64
- - lib/thrift/protocol.rb
65
- - lib/thrift/protocol/binaryprotocol.rb
66
- - lib/thrift/protocol/binaryprotocolaccelerated.rb
67
- - lib/thrift/protocol/tbinaryprotocol.rb
68
- - lib/thrift/protocol/tprotocol.rb
69
- - lib/thrift/serializer.rb
70
- - lib/thrift/server.rb
71
- - lib/thrift/server/httpserver.rb
72
- - lib/thrift/server/nonblockingserver.rb
73
- - lib/thrift/server/thttpserver.rb
74
- - lib/thrift/server/tserver.rb
75
65
  - lib/thrift/struct.rb
76
- - lib/thrift/thrift.rb
77
- - lib/thrift/transport.rb
78
- - lib/thrift/transport/httpclient.rb
79
- - lib/thrift/transport/socket.rb
80
- - lib/thrift/transport/thttpclient.rb
81
- - lib/thrift/transport/tsocket.rb
82
- - lib/thrift/transport/ttransport.rb
83
- - lib/thrift/transport/unixsocket.rb
66
+ - lib/thrift/thrift_native.rb
84
67
  - lib/thrift/types.rb
68
+ - lib/thrift/core_ext/fixnum.rb
69
+ - lib/thrift/protocol/base_protocol.rb
70
+ - lib/thrift/protocol/binary_protocol.rb
71
+ - lib/thrift/protocol/binary_protocol_accelerated.rb
72
+ - lib/thrift/protocol/compact_protocol.rb
73
+ - lib/thrift/serializer/deserializer.rb
74
+ - lib/thrift/serializer/serializer.rb
75
+ - lib/thrift/server/base_server.rb
76
+ - lib/thrift/server/mongrel_http_server.rb
77
+ - lib/thrift/server/nonblocking_server.rb
78
+ - lib/thrift/server/simple_server.rb
79
+ - lib/thrift/server/thread_pool_server.rb
80
+ - lib/thrift/server/threaded_server.rb
81
+ - lib/thrift/transport/base_server_transport.rb
82
+ - lib/thrift/transport/base_transport.rb
83
+ - lib/thrift/transport/buffered_transport.rb
84
+ - lib/thrift/transport/framed_transport.rb
85
+ - lib/thrift/transport/http_client_transport.rb
86
+ - lib/thrift/transport/io_stream_transport.rb
87
+ - lib/thrift/transport/memory_buffer_transport.rb
88
+ - lib/thrift/transport/server_socket.rb
89
+ - lib/thrift/transport/socket.rb
90
+ - lib/thrift/transport/unix_server_socket.rb
91
+ - lib/thrift/transport/unix_socket.rb
85
92
  files:
86
93
  - CHANGELOG
87
- - COPYING
88
- - LICENSE
89
- - Makefile.am
90
94
  - Manifest
91
- - README
92
95
  - Rakefile
93
- - benchmark/Benchmark.thrift
96
+ - README
97
+ - setup.rb
94
98
  - benchmark/benchmark.rb
99
+ - benchmark/Benchmark.thrift
95
100
  - benchmark/client.rb
96
- - benchmark/gen-rb/BenchmarkService.rb
97
- - benchmark/gen-rb/Benchmark_constants.rb
98
- - benchmark/gen-rb/Benchmark_types.rb
99
101
  - benchmark/server.rb
100
102
  - benchmark/thin_server.rb
101
103
  - ext/binary_protocol_accelerated.c
102
104
  - ext/binary_protocol_accelerated.h
105
+ - ext/compact_protocol.c
106
+ - ext/compact_protocol.h
103
107
  - ext/constants.h
104
108
  - ext/extconf.rb
109
+ - ext/macros.h
105
110
  - ext/memory_buffer.c
106
111
  - ext/memory_buffer.h
107
112
  - ext/protocol.c
@@ -111,56 +116,61 @@ files:
111
116
  - ext/thrift_native.c
112
117
  - lib/thrift.rb
113
118
  - lib/thrift/client.rb
114
- - lib/thrift/deprecation.rb
119
+ - lib/thrift/core_ext.rb
115
120
  - lib/thrift/exceptions.rb
116
121
  - lib/thrift/processor.rb
117
- - lib/thrift/protocol.rb
118
- - lib/thrift/protocol/binaryprotocol.rb
119
- - lib/thrift/protocol/binaryprotocolaccelerated.rb
120
- - lib/thrift/protocol/tbinaryprotocol.rb
121
- - lib/thrift/protocol/tprotocol.rb
122
- - lib/thrift/serializer.rb
123
- - lib/thrift/server.rb
124
- - lib/thrift/server/httpserver.rb
125
- - lib/thrift/server/nonblockingserver.rb
126
- - lib/thrift/server/thttpserver.rb
127
- - lib/thrift/server/tserver.rb
128
122
  - lib/thrift/struct.rb
129
- - lib/thrift/thrift.rb
130
- - lib/thrift/transport.rb
131
- - lib/thrift/transport/httpclient.rb
132
- - lib/thrift/transport/socket.rb
133
- - lib/thrift/transport/thttpclient.rb
134
- - lib/thrift/transport/tsocket.rb
135
- - lib/thrift/transport/ttransport.rb
136
- - lib/thrift/transport/unixsocket.rb
123
+ - lib/thrift/thrift_native.rb
137
124
  - lib/thrift/types.rb
138
- - setup.rb
139
- - spec/ThriftSpec.thrift
140
- - spec/backwards_compatibility_spec.rb
141
- - spec/binaryprotocol_spec.rb
142
- - spec/binaryprotocol_spec_shared.rb
143
- - spec/binaryprotocolaccelerated_spec.rb
125
+ - lib/thrift/core_ext/fixnum.rb
126
+ - lib/thrift/protocol/base_protocol.rb
127
+ - lib/thrift/protocol/binary_protocol.rb
128
+ - lib/thrift/protocol/binary_protocol_accelerated.rb
129
+ - lib/thrift/protocol/compact_protocol.rb
130
+ - lib/thrift/serializer/deserializer.rb
131
+ - lib/thrift/serializer/serializer.rb
132
+ - lib/thrift/server/base_server.rb
133
+ - lib/thrift/server/mongrel_http_server.rb
134
+ - lib/thrift/server/nonblocking_server.rb
135
+ - lib/thrift/server/simple_server.rb
136
+ - lib/thrift/server/thread_pool_server.rb
137
+ - lib/thrift/server/threaded_server.rb
138
+ - lib/thrift/transport/base_server_transport.rb
139
+ - lib/thrift/transport/base_transport.rb
140
+ - lib/thrift/transport/buffered_transport.rb
141
+ - lib/thrift/transport/framed_transport.rb
142
+ - lib/thrift/transport/http_client_transport.rb
143
+ - lib/thrift/transport/io_stream_transport.rb
144
+ - lib/thrift/transport/memory_buffer_transport.rb
145
+ - lib/thrift/transport/server_socket.rb
146
+ - lib/thrift/transport/socket.rb
147
+ - lib/thrift/transport/unix_server_socket.rb
148
+ - lib/thrift/transport/unix_socket.rb
149
+ - script/proto_benchmark.rb
150
+ - script/read_struct.rb
151
+ - script/write_struct.rb
152
+ - spec/base_protocol_spec.rb
153
+ - spec/base_transport_spec.rb
154
+ - spec/binary_protocol_accelerated_spec.rb
155
+ - spec/binary_protocol_spec.rb
156
+ - spec/binary_protocol_spec_shared.rb
144
157
  - spec/client_spec.rb
145
- - spec/deprecation_spec.rb
158
+ - spec/compact_protocol_spec.rb
146
159
  - spec/exception_spec.rb
147
- - spec/gen-rb/NonblockingService.rb
148
- - spec/gen-rb/ThriftSpec_constants.rb
149
- - spec/gen-rb/ThriftSpec_types.rb
150
- - spec/httpclient_spec.rb
151
- - spec/httpserver_spec.rb
152
- - spec/nonblockingserver_spec.rb
160
+ - spec/http_client_spec.rb
161
+ - spec/mongrel_http_server_spec.rb
162
+ - spec/nonblocking_server_spec.rb
153
163
  - spec/processor_spec.rb
154
- - spec/protocol_spec.rb
155
164
  - spec/serializer_spec.rb
165
+ - spec/server_socket_spec.rb
156
166
  - spec/server_spec.rb
157
167
  - spec/socket_spec.rb
158
168
  - spec/socket_spec_shared.rb
159
169
  - spec/spec_helper.rb
160
170
  - spec/struct_spec.rb
161
- - spec/transport_spec.rb
171
+ - spec/ThriftSpec.thrift
162
172
  - spec/types_spec.rb
163
- - spec/unixsocket_spec.rb
173
+ - spec/unix_socket_spec.rb
164
174
  - thrift.gemspec
165
175
  has_rdoc: true
166
176
  homepage: http://blog.evanweaver.com/files/doc/fauna/thrift/
@@ -195,6 +205,6 @@ rubyforge_project: fauna
195
205
  rubygems_version: 1.3.5
196
206
  signing_key:
197
207
  specification_version: 3
198
- summary: Ruby libraries for Thrift (a language-agnostic RPC system)
208
+ summary: Ruby libraries for Thrift, with fixes.
199
209
  test_files: []
200
210
 
metadata.gz.sig CHANGED
Binary file
data/COPYING DELETED
@@ -1,14 +0,0 @@
1
- Apache Software License
2
- Copyright (c) 2006- Facebook, Inc. et al.
3
-
4
- Licensed under the Apache License, Version 2.0 (the "License");
5
- you may not use this file except in compliance with the License.
6
- You may obtain a copy of the License at
7
-
8
- http://www.apache.org/licenses/LICENSE-2.0
9
-
10
- Unless required by applicable law or agreed to in writing, software
11
- distributed under the License is distributed on an "AS IS" BASIS,
12
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- See the License for the specific language governing permissions and
14
- limitations under the License.
data/LICENSE DELETED
@@ -1,14 +0,0 @@
1
- Apache Software License
2
- Copyright (c) 2006- Facebook, Inc. et al.
3
-
4
- Licensed under the Apache License, Version 2.0 (the "License");
5
- you may not use this file except in compliance with the License.
6
- You may obtain a copy of the License at
7
-
8
- http://www.apache.org/licenses/LICENSE-2.0
9
-
10
- Unless required by applicable law or agreed to in writing, software
11
- distributed under the License is distributed on an "AS IS" BASIS,
12
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- See the License for the specific language governing permissions and
14
- limitations under the License.
data/Makefile.am DELETED
@@ -1,15 +0,0 @@
1
- EXTRA_DIST = setup.rb lib ext
2
-
3
- all-local:
4
- $(RUBY) setup.rb config
5
- $(RUBY) setup.rb setup
6
-
7
- install-exec-hook:
8
- $(RUBY) setup.rb install
9
-
10
- # Make sure this doesn't fail if Ruby is not configured.
11
- clean-local:
12
- RUBY=$(RUBY) ; if test -z "$$RUBY" ; then RUBY=: ; fi ; \
13
- $$RUBY setup.rb clean
14
-
15
- check-local: all
@@ -1,81 +0,0 @@
1
- #
2
- # Autogenerated by Thrift
3
- #
4
- # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
- #
6
-
7
- require 'thrift'
8
- require 'thrift/protocol'
9
- require File.dirname(__FILE__) + '/Benchmark_types'
10
-
11
- module ThriftBenchmark
12
- module BenchmarkService
13
- class Client
14
- include ::Thrift::Client
15
-
16
- def fibonacci(n)
17
- send_fibonacci(n)
18
- return recv_fibonacci()
19
- end
20
-
21
- def send_fibonacci(n)
22
- send_message('fibonacci', Fibonacci_args, :n => n)
23
- end
24
-
25
- def recv_fibonacci()
26
- result = receive_message(Fibonacci_result)
27
- return result.success unless result.success.nil?
28
- raise Thrift::ApplicationException.new(Thrift::ApplicationException::MISSING_RESULT, 'fibonacci failed: unknown result')
29
- end
30
-
31
- end
32
-
33
- class Processor
34
- include ::Thrift::Processor
35
-
36
- def process_fibonacci(seqid, iprot, oprot)
37
- args = read_args(iprot, Fibonacci_args)
38
- result = Fibonacci_result.new()
39
- result.success = @handler.fibonacci(args.n)
40
- write_result(result, oprot, 'fibonacci', seqid)
41
- end
42
-
43
- end
44
-
45
- # HELPER FUNCTIONS AND STRUCTURES
46
-
47
- class Fibonacci_args
48
- include ::Thrift::Struct
49
- N = 1
50
-
51
- Thrift::Struct.field_accessor self, :n
52
- FIELDS = {
53
- N => {:type => Thrift::Types::BYTE, :name => 'n'}
54
- }
55
-
56
- def struct_fields; FIELDS; end
57
-
58
- def validate
59
- end
60
-
61
- end
62
-
63
- class Fibonacci_result
64
- include ::Thrift::Struct
65
- SUCCESS = 0
66
-
67
- Thrift::Struct.field_accessor self, :success
68
- FIELDS = {
69
- SUCCESS => {:type => Thrift::Types::I32, :name => 'success'}
70
- }
71
-
72
- def struct_fields; FIELDS; end
73
-
74
- def validate
75
- end
76
-
77
- end
78
-
79
- end
80
-
81
- end
@@ -1,11 +0,0 @@
1
- #
2
- # Autogenerated by Thrift
3
- #
4
- # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
- #
6
-
7
- require 'thrift/protocol'
8
- require File.dirname(__FILE__) + '/Benchmark_types'
9
-
10
- module ThriftBenchmark
11
- end
@@ -1,10 +0,0 @@
1
- #
2
- # Autogenerated by Thrift
3
- #
4
- # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
- #
6
-
7
- require 'thrift/protocol'
8
-
9
- module ThriftBenchmark
10
- end