scribe 0.2.1 → 0.2.2

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.2.2 Refactoring to make dynamic class unloading work better.
1
2
 
2
3
  v0.2.1. Set strict_read to false.
3
4
 
data/README CHANGED
@@ -7,7 +7,7 @@ A Ruby client for the Scribe distributed log server.
7
7
 
8
8
  Copyright 2009 Twitter, Inc. See included LICENSE file.
9
9
 
10
- The public certificate for this gem is here[http://rubyforge.org/frs/download.php/25331/evan_weaver-original-public_cert.pem].
10
+ The public certificate for this gem is here[http://blog.evanweaver.com/files/evan_weaver-original-public_cert.pem].
11
11
 
12
12
  == Features
13
13
 
@@ -7,12 +7,6 @@ HERE = File.expand_path(File.dirname(__FILE__))
7
7
  $LOAD_PATH << "#{HERE}/../vendor/gen-rb"
8
8
  require "#{HERE}/../vendor/gen-rb/scribe"
9
9
 
10
- Object.const_set("ScribeThrift", Scribe)
11
- Object.send(:remove_const, "Scribe")
12
-
13
- ScribeThrift.const_set("LogEntry", LogEntry)
14
- Object.send(:remove_const, "LogEntry")
15
-
16
10
  $LOAD_PATH << "#{HERE}"
17
11
  require 'scribe/scribe'
18
12
  require 'scribe/debug' if ENV['DEBUG']
@@ -2,12 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{scribe}
5
- s.version = "0.2.1"
5
+ s.version = "0.2.2"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0.8") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Evan Weaver"]
9
- s.cert_chain = ["/Users/eweaver/p/configuration/gem_certificates/evan_weaver-original-public_cert.pem"]
10
- s.date = %q{2009-11-18}
9
+ s.date = %q{2010-09-27}
11
10
  s.description = %q{A Ruby client for the Scribe distributed log server.}
12
11
  s.email = %q{}
13
12
  s.extra_rdoc_files = ["CHANGELOG", "LICENSE", "README", "lib/scribe.rb", "lib/scribe/debug.rb", "lib/scribe/scribe.rb"]
@@ -16,8 +15,7 @@ Gem::Specification.new do |s|
16
15
  s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Scribe", "--main", "README"]
17
16
  s.require_paths = ["lib"]
18
17
  s.rubyforge_project = %q{fauna}
19
- s.rubygems_version = %q{1.3.5}
20
- s.signing_key = %q{/Users/eweaver/p/configuration/gem_certificates/evan_weaver-original-private_key.pem}
18
+ s.rubygems_version = %q{1.3.7}
21
19
  s.summary = %q{A Ruby client for the Scribe distributed log server.}
22
20
  s.test_files = ["test/scribe_test.rb", "test/test_helper.rb"]
23
21
 
@@ -25,7 +23,7 @@ Gem::Specification.new do |s|
25
23
  current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
26
24
  s.specification_version = 3
27
25
 
28
- if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
26
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
29
27
  s.add_runtime_dependency(%q<thrift_client>, [">= 0"])
30
28
  s.add_runtime_dependency(%q<rake>, [">= 0"])
31
29
  else
@@ -8,7 +8,7 @@ require 'thrift'
8
8
  require 'facebook_service'
9
9
  require 'scribe_types'
10
10
 
11
- module Scribe
11
+ module ScribeThrift
12
12
  class Client < FacebookService::Client
13
13
  include ::Thrift::Client
14
14
 
@@ -49,7 +49,7 @@ module Scribe
49
49
 
50
50
  ::Thrift::Struct.field_accessor self, :messages
51
51
  FIELDS = {
52
- MESSAGES => {:type => ::Thrift::Types::LIST, :name => 'messages', :element => {:type => ::Thrift::Types::STRUCT, :class => LogEntry}}
52
+ MESSAGES => {:type => ::Thrift::Types::LIST, :name => 'messages', :element => {:type => ::Thrift::Types::STRUCT, :class => ScribeThrift::LogEntry}}
53
53
  }
54
54
 
55
55
  def struct_fields; FIELDS; end
@@ -65,13 +65,13 @@ module Scribe
65
65
 
66
66
  ::Thrift::Struct.field_accessor self, :success
67
67
  FIELDS = {
68
- SUCCESS => {:type => ::Thrift::Types::I32, :name => 'success', :enum_class => ResultCode}
68
+ SUCCESS => {:type => ::Thrift::Types::I32, :name => 'success', :enum_class => ScribeThrift::ResultCode}
69
69
  }
70
70
 
71
71
  def struct_fields; FIELDS; end
72
72
 
73
73
  def validate
74
- unless @success.nil? || ResultCode::VALID_VALUES.include?(@success)
74
+ unless @success.nil? || ScribeThrift::ResultCode::VALID_VALUES.include?(@success)
75
75
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field success!')
76
76
  end
77
77
  end
@@ -7,28 +7,29 @@
7
7
  require 'fb303_types'
8
8
 
9
9
 
10
- module ResultCode
11
- OK = 0
12
- TRY_LATER = 1
13
- VALUE_MAP = {0 => "OK", 1 => "TRY_LATER"}
14
- VALID_VALUES = Set.new([OK, TRY_LATER]).freeze
15
- end
10
+ module ScribeThrift
11
+ module ResultCode
12
+ OK = 0
13
+ TRY_LATER = 1
14
+ VALUE_MAP = {0 => "OK", 1 => "TRY_LATER"}
15
+ VALID_VALUES = Set.new([OK, TRY_LATER]).freeze
16
+ end
16
17
 
17
- class LogEntry
18
- include ::Thrift::Struct
19
- CATEGORY = 1
20
- MESSAGE = 2
18
+ class LogEntry
19
+ include ::Thrift::Struct
20
+ CATEGORY = 1
21
+ MESSAGE = 2
21
22
 
22
- ::Thrift::Struct.field_accessor self, :category, :message
23
- FIELDS = {
24
- CATEGORY => {:type => ::Thrift::Types::STRING, :name => 'category'},
25
- MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'}
26
- }
23
+ ::Thrift::Struct.field_accessor self, :category, :message
24
+ FIELDS = {
25
+ CATEGORY => {:type => ::Thrift::Types::STRING, :name => 'category'},
26
+ MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'}
27
+ }
27
28
 
28
- def struct_fields; FIELDS; end
29
+ def struct_fields; FIELDS; end
29
30
 
30
- def validate
31
- end
31
+ def validate
32
+ end
32
33
 
34
+ end
33
35
  end
34
-
metadata CHANGED
@@ -1,58 +1,51 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scribe
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ hash: 19
5
+ prerelease: false
6
+ segments:
7
+ - 0
8
+ - 2
9
+ - 2
10
+ version: 0.2.2
5
11
  platform: ruby
6
12
  authors:
7
13
  - Evan Weaver
8
14
  autorequire:
9
15
  bindir: bin
10
- cert_chain:
11
- - |
12
- -----BEGIN CERTIFICATE-----
13
- MIIDLjCCAhagAwIBAgIBADANBgkqhkiG9w0BAQUFADA9MQ0wCwYDVQQDDARldmFu
14
- MRgwFgYKCZImiZPyLGQBGRYIY2xvdWRidXIxEjAQBgoJkiaJk/IsZAEZFgJzdDAe
15
- Fw0wNzA5MTYxMDMzMDBaFw0wODA5MTUxMDMzMDBaMD0xDTALBgNVBAMMBGV2YW4x
16
- GDAWBgoJkiaJk/IsZAEZFghjbG91ZGJ1cjESMBAGCgmSJomT8ixkARkWAnN0MIIB
17
- IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA5C0Io89nyApnr+PvbNFge9Vs
18
- yRWAlGBUEMahpXp28VrrfXZT0rAW7JBo4PlCE3jl4nE4dzE6gAdItSycjTosrw7A
19
- Ir5+xoyl4Vb35adv56TIQQXvNz+BzlqnkAY5JN0CSBRTQb6mxS3hFyD/h4qgDosj
20
- R2RFVzHqSxCS8xq4Ny8uzOwOi+Xyu4w67fI5JvnPvMxqrlR1eaIQHmxnf76RzC46
21
- QO5QhufjAYGGXd960XzbQsQyTDUYJzrvT7AdOfiyZzKQykKt8dEpDn+QPjFTnGnT
22
- QmgJBX5WJN0lHF2l1sbv3gh4Kn1tZu+kTUqeXY6ShAoDTyvZRiFqQdwh8w2lTQID
23
- AQABozkwNzAJBgNVHRMEAjAAMAsGA1UdDwQEAwIEsDAdBgNVHQ4EFgQU+WqJz3xQ
24
- XSea1hRvvHWcIMgeeC4wDQYJKoZIhvcNAQEFBQADggEBAGLZ75jfOEW8Nsl26CTt
25
- JFrWxQTcQT/UljeefVE3xYr7lc9oQjbqO3FOyued3qW7TaNEtZfSHoYeUSMYbpw1
26
- XAwocIPuSRFDGM4B+hgQGVDx8PMGiJKom4qLXjO40UZsR7QyN/u869Vj45LURm6h
27
- MBcPeqCASI+WNprj9+uZa2kmHiitrFqqfMBNlm5IFbn9XeYSta9AHVvs5QQqV2m5
28
- hIPfLqCyxsn/YgOGvo6iwyQTWyTswamaAC3HRWZxIS1sfn/Ssqa7E7oQMkv5FAXr
29
- x5rKePfXINf8XTJczkl9OBEYdE9aNdJsJpXD0asLgGVwBICS5Bjohp6mizJcDC1+
30
- yZ0=
31
- -----END CERTIFICATE-----
16
+ cert_chain: []
32
17
 
33
- date: 2009-11-18 00:00:00 -08:00
18
+ date: 2010-09-27 00:00:00 -07:00
34
19
  default_executable:
35
20
  dependencies:
36
21
  - !ruby/object:Gem::Dependency
37
22
  name: thrift_client
38
- type: :runtime
39
- version_requirement:
40
- version_requirements: !ruby/object:Gem::Requirement
23
+ prerelease: false
24
+ requirement: &id001 !ruby/object:Gem::Requirement
25
+ none: false
41
26
  requirements:
42
27
  - - ">="
43
28
  - !ruby/object:Gem::Version
29
+ hash: 3
30
+ segments:
31
+ - 0
44
32
  version: "0"
45
- version:
33
+ type: :runtime
34
+ version_requirements: *id001
46
35
  - !ruby/object:Gem::Dependency
47
36
  name: rake
48
- type: :runtime
49
- version_requirement:
50
- version_requirements: !ruby/object:Gem::Requirement
37
+ prerelease: false
38
+ requirement: &id002 !ruby/object:Gem::Requirement
39
+ none: false
51
40
  requirements:
52
41
  - - ">="
53
42
  - !ruby/object:Gem::Version
43
+ hash: 3
44
+ segments:
45
+ - 0
54
46
  version: "0"
55
- version:
47
+ type: :runtime
48
+ version_requirements: *id002
56
49
  description: A Ruby client for the Scribe distributed log server.
57
50
  email: ""
58
51
  executables: []
@@ -100,21 +93,28 @@ rdoc_options:
100
93
  require_paths:
101
94
  - lib
102
95
  required_ruby_version: !ruby/object:Gem::Requirement
96
+ none: false
103
97
  requirements:
104
98
  - - ">="
105
99
  - !ruby/object:Gem::Version
100
+ hash: 3
101
+ segments:
102
+ - 0
106
103
  version: "0"
107
- version:
108
104
  required_rubygems_version: !ruby/object:Gem::Requirement
105
+ none: false
109
106
  requirements:
110
107
  - - ">="
111
108
  - !ruby/object:Gem::Version
109
+ hash: 27
110
+ segments:
111
+ - 0
112
+ - 8
112
113
  version: "0.8"
113
- version:
114
114
  requirements: []
115
115
 
116
116
  rubyforge_project: fauna
117
- rubygems_version: 1.3.5
117
+ rubygems_version: 1.3.7
118
118
  signing_key:
119
119
  specification_version: 3
120
120
  summary: A Ruby client for the Scribe distributed log server.
data.tar.gz.sig DELETED
@@ -1,2 +0,0 @@
1
- �����(L�'�[m ��o2�Z�:�}�� �
2
- ʑ�h{o 22(�0!i,�GDD�z=(v �x���MFE�����A���b�����![��&z��Òu��7��R�%
metadata.gz.sig DELETED
Binary file