brm_client 0.3.6 → 0.4.0

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/Rakefile CHANGED
@@ -24,7 +24,7 @@ begin
24
24
  gem.add_development_dependency "rspec", ">= 1.2.9"
25
25
  gem.add_dependency "bunny"
26
26
  gem.add_dependency "stomp"
27
- gem.add_dependency "typhoeus", ">= 0.1.31"
27
+ gem.add_dependency "rest-client", ">= 1.6.1"
28
28
  gem.add_dependency "mongo", ">= 0.18.3"
29
29
  gem.add_dependency "activesupport"
30
30
  # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.6
1
+ 0.4.0
@@ -1,69 +1,66 @@
1
1
  # Generated by jeweler
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{brm_client}
8
- s.version = "0.3.6"
8
+ s.version = "0.4.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Stephane Bellity"]
12
- s.date = %q{2011-01-27}
12
+ s.date = %q{2011-04-07}
13
13
  s.description = %q{BRM Event logging client library}
14
14
  s.email = %q{sbellity@gmail.com}
15
15
  s.extra_rdoc_files = [
16
16
  "LICENSE",
17
- "README.rdoc"
17
+ "README.rdoc"
18
18
  ]
19
19
  s.files = [
20
20
  ".document",
21
- ".gitignore",
22
- "LICENSE",
23
- "README.rdoc",
24
- "Rakefile",
25
- "VERSION",
26
- "brm_client.gemspec",
27
- "lib/brm_client.rb",
28
- "lib/brm_client/event.rb",
29
- "lib/brm_client/gateway.rb",
30
- "lib/brm_client/gateway/amqp.rb",
31
- "lib/brm_client/gateway/debug.rb",
32
- "lib/brm_client/gateway/file.rb",
33
- "lib/brm_client/gateway/http.rb",
34
- "lib/brm_client/gateway/mongo.rb",
35
- "lib/brm_client/gateway/stomp.rb",
36
- "lib/brm_client/logger.rb",
37
- "spec/brm_client_spec.rb",
38
- "spec/spec.opts",
39
- "spec/spec_helper.rb"
21
+ "LICENSE",
22
+ "README.rdoc",
23
+ "Rakefile",
24
+ "VERSION",
25
+ "brm_client.gemspec",
26
+ "lib/brm_client.rb",
27
+ "lib/brm_client/event.rb",
28
+ "lib/brm_client/gateway.rb",
29
+ "lib/brm_client/gateway/amqp.rb",
30
+ "lib/brm_client/gateway/debug.rb",
31
+ "lib/brm_client/gateway/file.rb",
32
+ "lib/brm_client/gateway/http.rb",
33
+ "lib/brm_client/gateway/mongo.rb",
34
+ "lib/brm_client/gateway/stomp.rb",
35
+ "lib/brm_client/logger.rb",
36
+ "spec/brm_client_spec.rb",
37
+ "spec/spec.opts",
38
+ "spec/spec_helper.rb"
40
39
  ]
