webim 0.1.0 → 0.1.2

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +10 -1
  3. data/lib/webim.rb +3 -2
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 018cfb15bf5938d1909314a2797127959e8b7bea
4
- data.tar.gz: 85b5d031659a78e7f6be1ea0906c4e25206d2057
3
+ metadata.gz: d869afaf7806c888cbcdf4ae775d1d700a5f5fb1
4
+ data.tar.gz: 917265023d11fdc67637cb3bb8933b2237bc16bc
5
5
  SHA512:
6
- metadata.gz: ec27f9a54ffb5f8e0becc4387ba8ffd1b4e46a794091faf86164369dd52ca85013aa4dacc1a1175398c57742175265bd0937327128c2bf37baf67bacb9745f8f
7
- data.tar.gz: 4720f02fb183d9dcb864de4ceb3b2ccbb97e62310c7aa07b86b454b689a3ce59b592c0b5a985253d223a8ba0a977b9d4b846bf542b84a4af1fa524da27e8d86a
6
+ metadata.gz: 1c26e31ecb35efac0254545963b94c6b7b3a668428142268590eb0fdce9490319e3349008ff4be421def09e6801fb7122320f0700578c08290792b4d3ba0399e
7
+ data.tar.gz: a4205b393e1b7ee5ac44af0b27ecddb5ae36317966dc32370f2c70dcf6602cf33449a3fa0303a1594a635a53326b9275f9609b62a9a8ed5579dc9284ac4597e1
@@ -1,4 +1,13 @@
1
- # 0.1 (2013-12-12)
1
+
2
+ # 0.1.2 (2013-12-13)
3
+
4
+ * fix lib/webim.rb:146: syntax error, unexpected ')'
5
+
6
+ # 0.1.1 (2013-12-13)
7
+
8
+ * add timestamp parameter to message function
9
+
10
+ # 0.1.0 (2013-12-12)
2
11
 
3
12
  * first release
4
13
 
@@ -140,10 +140,11 @@ module Webim
140
140
  #
141
141
  # to: 接收者
142
142
  # body: 消息体
143
+ # timestam: 时间戳
143
144
  # type: chat | grpchat
144
145
  # style: 消息CSS
145
146
  #
146
- def message(to, body, type = "chat", style = "")
147
+ def message(to, body, timestamp = nil, type = "chat", style = "")
147
148
  http_post('/messages', {
148
149
  :version => APIVSN,
149
150
  :ticket => @ticket,
@@ -154,7 +155,7 @@ module Webim
154
155
  :to => to,
155
156
  :body => body,
156
157
  :style => style,
157
- :timestamp => Time.now.to_f * 1000
158
+ :timestamp => timestamp ? timestamp : Time.now.to_f * 1000
158
159
  })
159
160
  end
160
161
 
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: 0.1.0
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ery Lee
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-12-12 00:00:00.000000000 Z
11
+ date: 2013-12-13 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