firering 1.0.5 → 1.0.6
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 +3 -1
- data/firering.gemspec +2 -2
- data/lib/firering/connection.rb +10 -2
- data/lib/firering.rb +1 -1
- data/spec/firering/connection_spec.rb +1 -1
- metadata +4 -4
data/README.rdoc
CHANGED
@@ -80,7 +80,9 @@ 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 ,
|
84
|
+
https://github.com/EmmanuelOga/firering/pull/2 ,
|
85
|
+
https://github.com/EmmanuelOga/firering/pull/3
|
84
86
|
|
85
87
|
== Copyright
|
86
88
|
|
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-
|
7
|
+
s.version = '1.0.6'
|
8
|
+
s.date = '2011-03-01'
|
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
@@ -107,6 +107,16 @@ module Firering
|
|
107
107
|
# disruptions. Upon unexpected disconnection, API clients should wait for a
|
108
108
|
# few seconds before trying to reconnect.
|
109
109
|
http.errback do
|
110
|
+
logger.error("http error #{http.error}. Trying again in #{retry_delay} seconds...")
|
111
|
+
perform_retry(http) do
|
112
|
+
room.stream(&callback)
|
113
|
+
end
|
114
|
+
end
|
115
|
+
|
116
|
+
# Campfire will _also_ actively close the connection. Correctly. Presumably,
|
117
|
+
# this only happens when they deploy, but it does actually happen.
|
118
|
+
http.callback do
|
119
|
+
logger.error("http connection closed. Trying again in #{retry_delay} seconds...")
|
110
120
|
perform_retry(http) do
|
111
121
|
room.stream(&callback)
|
112
122
|
end
|
@@ -126,8 +136,6 @@ module Firering
|
|
126
136
|
logger.error("Firering performed #{performed_retries} but did not get any answer. Increase Firering::Connection.max_retries or check your internet connection.")
|
127
137
|
raise Firering::Connection::HTTPError.new(http)
|
128
138
|
else
|
129
|
-
logger.error("http error #{http.error}. Trying again in #{retry_delay} seconds...")
|
130
|
-
|
131
139
|
EventMachine::add_timer(retry_delay) do
|
132
140
|
logger.info("Reconnecting...")
|
133
141
|
increase_retries_counter
|
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: 27
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 1.0.
|
9
|
+
- 6
|
10
|
+
version: 1.0.6
|
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-
|
18
|
+
date: 2011-03-01 00:00:00 -03:00
|
19
19
|
default_executable: campf-notify
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|