matrix_dbus 2.0.0 → 2.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fed93f81bba45cc4686dfb2390018823642a0c2f
4
- data.tar.gz: e9cd4b05fba3a15d88d1b0c02a6448979401fe09
3
+ metadata.gz: fbec2e1c325bb53f32e41627da6c7c5c3f8169da
4
+ data.tar.gz: 9571f0bf0151ad5c2b4a8dcd4c999f10d7cf665b
5
5
  SHA512:
6
- metadata.gz: ebfb43ce61f0175ddf83ca25f67222fa1241dcd458cd0e492a1c50c432c09bf4501f22d138f35bb48d8fd3004202ecda7c231ee3a94ccab5c7ebcb449e615e72
7
- data.tar.gz: 6a3bf3e2e5dc00c7d488df01affb4fe27a3c9af54e2e1fdabd31cb686e95d4f634767901f9b1899588577e52ef1120482ab349d556ddcdbbc1965b23dcb9d430
6
+ metadata.gz: cde018caa886277fcc95eef7982c287224552b945e37bd7024dead74654c84d5f119cb1d1142812d0446c4bcf11fbd4eea408e9b867576f54d960eb16bf9e522
7
+ data.tar.gz: 619d15770d9381baf976673349a2186d0fb036f1c808aeb65e4ca4fe54ec82fb90073dcd18c577438426a0f0d7f4ee172fef91cce8d74c28657ebcb04b341565
data/README.en.md CHANGED
@@ -20,6 +20,10 @@ Or install it yourself as:
20
20
 
21
21
  ## Usage
22
22
 
23
+ Service: `org.dastudio.qq`
24
+ Object path: `/org/dastudio/qq`
25
+ Interface: `org.dastudio.cqhttp`
26
+
23
27
  TODO: Write usage instructions here
24
28
 
25
29
  ## Development
data/README.md CHANGED
@@ -20,6 +20,10 @@ gem 'matrix_dbus'
20
20
 
21
21
  ## 使用
22
22
 
23
+ Service: `org.dastudio.qq`
24
+ Object path: `/org/dastudio/qq`
25
+ Interface: `org.dastudio.cqhttp`
26
+
23
27
  TODO: 写使用说明
24
28
 
25
29
  ## 开发
data/exe/matrix-dbus CHANGED
@@ -4,7 +4,9 @@ require 'matrix_dbus'
4
4
  Thread.abort_on_exception = true
5
5
 
6
6
  def send_if_exist(obj, name, json)
7
- obj.send name, JSON.pretty_generate(json) unless json.empty?
7
+ return if json.nil?
8
+ return if json.empty?
9
+ obj.send name, JSON.pretty_generate(json)
8
10
  end
9
11
 
10
12
  def matrix2dbus(c, obj)
@@ -10,9 +10,15 @@ module MatrixDBus
10
10
 
11
11
  def run
12
12
  Thread.new { @matrix.run }
13
+ rescue RestClient::Exception => e
14
+ puts e
15
+ puts e.response.body
16
+ retry
13
17
  end
14
18
 
15
19
  def self.return(info)
20
+ return ['{}'] if info.nil?
21
+ return ['{}'] if info.empty?
16
22
  [JSON.pretty_generate(info)]
17
23
  end
18
24
 
@@ -1,3 +1,3 @@
1
1
  module MatrixDBus
2
- VERSION = '2.0.0'.freeze
2
+ VERSION = '2.0.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: matrix_dbus
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - 71e6fd52
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-10-28 00:00:00.000000000 Z
11
+ date: 2017-10-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler