tokboxer 0.1.0 → 0.1.1
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/History.txt +4 -0
- data/Manifest.txt +4 -0
- data/lib/TokBoxer.rb +1 -1
- data/lib/TokBoxer/Api.rb +290 -0
- data/lib/TokBoxer/Call.rb +42 -0
- data/lib/TokBoxer/User.rb +137 -0
- data/lib/TokBoxer/VMail.rb +17 -0
- data/website/index.html +84 -11
- metadata +6 -2
data/History.txt
CHANGED
data/Manifest.txt
CHANGED
data/lib/TokBoxer.rb
CHANGED
data/lib/TokBoxer/Api.rb
ADDED
@@ -0,0 +1,290 @@
|
|
1
|
+
module TokBoxer
|
2
|
+
|
3
|
+
class Api
|
4
|
+
|
5
|
+
attr_reader :api_server_url, :api_key
|
6
|
+
|
7
|
+
# Call API actions =================================================================================
|
8
|
+
|
9
|
+
def create_call(callerJabberId, callerName, persistent=false, features="")
|
10
|
+
method = "POST"
|
11
|
+
call = "/calls/create"
|
12
|
+
params = { :callerJabberId => callerJabberId, :callerName => callerName, :persistent => persistent, :features => features }
|
13
|
+
result = request(method, call, params)
|
14
|
+
end
|
15
|
+
|
16
|
+
def create_invite(callerJabberId, calleeJabberId, call_id)
|
17
|
+
method = "POST"
|
18
|
+
call = "/calls/invite"
|
19
|
+
params = { :callerJabberId => callerJabberId, :calleeJabberId => calleeJabberId, :call_id => call_id }
|
20
|
+
result = request(method, call, params)
|
21
|
+
end
|
22
|
+
|
23
|
+
def join_call(invite_id)
|
24
|
+
method = "POST"
|
25
|
+
call = "/calls/join"
|
26
|
+
params = { :invite_id => invite_id }
|
27
|
+
result = request(method, call, params)
|
28
|
+
end
|
29
|
+
|
30
|
+
# Contacts API Actions =============================================================================
|
31
|
+
|
32
|
+
def add_contact(jabberId, remoteJabberId)
|
33
|
+
method = "POST"
|
34
|
+
call = "/contacts/request"
|
35
|
+
params = { :jabberId => jabberId, :remoteJabberId => remoteJabberId }
|
36
|
+
result = request(method, call, params)
|
37
|
+
end
|
38
|
+
|
39
|
+
def is_friend(jabberId, remoteJabberId)
|
40
|
+
method = "POST"
|
41
|
+
call = "/contacts/getRelation"
|
42
|
+
params = { :jabberId => jabberId, :remoteJabberId => remoteJabberId }
|
43
|
+
result = request(method, call, params)
|
44
|
+
end
|
45
|
+
|
46
|
+
def remove_contact(jabberId, remoteJabberId)
|
47
|
+
method = "POST"
|
48
|
+
call = "/contacts/remove"
|
49
|
+
params = { :jabberId => jabberId, :remoteJabberId => remoteJabberId }
|
50
|
+
result = request(method, call, params)
|
51
|
+
end
|
52
|
+
|
53
|
+
def reject_contact(jabberId, remoteJabberId)
|
54
|
+
method = "POST"
|
55
|
+
call = "/contacts/reject"
|
56
|
+
params = { :jabberId => jabberId, :remoteJabberId => remoteJabberId }
|
57
|
+
result = request(method, call, params)
|
58
|
+
end
|
59
|
+
|
60
|
+
# Feed API actions =================================================================================
|
61
|
+
|
62
|
+
def add_comment(posterjabberId, vmailmessageid, commenttext, vmailcontentid)
|
63
|
+
method = "POST"
|
64
|
+
call = "/vmail/addcomment"
|
65
|
+
params = { :posterjabberId => posterjabberId, :vmailmessageid => vmailmessageid, :commenttext => commenttext, :vmailcontentid => vmailcontentid }
|
66
|
+
result = request(method, call, params)
|
67
|
+
end
|
68
|
+
|
69
|
+
def delete_missed_call_from_feed(jabberId, invite_id)
|
70
|
+
method = "POST"
|
71
|
+
call = "/callevent/delete"
|
72
|
+
params = { :jabberId => jabberId, :invite_id => invite_id }
|
73
|
+
result = request(method, call, params)
|
74
|
+
end
|
75
|
+
|
76
|
+
def delete_vmail_from_feed(message_id, type)
|
77
|
+
method = "POST"
|
78
|
+
call = "/vmail/delete"
|
79
|
+
params = { :message_id => message_id, :type => type }
|
80
|
+
result = request(method, call, params)
|
81
|
+
end
|
82
|
+
|
83
|
+
def get_all_of_the_comments_on_a_post(message_id, start = nil, count = nil)
|
84
|
+
method = "POST"
|
85
|
+
call = "/vmail/getcomments"
|
86
|
+
params = { :message_id => message_id, :start => start, :count => count }
|
87
|
+
result = request(method, call, params)
|
88
|
+
end
|
89
|
+
|
90
|
+
def get_feed(jabberId, filter=nil, start=nil, count=nil, sort=nil, dateRange=nil)
|
91
|
+
method = "POST"
|
92
|
+
call = "/feed/getFeed"
|
93
|
+
params = { :jabberId => jabberId, :filter => filter, :start => start, :count => count, :sort => sort, :dateRange => nil }
|
94
|
+
result = request(method, call, params)
|
95
|
+
end
|
96
|
+
|
97
|
+
def get_feed_unread_count(jabberId)
|
98
|
+
method = "POST"
|
99
|
+
call = "/feed/unreadCount"
|
100
|
+
params = { :jabberId => jabberId }
|
101
|
+
result = request(method, call, params)
|
102
|
+
end
|
103
|
+
|
104
|
+
def mark_missed_call_as_read_in_feed(jabberId, invite_id)
|
105
|
+
method = "POST"
|
106
|
+
call = "/callevent/markasviewed"
|
107
|
+
params = { :jabberId => jabberId, :invite_id => invite_id }
|
108
|
+
result = request(method, call, params)
|
109
|
+
end
|
110
|
+
|
111
|
+
def mark_vmail_as_read(message_id)
|
112
|
+
method = "POST"
|
113
|
+
call = "/vmail/markasviewed"
|
114
|
+
params = { :message_id => message_id }
|
115
|
+
result = request(method, call, params)
|
116
|
+
end
|
117
|
+
|
118
|
+
# Token API actions ================================================================================
|
119
|
+
|
120
|
+
def get_access_token(jabberId, password)
|
121
|
+
method = "POST"
|
122
|
+
call = "/auth/getAccessToken"
|
123
|
+
params = { :jabberId => jabberId, :password => password }
|
124
|
+
result = request(method, call, params, @api_secret)
|
125
|
+
end
|
126
|
+
|
127
|
+
def get_request_token(callbackUrl)
|
128
|
+
method = "POST"
|
129
|
+
call = "/auth/getRequestToken"
|
130
|
+
params = { :callbackUrl => callbackUrl }
|
131
|
+
result = request(method, call, params, @api_secret)
|
132
|
+
end
|
133
|
+
|
134
|
+
def validate_access_token(jabberId, accessSecret)
|
135
|
+
method = "POST"
|
136
|
+
call = "/auth/validateAccessToken"
|
137
|
+
params = { :jabberId => jabberId, :accessSecret => accessSecret }
|
138
|
+
result = request(method, call, params, @api_secret)
|
139
|
+
end
|
140
|
+
|
141
|
+
# User API actions =================================================================================
|
142
|
+
|
143
|
+
def login_user(jabberId, secret)
|
144
|
+
@jabberId = jabberId
|
145
|
+
@secret = secret
|
146
|
+
end
|
147
|
+
|
148
|
+
def create_user(jabberId, secret)
|
149
|
+
TokBoxer::User.new(jabberId, secret, self)
|
150
|
+
end
|
151
|
+
|
152
|
+
def create_guest_user
|
153
|
+
method = "POST"
|
154
|
+
call = "/users/createGuest"
|
155
|
+
params = { :partnerKey => @api_key }
|
156
|
+
result = request(method, call, params, @api_secret)
|
157
|
+
if result['error']
|
158
|
+
return nil # error
|
159
|
+
else
|
160
|
+
return create_user(result["createGuest"].first["jabberId"].first, result["createGuest"].first["secret"].first)
|
161
|
+
end
|
162
|
+
end
|
163
|
+
|
164
|
+
def register_user(firstname,lastname,email)
|
165
|
+
method = "POST"
|
166
|
+
call = "/users/register"
|
167
|
+
params = { :firstname => firstname, :lastname => lastname, :email => email }
|
168
|
+
result = request(method, call, params, @api_secret)
|
169
|
+
if result['error']
|
170
|
+
return nil # error
|
171
|
+
else
|
172
|
+
return create_user(result["registerUser"].first["jabberId"].first, result["registerUser"].first["secret"].first)
|
173
|
+
end
|
174
|
+
end
|
175
|
+
|
176
|
+
def get_user_profile(jabberId)
|
177
|
+
@jabberId = jabberId
|
178
|
+
method = "POST"
|
179
|
+
call = "/users/getProfile"
|
180
|
+
params = { :jabberId => jabberId }
|
181
|
+
result = request(method, call, params)
|
182
|
+
end
|
183
|
+
|
184
|
+
# VMail API actions ================================================================================
|
185
|
+
|
186
|
+
def forward_vmail(vmail_id, senderJabberId, text="", tokboxRecipients="", emailRecipients="")
|
187
|
+
method = "POST"
|
188
|
+
call = "/vmail/forward"
|
189
|
+
params = { :vmail_id => vmail_id, :senderJabberId => senderJabberId, :text => text, :tokboxRecipients => tokboxRecipients, :emailRecipients => emailRecipients }
|
190
|
+
result = request(method, call, params)
|
191
|
+
end
|
192
|
+
|
193
|
+
def forward_vmail_to_all_friends(vmail_id, senderJabberId, text="")
|
194
|
+
method = "POST"
|
195
|
+
call = "/vmail/forwardToFriends"
|
196
|
+
params = { :vmail_id => vmail_id, :senderJabberId => senderJabberId, :text => text }
|
197
|
+
result = request(method, call, params)
|
198
|
+
end
|
199
|
+
|
200
|
+
def get_vmail(message_id)
|
201
|
+
method = "POST"
|
202
|
+
call = "/vmail/getVmail"
|
203
|
+
params = { :message_id => message_id }
|
204
|
+
result = request(method, call, params)
|
205
|
+
end
|
206
|
+
|
207
|
+
def post_public_vmail(vmail_id, scope, senderJabberId, text)
|
208
|
+
method = "POST"
|
209
|
+
call = "/vmail/postPublic"
|
210
|
+
params = { :vmail_id => vmail_id, :scope => scope, :senderJabberId => senderJabberId, :text => text }
|
211
|
+
result = request(method, call, params)
|
212
|
+
end
|
213
|
+
|
214
|
+
def send_vmail(vmail_id, senderJabberId, text="", tokboxRecipients="", emailRecipients="")
|
215
|
+
method = "POST"
|
216
|
+
call = "/vmail/send"
|
217
|
+
params = { :vmail_id => vmail_id, :senderJabberId => senderJabberId, :text => text, :tokboxRecipients => tokboxRecipients, :emailRecipients => emailRecipients }
|
218
|
+
result = request(method, call, params)
|
219
|
+
end
|
220
|
+
|
221
|
+
def send_vmail_to_alL_friends(vmail_id, senderJabberId, text="")
|
222
|
+
method = "POST"
|
223
|
+
call = "/vmail/sendToFriends"
|
224
|
+
params = { :vmail_id => vmail_id, :senderJabberId => senderJabberId, :text => text }
|
225
|
+
result = request(method, call, params)
|
226
|
+
end
|
227
|
+
|
228
|
+
private # ==========================================================================================
|
229
|
+
|
230
|
+
def initialize(api_key, api_secret, api_server_url = 'http://sandbox.tokbox.com/')
|
231
|
+
@api_key = api_key
|
232
|
+
@api_secret = api_secret
|
233
|
+
@api_server_url = api_server_url
|
234
|
+
end
|
235
|
+
|
236
|
+
def generate_nonce
|
237
|
+
(0...16).map { "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"[rand(62)] }.join
|
238
|
+
end
|
239
|
+
|
240
|
+
def generate_request_string(hash)
|
241
|
+
hash.reject{ |k,v| k=~/^_/ or v.nil? or v.to_s == "" }.
|
242
|
+
map{|k,v| "#{CGI.escape(k.to_s)}=#{CGI.escape(v.to_s)}".gsub("+","%20")}.sort.join("&")
|
243
|
+
end
|
244
|
+
|
245
|
+
def build_signed_request(method, uri, nonce, timestamp, paramList, secret)
|
246
|
+
signed_auth_fields = { 'oauth_partner_key' => @api_key,
|
247
|
+
'oauth_signature_method' => API_SIGNATURE_METHOD,
|
248
|
+
'oauth_timestamp' => timestamp,
|
249
|
+
'oauth_version' => API_VERSION,
|
250
|
+
'oauth_nonce' => nonce,
|
251
|
+
'tokbox_jabberid' => @jabberId }.merge(paramList)
|
252
|
+
request_string = method + "&" + uri + "&" + generate_request_string(signed_auth_fields)
|
253
|
+
Digest::MD5.hexdigest(request_string + secret)
|
254
|
+
end
|
255
|
+
|
256
|
+
def request(method, apiURL, paramList, secret = nil)
|
257
|
+
nonce = generate_nonce
|
258
|
+
timestamp = Time.now.to_i
|
259
|
+
request_url = @api_server_url + API_SERVER_METHODS_URL + apiURL
|
260
|
+
authfields = { 'oauth_partner_key' => @api_key,
|
261
|
+
'oauth_signature_method' => API_SIGNATURE_METHOD,
|
262
|
+
'oauth_timestamp' => timestamp,
|
263
|
+
'oauth_version' => API_VERSION,
|
264
|
+
'oauth_nonce' => nonce,
|
265
|
+
'oauth_signature' => build_signed_request(method,request_url,nonce,timestamp,paramList, secret || @secret),
|
266
|
+
'tokbox_jabberid' => @jabberId }
|
267
|
+
datastring = generate_request_string(paramList)+"&"+generate_request_string(authfields)
|
268
|
+
datastring += '&_AUTHORIZATION='
|
269
|
+
datastring += authfields.map{|k,v|"#{CGI.escape(k.to_s)}=\"#{CGI.escape(v.to_s)}\""}.join(",").gsub("+","%20")
|
270
|
+
if @debug
|
271
|
+
puts "=========================v"
|
272
|
+
puts "Call : #{method} #{request_url}"
|
273
|
+
puts "Params : #{paramList.inspect}"
|
274
|
+
puts "-------------------------"
|
275
|
+
end
|
276
|
+
url = URI.parse(request_url)
|
277
|
+
request = Net::HTTP.new(url.host,url.port)
|
278
|
+
response = request.post(url.path,datastring)
|
279
|
+
result = response.body
|
280
|
+
xml_result = XmlSimple.xml_in(result)
|
281
|
+
if @debug
|
282
|
+
pp xml_result
|
283
|
+
puts "=========================^"
|
284
|
+
end
|
285
|
+
xml_result
|
286
|
+
end
|
287
|
+
|
288
|
+
end
|
289
|
+
|
290
|
+
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
module TokBoxer
|
2
|
+
|
3
|
+
class Call
|
4
|
+
|
5
|
+
attr_reader :callerName, :callId, :callerJabberId, :persistent, :server
|
6
|
+
alias :id :callId
|
7
|
+
|
8
|
+
def initialize(callerName, callId, callerJabberId, persistent, server, api)
|
9
|
+
@callerName = callerName
|
10
|
+
@callId = callId
|
11
|
+
@callerJabberId = callerJabberId
|
12
|
+
@persistent = persistent
|
13
|
+
@server = server
|
14
|
+
@api = api
|
15
|
+
end
|
16
|
+
|
17
|
+
def embed_code(width="322", height="321")
|
18
|
+
<<-END
|
19
|
+
<object width="#{width}" height="#{height}">
|
20
|
+
<param name="movie" value="#{@api.api_server_url}#{API_SERVER_CALL_WIDGET}#{id}" />
|
21
|
+
<param name="allowFullScreen" value="true" />
|
22
|
+
<param name="allowScriptAccess" value="true" />
|
23
|
+
<param name="flashVars" value="textChat=true&guestList=false&inviteButton=false" />
|
24
|
+
<embed src="#{@api.api_server_url}#{API_SERVER_CALL_WIDGET}#{id}"
|
25
|
+
type="application/x-shockwave-flash"
|
26
|
+
allowfullscreen="true"
|
27
|
+
allowScriptAccess="always"
|
28
|
+
width="#{width}"
|
29
|
+
height="#{height}"
|
30
|
+
flashvars="textChat=true&guestList=false&inviteButton=false" >
|
31
|
+
</embed>
|
32
|
+
</object>
|
33
|
+
END
|
34
|
+
end
|
35
|
+
|
36
|
+
def to_s
|
37
|
+
id
|
38
|
+
end
|
39
|
+
|
40
|
+
end
|
41
|
+
|
42
|
+
end
|
@@ -0,0 +1,137 @@
|
|
1
|
+
module TokBoxer
|
2
|
+
|
3
|
+
class User
|
4
|
+
|
5
|
+
attr_reader :jabberId, :secret
|
6
|
+
alias :id :jabberId
|
7
|
+
|
8
|
+
def initialize(jabberId, secret, api)
|
9
|
+
@jabberId = jabberId
|
10
|
+
@secret = secret
|
11
|
+
@api = api
|
12
|
+
self.login
|
13
|
+
end
|
14
|
+
|
15
|
+
# TODO add a method which calls get_request_token from the API
|
16
|
+
# to get the jabberId and secret from the email and password
|
17
|
+
|
18
|
+
def login
|
19
|
+
@api.login_user(self.jabberId,self.secret)
|
20
|
+
end
|
21
|
+
|
22
|
+
def create_call(full_name,persistent=false)
|
23
|
+
result = @api.create_call(@jabberId, full_name, persistent)
|
24
|
+
if result['createCall'] and (createCall=result['createCall'].first)
|
25
|
+
Call.new createCall['callerName'],
|
26
|
+
createCall['callId'].first,
|
27
|
+
createCall['callerJabberId'],
|
28
|
+
createCall['persistent'],
|
29
|
+
createCall['server'].first,
|
30
|
+
@api
|
31
|
+
else
|
32
|
+
nil
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
def access_token_valid?
|
37
|
+
result = @api.validate_access_token(@jabberId, @secret)
|
38
|
+
result['validateAccessToken'].first["isValid"].first == "true"
|
39
|
+
end
|
40
|
+
|
41
|
+
# Feeds ============================================================================================
|
42
|
+
|
43
|
+
def vmails
|
44
|
+
@api.get_feed(@jabberId,"all")["feed"].first["item"].map do |m|
|
45
|
+
VMail.new m["videoMail"].first["content"]["messageId"].first
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
def sent_vmails
|
50
|
+
@api.get_feed(@jabberId,"vmailSent")["feed"].first["item"].map do |m|
|
51
|
+
VMail.new m["videoMail"].first["content"]["messageId"].first
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
def received_vmails
|
56
|
+
@api.get_feed(@jabberId,"vmailRecv")["feed"].first["item"].map do |m|
|
57
|
+
VMail.new m["videoMail"].first["content"]["messageId"].first
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
def recorder_embed_code(width="322", height="321",vmailToEmail="")
|
62
|
+
# TODO: this comes from the PHP api. Not yet implemented here
|
63
|
+
# if($isGuest) {
|
64
|
+
# $apiObj = new TokBoxApi(API_Config::PARTNER_KEY, API_Config::PARTNER_SECRET);
|
65
|
+
# $apiObj->updateToken($apiObj->getRequestToken(API_Config::CALLBACK_URL));
|
66
|
+
#
|
67
|
+
# $htmlCode .= "<script language=\"javascript\" src=\"SDK/js/TokBoxScript.js\"></script>\n";
|
68
|
+
# $htmlCode .= "<body onclick=\"setToken('".$apiObj->getAuthToken()."');\">\n";
|
69
|
+
# }
|
70
|
+
<<-END
|
71
|
+
<object width="#{width}" height="#{height}">
|
72
|
+
<param name="movie" value="#{@api.api_server_url}#{API_SERVER_RECORDER_WIDGET}"></param>
|
73
|
+
<param name="allowFullScreen" value="true"></param>
|
74
|
+
<param name="allowScriptAccess" value="true"></param>
|
75
|
+
<param name="FlashVars" value="tokboxPartnerKey=#{@api.api_key}&tokboxJid=#{jabberId}&tokboxAccessSecret=#{secret}&offsiteAuth=true&vmailToEmail=#{vmailToEmail}"></param>
|
76
|
+
<embed id="tbx_recorder" src="#{@api.api_server_url}#{API_SERVER_RECORDER_WIDGET}"
|
77
|
+
type="application/x-shockwave-flash"
|
78
|
+
allowfullscreen="true"
|
79
|
+
allowScriptAccess="always"
|
80
|
+
width="#{width}"
|
81
|
+
height="#{height}"
|
82
|
+
FlashVars="tokboxPartnerKey=#{@api.api_key}&tokboxJid=#{jabberId}&tokboxAccessSecret=#{secret}&offsiteAuth=true&vmailToEmail=#{vmailToEmail}"
|
83
|
+
>
|
84
|
+
</embed>
|
85
|
+
</object>
|
86
|
+
END
|
87
|
+
end
|
88
|
+
|
89
|
+
def player_embed_code(messageId, width="425", height="344")
|
90
|
+
<<-END
|
91
|
+
<object width="#{width}" height="#{height}">
|
92
|
+
|
93
|
+
<param name="movie" value="#{@api.api_server_url}#{API_SERVER_PLAYER_WIDGET}"></param>
|
94
|
+
<param name="allowFullScreen" value="true"></param>
|
95
|
+
<param name="allowScriptAccess" value="true"></param>
|
96
|
+
<embed id="tbx_player" src="#{@api.api_server_url}#{API_SERVER_PLAYER_WIDGET}"
|
97
|
+
type="application/x-shockwave-flash"
|
98
|
+
allowfullscreen="true"
|
99
|
+
allowScriptAccess="always"
|
100
|
+
flashvars="targetVmail=#{messageId}"
|
101
|
+
width="#{width}"
|
102
|
+
height="#{height}"
|
103
|
+
>
|
104
|
+
</embed>
|
105
|
+
</object>
|
106
|
+
END
|
107
|
+
end
|
108
|
+
|
109
|
+
def is_online?
|
110
|
+
info["isOnline"].first == "true"
|
111
|
+
end
|
112
|
+
|
113
|
+
def display_name
|
114
|
+
info["displayName"].first
|
115
|
+
end
|
116
|
+
|
117
|
+
def username
|
118
|
+
info["username"].first
|
119
|
+
end
|
120
|
+
|
121
|
+
def userid
|
122
|
+
info["userid"].first
|
123
|
+
end
|
124
|
+
|
125
|
+
def show
|
126
|
+
info["show"].first
|
127
|
+
end
|
128
|
+
|
129
|
+
protected
|
130
|
+
|
131
|
+
def info
|
132
|
+
@info ||= @api.get_user_profile(self.jabberId)["getUserProfile"].first
|
133
|
+
end
|
134
|
+
|
135
|
+
end
|
136
|
+
|
137
|
+
end
|
data/website/index.html
CHANGED
@@ -1,11 +1,84 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
|
+
<head>
|
5
|
+
<link rel="stylesheet" href="stylesheets/screen.css" type="text/css" media="screen" />
|
6
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
7
|
+
<title>
|
8
|
+
TokBoxer
|
9
|
+
</title>
|
10
|
+
<script src="javascripts/rounded_corners_lite.inc.js" type="text/javascript"></script>
|
11
|
+
<style>
|
12
|
+
|
13
|
+
</style>
|
14
|
+
<script type="text/javascript">
|
15
|
+
window.onload = function() {
|
16
|
+
settings = {
|
17
|
+
tl: { radius: 10 },
|
18
|
+
tr: { radius: 10 },
|
19
|
+
bl: { radius: 10 },
|
20
|
+
br: { radius: 10 },
|
21
|
+
antiAlias: true,
|
22
|
+
autoPad: true,
|
23
|
+
validTags: ["div"]
|
24
|
+
}
|
25
|
+
var versionBox = new curvyCorners(settings, document.getElementById("version"));
|
26
|
+
versionBox.applyCornersToAll();
|
27
|
+
}
|
28
|
+
</script>
|
29
|
+
</head>
|
30
|
+
<body>
|
31
|
+
<div id="main">
|
32
|
+
|
33
|
+
<h1>TokBoxer</h1>
|
34
|
+
<div class="sidebar">
|
35
|
+
<div id="version" class="clickable" onclick='document.location = "http://rubyforge.org/projects/tokboxer"; return false'>
|
36
|
+
<p>Get Version</p>
|
37
|
+
<a href="http://rubyforge.org/projects/tokboxer" class="numbers">0.1.0</a>
|
38
|
+
</div>
|
39
|
+
</div>
|
40
|
+
<h2>What</h2>
|
41
|
+
<h2>Installing</h2>
|
42
|
+
<p><pre class='syntax'><span class="ident">sudo</span> <span class="ident">gem</span> <span class="ident">install</span> <span class="constant">TokBoxer</span></pre></p>
|
43
|
+
<h2>The basics</h2>
|
44
|
+
<h2>Demonstration of usage</h2>
|
45
|
+
<h2>Forum</h2>
|
46
|
+
<p><a href="http://groups.google.com/group/TokBoxer">http://groups.google.com/group/TokBoxer</a></p>
|
47
|
+
<p><span class="caps">TODO</span> – create Google Group – TokBoxer</p>
|
48
|
+
<h2>How to submit patches</h2>
|
49
|
+
<p>Read the <a href="http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/">8 steps for fixing other people’s code</a> and for section <a href="http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/#8b-google-groups">8b: Submit patch to Google Groups</a>, use the Google Group above.</p>
|
50
|
+
<p><span class="caps">TODO</span> – pick <span class="caps">SVN</span> or Git instructions</p>
|
51
|
+
<p>The trunk repository is <code>svn://rubyforge.org/var/svn/TokBoxer/trunk</code> for anonymous access.</p>
|
52
|
+
<p><span class="caps">OOOORRRR</span></p>
|
53
|
+
<p>You can fetch the source from either:</p>
|
54
|
+
<ul>
|
55
|
+
<li>rubyforge: <a href="http://rubyforge.org/scm/?group_id=7264">http://rubyforge.org/scm/?group_id=7264</a></li>
|
56
|
+
</ul>
|
57
|
+
<pre>git clone git://rubyforge.org/TokBoxer.git</pre>
|
58
|
+
<ul>
|
59
|
+
<li>github: <a href="http://github.com/GITHUB_USERNAME/TokBoxer/tree/master">http://github.com/GITHUB_USERNAME/TokBoxer/tree/master</a></li>
|
60
|
+
</ul>
|
61
|
+
<pre>git clone git://github.com/GITHUB_USERNAME/TokBoxer.git</pre>
|
62
|
+
<p><span class="caps">TODO</span> – add “github_username: username” to ~/.rubyforge/user-config.yml and newgem will reuse it for future projects.</p>
|
63
|
+
<ul>
|
64
|
+
<li>gitorious: <a href="git://gitorious.org/TokBoxer/mainline.git">git://gitorious.org/TokBoxer/mainline.git</a></li>
|
65
|
+
</ul>
|
66
|
+
<pre>git clone git://gitorious.org/TokBoxer/mainline.git</pre>
|
67
|
+
<h3>Build and test instructions</h3>
|
68
|
+
<pre>cd TokBoxer
|
69
|
+
rake test
|
70
|
+
rake install_gem</pre>
|
71
|
+
<h2>License</h2>
|
72
|
+
<p>This code is free to use under the terms of the <span class="caps">MIT</span> license.</p>
|
73
|
+
<h2>Contact</h2>
|
74
|
+
<p>Comments are welcome. Send an email to <a href="mailto:nj@belighted.com">Nicolas Jacobeus</a> via the <a href="http://groups.google.com/group/TokBoxer">forum</a></p>
|
75
|
+
<p class="coda">
|
76
|
+
<a href="nj@belighted.com">Nicolas Jacobeus</a>, 3rd November 2008<br>
|
77
|
+
Theme extended from <a href="http://rb2js.rubyforge.org/">Paul Battley</a>
|
78
|
+
</p>
|
79
|
+
</div>
|
80
|
+
|
81
|
+
<!-- insert site tracking codes here, like Google Urchin -->
|
82
|
+
|
83
|
+
</body>
|
84
|
+
</html>
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tokboxer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nicolas Jacobeus
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-11-
|
12
|
+
date: 2008-11-26 00:00:00 +01:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -63,6 +63,10 @@ files:
|
|
63
63
|
- Rakefile
|
64
64
|
- config/website.yml.sample
|
65
65
|
- lib/TokBoxer.rb
|
66
|
+
- lib/TokBoxer/Api.rb
|
67
|
+
- lib/TokBoxer/Call.rb
|
68
|
+
- lib/TokBoxer/User.rb
|
69
|
+
- lib/TokBoxer/VMail.rb
|
66
70
|
- script/console
|
67
71
|
- script/destroy
|
68
72
|
- script/generate
|