sord 5.0.0 → 5.1.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: 12567f3b935a14271aedb28b62acfcfef3cb1e3bfb80fd294732947490dfb765
4
- data.tar.gz: c40c2790500508fd2e575ab01e471cf7fe0e90f0c6d255285c7474433b65952c
3
+ metadata.gz: f101fdc3b63cf69bc59fd766ced5222c3e6b02f70f913fcc39085459e32c89de
4
+ data.tar.gz: ea8df6949fdef290b13cf082c364138a17224deb127e069fd8a55d8e86de29c4
5
5
  SHA512:
6
- metadata.gz: 85435a86928840302557121d0deeafde94a0b70905da93403c642a303ec773f5f4503b316beed31709052839a597e671df9ac554410d4c169843e859aebf361d
7
- data.tar.gz: 77795ca64b509b9c7e7da210fac12d2b27bb8fe9e952ab61dc1d87c92189a1d0e457a4546bce2cebac4230a643f96072559c39bd477fc7e345819c98dd0b3bdd
6
+ metadata.gz: 9bed3f4e28d753ccf493a63d552f0560267d5a4841ca6208691e557fa84ba719e1c906be765c4ba45d62ad84cbe167766b8b286202727400bcf62bf8e0748a84
7
+ data.tar.gz: c51d9041a3de3dd66faf35173c38ce74e89e5dc4054e9cc675c54a871dc35c84a33139e1a18674265d951f759365a66f272badca1306d89c3b7fa7997f87bb3e
data/CHANGELOG.md CHANGED
@@ -3,6 +3,15 @@ All notable changes to this project will be documented in this file.
3
3
 
4
4
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
5
5
 
6
+ ## [5.1.0] - 2023-05-22
7
+ ### Added
8
+ - Add support for a single `@overload` tag, typically used to describe methods defined outside of
9
+ Ruby. Thanks @ohai!
10
+
11
+ ## [5.0.1] - 2023-05-02
12
+ ### Fixed
13
+ - Use `File#exist?` instead of `File#exists?`, for Ruby 3.2 support. Thanks @matmorel!
14
+
6
15
  ## [5.0.0] - 2022-10-06
7
16
  ### Added
8
17
  - If a derived class does not provide tags for a method, but it is overridden from a base class
@@ -294,6 +294,15 @@ module Sord
294
294
  next
295
295
  end
296
296
 
297
+ # If the method has YARD's "@overload" tags, the information of the
298
+ # first one is merged into meth object
299
+ # NOTE: This code does not handle the second and subsequent @overload tags
300
+ if meth.tag("overload")
301
+ meth.parameters = meth.tag("overload").parameters
302
+ meth.tag("overload").tags.each { |tag| meth.add_tag(tag) }
303
+ meth.docstring += meth.tag("overload").docstring
304
+ end
305
+
297
306
  # Sort parameters
298
307
  meth.parameters.reverse.sort! { |pair1, pair2| sort_params(pair1, pair2) }
299
308
 
data/lib/sord/resolver.rb CHANGED
@@ -32,11 +32,11 @@ module Sord
32
32
 
33
33
  gem_paths = Bundler.load.specs.map(&:full_gem_path)
34
34
  gem_paths.each do |path|
35
- if File.exists?("#{path}/rbi")
36
- Dir["#{path}/rbi/**/*.rbi"].each do |sigfile|
37
- tree = Parlour::TypeLoader.load_file(sigfile)
38
- add_rbi_objects_to_paths(tree.children, hash)
39
- end
35
+ next unless File.exist?("#{path}/rbi")
36
+
37
+ Dir["#{path}/rbi/**/*.rbi"].each do |sigfile|
38
+ tree = Parlour::TypeLoader.load_file(sigfile)
39
+ add_rbi_objects_to_paths(tree.children, hash)
40
40
  end
41
41
  end
42
42
  end
data/lib/sord/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  # typed: strong
2
2
  module Sord
3
- VERSION = '5.0.0'
3
+ VERSION = '5.1.0'
4
4
  end
data/sord.gemspec CHANGED
@@ -29,7 +29,7 @@ Gem::Specification.new do |spec|
29
29
  spec.add_dependency 'rbs', '~> 2.0'
30
30
 
31
31
  spec.add_development_dependency "bundler", "~> 2.0"
32
- spec.add_development_dependency "rake", "~> 10.0"
32
+ spec.add_development_dependency "rake", "~> 13.0"
33
33
  spec.add_development_dependency "rspec", "~> 3.0"
34
34
  spec.add_development_dependency 'sorbet'
35
35
  spec.add_development_dependency 'simplecov'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sord
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.0
4
+ version: 5.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aaron Christiansen
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-10-06 00:00:00.000000000 Z
11
+ date: 2023-05-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: yard
@@ -100,14 +100,14 @@ dependencies:
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: '10.0'
103
+ version: '13.0'
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: '10.0'
110
+ version: '13.0'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: rspec
113
113
  requirement: !ruby/object:Gem::Requirement