solargraph 0.39.14 → 0.40.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (69) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +4 -8
  3. data/CHANGELOG.md +988 -0
  4. data/Rakefile +12 -1
  5. data/SPONSORS.md +1 -0
  6. data/lib/solargraph.rb +2 -4
  7. data/lib/solargraph/api_map.rb +75 -74
  8. data/lib/solargraph/api_map/cache.rb +2 -2
  9. data/lib/solargraph/api_map/store.rb +4 -8
  10. data/lib/solargraph/{bundle.rb → bench.rb} +6 -2
  11. data/lib/solargraph/compat.rb +14 -0
  12. data/lib/solargraph/complex_type.rb +2 -2
  13. data/lib/solargraph/convention.rb +13 -4
  14. data/lib/solargraph/convention/base.rb +16 -8
  15. data/lib/solargraph/convention/gemfile.rb +2 -5
  16. data/lib/solargraph/convention/gemspec.rb +3 -6
  17. data/lib/solargraph/convention/rspec.rb +3 -6
  18. data/lib/solargraph/documentor.rb +2 -0
  19. data/lib/solargraph/environ.rb +11 -6
  20. data/lib/solargraph/language_server/message/extended/check_gem_version.rb +6 -1
  21. data/lib/solargraph/language_server/message/text_document/definition.rb +1 -1
  22. data/lib/solargraph/language_server/message/text_document/formatting.rb +17 -19
  23. data/lib/solargraph/library.rb +8 -10
  24. data/lib/solargraph/parser/legacy/node_chainer.rb +7 -7
  25. data/lib/solargraph/parser/legacy/node_methods.rb +5 -0
  26. data/lib/solargraph/parser/legacy/node_processors/ivasgn_node.rb +1 -1
  27. data/lib/solargraph/parser/legacy/node_processors/send_node.rb +36 -23
  28. data/lib/solargraph/parser/node_processor/base.rb +3 -0
  29. data/lib/solargraph/parser/rubyvm/node_chainer.rb +9 -9
  30. data/lib/solargraph/parser/rubyvm/node_methods.rb +11 -1
  31. data/lib/solargraph/parser/rubyvm/node_processors/args_node.rb +1 -1
  32. data/lib/solargraph/parser/rubyvm/node_processors/ivasgn_node.rb +1 -1
  33. data/lib/solargraph/parser/rubyvm/node_processors/send_node.rb +40 -29
  34. data/lib/solargraph/pin.rb +0 -3
  35. data/lib/solargraph/pin/common.rb +1 -1
  36. data/lib/solargraph/pin/conversions.rb +3 -4
  37. data/lib/solargraph/pin/documenting.rb +3 -9
  38. data/lib/solargraph/pin/method.rb +141 -7
  39. data/lib/solargraph/pin/method_alias.rb +1 -1
  40. data/lib/solargraph/position.rb +2 -14
  41. data/lib/solargraph/shell.rb +1 -1
  42. data/lib/solargraph/source.rb +10 -6
  43. data/lib/solargraph/source/chain.rb +18 -5
  44. data/lib/solargraph/source_map.rb +4 -1
  45. data/lib/solargraph/source_map/clip.rb +3 -2
  46. data/lib/solargraph/source_map/mapper.rb +10 -6
  47. data/lib/solargraph/type_checker.rb +35 -39
  48. data/lib/solargraph/type_checker/param_def.rb +1 -1
  49. data/lib/solargraph/version.rb +1 -1
  50. data/lib/solargraph/yard_map.rb +40 -47
  51. data/lib/solargraph/yard_map/core_fills.rb +185 -0
  52. data/lib/solargraph/yard_map/helpers.rb +16 -0
  53. data/lib/solargraph/yard_map/mapper.rb +14 -8
  54. data/lib/solargraph/{pin/yard_pin/constant.rb → yard_map/mapper/to_constant.rb} +6 -6
  55. data/lib/solargraph/yard_map/mapper/to_method.rb +78 -0
  56. data/lib/solargraph/{pin/yard_pin/namespace.rb → yard_map/mapper/to_namespace.rb} +6 -6
  57. data/lib/solargraph/yard_map/rdoc_to_yard.rb +1 -1
  58. data/lib/solargraph/yard_map/stdlib_fills.rb +43 -0
  59. data/lib/solargraph/yard_map/to_method.rb +79 -0
  60. data/solargraph.gemspec +4 -4
  61. metadata +20 -34
  62. data/lib/solargraph/core_fills.rb +0 -160
  63. data/lib/solargraph/pin/attribute.rb +0 -49
  64. data/lib/solargraph/pin/base_method.rb +0 -141
  65. data/lib/solargraph/pin/yard_pin.rb +0 -12
  66. data/lib/solargraph/pin/yard_pin/method.rb +0 -80
  67. data/lib/solargraph/pin/yard_pin/yard_mixin.rb +0 -20
  68. data/lib/solargraph/stdlib_fills.rb +0 -40
  69. data/travis-bundler.rb +0 -11
@@ -1,40 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Solargraph
4
- # Overrides for the Ruby stdlib.
5
- #
6
- # The YardMap uses this module to add type information to stdlib methods.
7
- #
8
- module StdlibFills
9
- Override = Pin::Reference::Override
10
-
11
- LIBS = {
12
- 'benchmark' => [
13
- Override.method_return('Benchmark.measure', 'Benchmark::Tms')
14
- ],
15
-
16
- 'pathname' => [
17
- Override.method_return('Pathname#join', 'Pathname'),
18
- Override.method_return('Pathname#basename', 'Pathname'),
19
- Override.method_return('Pathname#dirname', 'Pathname'),
20
- Override.method_return('Pathname#cleanpath', 'Pathname'),
21
- Override.method_return('Pathname#children', 'Array<Pathname>'),
22
- Override.method_return('Pathname#entries', 'Array<Pathname>')
23
- ],
24
-
25
- 'set' => [
26
- Override.method_return('Enumerable#to_set', 'Set'),
27
- Override.method_return('Set#add', 'self'),
28
- Override.method_return('Set#add?', 'self, nil'),
29
- Override.method_return('Set#classify', 'Hash'),
30
- Override.from_comment('Set#each', '@yieldparam_single_parameter')
31
- ]
32
- }
33
-
34
- # @param path [String]
35
- # @return [Array<Pin::Reference::Override>]
36
- def self.get path
37
- LIBS[path] || []
38
- end
39
- end
40
- end
@@ -1,11 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- # Travis uses this script to select which version of bundler to install for
4
- # each job.
5
-
6
- if RUBY_VERSION =~ /^2\.(1|2)\./
7
- `gem install bundler -v '< 2'`
8
- else
9
- `gem update --system`
10
- `gem install bundler`
11
- end