webim 5.4.2 → 5.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/README.md +9 -6
- data/lib/webim.rb +1 -1
- data/test/webim_test.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bd456adf2bd33d69739c8330095bc89a6e027c63
|
4
|
+
data.tar.gz: 8ff0f6603dd9fb51cdae405e164f78738bffa484
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 688e67178b9663d5b4bd15740119f76a68f0918d9e9082ae8bf83dd1fb7dd4cb1c3fc69672b351d92bdc57e42c2473d9c6ffb02d967902cf231bc78dc2efd13c
|
7
|
+
data.tar.gz: c366ee0b8d071fda776e74dc9077f4d20ddfccb14bae99e49235ab274a805e5400117be7c6b114ed99f211cd330b33a24bf20faaf7ab5a04278818dcb3828373
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# WebIM
|
2
2
|
|
3
|
-
A Ruby
|
3
|
+
A Ruby WebIM library for [nextalk.im](http://nextal.im).
|
4
4
|
|
5
5
|
## Require
|
6
6
|
|
@@ -8,7 +8,7 @@ Ruby2.0+
|
|
8
8
|
|
9
9
|
## Getting started
|
10
10
|
|
11
|
-
You can connect to NexTalk server by instantiating the `
|
11
|
+
You can connect to NexTalk server by instantiating the `WebIM::Client` class:
|
12
12
|
|
13
13
|
require "webim"
|
14
14
|
|
@@ -17,8 +17,6 @@ You can connect to NexTalk server by instantiating the `Webim::Client` class:
|
|
17
17
|
|
18
18
|
Once connected, you can forward requests or route messages to the server:
|
19
19
|
|
20
|
-
```ruby
|
21
|
-
|
22
20
|
# 向消息服务器转发用户上线消息,同时发送用户的好友id列表、群组id列表
|
23
21
|
client.online(['uid2','uid3', 'uid4'], ['room1', 'room2', 'room3'])
|
24
22
|
|
@@ -37,18 +35,23 @@ Once connected, you can forward requests or route messages to the server:
|
|
37
35
|
# 从消息服务器读取用户现场信息
|
38
36
|
client.presences(["uid1", "uid2"])
|
39
37
|
|
38
|
+
# 向消息服务器转发用户加入群组请求
|
39
|
+
client.join('room1')
|
40
|
+
|
40
41
|
# 从消息服务器读取当前群组在线用户
|
41
42
|
client.members('room1')
|
42
43
|
|
44
|
+
# 向消息服务器转发用户离开群组请求
|
45
|
+
client.leave('room1')
|
46
|
+
|
43
47
|
# 向消息服务器转发用户下线消息
|
44
48
|
client.offline
|
45
49
|
|
46
|
-
```
|
47
50
|
|
48
51
|
## Gem build and install
|
49
52
|
|
50
53
|
gem build webim.gemspec
|
51
54
|
|
52
|
-
gem install webim-5.
|
55
|
+
gem install webim-5.8.gem
|
53
56
|
|
54
57
|
|
data/lib/webim.rb
CHANGED
data/test/webim_test.rb
CHANGED
@@ -6,7 +6,7 @@ class WebimTest < Test::Unit::TestCase
|
|
6
6
|
|
7
7
|
def setup
|
8
8
|
endpoint = {:id => "uid1", :nick => "user1", :show => "available", :status => 'Online'}
|
9
|
-
@client = WebIM::Client.new(endpoint, "localhost", "public", "
|
9
|
+
@client = WebIM::Client.new(endpoint, "localhost", "public", "t.nextalk.im", 8000)
|
10
10
|
@client.online(['uid2','uid3', 'uid4'], ['room1', 'room2', 'room3'])
|
11
11
|
end
|
12
12
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: webim
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.
|
4
|
+
version: '5.8'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ery Lee
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-04-24 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Ruby webim client library for NexTalk.IM
|
14
14
|
email: ery.lee@gmail.com
|
@@ -42,7 +42,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
42
42
|
version: '0'
|
43
43
|
requirements: []
|
44
44
|
rubyforge_project:
|
45
|
-
rubygems_version: 2.0.
|
45
|
+
rubygems_version: 2.0.14
|
46
46
|
signing_key:
|
47
47
|
specification_version: 4
|
48
48
|
summary: Ruby webim client library for NexTalk.IM
|