khl 1.2.0 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/khl/message.rb +6 -6
- data/lib/khl/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5b3ff60071d40b884b84c71573ec653fe5234c849e70adfa9d3527c8b790eb2e
|
4
|
+
data.tar.gz: cc54276f09718288a23b72b8f55e49cc12a19b20f15680af4f6478dffbe5153d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7f83216e039d7b3c3c088ab07d0900ecdd60b6b2f70a360933d05d41265ec6c43160c895bca64add54529dc026f5cbfdd0c8084e12afffb62b6681f87ef5fec6
|
7
|
+
data.tar.gz: 8e4558eab997c80038df0385ce67141797980c74358276dcc58ec7e56b3f5842f1d3d31eff73c8f71bb9c9a6fb86eaf13aac26075888bdd0b8bdabb9019e020f
|
data/CHANGELOG.md
CHANGED
data/lib/khl/message.rb
CHANGED
@@ -22,14 +22,14 @@ module KHL
|
|
22
22
|
def self.parse(raw)
|
23
23
|
return unless raw
|
24
24
|
|
25
|
-
data = JSON.parse(raw)
|
25
|
+
data = raw.is_a?(String) ? JSON.parse(raw) : raw
|
26
26
|
data = ActiveSupport::HashWithIndifferentAccess.new(data)
|
27
27
|
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
28
|
+
Message.new(
|
29
|
+
type: TYPES[data[:s]],
|
30
|
+
data: data[:d],
|
31
|
+
sn: data[:sn]
|
32
|
+
)
|
33
33
|
end
|
34
34
|
|
35
35
|
def initialize(type: nil, data: nil, sn: nil)
|
data/lib/khl/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: khl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dounx
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-04-
|
11
|
+
date: 2022-04-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -103,7 +103,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
103
103
|
- !ruby/object:Gem::Version
|
104
104
|
version: '0'
|
105
105
|
requirements: []
|
106
|
-
rubygems_version: 3.3.
|
106
|
+
rubygems_version: 3.3.11
|
107
107
|
signing_key:
|
108
108
|
specification_version: 4
|
109
109
|
summary: Ruby SDK for 开黑啦
|