sord 5.0.1 → 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: 84021ad2fe6eca96e0b11e2ebc8b41fb7070c9e8bcd32db11e39fafecd463d86
4
- data.tar.gz: a38b1025856359aff335bcac403a563ac1cbe526c2c6edb8ab3d3c6e1088af02
3
+ metadata.gz: f101fdc3b63cf69bc59fd766ced5222c3e6b02f70f913fcc39085459e32c89de
4
+ data.tar.gz: ea8df6949fdef290b13cf082c364138a17224deb127e069fd8a55d8e86de29c4
5
5
  SHA512:
6
- metadata.gz: 9857df42edf887fc03ba10d21acd9389e6d7d87427424e5881f58eee004fabb0e644cb4bad1c487ce716af712d0208f170f7f6eafd0d6f01bc853cdf3a319ffe
7
- data.tar.gz: 30195da215e3a1dcba962a441e1498733ab410c59e9b6f4eab5f56be524131c0050ec150ce37b616c3d1ce2125d6b85f7cf00fe7b2b0f5a95c5eb99525736c8e
6
+ metadata.gz: 9bed3f4e28d753ccf493a63d552f0560267d5a4841ca6208691e557fa84ba719e1c906be765c4ba45d62ad84cbe167766b8b286202727400bcf62bf8e0748a84
7
+ data.tar.gz: c51d9041a3de3dd66faf35173c38ce74e89e5dc4054e9cc675c54a871dc35c84a33139e1a18674265d951f759365a66f272badca1306d89c3b7fa7997f87bb3e
data/CHANGELOG.md CHANGED
@@ -3,6 +3,11 @@ 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
+
6
11
  ## [5.0.1] - 2023-05-02
7
12
  ### Fixed
8
13
  - Use `File#exist?` instead of `File#exists?`, for Ruby 3.2 support. Thanks @matmorel!
@@ -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/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  # typed: strong
2
2
  module Sord
3
- VERSION = '5.0.1'
3
+ VERSION = '5.1.0'
4
4
  end
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.1
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: 2023-05-02 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