cinch 2.0.0.pre.6 → 2.0.0.pre.7
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/lib/cinch/exceptions.rb +5 -0
- data/lib/cinch/syncable.rb +6 -2
- data/lib/cinch/version.rb +1 -1
- metadata +2 -2
data/lib/cinch/exceptions.rb
CHANGED
@@ -37,5 +37,10 @@ module Cinch
|
|
37
37
|
# Error stating that an invalid mode string was encountered.
|
38
38
|
class InvalidModeString < Generic
|
39
39
|
end
|
40
|
+
|
41
|
+
# Raised when a synced attribute hasn't been available for too
|
42
|
+
# long.
|
43
|
+
class SyncedAttributeNotAvailable < Generic
|
44
|
+
end
|
40
45
|
end
|
41
46
|
end
|
data/lib/cinch/syncable.rb
CHANGED
@@ -13,9 +13,13 @@ module Cinch
|
|
13
13
|
waited += 1
|
14
14
|
|
15
15
|
if waited % 100 == 0
|
16
|
-
|
17
|
-
bot.loggers.warn "A synced attribute ('%s') has not been available for %d seconds, still waiting" % [attr, waited / 10]
|
16
|
+
bot.loggers.warn "A synced attribute ('%s' for %s) has not been available for %d seconds, still waiting" % [attr, self.inspect, waited / 10]
|
18
17
|
bot.loggers.warn caller.map {|s| " #{s}"}
|
18
|
+
|
19
|
+
if waited / 10 >= 30
|
20
|
+
bot.loggers.warn " Giving up..."
|
21
|
+
raise Exceptions::SyncedAttributeNotAvailable, "'%s' for %s" % [attr, self.inspect]
|
22
|
+
end
|
19
23
|
end
|
20
24
|
sleep 0.1
|
21
25
|
end
|
data/lib/cinch/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cinch
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.0.pre.
|
4
|
+
version: 2.0.0.pre.7
|
5
5
|
prerelease: 6
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-03-
|
12
|
+
date: 2012-03-17 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: A simple, friendly DSL for creating IRC bots
|
15
15
|
email:
|