garru-ruby_scribe_client 0.0.9 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +1 -0
- data/Manifest +1 -0
- data/lib/ruby_scribe_client/scribe.rb +1 -0
- data/lib/ruby_scribe_client/scribe_server.rb +29 -0
- data/lib/ruby_scribe_client.rb +1 -1
- data/ruby_scribe_client.gemspec +3 -3
- data/vendor/thrift/protocol/binaryprotocol.rb +1 -1
- data/vendor/thrift/server.rb +1 -1
- metadata +3 -1
data/CHANGELOG
CHANGED
data/Manifest
CHANGED
@@ -9,6 +9,7 @@ lib/ruby_scribe_client/fb303_types.rb
|
|
9
9
|
lib/ruby_scribe_client/reflection_limited_types.rb
|
10
10
|
lib/ruby_scribe_client/scribe.rb
|
11
11
|
lib/ruby_scribe_client/scribe_mgmt.rb
|
12
|
+
lib/ruby_scribe_client/scribe_server.rb
|
12
13
|
lib/ruby_scribe_client/scribe_types.rb
|
13
14
|
lib/ruby_scribe_client.rb
|
14
15
|
LICENSE
|
@@ -0,0 +1,29 @@
|
|
1
|
+
require File.join([File.dirname(__FILE__), 'scribe'])
|
2
|
+
#
|
3
|
+
# class ScribeHandler
|
4
|
+
# def Log(messages)
|
5
|
+
# messages.each do |x|
|
6
|
+
# puts "#{x.inspect}"
|
7
|
+
# end
|
8
|
+
# return ResultCode::OK
|
9
|
+
# end
|
10
|
+
# end
|
11
|
+
#
|
12
|
+
# handler = ScribeHandler.new
|
13
|
+
#
|
14
|
+
# puts "Starting the server..."
|
15
|
+
# server.serve()
|
16
|
+
# puts "done."
|
17
|
+
class ScribeServer
|
18
|
+
def initialize(port, handler)
|
19
|
+
handler
|
20
|
+
processor = Scribe::Processor.new(handler)
|
21
|
+
transport = Thrift::ServerSocket.new(port)
|
22
|
+
transportFactory = Thrift::FramedTransportFactory.new
|
23
|
+
@server = Thrift::SimpleServer.new(processor, transport, transportFactory)
|
24
|
+
end
|
25
|
+
|
26
|
+
def run
|
27
|
+
@server.serve()
|
28
|
+
end
|
29
|
+
end
|
data/lib/ruby_scribe_client.rb
CHANGED
data/ruby_scribe_client.gemspec
CHANGED
@@ -2,15 +2,15 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{ruby_scribe_client}
|
5
|
-
s.version = "0.0
|
5
|
+
s.version = "0.1.0"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Gary Tsang"]
|
9
9
|
s.date = %q{2009-04-13}
|
10
10
|
s.description = %q{Ruby Scribe Client. Package and Wrapper for generated ruby interfaces}
|
11
11
|
s.email = %q{}
|
12
|
-
s.extra_rdoc_files = ["CHANGELOG", "lib/ruby_scribe_client/FacebookService.rb", "lib/ruby_scribe_client/fb303_client.rb", "lib/ruby_scribe_client/fb303_types.rb", "lib/ruby_scribe_client/reflection_limited_types.rb", "lib/ruby_scribe_client/scribe.rb", "lib/ruby_scribe_client/scribe_mgmt.rb", "lib/ruby_scribe_client/scribe_types.rb", "lib/ruby_scribe_client.rb", "LICENSE", "README"]
|
13
|
-
s.files = ["CHANGELOG", "etc/scribe_cat.rb", "etc/scribe_munin.rb", "etc/scribe_net", "etc/test.rb", "lib/ruby_scribe_client/FacebookService.rb", "lib/ruby_scribe_client/fb303_client.rb", "lib/ruby_scribe_client/fb303_types.rb", "lib/ruby_scribe_client/reflection_limited_types.rb", "lib/ruby_scribe_client/scribe.rb", "lib/ruby_scribe_client/scribe_mgmt.rb", "lib/ruby_scribe_client/scribe_types.rb", "lib/ruby_scribe_client.rb", "LICENSE", "Manifest", "Rakefile", "README", "ruby_scribe_client.gemspec", "vendor/thrift/client.rb", "vendor/thrift/deprecation.rb", "vendor/thrift/exceptions.rb", "vendor/thrift/processor.rb", "vendor/thrift/protocol/binaryprotocol.rb", "vendor/thrift/protocol/binaryprotocolaccelerated.rb", "vendor/thrift/protocol/tbinaryprotocol.rb", "vendor/thrift/protocol/tprotocol.rb", "vendor/thrift/protocol.rb", "vendor/thrift/serializer.rb", "vendor/thrift/server/httpserver.rb", "vendor/thrift/server/nonblockingserver.rb", "vendor/thrift/server/thttpserver.rb", "vendor/thrift/server/tserver.rb", "vendor/thrift/server.rb", "vendor/thrift/struct.rb", "vendor/thrift/thrift.rb", "vendor/thrift/transport/httpclient.rb", "vendor/thrift/transport/socket.rb", "vendor/thrift/transport/thttpclient.rb", "vendor/thrift/transport/tsocket.rb", "vendor/thrift/transport/ttransport.rb", "vendor/thrift/transport/unixsocket.rb", "vendor/thrift/transport.rb", "vendor/thrift/types.rb", "vendor/thrift.rb"]
|
12
|
+
s.extra_rdoc_files = ["CHANGELOG", "lib/ruby_scribe_client/FacebookService.rb", "lib/ruby_scribe_client/fb303_client.rb", "lib/ruby_scribe_client/fb303_types.rb", "lib/ruby_scribe_client/reflection_limited_types.rb", "lib/ruby_scribe_client/scribe.rb", "lib/ruby_scribe_client/scribe_mgmt.rb", "lib/ruby_scribe_client/scribe_server.rb", "lib/ruby_scribe_client/scribe_types.rb", "lib/ruby_scribe_client.rb", "LICENSE", "README"]
|
13
|
+
s.files = ["CHANGELOG", "etc/scribe_cat.rb", "etc/scribe_munin.rb", "etc/scribe_net", "etc/test.rb", "lib/ruby_scribe_client/FacebookService.rb", "lib/ruby_scribe_client/fb303_client.rb", "lib/ruby_scribe_client/fb303_types.rb", "lib/ruby_scribe_client/reflection_limited_types.rb", "lib/ruby_scribe_client/scribe.rb", "lib/ruby_scribe_client/scribe_mgmt.rb", "lib/ruby_scribe_client/scribe_server.rb", "lib/ruby_scribe_client/scribe_types.rb", "lib/ruby_scribe_client.rb", "LICENSE", "Manifest", "Rakefile", "README", "ruby_scribe_client.gemspec", "vendor/thrift/client.rb", "vendor/thrift/deprecation.rb", "vendor/thrift/exceptions.rb", "vendor/thrift/processor.rb", "vendor/thrift/protocol/binaryprotocol.rb", "vendor/thrift/protocol/binaryprotocolaccelerated.rb", "vendor/thrift/protocol/tbinaryprotocol.rb", "vendor/thrift/protocol/tprotocol.rb", "vendor/thrift/protocol.rb", "vendor/thrift/serializer.rb", "vendor/thrift/server/httpserver.rb", "vendor/thrift/server/nonblockingserver.rb", "vendor/thrift/server/thttpserver.rb", "vendor/thrift/server/tserver.rb", "vendor/thrift/server.rb", "vendor/thrift/struct.rb", "vendor/thrift/thrift.rb", "vendor/thrift/transport/httpclient.rb", "vendor/thrift/transport/socket.rb", "vendor/thrift/transport/thttpclient.rb", "vendor/thrift/transport/tsocket.rb", "vendor/thrift/transport/ttransport.rb", "vendor/thrift/transport/unixsocket.rb", "vendor/thrift/transport.rb", "vendor/thrift/types.rb", "vendor/thrift.rb"]
|
14
14
|
s.has_rdoc = true
|
15
15
|
s.homepage = %q{http://github.com/garru/ruby_scribe_client}
|
16
16
|
s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Ruby_scribe_client", "--main", "README"]
|
@@ -17,7 +17,7 @@ module Thrift
|
|
17
17
|
|
18
18
|
attr_reader :strict_read, :strict_write
|
19
19
|
|
20
|
-
def initialize(trans, strict_read=
|
20
|
+
def initialize(trans, strict_read=false, strict_write=true)
|
21
21
|
super(trans)
|
22
22
|
@strict_read = strict_read
|
23
23
|
@strict_write = strict_write
|
data/vendor/thrift/server.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: garru-ruby_scribe_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gary Tsang
|
@@ -27,6 +27,7 @@ extra_rdoc_files:
|
|
27
27
|
- lib/ruby_scribe_client/reflection_limited_types.rb
|
28
28
|
- lib/ruby_scribe_client/scribe.rb
|
29
29
|
- lib/ruby_scribe_client/scribe_mgmt.rb
|
30
|
+
- lib/ruby_scribe_client/scribe_server.rb
|
30
31
|
- lib/ruby_scribe_client/scribe_types.rb
|
31
32
|
- lib/ruby_scribe_client.rb
|
32
33
|
- LICENSE
|
@@ -43,6 +44,7 @@ files:
|
|
43
44
|
- lib/ruby_scribe_client/reflection_limited_types.rb
|
44
45
|
- lib/ruby_scribe_client/scribe.rb
|
45
46
|
- lib/ruby_scribe_client/scribe_mgmt.rb
|
47
|
+
- lib/ruby_scribe_client/scribe_server.rb
|
46
48
|
- lib/ruby_scribe_client/scribe_types.rb
|
47
49
|
- lib/ruby_scribe_client.rb
|
48
50
|
- LICENSE
|