lsp_router 0.1.0 → 0.1.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
  SHA256:
3
- metadata.gz: d57746f846403f9ca2c5a45bba0ecd01fdb6e907e05095431063b8bc4a0a5f80
4
- data.tar.gz: a3aa45e975f6db6712acd14edd1f5fcfa3603578572890c87c29d0e8abb34da9
3
+ metadata.gz: c3ba53e8db9e41cea66c0d4f935517fe4f3e4e8e24a6173794e53ea409556847
4
+ data.tar.gz: 984ea810f99d29a70efbb798b76c5d9f161b5bb5433ab0b96c52ed015529699c
5
5
  SHA512:
6
- metadata.gz: 101ee8a0b48df239a88ee5a4a684f3591ab544a7e76e35cbea4ab30e12ef4f0711fbde52dca246e0f5729d49589ada0d8327cf242ede5e6ef3f3ce7a5c2e0dea
7
- data.tar.gz: dd2ec59d88c78cd1dd5111a0a6437ce87136b3ebc6fbdd1723b6a92e6d4a2e9ae5a6eff1c2c01ac61337e3e42dee342b8a4566b81e13367b03eb6154bcba149e
6
+ metadata.gz: 40903c06994c73209c64535f12b417c913e59db4a7b856eae9504aac1e86102a273656e6f3a4148b3fa54e8c862855cd846e5e29d00f457b6a8e691b727ee919
7
+ data.tar.gz: bde44dd17b4288879bf96dee727320241ebf143d13e4e5ee8fadbf562223db6a0c5214c584847369a6ff97f20b2048192dc2faaea076fbfc7f213b68b479818c
data/config/example.conf CHANGED
@@ -2,7 +2,7 @@ logfile '/tmp/lsp_router'
2
2
  loglevel :info
3
3
 
4
4
  server :rubocop do
5
- command 'rubocop-lsp'
5
+ command 'rubocop --lsp'
6
6
  mode :stdio
7
7
  end
8
8
 
@@ -41,6 +41,7 @@ class LspRouter
41
41
  # @return [Hash]
42
42
  def read
43
43
  header = @stdout.gets("\r\n\r\n")
44
+ return unless header
44
45
  fields = header.lines.map do |line|
45
46
  n, v = line.chomp.split(/: */, 2)
46
47
  [n.downcase, v] if n
@@ -1,3 +1,3 @@
1
1
  class LspRouter
2
- VERSION = '0.1.0'
2
+ VERSION = '0.1.1'
3
3
  end
data/lib/lsp_router.rb CHANGED
@@ -85,6 +85,7 @@ class LspRouter
85
85
  Thread.abort_on_exception = true
86
86
  while true
87
87
  data = server.read
88
+ break unless data
88
89
  @client.write(data)
89
90
  end
90
91
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lsp_router
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - TOMITA Masahiro