41
40
  s.homepage = %q{http://github.com/sbellity/brm_client}
42
- s.rdoc_options = ["--charset=UTF-8"]
43
41
  s.require_paths = ["lib"]
44
- s.rubygems_version = %q{1.3.7}
42
+ s.rubygems_version = %q{1.6.2}
45
43
  s.summary = %q{BRM Event logging client}
46
44
  s.test_files = [
47
45
  "spec/brm_client_spec.rb",
48
- "spec/spec_helper.rb"
46
+ "spec/spec_helper.rb"
49
47
  ]
50
48
 
51
49
  if s.respond_to? :specification_version then
52
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
53
50
  s.specification_version = 3
54
51
 
55
52
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
56
53
  s.add_development_dependency(%q<rspec>, [">= 1.2.9"])
57
54
  s.add_runtime_dependency(%q<bunny>, [">= 0"])
58
55
  s.add_runtime_dependency(%q<stomp>, [">= 0"])
59
- s.add_runtime_dependency(%q<typhoeus>, [">= 0.1.31"])
56
+ s.add_runtime_dependency(%q<rest-client>, [">= 1.6.1"])
60
57
  s.add_runtime_dependency(%q<mongo>, [">= 0.18.3"])
61
58
  s.add_runtime_dependency(%q<activesupport>, [">= 0"])
62
59
  else
63
60
  s.add_dependency(%q<rspec>, [">= 1.2.9"])
64
61
  s.add_dependency(%q<bunny>, [">= 0"])
65
62
  s.add_dependency(%q<stomp>, [">= 0"])
66
- s.add_dependency(%q<typhoeus>, [">= 0.1.31"])
63
+ s.add_dependency(%q<rest-client>, [">= 1.6.1"])
67
64
  s.add_dependency(%q<mongo>, [">= 0.18.3"])
68
65
  s.add_dependency(%q<activesupport>, [">= 0"])
69
66
  end
@@ -71,7 +68,7 @@ Gem::Specification.new do |s|
71
68
  s.add_dependency(%q<rspec>, [">= 1.2.9"])
72
69
  s.add_dependency(%q<bunny>, [">= 0"])
73
70
  s.add_dependency(%q<stomp>, [">= 0"])
74
- s.add_dependency(%q<typhoeus>, [">= 0.1.31"])
71
+ s.add_dependency(%q<rest-client>, [">= 1.6.1"])
75
72
  s.add_dependency(%q<mongo>, [">= 0.18.3"])
76
73
  s.add_dependency(%q<activesupport>, [">= 0"])
77
74
  end
@@ -6,7 +6,6 @@ require "brm_client/event"
6
6
  require "brm_client/logger"
7
7
  require "brm_client/gateway"
8
8
 
9
-
10
9
  module BrmClient
11
10
  VERSION = File.read(File.join(File.dirname(__FILE__), '..', 'VERSION')).chomp
12
11
  end
@@ -1,5 +1,4 @@
1
- require "typhoeus"
2
-
1
+ require "rest_client"
3
2
  module BrmClient
4
3
  module Gateway
5
4
  class Http
@@ -8,20 +7,17 @@ module BrmClient
8
7
  host = opts[:host]
9
8
  port = opts[:port]
10
9
  path = opts[:path] || ""
11
- @endpoint_url = "http://#{host}:#{port}/#{path}"
10
+ @endpoint = "http://#{host}:#{port}"
12
11
  @timeout = opts[:timeout] || 300
13
12
  @destination = opts[:queue] || opts[:application]
13
+ @rest_client = RestClient::Resource.new(@endpoint, :timeout => @timeout)
14
14
  end
15
15
 
16
16
  def disconnect
17
17
  end
18
18
 
19
19
  def send_event e
20
- options = {
21
- :params => { :destination => @destination, :msg => e.to_json },
22
- :timeout => @timeout
23
- }
24
- request = Typhoeus::Request.post(@endpoint_url, options)
20
+ @rest_client.post :destination => @destination, :msg => e.to_json
25
21
  end
26
22
 
27
23
  end
@@ -11,13 +11,13 @@ module BrmClient
11
11
  attr_accessor :facet_id, :user_id
12
12
 
13
13
  def initialize(application, gateway_options = {}, opts={})
14
- @application = application
15
- @options = {
14
+ @application = application
15
+ @options = {
16
16
  :timestamp_format => "timestamp"
17
- }.merge(opts)
18
- gateway_type = gateway_options.delete(:type) || "File"
19
- gateway_options[:application] ||= application
20
- @gateway = BrmClient::Gateway.const_get(gateway_type).new(gateway_options)
17
+ }.merge(opts)
18
+ gateway_type = gateway_options.delete(:type) || "File"
19
+ gateway_options[:application] ||= application
20
+ @gateway = BrmClient::Gateway.const_get(gateway_type).new(gateway_options)
21
21
  end
22
22
 
23
23
  def disconnect
metadata CHANGED
@@ -1,12 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: brm_client
3
3
  version: !ruby/object:Gem::Version
4
- prerelease: false
4
+ hash: 15
5
+ prerelease:
5
6
  segments:
6
7
  - 0
7
- - 3
8
- - 6
9
- version: 0.3.6
8
+ - 4
9
+ - 0
10
+ version: 0.4.0
10
11
  platform: ruby
11
12
  authors:
12
13
  - Stephane Bellity
@@ -14,7 +15,7 @@ autorequire:
14
15
  bindir: bin
15
16
  cert_chain: []
16
17
 
17
- date: 2011-01-27 00:00:00 +01:00
18
+ date: 2011-04-07 00:00:00 +02:00
18
19
  default_executable:
19
20
  dependencies:
20
21
  - !ruby/object:Gem::Dependency
@@ -25,6 +26,7 @@ dependencies:
25
26
  requirements:
26
27
  - - ">="
27
28
  - !ruby/object:Gem::Version
29
+ hash: 13
28
30
  segments:
29
31
  - 1
30
32
  - 2
@@ -40,6 +42,7 @@ dependencies:
40
42
  requirements:
41
43
  - - ">="
42
44
  - !ruby/object:Gem::Version
45
+ hash: 3
43
46
  segments:
44
47
  - 0
45
48
  version: "0"
@@ -53,24 +56,26 @@ dependencies:
53
56
  requirements:
54
57
  - - ">="
55
58
  - !ruby/object:Gem::Version
59
+ hash: 3
56
60
  segments:
57
61
  - 0
58
62
  version: "0"
59
63
  type: :runtime
60
64
  version_requirements: *id003
61
65
  - !ruby/object:Gem::Dependency
62
- name: typhoeus
66
+ name: rest-client
63
67
  prerelease: false
64
68
  requirement: &id004 !ruby/object:Gem::Requirement
65
69
  none: false
66
70
  requirements:
67
71
  - - ">="
68
72
  - !ruby/object:Gem::Version
73
+ hash: 13
69
74
  segments:
70
- - 0
71
75
  - 1
72
- - 31
73
- version: 0.1.31
76
+ - 6
77
+ - 1
78
+ version: 1.6.1
74
79
  type: :runtime
75
80
  version_requirements: *id004
76
81
  - !ruby/object:Gem::Dependency
@@ -81,6 +86,7 @@ dependencies:
81
86
  requirements:
82
87
  - - ">="
83
88
  - !ruby/object:Gem::Version
89
+ hash: 81
84
90
  segments:
85
91
  - 0
86
92
  - 18
@@ -96,6 +102,7 @@ dependencies:
96
102
  requirements:
97
103
  - - ">="
98
104
  - !ruby/object:Gem::Version
105
+ hash: 3
99
106
  segments:
100
107
  - 0
101
108
  version: "0"
@@ -112,7 +119,6 @@ extra_rdoc_files:
112
119
  - README.rdoc
113
120
  files:
114
121
  - .document
115
- - .gitignore
116
122
  - LICENSE
117
123
  - README.rdoc
118
124
  - Rakefile
@@ -136,8 +142,8 @@ homepage: http://github.com/sbellity/brm_client
136
142
  licenses: []
137
143
 
138
144
  post_install_message:
139
- rdoc_options:
140
- - --charset=UTF-8
145
+ rdoc_options: []
146
+
141
147
  require_paths:
142
148
  - lib
143
149
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -145,6 +151,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
145
151
  requirements:
146
152
  - - ">="
147
153
  - !ruby/object:Gem::Version
154
+ hash: 3
148
155
  segments:
149
156
  - 0
150
157
  version: "0"
@@ -153,13 +160,14 @@ required_rubygems_version: !ruby/object:Gem::Requirement
153
160
  requirements:
154
161
  - - ">="
155
162
  - !ruby/object:Gem::Version
163
+ hash: 3
156
164
  segments:
157
165
  - 0
158
166
  version: "0"
159
167
  requirements: []
160
168
 
161
169
  rubyforge_project:
162
- rubygems_version: 1.3.7
170
+ rubygems_version: 1.6.2
163
171
  signing_key:
164
172
  specification_version: 3
165
173
  summary: BRM Event logging client
data/.gitignore DELETED
@@ -1,21 +0,0 @@
1
- ## MAC OS
2
- .DS_Store
3
-
4
- ## TEXTMATE
5
- *.tmproj
6
- tmtags
7
-
8
- ## EMACS
9
- *~
10
- \#*
11
- .\#*
12
-
13
- ## VIM
14
- *.swp
15
-
16
- ## PROJECT::GENERAL
17
- coverage
18
- rdoc
19
- pkg
20
-
21
- ## PROJECT::SPECIFIC