firetower 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +1 -1
- data/lib/firetower/rooms.rb +0 -5
- data/lib/firetower/session.rb +14 -0
- data/version.txt +1 -1
- metadata +3 -3
data/History.txt
CHANGED
data/lib/firetower/rooms.rb
CHANGED
@@ -1,15 +1,10 @@
|
|
1
1
|
module Firetower
|
2
2
|
module Rooms
|
3
|
-
def self.included(other)
|
4
|
-
|
5
|
-
end
|
6
3
|
fattr(:subscribed_rooms) { [] }
|
7
4
|
|
8
5
|
def join_room(subdomain, room_name)
|
9
6
|
subscribed_rooms << find_room(subdomain, room_name)
|
10
7
|
end
|
11
8
|
|
12
|
-
# Fix backwards compatability with 0.0.3
|
13
|
-
alias_method :join, :join_room
|
14
9
|
end
|
15
10
|
end
|
data/lib/firetower/session.rb
CHANGED
@@ -97,5 +97,19 @@ module Firetower
|
|
97
97
|
account.close!
|
98
98
|
end
|
99
99
|
end
|
100
|
+
|
101
|
+
# This is here just for backwards compability. 0.0.3 introduced the 'join' hook, and renamed the existing session config 'join' to 'join_name'. This supports both.
|
102
|
+
def join(subdomain = nil, room_name = nil, &block)
|
103
|
+
#raise "#{su}: #{caller[0]}"
|
104
|
+
|
105
|
+
if subdomain && room_name && !subdomain.kind_of?(Firetower::Session) && !room_name.kind_of?(Firetower::Room)
|
106
|
+
warn "WARNING: `join` is deprecated. use `join_room` instead: #{Kernel.caller.first.gsub(/:in .*$/, '')}"
|
107
|
+
join_room(subdomain, room_name)
|
108
|
+
else
|
109
|
+
# gross, copy pasta from hookr
|
110
|
+
add_callback(:join, subdomain, &block)
|
111
|
+
end
|
112
|
+
end
|
113
|
+
|
100
114
|
end
|
101
115
|
end
|
data/version.txt
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.7
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: firetower
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 17
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 7
|
10
|
+
version: 0.0.7
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Avdi Grimm
|