solargraph 0.23.0 → 0.23.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6e4fd079cd97cdd7650d3040d3a9182451f280e8e89c1de91f82d2092dbef840
4
- data.tar.gz: '0516619d1947a312eebb8b1caa535c4194bed4a308b4c68467af7d55c705119a'
3
+ metadata.gz: d187a64660b1ee9c012163ae7d46c76c4d693f7a5559024cfbfb7a2e935ff946
4
+ data.tar.gz: 0a399c708b6123c8a5ea4592b13ad9e93facb710a057328f7e909b2f5e36de1d
5
5
  SHA512:
6
- metadata.gz: 4b290e1ed7ecf9b59933abef586de329903c6c9f06d61b233dc71b817b75f7a4e4cae1f246803965779eac8b9eed1107e27263e63a039a282e2ede3da2f2260d
7
- data.tar.gz: 7b29c6d72ce773d6ea9a55a5ae9d23398fbe1d4ef9ace42bab1b29723e8c61171bbae1c12900fd4e64f2e1b17193519b4eab202e39ab8428e3a24d691c8c17af
6
+ metadata.gz: 9f39a57b1a4c0e3606972305cfab712eab503c742743c0cf88b701db0c9aabd0f2c3cafa79ca29dad5f8661184698ab6818be48be9ee514a7d17fb48cba5e4af
7
+ data.tar.gz: 00db80b46d3183fc2e6390b37d3b2b1bf9c0673489d837e71295b87faab8b3075409cf43261420b94cad710cd35fa01e8498418c8e3d183d4c0fea917b146f0c
data/bin/solargraph CHANGED
File without changes
File without changes
data/lib/solargraph.rb CHANGED
File without changes
File without changes
@@ -8,11 +8,11 @@ module Solargraph
8
8
  class Rubocop < Base
9
9
  # Conversion of RuboCop severity names to LSP constants
10
10
  SEVERITIES = {
11
- 'refactor' => 4,
12
- 'convention' => 3,
13
- 'warning' => 2,
14
- 'error' => 1,
15
- 'fatal' => 1
11
+ 'refactor' => Severities::HINT,
12
+ 'convention' => Severities::INFORMATION,
13
+ 'warning' => Severities::WARNING,
14
+ 'error' => Severities::ERROR,
15
+ 'fatal' => Severities::ERROR
16
16
  }
17
17
 
18
18
  # The rubocop command
@@ -252,7 +252,7 @@ module Solargraph
252
252
  def register_capabilities methods
253
253
  @register_semaphore.synchronize do
254
254
  send_request 'client/registerCapability', {
255
- registrations: methods.reject{|m| @dynamic_capabilities.include?(m) and @registered_capabilities.include?(m)}.map { |m|
255
+ registrations: methods.select{|m| @dynamic_capabilities.include?(m) and !@registered_capabilities.include?(m)}.map { |m|
256
256
  @registered_capabilities.push m
257
257
  {
258
258
  id: m,
@@ -101,11 +101,13 @@ module Solargraph
101
101
 
102
102
  # @return [Boolean]
103
103
  def dynamic_registration_for? section, capability
104
- result = params['capabilities'] and
104
+ result = (params['capabilities'] and
105
105
  params['capabilities'][section] and
106
106
  params['capabilities'][section][capability] and
107
- params['capabilities'][section][capability]['dynamicRegistration']
108
- host.allow_registration "#{section}/#{capability}" if result
107
+ params['capabilities'][section][capability]['dynamicRegistration'])
108
+ # HACK: Capability for workspace/workspaceSymbol is workspace/symbol
109
+ adjcap = (section == 'workspace' and capability == 'symbol') ? 'workspaceSymbol' : capability
110
+ host.allow_registration("#{section}/#{adjcap}") if result
109
111
  result
110
112
  end
111
113
  end
File without changes
@@ -1,3 +1,3 @@
1
1
  module Solargraph
2
- VERSION = '0.23.0'
2
+ VERSION = '0.23.2'
3
3
  end
File without changes
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: solargraph
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.23.0
4
+ version: 0.23.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fred Snyder
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-07-02 00:00:00.000000000 Z
11
+ date: 2018-07-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: parser
@@ -376,7 +376,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
376
376
  version: '0'
377
377
  requirements: []
378
378
  rubyforge_project:
379
- rubygems_version: 2.7.6
379
+ rubygems_version: 2.7.7
380
380
  signing_key:
381
381
  specification_version: 4
382
382
  summary: Solargraph for Ruby