firering 1.0.4 → 1.0.5

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/README.rdoc CHANGED
@@ -80,7 +80,7 @@ For more details take a look at spec/fixtures/load_server.rb file.
80
80
 
81
81
  == Contributors
82
82
 
83
- * indirect (Andre Arko), https://github.com/EmmanuelOga/firering/pull/1
83
+ * indirect (Andre Arko), https://github.com/EmmanuelOga/firering/pull/1 and https://github.com/EmmanuelOga/firering/pull/2/files
84
84
 
85
85
  == Copyright
86
86
 
data/firering.gemspec CHANGED
@@ -4,8 +4,8 @@ Gem::Specification.new do |s|
4
4
  s.rubygems_version = '1.3.5'
5
5
 
6
6
  s.name = 'firering'
7
- s.version = '1.0.4'
8
- s.date = '2011-02-24'
7
+ s.version = '1.0.5'
8
+ s.date = '2011-02-25'
9
9
  s.rubyforge_project = 'firering'
10
10
 
11
11
  s.summary = "Campfire API interface powered by eventmachine em-http-request and yajl-ruby."
@@ -84,9 +84,13 @@ module Firering
84
84
  callback.call(Firering::Message.instantiate(self, data)) if callback
85
85
  end
86
86
 
87
+ # timeout 5s because the campfire streaming API chunked connection sends
88
+ # "1\r\n \r\n" every 3s, and we want to bail as soon as that stops
89
+ options = {:keepalive => true, :timeout => 5}
90
+
87
91
  uri = streaming_host.join("/room/#{room.id}/live.json")
88
92
  logger.info("performing streaming request to #{uri.to_s}")
89
- http = EventMachine::HttpRequest.new(uri).get(parameters)
93
+ http = EventMachine::HttpRequest.new(uri).get(options.merge(parameters))
90
94
 
91
95
  http.stream do |chunk|
92
96
  begin
data/lib/firering.rb CHANGED
@@ -5,7 +5,7 @@ require 'yajl'
5
5
  require 'em-http'
6
6
 
7
7
  module Firering
8
- VERSION = '1.0.4'
8
+ VERSION = '1.0.5'
9
9
 
10
10
  Error = Class.new(StandardError)
11
11
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: firering
3
3
  version: !ruby/object:Gem::Version
4
- hash: 31
4
+ hash: 29
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 4
10
- version: 1.0.4
9
+ - 5
10
+ version: 1.0.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - Emmanuel Oga
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-02-24 00:00:00 -03:00
18
+ date: 2011-02-25 00:00:00 -03:00
19
19
  default_executable: campf-notify
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency