rbi 0.2.1 → 0.2.2

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: 68328047c11f18c7617e8101a773a3b3b9438be4e36a0b01072274eba2b1c583
4
- data.tar.gz: 275b2ed35e5486461d2ebf4afae88d7b75b9f26ac1d7d8d9693ff630b17dff3d
3
+ metadata.gz: 4c651b1059238b331d30239d5f366dc771fa9e3a3cd5ae8341cd41afcd8f4fbd
4
+ data.tar.gz: 1c46c0ca74094a0a74fe6b5e8de3ab6ca23c1a4f441ca88eb2733a0b56c42031
5
5
  SHA512:
6
- metadata.gz: 53e510f0df7f4e44c45686774f3573e06031ba7c81a29f7ff429b2dacb601c42a83be37acca12809161ef7acd50722682ad88483b12d4af8d536c6f709e540b8
7
- data.tar.gz: 172bbba7e9c3cd29032d4d34a4fda47ce81728b971a8956d742b0d012ca393b3f555109493ec2ebfe1aa3087a142da109061fc07074f8a4b721096cf1884091d
6
+ metadata.gz: 339001680272e363ee1bb55170bce1e1af78fbb70a718359a9a0b56db0c8c73210043fca56b6f65d4a45da6bafbbd10f7a6162fe03351a8f7b409781d752ccaf
7
+ data.tar.gz: 0e97a47c78aec83d044ceaa901b79e3ebdfd2219cfe787d7645faf070f83c317cd47239c41c424737ef5172cfb4ebfac96fb9a2939e863543290168e167243d3
data/Gemfile CHANGED
@@ -10,7 +10,7 @@ group(:development, :test) do
10
10
  gem("minitest")
11
11
  gem("minitest-reporters")
12
12
  gem("rake", "~> 13.2")
13
- gem("rubocop", "~> 1.66", require: false)
13
+ gem("rubocop", "~> 1.69", 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/model.rb CHANGED
@@ -581,7 +581,7 @@ module RBI
581
581
  is_final: T::Boolean,
582
582
  type_params: T::Array[String],
583
583
  checked: T.nilable(Symbol),
584
- block: T.proc.params(node: Sig).void,
584
+ block: T.nilable(T.proc.params(node: Sig).void),
585
585
  ).void
586
586
  end
587
587
  def add_sig(
@@ -770,17 +770,10 @@ module RBI
770
770
  return unless node.name == :let
771
771
  return unless node.receiver&.slice =~ /^(::)?T$/
772
772
 
773
- node.arguments&.arguments&.fetch(1, nil)&.slice
774
- end
775
-
776
- sig { params(node: Type).returns(T::Boolean) }
777
- def bare_proc?(node)
778
- node.is_a?(Type::Simple) && node.name == "Proc"
779
- end
773
+ arguments = node.arguments&.arguments
774
+ return unless arguments
780
775
 
781
- sig { params(node: Type).returns(T::Boolean) }
782
- def bare_nilable_proc?(node)
783
- node.is_a?(Type::Nilable) && bare_proc?(node.type)
776
+ arguments.fetch(1, nil)&.slice
784
777
  end
785
778
  end
786
779
 
@@ -887,7 +880,7 @@ module RBI
887
880
 
888
881
  sig { params(type: Type::AttachedClass).void }
889
882
  def visit_attached_class(type)
890
- @string << "attached_class"
883
+ @string << "instance"
891
884
  end
892
885
 
893
886
  sig { params(type: Type::Nilable).void }
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.2.1"
5
+ VERSION = "0.2.2"
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.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexandre Terrasa
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-10-03 00:00:00.000000000 Z
11
+ date: 2024-12-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: prism
@@ -95,7 +95,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
97
  requirements: []
98
- rubygems_version: 3.5.20
98
+ rubygems_version: 3.5.23
99
99
  signing_key:
100
100
  specification_version: 4
101
101
  summary: RBI generation framework