CQHTTP 0.2.0 → 0.2.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: 700ffb06a600566129b850c0cbd46727911f860d
4
- data.tar.gz: 44d259ba825fdc1c62e00cffa02cbd9e623a45af
3
+ metadata.gz: 32f5a329e4ce5dc8b0472737f61d828a43e95c6f
4
+ data.tar.gz: 959f0d0984d8121fe4e525a618aba376f712cae9
5
5
  SHA512:
6
- metadata.gz: 604e3753841b698d0d979823004d74acfca23e2ae8089bed8c29cff908e56c61c6036ac953648e983a09ce025063dd29b5c532e46a69f79122cc4a485608ff88
7
- data.tar.gz: 6c946f4ea817b8eb89ba2fb78c5998d487c5abc97f5d673f710efa512eabc11ccdf004fe86926f59430f985cb06d36969b0d8cc4857b62f8663fc572947d4702
6
+ metadata.gz: 1d487d975cfcf243045d29bdaf35c7702907e7867d2074cb22d6f075bcfc30807a7a3f173bf6e9d68b9ac493e4f2d4fb41734c655d853b1a660ae7bbd19ed0f3
7
+ data.tar.gz: e02241186ec51057dd9b82636876503c1094e01f241a8cdeb11b0ac30a4df68714dcee21b8e4df5816505ac8681bf5b438b7db494b16eda5f4ea7f010b87357f
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # CQHTTP ([English](/README.en,md))
1
+ # CQHTTP ([English](/README.en.md))
2
2
 
3
3
  在 ruby 中使用 [richardchien/coolq-http-api](https://github.com/richardchien/coolq-http-api)。
4
4
 
@@ -1,3 +1,3 @@
1
1
  module CQHTTP
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: CQHTTP
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.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-09-24 00:00:00.000000000 Z
11
+ date: 2017-10-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -73,7 +73,6 @@ files:
73
73
  - lib/CQHTTP/API.md
74
74
  - lib/CQHTTP/api.rb
75
75
  - lib/CQHTTP/network.rb
76
- - lib/CQHTTP/qq.rb
77
76
  - lib/CQHTTP/version.rb
78
77
  homepage: https://github.com/71e6fd52/cqhttp-ruby
79
78
  licenses: []
data/lib/CQHTTP/qq.rb DELETED
@@ -1,45 +0,0 @@
1
- #
2
- class QQ
3
- include QQAPI
4
- attr_reader :json
5
-
6
- def initialize(hostname: '0.0.0.0', port: 9455)
7
- @server = TCPServer.new(hostname, port)
8
- @event_method = []
9
- end
10
-
11
- def bind(func)
12
- @event_method << func
13
- end
14
-
15
- def run
16
- loop do
17
- socket = @server.accept
18
-
19
- head socket
20
-
21
- socket.print "HTTP/1.1 204\r\nContent-Type: application/json\r\n\r\n"
22
- data = socket.gets
23
- @json = JSON.parse data
24
-
25
- @event_method.each { |func| func.call self }
26
-
27
- socket.close
28
- end
29
- end
30
-
31
- private
32
-
33
- def head(socket)
34
- puts 'head'
35
- while (line = socket.gets) != "\r\n"
36
- put line
37
- end
38
- puts 'end'
39
- end
40
-
41
- def put(text)
42
- print ' '
43
- puts text
44
- end
45
- end