language_server-protocol 3.16.0.2 → 3.16.0.3

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
  SHA256:
3
- metadata.gz: cb38ed978207a09954b5a1a62b25b5d5ebaec981d82b9486dbf429c2593a9b5d
4
- data.tar.gz: 274301eb1c493d7d408da8b1b723630566a51c803bcc1affe22122ed85e18bba
3
+ metadata.gz: d19c5c039606efbbc57298c563b1a239c089b2598f0ed2d858e0109a6f255d92
4
+ data.tar.gz: 2e6b7d482808b24cf7dce34b933fe6af17e989934871226165ebe3466179024c
5
5
  SHA512:
6
- metadata.gz: 57b0e114a97a7313c59c2f34650967dedde4a93faf0ca9cd5ef33deedfa30c7a6609fb0d8decb33fd3e4ebed94a3948b5c20d0b10e2eb41b4812552f67ae0713
7
- data.tar.gz: 2faf8f34ce05e565828acc2cc06131e0a7112e2574da38e86e44432a17b536c8312c6ea40f7618617c145e9c17358d8ec926f482d89f73a6ce28fc961bad017b
6
+ metadata.gz: e54fb19dbc55a1373eb9920b463167a11b6805c6b31a0d8dc6c2d77dedcec755460d47cf08c5624208e071ee029463043f466192a265af8d897daf02227d39ed
7
+ data.tar.gz: 5badb34f7bec3ca1bc2c6a791f3e3eed615bb65e118159a014ab425cc4950d5b8eff6736a8375324aaee5099e6244c57e18f9a874dde1b09deab837934db983a
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "json"
2
4
 
3
5
  module LanguageServer
@@ -11,30 +13,11 @@ module LanguageServer
11
13
  end
12
14
 
13
15
  def read(&block)
14
- buffer = +""
15
- header_parsed = false
16
- content_length = nil
17
-
18
- while char = io.getc
19
- buffer << char
20
-
21
- unless header_parsed
22
- if buffer[-4..-1] == "\r\n" * 2
23
- content_length = buffer.match(/Content-Length: (\d+)/i)[1].to_i
24
-
25
- header_parsed = true
26
- buffer.clear
27
- end
28
- else
29
- if buffer.bytesize == content_length
30
- request = JSON.parse(buffer, symbolize_names: true)
31
-
32
- block.call(request)
33
-
34
- header_parsed = false
35
- buffer.clear
36
- end
37
- end
16
+ while buffer = io.gets("\r\n\r\n")
17
+ content_length = buffer.match(/Content-Length: (\d+)/i)[1].to_i
18
+ message = io.read(content_length) or raise
19
+ request = JSON.parse(message, symbolize_names: true)
20
+ block.call(request)
38
21
  end
39
22
  end
40
23
 
@@ -1,5 +1,5 @@
1
1
  module LanguageServer
2
2
  module Protocol
3
- VERSION = "3.16.0.2"
3
+ VERSION = "3.16.0.3"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: language_server-protocol
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.16.0.2
4
+ version: 3.16.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fumiaki MATSUSHIMA
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-08-25 00:00:00.000000000 Z
11
+ date: 2021-08-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -52,20 +52,6 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '5.0'
55
- - !ruby/object:Gem::Dependency
56
- name: pry-byebug
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - ">="
60
- - !ruby/object:Gem::Version
61
- version: '0'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - ">="
67
- - !ruby/object:Gem::Version
68
- version: '0'
69
55
  - !ruby/object:Gem::Dependency
70
56
  name: minitest-power_assert
71
57
  requirement: !ruby/object:Gem::Requirement