steep 0.17.1 → 0.18.0

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: a1ad7c49806193ddc567206eff7d74ad184bf6e339f15f5a06b54eac2a44798d
4
- data.tar.gz: 7738b5ccd9339e7de6643e8d87b8e3eaf7a0f36a42a4667848ea29cc3637d34a
3
+ metadata.gz: 6c7d4a0ac0c0bbae681b48b3a435baf1e30f67ed36ae86a9cf6e4546d6e30485
4
+ data.tar.gz: a22966a8fd94bed71ad1398d2587b7d84cfc8ba157a47da8b7289f2dae51b8d8
5
5
  SHA512:
6
- metadata.gz: 68c6694af012124101dbf7d345fd4cab56582968a58cb462c4336558547089a403604606991585d12c5165b2955002f5905fe6b75788e7bab677cb9b6229f1ec
7
- data.tar.gz: 25437e503f4630e92b9fa7cdb31701ae809209f8e300812736a6acacdd181882fd380d277dd672334ae88698198c5ea4a2e0d7d83761614d75db86cf49d9d49e
6
+ metadata.gz: 31b10b5a6ac174dafee25cf2c9baaf725218e7c8e7969437557982dcc9c4c1704f8fb87bdd2a583eb9e538fee06376fe068ba2f8f64a5f18ec55919d3d49f9f4
7
+ data.tar.gz: 5f3db5481934cba32b3b45a92b2a9e2dc796507b3b99c2bdcc9c1a991b9ee6982dad1f5824c478abc7a483ba8ad17fab13ac48e6e13429daf465f3c025e66a40
@@ -2,6 +2,11 @@
2
2
 
3
3
  ## master
4
4
 
5
+ ## 0.18.0 (2020-07-06)
6
+
7
+ * Sort result of `Pathname#glob` ([#154](https://github.com/soutaro/steep/pull/154))
8
+ * Sort methods in LanguageServer to return non-inherited methods first ([#159](https://github.com/soutaro/steep/pull/159))
9
+
5
10
  ## 0.17.1 (2020-06-15)
6
11
 
7
12
  * Allow RBS gem to be 0.4 ([#153](https://github.com/soutaro/steep/pull/153))
@@ -12,6 +12,7 @@ require 'language_server-protocol'
12
12
  require "etc"
13
13
  require "open3"
14
14
  require "stringio"
15
+ require 'uri'
15
16
 
16
17
  require "rbs"
17
18
 
@@ -10,7 +10,7 @@ module Steep
10
10
 
11
11
  InstanceVariableItem = Struct.new(:identifier, :range, :type, keyword_init: true)
12
12
  LocalVariableItem = Struct.new(:identifier, :range, :type, keyword_init: true)
13
- MethodNameItem = Struct.new(:identifier, :range, :definition, :method_type, keyword_init: true)
13
+ MethodNameItem = Struct.new(:identifier, :range, :definition, :method_type, :inherited_method, keyword_init: true)
14
14
 
15
15
  attr_reader :source_text
16
16
  attr_reader :path
@@ -244,7 +244,8 @@ module Steep
244
244
  items << MethodNameItem.new(identifier: name,
245
245
  range: range,
246
246
  definition: method,
247
- method_type: method_type)
247
+ method_type: method_type,
248
+ inherited_method: inherited_method?(method, type))
248
249
  end
249
250
  end
250
251
  end
@@ -293,6 +294,10 @@ module Steep
293
294
 
294
295
  index
295
296
  end
297
+
298
+ def inherited_method?(method, type)
299
+ method.implemented_in&.name&.name != type.name&.name
300
+ end
296
301
  end
297
302
  end
298
303
  end
@@ -20,7 +20,7 @@ module Steep
20
20
  Pathname.glob(absolute_path)
21
21
  end
22
22
 
23
- files.each do |source_path|
23
+ files.sort.each do |source_path|
24
24
  yield project.relative_path(source_path)
25
25
  end
26
26
  end
@@ -191,7 +191,8 @@ HOVER
191
191
  range: range
192
192
  ),
193
193
  documentation: item.definition.comment&.string,
194
- insert_text_format: LanguageServer::Protocol::Constant::InsertTextFormat::SNIPPET
194
+ insert_text_format: LanguageServer::Protocol::Constant::InsertTextFormat::SNIPPET,
195
+ sort_text: item.inherited_method ? 'z' : 'a' # Ensure language server puts non-inherited methods before inherited methods
195
196
  )
196
197
  when Project::CompletionProvider::InstanceVariableItem
197
198
  label = "#{item.identifier}: #{item.type}"
@@ -1,3 +1,3 @@
1
1
  module Steep
2
- VERSION = "0.17.1"
2
+ VERSION = "0.18.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: steep
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.17.1
4
+ version: 0.18.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Soutaro Matsumoto
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-06-15 00:00:00.000000000 Z
11
+ date: 2020-07-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -463,7 +463,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
463
463
  - !ruby/object:Gem::Version
464
464
  version: '0'
465
465
  requirements: []
466
- rubygems_version: 3.0.3
466
+ rubygems_version: 3.1.2
467
467
  signing_key:
468
468
  specification_version: 4
469
469
  summary: Gradual Typing for Ruby