raap 0.5.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/sig/raap.rbs CHANGED
@@ -19,15 +19,15 @@ module RaaP
19
19
 
20
20
  class CLI
21
21
  class Option < ::Struct[untyped]
22
- def self.new: (?dirs: ::Array[String], ?requires: ::Array[String], ?libraries: ::Array[String], ?timeout: (Integer | Float | nil), ?size_from: ::Integer, ?size_to: ::Integer, ?size_by: ::Integer, ?allow_private: bool) -> instance
22
+ def self.new: (?dirs: ::Array[String], ?requires: ::Array[String], ?libraries: ::Array[String], ?timeout: (Integer | Float | nil), ?size_from: ::Integer, ?size_to: ::Integer, ?size_by: ::Integer, ?allow_private: bool, ?coverage: bool) -> instance
23
23
 
24
- def self.[]: (?dirs: ::Array[String], ?requires: ::Array[String], ?libraries: ::Array[String], ?timeout: (Integer | Float | nil), ?size_from: ::Integer, ?size_to: ::Integer, ?size_by: ::Integer, ?allow_private: bool) -> instance
24
+ def self.[]: (?dirs: ::Array[String], ?requires: ::Array[String], ?libraries: ::Array[String], ?timeout: (Integer | Float | nil), ?size_from: ::Integer, ?size_to: ::Integer, ?size_by: ::Integer, ?allow_private: bool, ?coverage: bool) -> instance
25
25
 
26
26
  def self.keyword_init?: () -> true
27
27
 
28
- def self.members: () -> [ :dirs, :requires, :library, :timeout, :size_from, :size_to, :size_by, :allow_private]
28
+ def self.members: () -> [ :dirs, :requires, :library, :timeout, :size_from, :size_to, :size_by, :allow_private, :coverage]
29
29
 
30
- def members: () -> [ :dirs, :requires, :library, :timeout, :size_from, :size_to, :size_by, :allow_private]
30
+ def members: () -> [ :dirs, :requires, :library, :timeout, :size_from, :size_to, :size_by, :allow_private, :coverage]
31
31
 
32
32
  attr_accessor dirs: ::Array[String]
33
33
 
@@ -44,6 +44,8 @@ module RaaP
44
44
  attr_accessor size_by: ::Integer
45
45
 
46
46
  attr_accessor allow_private: bool
47
+
48
+ attr_accessor coverage: bool
47
49
  end
48
50
 
49
51
  type property_result = [Integer, Symbol, ::RBS::MethodType, StringIO?]
@@ -71,6 +73,39 @@ module RaaP
71
73
  def report: () -> Integer
72
74
  end
73
75
 
76
+ module Coverage
77
+ type locs = [::RBS::Buffer::loc, ::RBS::Buffer::loc]
78
+ type accuracy = :abs | :opt
79
+ class Writer
80
+ @method_type: ::RBS::MethodType
81
+ @cov: ::Set[Symbol]
82
+ @cur: Integer
83
+
84
+ def initialize: (::RBS::MethodType, Set[Symbol]) -> void
85
+ def write: (IO) -> void
86
+
87
+ private
88
+
89
+ def method_type_location: () -> ::RBS::Location[untyped, untyped]
90
+ def slice: (Integer, Range[Integer]) -> String
91
+ def write_param: (IO, String, ::RBS::Types::Function::Param, accuracy) -> void
92
+ def write_type: (IO, String, ::RBS::Types::t, accuracy) -> void
93
+ def green: (String) -> String
94
+ def red: (String) -> String
95
+ def yellow: (String) -> String
96
+ end
97
+
98
+ self.@cov: Set[Symbol]?
99
+ self.@method_type: ::RBS::MethodType
100
+
101
+ def self.start: (::RBS::MethodType) -> void
102
+ def self.running?: () -> bool
103
+ def self.log: (String | Symbol) -> void
104
+ def self.cov: () -> Set[Symbol]
105
+ def self.show: (IO) -> void
106
+ def self.new_type_with_log: (String, ::RBS::Types::t) -> Type
107
+ end
108
+
74
109
  class FunctionType
75
110
  @fun: ::RBS::Types::Function
76
111
 
@@ -83,6 +118,7 @@ module RaaP
83
118
  def to_symbolic_call_recursive: (untyped, size: Integer) -> untyped
84
119
  def build_args_type: () -> Array[Type]
85
120
  def build_kwargs_type: () -> Hash[Symbol, Type]
121
+ def build_type_with_coverage: (String, ::RBS::Types::Function::Param) -> Type
86
122
  end
87
123
 
88
124
  class MethodProperty
@@ -108,10 +144,13 @@ module RaaP
108
144
  def call: (size: Integer, stats: Stats) -> (Result::Success | Result::Failure | Result::Skip | Result::Exception)
109
145
  def check_return: (receiver_value: untyped, return_value: untyped) -> ([Symbol] | [Symbol, Exception])
110
146
  def return_type: () -> RBS::Types::t
147
+ def original_return_type: () -> RBS::Types::t
148
+ def coverage: (String, untyped, RBS::Types::t, ?RBS::Test::TypeCheck?) -> void
111
149
  end
112
150
 
113
151
  class MethodType
114
152
  attr_reader rbs: ::RBS::MethodType
153
+ attr_reader original_rbs: ::RBS::MethodType
115
154
  @fun_type: FunctionType
116
155
 
117
156
  def initialize: (::RBS::MethodType | String method, ?type_params_decl: Array[untyped], ?type_args: Array[untyped], ?self_type: ::RBS::Types::ClassInstance?, ?instance_type: ::RBS::Types::ClassInstance?, ?class_type: ::RBS::Types::ClassSingleton?) -> void
@@ -134,6 +173,8 @@ module RaaP
134
173
  def self.loader: () -> ::RBS::EnvironmentLoader
135
174
  def self.parse_type: (String) -> ::RBS::Types::t
136
175
  def self.parse_method_type: (String) -> ::RBS::MethodType
176
+ def self.parse_member: (String) -> ::RBS::AST::Members::Attribute
177
+ def self._shift_location: (untyped, Integer) -> void
137
178
  def self.find_alias_decl: (::RBS::TypeName, Symbol) -> ::RBS::AST::Members::Alias?
138
179
  end
139
180
 
@@ -242,7 +283,7 @@ module RaaP
242
283
  GENERATORS: Hash[String, ^() -> Sized[untyped]]
243
284
  SIMPLE_SOURCE: Array[String]
244
285
 
245
- def self.register: (String) { () [self: instance] -> Sized[untyped] } -> void
286
+ def self.register: (String) { () [self: instance] -> untyped } -> void
246
287
  def self.random: () -> Type
247
288
  def self.random_without_basic_object: () -> Type
248
289
  def self.call_new_from: (Module, ::RBS::Types::ClassInstance, size: Integer) -> symbolic_call
@@ -278,8 +319,8 @@ module RaaP
278
319
  def symbol: () -> Sized[Symbol]
279
320
  def array: (Type) -> Sized[Array[untyped]]
280
321
  def dict: (Type, Type) -> Sized[Hash[untyped, untyped]]
281
- def encoding: () -> Sized[symbolic_call]
282
- def bool: () -> Sized[bool]
322
+ def encoding: () -> symbolic_call
323
+ def bool: () -> bool
283
324
  def temp_method_object: () -> ::Method
284
325
  end
285
326
 
@@ -289,19 +330,19 @@ module RaaP
289
330
  def class: () -> class
290
331
  end
291
332
 
292
- class Interface < BasicObject
333
+ class Interface
293
334
  @type: ::RBS::Types::Interface
294
335
  @size: Integer
295
336
  @definition: ::RBS::Definition
296
337
 
297
- def self.define_method_from_interface: (Class base_class, String | ::RBS::Types::Interface type, ?size: Integer) -> void
338
+ def self.define_method_from_interface: (::Module base_class, String | ::RBS::Types::Interface type, ?size: Integer) -> void
298
339
  def initialize: (String | ::RBS::Types::Interface | String, ?size: Integer) -> void
299
340
  def respond_to?: (Symbol, ?boolish) -> bool
300
341
  def inspect: () -> String
301
342
  def class: () -> class
302
343
  end
303
344
 
304
- class Intersection < BasicObject
345
+ module Intersection
305
346
  @type: ::RBS::Types::Intersection
306
347
  @children: Array[Type]
307
348
  @size: Integer
@@ -328,7 +369,7 @@ module RaaP
328
369
  def class: () -> class
329
370
  end
330
371
 
331
- class Variable < BasicObject
372
+ class Variable
332
373
  attr_reader type: ::RBS::Types::Variable
333
374
 
334
375
  def initialize: (::RBS::Types::Variable | String | Symbol) -> void
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: raap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ksss
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-04-23 00:00:00.000000000 Z
11
+ date: 2024-05-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rbs
@@ -57,6 +57,7 @@ files:
57
57
  - lib/raap.rb
58
58
  - lib/raap/bind_call.rb
59
59
  - lib/raap/cli.rb
60
+ - lib/raap/coverage.rb
60
61
  - lib/raap/function_type.rb
61
62
  - lib/raap/method_property.rb
62
63
  - lib/raap/method_type.rb
@@ -76,6 +77,8 @@ files:
76
77
  - lib/raap/value/variable.rb
77
78
  - lib/raap/value/void.rb
78
79
  - lib/raap/version.rb
80
+ - lib/shims.rb
81
+ - public/example.webp
79
82
  - public/jacket.webp
80
83
  - rbs_collection.lock.yaml
81
84
  - rbs_collection.yaml
@@ -94,14 +97,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
94
97
  requirements:
95
98
  - - ">="
96
99
  - !ruby/object:Gem::Version
97
- version: 3.3.0
100
+ version: 3.0.0
98
101
  required_rubygems_version: !ruby/object:Gem::Requirement
99
102
  requirements:
100
103
  - - ">="
101
104
  - !ruby/object:Gem::Version
102
105
  version: '0'
103
106
  requirements: []
104
- rubygems_version: 3.5.3
107
+ rubygems_version: 3.5.9
105
108
  signing_key:
106
109
  specification_version: 4
107
110
  summary: RBS as a Property