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 +1 -1
- data/firering.gemspec +2 -2
- data/lib/firering/connection.rb +5 -1
- data/lib/firering.rb +1 -1
- metadata +4 -4
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.
|
|
8
|
-
s.date = '2011-02-
|
|
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."
|
data/lib/firering/connection.rb
CHANGED
|
@@ -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
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:
|
|
4
|
+
hash: 29
|
|
5
5
|
prerelease: false
|
|
6
6
|
segments:
|
|
7
7
|
- 1
|
|
8
8
|
- 0
|
|
9
|
-
-
|
|
10
|
-
version: 1.0.
|
|
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-
|
|
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
|