tinder 1.4.2 → 1.4.3
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/CHANGELOG.txt +4 -0
- data/VERSION +1 -1
- data/lib/tinder/connection.rb +1 -0
- data/lib/tinder/room.rb +38 -33
- data/tinder.gemspec +2 -2
- metadata +3 -3
data/CHANGELOG.txt
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.4.
|
1
|
+
1.4.3
|
data/lib/tinder/connection.rb
CHANGED
data/lib/tinder/room.rb
CHANGED
@@ -81,6 +81,10 @@ module Tinder
|
|
81
81
|
send_message(sound, 'SoundMessage')
|
82
82
|
end
|
83
83
|
|
84
|
+
def tweet(url)
|
85
|
+
send_message(url, 'TweetMessage')
|
86
|
+
end
|
87
|
+
|
84
88
|
# Get the list of users currently chatting for this room
|
85
89
|
def users
|
86
90
|
reload!
|
@@ -188,47 +192,48 @@ module Tinder
|
|
188
192
|
get(:uploads)['uploads'].map { |u| u['full_url'] }
|
189
193
|
end
|
190
194
|
|
191
|
-
|
192
|
-
def load
|
193
|
-
reload! unless @loaded
|
194
|
-
end
|
195
|
+
protected
|
195
196
|
|
196
|
-
|
197
|
-
|
197
|
+
def load
|
198
|
+
reload! unless @loaded
|
199
|
+
end
|
198
200
|
|
199
|
-
|
200
|
-
|
201
|
-
@topic = attributes['topic']
|
202
|
-
@full = attributes['full']
|
203
|
-
@open_to_guests = attributes['open_to_guests']
|
204
|
-
@active_token_value = attributes['active_token_value']
|
205
|
-
@users = attributes['users']
|
201
|
+
def reload!
|
202
|
+
attributes = connection.get("/room/#{@id}.json")['room']
|
206
203
|
|
207
|
-
|
208
|
-
|
204
|
+
@id = attributes['id']
|
205
|
+
@name = attributes['name']
|
206
|
+
@topic = attributes['topic']
|
207
|
+
@full = attributes['full']
|
208
|
+
@open_to_guests = attributes['open_to_guests']
|
209
|
+
@active_token_value = attributes['active_token_value']
|
210
|
+
@users = attributes['users']
|
209
211
|
|
210
|
-
|
211
|
-
|
212
|
-
end
|
212
|
+
@loaded = true
|
213
|
+
end
|
213
214
|
|
214
|
-
|
215
|
-
|
216
|
-
|
215
|
+
def send_message(message, type = 'TextMessage')
|
216
|
+
post 'speak', {:message => {:body => message, :type => type}}
|
217
|
+
end
|
217
218
|
|
218
|
-
|
219
|
-
|
220
|
-
|
219
|
+
def get(action)
|
220
|
+
connection.get(room_url_for(action))
|
221
|
+
end
|
221
222
|
|
222
|
-
|
223
|
-
|
224
|
-
|
223
|
+
def post(action, body = nil)
|
224
|
+
connection.post(room_url_for(action), body)
|
225
|
+
end
|
225
226
|
|
226
|
-
|
227
|
-
|
228
|
-
|
227
|
+
def raw_post(action, body = nil)
|
228
|
+
connection.raw_post(room_url_for(action), body)
|
229
|
+
end
|
229
230
|
|
230
|
-
|
231
|
-
|
232
|
-
|
231
|
+
def room_url_for(action)
|
232
|
+
"/room/#{@id}/#{action}.json"
|
233
|
+
end
|
234
|
+
|
235
|
+
def connection
|
236
|
+
@connection
|
237
|
+
end
|
233
238
|
end
|
234
239
|
end
|
data/tinder.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{tinder}
|
8
|
-
s.version = "1.4.
|
8
|
+
s.version = "1.4.3"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Brandon Keepers"]
|
12
|
-
s.date = %q{2010-
|
12
|
+
s.date = %q{2010-12-07}
|
13
13
|
s.description = %q{A Ruby API for interfacing with Campfire, the 37Signals chat application.}
|
14
14
|
s.email = %q{brandon@opensoul.org}
|
15
15
|
s.extra_rdoc_files = [
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 1
|
7
7
|
- 4
|
8
|
-
-
|
9
|
-
version: 1.4.
|
8
|
+
- 3
|
9
|
+
version: 1.4.3
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Brandon Keepers
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-
|
17
|
+
date: 2010-12-07 00:00:00 -05:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|