upfluence-thrift 1.0.11 → 2.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/thrift.rb +6 -4
- data/lib/thrift/client.rb +31 -1
- data/lib/thrift/definition.rb +64 -0
- data/lib/thrift/exceptions.rb +5 -5
- data/lib/thrift/middleware.rb +50 -0
- data/lib/thrift/processor.rb +3 -3
- data/lib/thrift/protocol/json_protocol.rb +6 -6
- data/lib/thrift/server/rack_application.rb +30 -19
- data/lib/thrift/struct.rb +10 -10
- data/lib/thrift/transport/base_transport.rb +9 -7
- data/lib/thrift/transport/server_socket.rb +6 -6
- data/lib/thrift/types.rb +4 -4
- data/lib/thrift/types/known/any.rb +179 -0
- data/lib/thrift/types/known/any_constants.rb +17 -0
- data/lib/thrift/types/known/any_types.rb +43 -0
- data/lib/thrift/types/known/duration.rb +27 -0
- data/lib/thrift/types/known/duration_constants.rb +17 -0
- data/lib/thrift/types/known/duration_types.rb +43 -0
- data/lib/thrift/types/known/timestamp.rb +31 -0
- data/lib/thrift/types/known/timestamp_constants.rb +17 -0
- data/lib/thrift/types/known/timestamp_types.rb +43 -0
- data/lib/thrift/types/value.rb +114 -0
- data/lib/thrift/types/value_constants.rb +15 -0
- data/lib/thrift/types/value_types.rb +213 -0
- data/spec/binary_protocol_spec_shared.rb +57 -60
- data/spec/client_spec.rb +2 -2
- data/spec/compact_protocol_spec.rb +26 -20
- data/spec/http_client_spec.rb +7 -20
- data/spec/nonblocking_server_spec.rb +1 -1
- data/spec/processor_spec.rb +1 -1
- data/spec/rack_application_spec.rb +1 -1
- data/spec/struct_spec.rb +2 -2
- data/spec/types/known/any_spec.rb +44 -0
- data/spec/types/known/duration_spec.rb +20 -0
- data/spec/types/known/timestamp_spec.rb +17 -0
- data/spec/types/value_spec.rb +43 -0
- data/spec/types_spec.rb +2 -2
- metadata +50 -87
- data/benchmark/gen-rb/benchmark_constants.rb +0 -11
- data/benchmark/gen-rb/benchmark_service.rb +0 -80
- data/benchmark/gen-rb/benchmark_types.rb +0 -10
- data/spec/gen-rb/base/base_service.rb +0 -80
- data/spec/gen-rb/base/base_service_constants.rb +0 -11
- data/spec/gen-rb/base/base_service_types.rb +0 -26
- data/spec/gen-rb/extended/extended_service.rb +0 -78
- data/spec/gen-rb/extended/extended_service_constants.rb +0 -11
- data/spec/gen-rb/extended/extended_service_types.rb +0 -12
- data/spec/gen-rb/flat/namespaced_nonblocking_service.rb +0 -272
- data/spec/gen-rb/flat/referenced_constants.rb +0 -11
- data/spec/gen-rb/flat/referenced_types.rb +0 -17
- data/spec/gen-rb/flat/thrift_namespaced_spec_constants.rb +0 -11
- data/spec/gen-rb/flat/thrift_namespaced_spec_types.rb +0 -28
- data/spec/gen-rb/namespaced_spec_namespace/namespaced_nonblocking_service.rb +0 -272
- data/spec/gen-rb/namespaced_spec_namespace/thrift_namespaced_spec_constants.rb +0 -11
- data/spec/gen-rb/namespaced_spec_namespace/thrift_namespaced_spec_types.rb +0 -28
- data/spec/gen-rb/nonblocking_service.rb +0 -272
- data/spec/gen-rb/other_namespace/referenced_constants.rb +0 -11
- data/spec/gen-rb/other_namespace/referenced_types.rb +0 -17
- data/spec/gen-rb/thrift_spec_constants.rb +0 -11
- data/spec/gen-rb/thrift_spec_types.rb +0 -538
- data/test/debug_proto/gen-rb/debug_proto_test_constants.rb +0 -274
- data/test/debug_proto/gen-rb/debug_proto_test_types.rb +0 -761
- data/test/debug_proto/gen-rb/empty_service.rb +0 -24
- data/test/debug_proto/gen-rb/inherited.rb +0 -79
- data/test/debug_proto/gen-rb/reverse_order_service.rb +0 -82
- data/test/debug_proto/gen-rb/service_for_exception_with_a_map.rb +0 -81
- data/test/debug_proto/gen-rb/srv.rb +0 -330
data/spec/client_spec.rb
CHANGED
@@ -37,7 +37,7 @@ describe 'Client' do
|
|
37
37
|
end
|
38
38
|
|
39
39
|
it "should send a test message" do
|
40
|
-
@prot.should_receive(:write_message_begin).with('testMessage', Thrift::MessageTypes::CALL,
|
40
|
+
@prot.should_receive(:write_message_begin).with('testMessage', Thrift::MessageTypes::CALL, 1)
|
41
41
|
mock_args = mock('#<TestMessage_args:mock>')
|
42
42
|
mock_args.should_receive(:foo=).with('foo')
|
43
43
|
mock_args.should_receive(:bar=).with(42)
|
@@ -66,7 +66,7 @@ describe 'Client' do
|
|
66
66
|
end
|
67
67
|
|
68
68
|
it "should receive a test message" do
|
69
|
-
@prot.should_receive(:read_message_begin).and_return [nil, Thrift::MessageTypes::
|
69
|
+
@prot.should_receive(:read_message_begin).and_return [nil, Thrift::MessageTypes::REPLY, 0]
|
70
70
|
@prot.should_receive(:read_message_end)
|
71
71
|
mock_klass = mock("#<MockClass:mock>")
|
72
72
|
mock_klass.should_receive(:read).with(@prot)
|
@@ -31,14 +31,14 @@ describe Thrift::CompactProtocol do
|
|
31
31
|
:double => [0.0, 1.0, -1.0, 1.1, -1.1, 10000000.1, 1.0/0.0, -1.0/0.0],
|
32
32
|
:bool => [true, false]
|
33
33
|
}
|
34
|
-
|
34
|
+
|
35
35
|
it "should encode and decode naked primitives correctly" do
|
36
36
|
TESTS.each_pair do |primitive_type, test_values|
|
37
37
|
test_values.each do |value|
|
38
38
|
# puts "testing #{value}" if primitive_type == :i64
|
39
39
|
trans = Thrift::MemoryBufferTransport.new
|
40
40
|
proto = Thrift::CompactProtocol.new(trans)
|
41
|
-
|
41
|
+
|
42
42
|
proto.send(writer(primitive_type), value)
|
43
43
|
# puts "buf: #{trans.inspect_buffer}" if primitive_type == :i64
|
44
44
|
read_back = proto.send(reader(primitive_type))
|
@@ -46,7 +46,7 @@ describe Thrift::CompactProtocol do
|
|
46
46
|
end
|
47
47
|
end
|
48
48
|
end
|
49
|
-
|
49
|
+
|
50
50
|
it "should encode and decode primitives in fields correctly" do
|
51
51
|
TESTS.each_pair do |primitive_type, test_values|
|
52
52
|
final_primitive_type = primitive_type == :binary ? :string : primitive_type
|
@@ -80,32 +80,38 @@ describe Thrift::CompactProtocol do
|
|
80
80
|
struct.write(proto)
|
81
81
|
|
82
82
|
struct2 = CompactProtoTestStruct.new
|
83
|
-
struct2.read(proto)
|
83
|
+
struct2.read(proto)
|
84
84
|
struct2.should == struct
|
85
85
|
end
|
86
86
|
|
87
|
-
|
88
|
-
|
87
|
+
xit "should make method calls correctly" do
|
88
|
+
r1, w1 = IO.pipe
|
89
|
+
r2, w2 = IO.pipe
|
90
|
+
client_out_trans = Thrift::IOStreamTransport.new(r2, w1)
|
89
91
|
client_out_proto = Thrift::CompactProtocol.new(client_out_trans)
|
90
92
|
|
91
|
-
client_in_trans = Thrift::
|
93
|
+
client_in_trans = Thrift::IOStreamTransport.new(r1, w2)
|
92
94
|
client_in_proto = Thrift::CompactProtocol.new(client_in_trans)
|
93
95
|
|
94
96
|
processor = Srv::Processor.new(JankyHandler.new)
|
95
97
|
|
96
|
-
client = Srv::Client.new(
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
98
|
+
client = Srv::Client.new(
|
99
|
+
Thrift::BaseClient.new(client_in_proto, client_out_proto)
|
100
|
+
)
|
101
|
+
|
102
|
+
t = Thread.new { processor.process(client_in_proto, client_out_proto) }
|
103
|
+
|
104
|
+
client.Janky(1).should == 2
|
105
|
+
|
106
|
+
t.join
|
101
107
|
end
|
102
|
-
|
108
|
+
|
103
109
|
it "should deal with fields following fields that have non-delta ids" do
|
104
110
|
brcp = BreaksRubyCompactProtocol.new(
|
105
|
-
:field1 => "blah",
|
111
|
+
:field1 => "blah",
|
106
112
|
:field2 => BigFieldIdStruct.new(
|
107
|
-
:field1 => "string1",
|
108
|
-
:field2 => "string2"),
|
113
|
+
:field1 => "string1",
|
114
|
+
:field2 => "string2"),
|
109
115
|
:field3 => 3)
|
110
116
|
ser = Thrift::Serializer.new(Thrift::CompactProtocolFactory.new)
|
111
117
|
bytes = ser.serialize(brcp)
|
@@ -115,7 +121,7 @@ describe Thrift::CompactProtocol do
|
|
115
121
|
deser.deserialize(brcp2, bytes)
|
116
122
|
brcp2.should == brcp
|
117
123
|
end
|
118
|
-
|
124
|
+
|
119
125
|
it "should deserialize an empty map to an empty hash" do
|
120
126
|
struct = SingleMapTestStruct.new(:i32_map => {})
|
121
127
|
ser = Thrift::Serializer.new(Thrift::CompactProtocolFactory.new)
|
@@ -126,17 +132,17 @@ describe Thrift::CompactProtocol do
|
|
126
132
|
deser.deserialize(struct2, bytes)
|
127
133
|
struct.should == struct2
|
128
134
|
end
|
129
|
-
|
135
|
+
|
130
136
|
class JankyHandler
|
131
137
|
def Janky(i32arg)
|
132
138
|
i32arg * 2
|
133
139
|
end
|
134
140
|
end
|
135
|
-
|
141
|
+
|
136
142
|
def writer(sym)
|
137
143
|
"write_#{sym.to_s}"
|
138
144
|
end
|
139
|
-
|
145
|
+
|
140
146
|
def reader(sym)
|
141
147
|
"read_#{sym.to_s}"
|
142
148
|
end
|
data/spec/http_client_spec.rb
CHANGED
@@ -23,7 +23,10 @@ describe 'Thrift::HTTPClientTransport' do
|
|
23
23
|
|
24
24
|
describe Thrift::HTTPClientTransport do
|
25
25
|
before(:each) do
|
26
|
-
@client = Thrift::HTTPClientTransport.new(
|
26
|
+
@client = Thrift::HTTPClientTransport.new(
|
27
|
+
"http://my.domain.com/path/to/service?param=value",
|
28
|
+
retries: 0
|
29
|
+
)
|
27
30
|
end
|
28
31
|
|
29
32
|
it "should always be open" do
|
@@ -41,6 +44,7 @@ describe 'Thrift::HTTPClientTransport' do
|
|
41
44
|
http.should_receive(:post).with("/path/to/service?param=value", "a test frame", {"Content-Type"=>"application/x-thrift"}).and_return do
|
42
45
|
mock("Net::HTTPOK").tap do |response|
|
43
46
|
response.should_receive(:body).and_return "data"
|
47
|
+
response.should_receive(:value).and_return nil
|
44
48
|
end
|
45
49
|
end
|
46
50
|
end
|
@@ -48,25 +52,6 @@ describe 'Thrift::HTTPClientTransport' do
|
|
48
52
|
@client.flush
|
49
53
|
@client.read(10).should == "data"
|
50
54
|
end
|
51
|
-
|
52
|
-
it "should send custom headers if defined" do
|
53
|
-
@client.write "test"
|
54
|
-
custom_headers = {"Cookie" => "Foo"}
|
55
|
-
headers = {"Content-Type"=>"application/x-thrift"}.merge(custom_headers)
|
56
|
-
|
57
|
-
@client.add_headers(custom_headers)
|
58
|
-
Net::HTTP.should_receive(:new).with("my.domain.com", 80).and_return do
|
59
|
-
mock("Net::HTTP").tap do |http|
|
60
|
-
http.should_receive(:use_ssl=).with(false)
|
61
|
-
http.should_receive(:post).with("/path/to/service?param=value", "test", headers).and_return do
|
62
|
-
mock("Net::HTTPOK").tap do |response|
|
63
|
-
response.should_receive(:body).and_return "data"
|
64
|
-
end
|
65
|
-
end
|
66
|
-
end
|
67
|
-
end
|
68
|
-
@client.flush
|
69
|
-
end
|
70
55
|
end
|
71
56
|
|
72
57
|
describe 'ssl enabled' do
|
@@ -88,6 +73,7 @@ describe 'Thrift::HTTPClientTransport' do
|
|
88
73
|
"Content-Type" => "application/x-thrift").and_return do
|
89
74
|
mock("Net::HTTPOK").tap do |response|
|
90
75
|
response.should_receive(:body).and_return "data"
|
76
|
+
response.should_receive(:value).and_return nil
|
91
77
|
end
|
92
78
|
end
|
93
79
|
end
|
@@ -109,6 +95,7 @@ describe 'Thrift::HTTPClientTransport' do
|
|
109
95
|
"Content-Type" => "application/x-thrift").and_return do
|
110
96
|
mock("Net::HTTPOK").tap do |response|
|
111
97
|
response.should_receive(:body).and_return "data"
|
98
|
+
response.should_receive(:value).and_return nil
|
112
99
|
end
|
113
100
|
end
|
114
101
|
end
|
data/spec/processor_spec.rb
CHANGED
@@ -45,7 +45,7 @@ describe 'Processor' do
|
|
45
45
|
@processor.process(@prot, @prot).should == true
|
46
46
|
end
|
47
47
|
|
48
|
-
|
48
|
+
xit "should raise an ApplicationException when the received message cannot be processed" do
|
49
49
|
@prot.should_receive(:read_message_begin).ordered.and_return ['testMessage', Thrift::MessageTypes::CALL, 4]
|
50
50
|
@prot.should_receive(:skip).with(Thrift::Types::STRUCT).ordered
|
51
51
|
@prot.should_receive(:read_message_end).ordered
|
@@ -57,7 +57,7 @@ describe Thrift::RackApplication do
|
|
57
57
|
|
58
58
|
it 'creates an IOStreamTransport' do
|
59
59
|
header('Content-Type', "application/x-thrift")
|
60
|
-
Thrift::IOStreamTransport.should_receive(:new).with(an_instance_of(
|
60
|
+
Thrift::IOStreamTransport.should_receive(:new).with(an_instance_of(StringIO), an_instance_of(Rack::Response))
|
61
61
|
post "/"
|
62
62
|
end
|
63
63
|
|
data/spec/struct_spec.rb
CHANGED
@@ -227,7 +227,7 @@ describe 'Struct' do
|
|
227
227
|
it "should support optional type-checking in Thrift::Struct.new" do
|
228
228
|
Thrift.type_checking = true
|
229
229
|
begin
|
230
|
-
lambda { SpecNamespace::Hello.new(:greeting => 3) }.should raise_error(Thrift::TypeError, "Expected Types::STRING, received
|
230
|
+
lambda { SpecNamespace::Hello.new(:greeting => 3) }.should raise_error(Thrift::TypeError, "Expected Types::STRING, received Integer for field greeting")
|
231
231
|
ensure
|
232
232
|
Thrift.type_checking = false
|
233
233
|
end
|
@@ -238,7 +238,7 @@ describe 'Struct' do
|
|
238
238
|
Thrift.type_checking = true
|
239
239
|
begin
|
240
240
|
hello = SpecNamespace::Hello.new
|
241
|
-
lambda { hello.greeting = 3 }.should raise_error(Thrift::TypeError, "Expected Types::STRING, received
|
241
|
+
lambda { hello.greeting = 3 }.should raise_error(Thrift::TypeError, "Expected Types::STRING, received Integer for field greeting")
|
242
242
|
ensure
|
243
243
|
Thrift.type_checking = false
|
244
244
|
end
|
@@ -0,0 +1,44 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'thrift/types/value'
|
3
|
+
require 'thrift/types/known/any'
|
4
|
+
|
5
|
+
describe 'Thrift::Types::Known::Any' do
|
6
|
+
describe 'encode' do
|
7
|
+
let(:codec) { '' }
|
8
|
+
|
9
|
+
shared_examples 'idempotent' do
|
10
|
+
it 'should be idempotent' do
|
11
|
+
Thrift::Types::Known::Any.from_object(obj, codec).to_object.should == obj
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
subject { Thrift::Types::Known::Any.from_object(obj, codec) }
|
16
|
+
|
17
|
+
context 'thrift struct' do
|
18
|
+
let(:obj) { Thrift::Types::Value.from_object("foo") }
|
19
|
+
|
20
|
+
it { subject.type.should == 'thrift/types.value.Value' }
|
21
|
+
it { subject.value.should == '{"2":{"str":"foo"}}' }
|
22
|
+
|
23
|
+
include_examples 'idempotent'
|
24
|
+
|
25
|
+
context 'yaml only' do
|
26
|
+
let(:codec) { 'yaml' }
|
27
|
+
|
28
|
+
it { subject.type.should == 'thrift-yaml/types.value.Value' }
|
29
|
+
it { subject.value.should == "string_value: foo\n" }
|
30
|
+
|
31
|
+
include_examples 'idempotent'
|
32
|
+
end
|
33
|
+
|
34
|
+
context 'json only' do
|
35
|
+
let(:codec) { 'json' }
|
36
|
+
|
37
|
+
it { subject.type.should == 'thrift-json/types.value.Value' }
|
38
|
+
it { subject.value.should == '{"string_value":"foo"}' }
|
39
|
+
|
40
|
+
include_examples 'idempotent'
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'thrift/types/known/duration'
|
3
|
+
|
4
|
+
describe 'Thrift::Types::Known::Duration' do
|
5
|
+
context 'from_number' do
|
6
|
+
it 'from float' do
|
7
|
+
d = Thrift::Types::Known::Duration.from_number(2.0005)
|
8
|
+
|
9
|
+
d.seconds.should == 2
|
10
|
+
d.nanos.should == 500_000
|
11
|
+
end
|
12
|
+
|
13
|
+
it 'from int' do
|
14
|
+
d = Thrift::Types::Known::Duration.from_number(127)
|
15
|
+
|
16
|
+
d.seconds.should == 127
|
17
|
+
d.nanos.should == 0
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'thrift/types/known/timestamp'
|
3
|
+
|
4
|
+
describe 'Thrift::Types::Known::Timestamp' do
|
5
|
+
context 'from_time' do
|
6
|
+
it do
|
7
|
+
t = Time.at(137, 5, :nsec)
|
8
|
+
|
9
|
+
tt = Thrift::Types::Known::Timestamp.from_time(t)
|
10
|
+
|
11
|
+
tt.seconds.should == 137
|
12
|
+
tt.nanos.should == 5
|
13
|
+
|
14
|
+
tt.to_time.should == t
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,43 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'json'
|
3
|
+
require 'thrift/types/value'
|
4
|
+
|
5
|
+
class LocalObject
|
6
|
+
def initialize(foo, bar)
|
7
|
+
@foo, @bar = foo, bar
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
describe 'Thrift::Types::Value' do
|
12
|
+
describe 'from_object' do
|
13
|
+
subject do
|
14
|
+
Thrift::Serializer.new(
|
15
|
+
Thrift::JsonProtocolFactory.new
|
16
|
+
).serialize(Thrift::Types::Value.from_object(obj))
|
17
|
+
end
|
18
|
+
|
19
|
+
describe 'utf-8 string' do
|
20
|
+
let(:obj) { 'foo' }
|
21
|
+
|
22
|
+
it do
|
23
|
+
subject.should == "{\"2\":{\"str\":\"foo\"}}"
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
describe 'complex hash' do
|
28
|
+
let(:obj) { { foo: true, baz: 0.5, buz: 1 } }
|
29
|
+
|
30
|
+
it do
|
31
|
+
subject.should == "{\"8\":{\"rec\":{\"1\":{\"lst\":[\"rec\",3,{\"1\":{\"rec\":{\"2\":{\"str\":\"foo\"}}},\"2\":{\"rec\":{\"6\":{\"tf\":1}}}},{\"1\":{\"rec\":{\"2\":{\"str\":\"baz\"}}},\"2\":{\"rec\":{\"5\":{\"dbl\":0.5}}}},{\"1\":{\"rec\":{\"2\":{\"str\":\"buz\"}}},\"2\":{\"rec\":{\"4\":{\"i64\":1}}}}]}}}}"
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
describe 'object' do
|
36
|
+
let(:obj) { LocalObject.new(1, true) }
|
37
|
+
|
38
|
+
it do
|
39
|
+
subject.should == "{\"9\":{\"rec\":{\"1\":{\"map\":[\"str\",\"rec\",2,{\"foo\":{\"4\":{\"i64\":1}},\"bar\":{\"6\":{\"tf\":1}}}]}}}}"
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
data/spec/types_spec.rb
CHANGED
@@ -97,9 +97,9 @@ describe Thrift::Types do
|
|
97
97
|
end
|
98
98
|
|
99
99
|
it "should give the Thrift::TypeError a readable message" do
|
100
|
-
msg = "Expected Types::STRING, received
|
100
|
+
msg = "Expected Types::STRING, received Integer for field foo"
|
101
101
|
lambda { Thrift.check_type(3, {:type => Thrift::Types::STRING}, :foo) }.should raise_error(Thrift::TypeError, msg)
|
102
|
-
msg = "Expected Types::STRING, received
|
102
|
+
msg = "Expected Types::STRING, received Integer for field foo.element"
|
103
103
|
field = {:type => Thrift::Types::LIST, :element => {:type => Thrift::Types::STRING}}
|
104
104
|
lambda { Thrift.check_type([3], field, :foo) }.should raise_error(Thrift::TypeError, msg)
|
105
105
|
msg = "Expected Types::I32, received NilClass for field foo.element.key"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: upfluence-thrift
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thrift Developers
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-04-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -28,30 +28,30 @@ dependencies:
|
|
28
28
|
name: rack
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rack-test
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 0
|
47
|
+
version: '0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - "
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 0
|
54
|
+
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: thin
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -94,20 +94,6 @@ dependencies:
|
|
94
94
|
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
|
-
- !ruby/object:Gem::Dependency
|
98
|
-
name: statsd-ruby
|
99
|
-
requirement: !ruby/object:Gem::Requirement
|
100
|
-
requirements:
|
101
|
-
- - ">="
|
102
|
-
- !ruby/object:Gem::Version
|
103
|
-
version: '0'
|
104
|
-
type: :runtime
|
105
|
-
prerelease: false
|
106
|
-
version_requirements: !ruby/object:Gem::Requirement
|
107
|
-
requirements:
|
108
|
-
- - ">="
|
109
|
-
- !ruby/object:Gem::Version
|
110
|
-
version: '0'
|
111
97
|
description: Ruby bindings for the Apache Thrift RPC system
|
112
98
|
email:
|
113
99
|
- dev@thrift.apache.org
|
@@ -138,9 +124,22 @@ extra_rdoc_files:
|
|
138
124
|
- lib/thrift/core_ext.rb
|
139
125
|
- lib/thrift/struct_union.rb
|
140
126
|
- lib/thrift/struct.rb
|
127
|
+
- lib/thrift/middleware.rb
|
141
128
|
- lib/thrift/union.rb
|
142
129
|
- lib/thrift/serializer/serializer.rb
|
143
130
|
- lib/thrift/serializer/deserializer.rb
|
131
|
+
- lib/thrift/types/value.rb
|
132
|
+
- lib/thrift/types/value_constants.rb
|
133
|
+
- lib/thrift/types/value_types.rb
|
134
|
+
- lib/thrift/types/known/any_types.rb
|
135
|
+
- lib/thrift/types/known/any.rb
|
136
|
+
- lib/thrift/types/known/timestamp.rb
|
137
|
+
- lib/thrift/types/known/timestamp_types.rb
|
138
|
+
- lib/thrift/types/known/any_constants.rb
|
139
|
+
- lib/thrift/types/known/timestamp_constants.rb
|
140
|
+
- lib/thrift/types/known/duration.rb
|
141
|
+
- lib/thrift/types/known/duration_types.rb
|
142
|
+
- lib/thrift/types/known/duration_constants.rb
|
144
143
|
- lib/thrift/transport/base_server_transport.rb
|
145
144
|
- lib/thrift/transport/framed_transport.rb
|
146
145
|
- lib/thrift/transport/socket.rb
|
@@ -154,6 +153,7 @@ extra_rdoc_files:
|
|
154
153
|
- lib/thrift/transport/http_client_transport.rb
|
155
154
|
- lib/thrift/bytes.rb
|
156
155
|
- lib/thrift/core_ext/fixnum.rb
|
156
|
+
- lib/thrift/definition.rb
|
157
157
|
- lib/thrift/multiplexed_processor.rb
|
158
158
|
- lib/thrift/thrift_native.rb
|
159
159
|
- lib/thrift/exceptions.rb
|
@@ -181,9 +181,6 @@ files:
|
|
181
181
|
- benchmark/Benchmark.thrift
|
182
182
|
- benchmark/benchmark.rb
|
183
183
|
- benchmark/client.rb
|
184
|
-
- benchmark/gen-rb/benchmark_constants.rb
|
185
|
-
- benchmark/gen-rb/benchmark_service.rb
|
186
|
-
- benchmark/gen-rb/benchmark_types.rb
|
187
184
|
- benchmark/server.rb
|
188
185
|
- benchmark/thin_server.rb
|
189
186
|
- ext/binary_protocol_accelerated.c
|
@@ -209,8 +206,10 @@ files:
|
|
209
206
|
- lib/thrift/client.rb
|
210
207
|
- lib/thrift/core_ext.rb
|
211
208
|
- lib/thrift/core_ext/fixnum.rb
|
209
|
+
- lib/thrift/definition.rb
|
212
210
|
- lib/thrift/exceptions.rb
|
213
211
|
- lib/thrift/metrics.rb
|
212
|
+
- lib/thrift/middleware.rb
|
214
213
|
- lib/thrift/multiplexed_processor.rb
|
215
214
|
- lib/thrift/processor.rb
|
216
215
|
- lib/thrift/protocol/base_protocol.rb
|
@@ -245,6 +244,18 @@ files:
|
|
245
244
|
- lib/thrift/transport/unix_server_socket.rb
|
246
245
|
- lib/thrift/transport/unix_socket.rb
|
247
246
|
- lib/thrift/types.rb
|
247
|
+
- lib/thrift/types/known/any.rb
|
248
|
+
- lib/thrift/types/known/any_constants.rb
|
249
|
+
- lib/thrift/types/known/any_types.rb
|
250
|
+
- lib/thrift/types/known/duration.rb
|
251
|
+
- lib/thrift/types/known/duration_constants.rb
|
252
|
+
- lib/thrift/types/known/duration_types.rb
|
253
|
+
- lib/thrift/types/known/timestamp.rb
|
254
|
+
- lib/thrift/types/known/timestamp_constants.rb
|
255
|
+
- lib/thrift/types/known/timestamp_types.rb
|
256
|
+
- lib/thrift/types/value.rb
|
257
|
+
- lib/thrift/types/value_constants.rb
|
258
|
+
- lib/thrift/types/value_types.rb
|
248
259
|
- lib/thrift/union.rb
|
249
260
|
- spec/BaseService.thrift
|
250
261
|
- spec/ExtendedService.thrift
|
@@ -261,25 +272,6 @@ files:
|
|
261
272
|
- spec/compact_protocol_spec.rb
|
262
273
|
- spec/exception_spec.rb
|
263
274
|
- spec/flat_spec.rb
|
264
|
-
- spec/gen-rb/base/base_service.rb
|
265
|
-
- spec/gen-rb/base/base_service_constants.rb
|
266
|
-
- spec/gen-rb/base/base_service_types.rb
|
267
|
-
- spec/gen-rb/extended/extended_service.rb
|
268
|
-
- spec/gen-rb/extended/extended_service_constants.rb
|
269
|
-
- spec/gen-rb/extended/extended_service_types.rb
|
270
|
-
- spec/gen-rb/flat/namespaced_nonblocking_service.rb
|
271
|
-
- spec/gen-rb/flat/referenced_constants.rb
|
272
|
-
- spec/gen-rb/flat/referenced_types.rb
|
273
|
-
- spec/gen-rb/flat/thrift_namespaced_spec_constants.rb
|
274
|
-
- spec/gen-rb/flat/thrift_namespaced_spec_types.rb
|
275
|
-
- spec/gen-rb/namespaced_spec_namespace/namespaced_nonblocking_service.rb
|
276
|
-
- spec/gen-rb/namespaced_spec_namespace/thrift_namespaced_spec_constants.rb
|
277
|
-
- spec/gen-rb/namespaced_spec_namespace/thrift_namespaced_spec_types.rb
|
278
|
-
- spec/gen-rb/nonblocking_service.rb
|
279
|
-
- spec/gen-rb/other_namespace/referenced_constants.rb
|
280
|
-
- spec/gen-rb/other_namespace/referenced_types.rb
|
281
|
-
- spec/gen-rb/thrift_spec_constants.rb
|
282
|
-
- spec/gen-rb/thrift_spec_types.rb
|
283
275
|
- spec/http_client_spec.rb
|
284
276
|
- spec/json_protocol_spec.rb
|
285
277
|
- spec/namespaced_spec.rb
|
@@ -295,21 +287,18 @@ files:
|
|
295
287
|
- spec/struct_nested_containers_spec.rb
|
296
288
|
- spec/struct_spec.rb
|
297
289
|
- spec/thin_http_server_spec.rb
|
290
|
+
- spec/types/known/any_spec.rb
|
291
|
+
- spec/types/known/duration_spec.rb
|
292
|
+
- spec/types/known/timestamp_spec.rb
|
293
|
+
- spec/types/value_spec.rb
|
298
294
|
- spec/types_spec.rb
|
299
295
|
- spec/union_spec.rb
|
300
296
|
- spec/unix_socket_spec.rb
|
301
|
-
- test/debug_proto/gen-rb/debug_proto_test_constants.rb
|
302
|
-
- test/debug_proto/gen-rb/debug_proto_test_types.rb
|
303
|
-
- test/debug_proto/gen-rb/empty_service.rb
|
304
|
-
- test/debug_proto/gen-rb/inherited.rb
|
305
|
-
- test/debug_proto/gen-rb/reverse_order_service.rb
|
306
|
-
- test/debug_proto/gen-rb/service_for_exception_with_a_map.rb
|
307
|
-
- test/debug_proto/gen-rb/srv.rb
|
308
297
|
homepage: http://thrift.apache.org
|
309
298
|
licenses:
|
310
299
|
- Apache 2.0
|
311
300
|
metadata: {}
|
312
|
-
post_install_message:
|
301
|
+
post_install_message:
|
313
302
|
rdoc_options:
|
314
303
|
- "--line-numbers"
|
315
304
|
- "--inline-source"
|
@@ -331,19 +320,11 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
331
320
|
- !ruby/object:Gem::Version
|
332
321
|
version: '0'
|
333
322
|
requirements: []
|
334
|
-
|
335
|
-
|
336
|
-
signing_key:
|
323
|
+
rubygems_version: 3.0.3
|
324
|
+
signing_key:
|
337
325
|
specification_version: 4
|
338
326
|
summary: Ruby bindings for Apache Thrift
|
339
327
|
test_files:
|
340
|
-
- test/debug_proto/gen-rb/debug_proto_test_constants.rb
|
341
|
-
- test/debug_proto/gen-rb/debug_proto_test_types.rb
|
342
|
-
- test/debug_proto/gen-rb/service_for_exception_with_a_map.rb
|
343
|
-
- test/debug_proto/gen-rb/inherited.rb
|
344
|
-
- test/debug_proto/gen-rb/reverse_order_service.rb
|
345
|
-
- test/debug_proto/gen-rb/empty_service.rb
|
346
|
-
- test/debug_proto/gen-rb/srv.rb
|
347
328
|
- spec/ThriftSpec.thrift
|
348
329
|
- spec/struct_nested_containers_spec.rb
|
349
330
|
- spec/http_client_spec.rb
|
@@ -353,6 +334,10 @@ test_files:
|
|
353
334
|
- spec/compact_protocol_spec.rb
|
354
335
|
- spec/base_protocol_spec.rb
|
355
336
|
- spec/client_spec.rb
|
337
|
+
- spec/types/value_spec.rb
|
338
|
+
- spec/types/known/timestamp_spec.rb
|
339
|
+
- spec/types/known/duration_spec.rb
|
340
|
+
- spec/types/known/any_spec.rb
|
356
341
|
- spec/server_spec.rb
|
357
342
|
- spec/server_socket_spec.rb
|
358
343
|
- spec/bytes_spec.rb
|
@@ -365,25 +350,6 @@ test_files:
|
|
365
350
|
- spec/unix_socket_spec.rb
|
366
351
|
- spec/ExtendedService.thrift
|
367
352
|
- spec/types_spec.rb
|
368
|
-
- spec/gen-rb/flat/thrift_namespaced_spec_constants.rb
|
369
|
-
- spec/gen-rb/flat/namespaced_nonblocking_service.rb
|
370
|
-
- spec/gen-rb/flat/referenced_constants.rb
|
371
|
-
- spec/gen-rb/flat/referenced_types.rb
|
372
|
-
- spec/gen-rb/flat/thrift_namespaced_spec_types.rb
|
373
|
-
- spec/gen-rb/other_namespace/referenced_constants.rb
|
374
|
-
- spec/gen-rb/other_namespace/referenced_types.rb
|
375
|
-
- spec/gen-rb/extended/extended_service.rb
|
376
|
-
- spec/gen-rb/extended/extended_service_types.rb
|
377
|
-
- spec/gen-rb/extended/extended_service_constants.rb
|
378
|
-
- spec/gen-rb/thrift_spec_constants.rb
|
379
|
-
- spec/gen-rb/nonblocking_service.rb
|
380
|
-
- spec/gen-rb/thrift_spec_types.rb
|
381
|
-
- spec/gen-rb/namespaced_spec_namespace/thrift_namespaced_spec_constants.rb
|
382
|
-
- spec/gen-rb/namespaced_spec_namespace/namespaced_nonblocking_service.rb
|
383
|
-
- spec/gen-rb/namespaced_spec_namespace/thrift_namespaced_spec_types.rb
|
384
|
-
- spec/gen-rb/base/base_service.rb
|
385
|
-
- spec/gen-rb/base/base_service_constants.rb
|
386
|
-
- spec/gen-rb/base/base_service_types.rb
|
387
353
|
- spec/exception_spec.rb
|
388
354
|
- spec/ThriftNamespacedSpec.thrift
|
389
355
|
- spec/struct_spec.rb
|
@@ -397,9 +363,6 @@ test_files:
|
|
397
363
|
- spec/base_transport_spec.rb
|
398
364
|
- spec/nonblocking_server_spec.rb
|
399
365
|
- benchmark/Benchmark.thrift
|
400
|
-
- benchmark/gen-rb/benchmark_service.rb
|
401
|
-
- benchmark/gen-rb/benchmark_constants.rb
|
402
|
-
- benchmark/gen-rb/benchmark_types.rb
|
403
366
|
- benchmark/client.rb
|
404
367
|
- benchmark/benchmark.rb
|
405
368
|
- benchmark/thin_server.rb
|