garru-ruby_scribe_client 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/CHANGELOG CHANGED
@@ -1,3 +1,4 @@
1
+ v0.0.3 flush instead of open/close each time
1
2
  v0.0.2 testing github gem build
2
3
  v0.0.1 making this a gem
3
4
 
@@ -17,16 +17,24 @@ class ScribeLogger
17
17
 
18
18
  def log(category, message)
19
19
  begin
20
- log_entry = LogEntry.new({:category => category_key(category), :message => message})
21
- @transport.open()
20
+ log_entry = LogEntry.new({:category => category_key(category), :message => message.to_s})
21
+ connect
22
22
  result = @client.Log([log_entry])
23
- @transport.close()
23
+ @transport.flush
24
24
  return result
25
25
  rescue Thrift::Exception => tx
26
26
  print 'Thrift::Exception: ', tx.message, "\n"
27
27
  end
28
28
  end
29
29
 
30
+ def connect
31
+ @transport.open unless @transport.open?
32
+ end
33
+
34
+ def disconnect
35
+ @transport.close if @transport.open?
36
+ end
37
+
30
38
  def category_key(category)
31
39
  [@namespace, category].compact.join('_')
32
40
  end
@@ -370,7 +370,7 @@ module FacebookService
370
370
  def struct_fields; FIELDS; end
371
371
 
372
372
  def validate
373
- unless @success.nil? || fb_status::VALID_VALUES.include?(@success)
373
+ unless @success.nil? || Fb_status::VALID_VALUES.include?(@success)
374
374
  raise Thrift::ProtocolException.new(Thrift::ProtocolException::UNKNOWN, 'Invalid value of field success!')
375
375
  end
376
376
  end
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{ruby_scribe_client}
5
- s.version = "0.0.2"
5
+ s.version = "0.0.3"
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
- s.date = %q{2009-03-12}
9
+ s.date = %q{2009-03-30}
10
10
  s.description = %q{Ruby Scribe Client. Package and Wrapper for generated ruby interfaces}
11
11
  s.email = %q{}
12
12
  s.extra_rdoc_files = ["CHANGELOG", "lib/ruby_scribe_client/FacebookService.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_types.rb", "lib/ruby_scribe_client.rb", "LICENSE", "README"]
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.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gary Tsang
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-03-12 00:00:00 -07:00
12
+ date: 2009-03-30 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies: []
15
15