yard-sorbet 0.4.0 → 0.4.1

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: 24bbf6faf77f9a54ad0c74bacef4828729c182352464734bb587ef6f1a035e9a
4
- data.tar.gz: c68e0b16d0f7cd81f1f03dac293aa7fd7f87504c134c1de34c3cf2e2600ff6d2
3
+ metadata.gz: f5adecef50618ea39bdb103aa89d5a6561e838ad9860b7b4103fc39eeb268f5b
4
+ data.tar.gz: 33a6ce0b55c6a9934e3491a1a1feff06da39919d6b5196a67bab5d3861cd9425
5
5
  SHA512:
6
- metadata.gz: 65bbdc49da863973cd60926c8b898a789d4b740009453a698dfa0531eaa742805d81e72eb95e1411625a6ecf25029c85b6dc863bcf67928035aeacaa4766fb55
7
- data.tar.gz: 4aba39bc2d129e99910d421f47fa01fb9178078da6bb1ba5b1e8da3c847e39b96927342e5c774db1ec71a46475a2eeed0ae12be4eb729bb278bfbf2fcd79e720
6
+ metadata.gz: '0139df44b176ef888fb74101915593dd43349133abc0cec0e60a16be72c72ddbbfdefa1ded2dc535764ef898a44156e8a5d74ff40d62ab109818277666f2e44f'
7
+ data.tar.gz: 2015b2b80680fcea678afc3b5d1a68350218904cc97a93ef4dec35cb1e07918d8766c77f309b21371dd52609c98a348bcb932899c360f721e0a00d3aedf0f175
@@ -12,7 +12,12 @@ class YARDSorbet::StructHandler < YARD::Handlers::Ruby::Base
12
12
  sig { void }
13
13
  def process
14
14
  # Store the property for use in the constructor definition
15
- name = statement.parameters[0].jump(:ident).source
15
+ name = statement.parameters[0].jump(
16
+ :ident, # handles most "normal" identifiers
17
+ :kw, # handles prop names using reserved words like `end` or `def`
18
+ :const # handles capitalized prop names like Foo
19
+ ).source
20
+
16
21
  doc = statement.docstring.to_s
17
22
  source = statement.source
18
23
  types = YARDSorbet::SigToYARD.convert(statement.parameters[1])
@@ -2,5 +2,5 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module YARDSorbet
5
- VERSION = '0.4.0'
5
+ VERSION = '0.4.1'
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yard-sorbet
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Douglas Eichelberger
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-04-02 00:00:00.000000000 Z
11
+ date: 2021-04-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: codecov
@@ -58,28 +58,28 @@ dependencies:
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 1.12.0
61
+ version: 1.13.0
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: 1.12.0
68
+ version: 1.13.0
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rubocop-performance
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: 1.10.0
75
+ version: 1.11.0
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: 1.10.0
82
+ version: 1.11.0
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: rubocop-rake
85
85
  requirement: !ruby/object:Gem::Requirement
@@ -100,14 +100,14 @@ dependencies:
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: 2.2.0
103
+ version: 2.3.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: 2.2.0
110
+ version: 2.3.0
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: rubocop-sorbet
113
113
  requirement: !ruby/object:Gem::Requirement