rbi 0.1.2 → 0.1.4

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: 3adefb9fc887432fdab8f11a5800c58fe0c4b7a089c1170d67fc5fa6374c475d
4
- data.tar.gz: 5259d5132a2b83761a22419c10fca4beff9bb95e2e60c779c3e7b5583230476d
3
+ metadata.gz: 7addd38e69e4e82317c0980f3175369f086c17f5147f7371ee7256b05f3494cd
4
+ data.tar.gz: 5fe473bb4c84e9c90f927366a4373bdab413c5d9602deba0f85e71d0251a43c4
5
5
  SHA512:
6
- metadata.gz: cb345c63c449eb4610d826b3a9a2e6da4633ac7f29ceaf0b46af689f956d5a6758939d02b6234f676c6f7ce6f49ccf119e4a6237946e87cd9a7d13b57f014f82
7
- data.tar.gz: 674a6fe4acf7b92ea718ed12c0906d5d1b8a1e1942869e0c163060fd107d227a65e0eb58460d694f22c48f3809c37739033a3b806551676ac136fedc360b0750
6
+ metadata.gz: 100fe1b591e20ecf7c04767b1990c75665ccd72f796e8c600ce3061019eb1023a7f2448296bbc46afe14c6eb17c6e9f78232d8a0c90bee9c1d7559e8333247fa
7
+ data.tar.gz: 365908e50430f31df97fd0b15f268e8a5920ccbf759e41c545df647e174409ea47658ff8467ed7a1f5c888619d61e0a58915294943b09685eb98005931cc2c30
data/Gemfile CHANGED
@@ -9,8 +9,8 @@ group(:development, :test) do
9
9
  gem("byebug")
10
10
  gem("minitest")
11
11
  gem("minitest-reporters")
12
- gem("rake", "~> 13.0")
13
- gem("rubocop", "~> 1.56", require: false)
12
+ gem("rake", "~> 13.1")
13
+ gem("rubocop", "~> 1.57", require: false)
14
14
  gem("rubocop-shopify", require: false)
15
15
  gem("rubocop-sorbet", require: false)
16
16
  gem("sorbet", ">= 0.5.9204", require: false)
data/lib/rbi/parser.rb CHANGED
@@ -606,19 +606,17 @@ module RBI
606
606
  end
607
607
 
608
608
  node.keywords.each do |param|
609
- next unless param.is_a?(Prism::KeywordParameterNode)
610
-
611
- value = param.value
612
- params << if value
613
- KwOptParam.new(
609
+ case param
610
+ when Prism::RequiredKeywordParameterNode
611
+ params << KwParam.new(
614
612
  param.name.to_s.delete_suffix(":"),
615
- node_string!(value),
616
613
  loc: node_loc(param),
617
614
  comments: node_comments(param),
618
615
  )
619
- else
620
- KwParam.new(
616
+ when Prism::OptionalKeywordParameterNode
617
+ params << KwOptParam.new(
621
618
  param.name.to_s.delete_suffix(":"),
619
+ node_string!(param.value),
622
620
  loc: node_loc(param),
623
621
  comments: node_comments(param),
624
622
  )
data/lib/rbi/version.rb CHANGED
@@ -2,5 +2,5 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module RBI
5
- VERSION = "0.1.2"
5
+ VERSION = "0.1.4"
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rbi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexandre Terrasa
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-10-26 00:00:00.000000000 Z
11
+ date: 2023-11-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: prism
@@ -16,14 +16,20 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 0.15.1
19
+ version: 0.17.1
20
+ - - "<"
21
+ - !ruby/object:Gem::Version
22
+ version: '0.18'
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
27
  - - ">="
25
28
  - !ruby/object:Gem::Version
26
- version: 0.15.1
29
+ version: 0.17.1
30
+ - - "<"
31
+ - !ruby/object:Gem::Version
32
+ version: '0.18'
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: sorbet-runtime
29
35
  requirement: !ruby/object:Gem::Requirement