orthoses 1.7.0 → 1.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (94) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +10 -3
  3. data/lib/orthoses/attribute.rb +28 -55
  4. data/lib/orthoses/builder.rb +7 -3
  5. data/lib/orthoses/constant.rb +0 -1
  6. data/lib/orthoses/content/duplication_checker.rb +67 -35
  7. data/lib/orthoses/content/environment.rb +1 -1
  8. data/lib/orthoses/content.rb +20 -13
  9. data/lib/orthoses/create_file_by_name.rb +38 -7
  10. data/lib/orthoses/lazy_trace_point.rb +37 -43
  11. data/lib/orthoses/missing_name.rb +81 -0
  12. data/lib/orthoses/mixin.rb +29 -34
  13. data/lib/orthoses/rbs_prototype_runtime.rb +23 -4
  14. data/lib/orthoses/trace/attribute.rb +26 -8
  15. data/lib/orthoses/utils.rb +2 -2
  16. data/lib/orthoses/version.rb +1 -1
  17. data/lib/orthoses.rb +1 -0
  18. data/sig/orthoses/_call.rbs +1 -1
  19. data/sig/orthoses/_middle_ware.rbs +1 -1
  20. data/sig/orthoses/attribute/hook.rbs +1 -1
  21. data/sig/orthoses/attribute.rbs +3 -3
  22. data/sig/orthoses/autoload/hook.rbs +1 -1
  23. data/sig/orthoses/autoload.rbs +2 -1
  24. data/sig/orthoses/builder/call_logable.rbs +1 -1
  25. data/sig/orthoses/builder.rbs +7 -4
  26. data/sig/orthoses/call_tracer/capturable.rbs +1 -1
  27. data/sig/orthoses/call_tracer/capture.rbs +2 -2
  28. data/sig/orthoses/call_tracer/lazy.rbs +4 -2
  29. data/sig/orthoses/call_tracer.rbs +3 -1
  30. data/sig/orthoses/const_load_error.rbs +4 -1
  31. data/sig/orthoses/constant.rbs +3 -3
  32. data/sig/orthoses/content/array_io.rbs +2 -1
  33. data/sig/orthoses/content/duplication_checker.rbs +10 -3
  34. data/sig/orthoses/content/environment.rbs +11 -6
  35. data/sig/orthoses/content/header_builder.rbs +3 -1
  36. data/sig/orthoses/content.rbs +7 -1
  37. data/sig/orthoses/create_file_by_name.rbs +8 -3
  38. data/sig/orthoses/delegate_class/hook.rbs +1 -1
  39. data/sig/orthoses/delegate_class.rbs +2 -2
  40. data/sig/orthoses/filter.rbs +4 -3
  41. data/sig/orthoses/lazy_trace_point/method_added_hook.rbs +6 -0
  42. data/sig/orthoses/lazy_trace_point/signleton_method_added_hook.rbs +5 -0
  43. data/sig/orthoses/lazy_trace_point.rbs +7 -7
  44. data/sig/orthoses/load_rbs.rbs +3 -3
  45. data/sig/orthoses/missing_name/missing_class.rbs +8 -0
  46. data/sig/orthoses/missing_name/missing_module.rbs +8 -0
  47. data/sig/orthoses/missing_name.rbs +7 -0
  48. data/sig/orthoses/mixin/hook.rbs +2 -2
  49. data/sig/orthoses/mixin.rbs +6 -4
  50. data/sig/orthoses/name_space_error.rbs +1 -1
  51. data/sig/orthoses/object_space_all.rbs +2 -2
  52. data/sig/orthoses/outputable/avoid_recursive_ancestor_error.rbs +2 -2
  53. data/sig/orthoses/outputable/constantizable_filter.rbs +2 -1
  54. data/sig/orthoses/outputable/uniq_content_body.rbs +2 -1
  55. data/sig/orthoses/outputable.rbs +3 -1
  56. data/sig/orthoses/path_helper.rbs +3 -1
  57. data/sig/orthoses/pp.rbs +2 -1
  58. data/sig/orthoses/rbs_prototype_rb.rbs +6 -4
  59. data/sig/orthoses/rbs_prototype_runtime.rbs +10 -3
  60. data/sig/orthoses/sort.rbs +2 -1
  61. data/sig/orthoses/store.rbs +2 -1
  62. data/sig/orthoses/tap.rbs +3 -2
  63. data/sig/orthoses/trace/attribute/hook.rbs +11 -0
  64. data/sig/orthoses/trace/attribute.rbs +4 -1
  65. data/sig/orthoses/trace/method/info.rbs +1 -1
  66. data/sig/orthoses/trace/method.rbs +6 -1
  67. data/sig/orthoses/trace/targetable.rbs +1 -1
  68. data/sig/orthoses/trace.rbs +3 -1
  69. data/sig/orthoses/utils/type_list.rbs +2 -1
  70. data/sig/orthoses/utils/underscore.rbs +1 -1
  71. data/sig/orthoses/utils.rbs +4 -2
  72. data/sig/orthoses/walk.rbs +3 -3
  73. data/sig/orthoses/writer.rbs +3 -2
  74. data/sig/orthoses.rbs +6 -6
  75. metadata +9 -21
  76. data/Gemfile +0 -16
  77. data/Gemfile.lock +0 -86
  78. data/examples/minitest/Rakefile +0 -56
  79. data/examples/rack-test/Gemfile +0 -8
  80. data/examples/rack-test/Gemfile.lock +0 -30
  81. data/examples/rack-test/Rakefile +0 -7
  82. data/examples/rack-test/generate.rb +0 -31
  83. data/examples/rack-test/out/rack/test/cookie.rbs +0 -28
  84. data/examples/rack-test/out/rack/test/cookie_jar.rbs +0 -28
  85. data/examples/rack-test/out/rack/test/fake_app.rbs +0 -13
  86. data/examples/rack-test/out/rack/test/input_rewinder.rbs +0 -8
  87. data/examples/rack-test/out/rack/test/methods.rbs +0 -98
  88. data/examples/rack-test/out/rack/test/session.rbs +0 -186
  89. data/examples/rack-test/out/rack/test/uploaded_file.rbs +0 -18
  90. data/examples/rack-test/out/rack/test/utils.rbs +0 -112
  91. data/examples/rack-test/out/rack/test.rbs +0 -3
  92. data/examples/simple_middleware.rb +0 -11
  93. data/examples/simple_middleware.rbs +0 -7
  94. data/orthoses.gemspec +0 -36
@@ -1,4 +1,4 @@
1
- # THIS IS GENERATED CODE from `$ rake generate_self_sig`
1
+ # THIS IS GENERATED CODE from `$ rake sig`
2
2
 
3
3
  class Orthoses::NameSpaceError < ::StandardError
4
4
  end
@@ -1,7 +1,7 @@
1
- # THIS IS GENERATED CODE from `$ rake generate_self_sig`
1
+ # THIS IS GENERATED CODE from `$ rake sig`
2
2
 
3
3
  class Orthoses::ObjectSpaceAll
4
+ @loader: Orthoses::_Call
4
5
  def initialize: (Orthoses::_Call loader, ?if: ^(Module) -> boolish) -> void
5
6
  def call: () -> Orthoses::store
6
- @loader: Orthoses::_Call
7
7
  end
@@ -1,10 +1,10 @@
1
- # THIS IS GENERATED CODE from `$ rake generate_self_sig`
1
+ # THIS IS GENERATED CODE from `$ rake sig`
2
2
 
3
3
  # AvoidRecursiveAncestorError is an internal middleware
4
4
  # It's using on orthoses/outputable.rb
5
5
  class Orthoses::Outputable::AvoidRecursiveAncestorError
6
+ @loader: Orthoses::_Call
6
7
  def initialize: (Orthoses::_Call loader) -> void
7
8
  def call: () -> Orthoses::store
8
9
  private def collect_mixin_recursive: (untyped store, untyped name, untyped mixins) -> untyped
9
- @loader: Orthoses::_Call
10
10
  end
@@ -1,8 +1,9 @@
1
- # THIS IS GENERATED CODE from `$ rake generate_self_sig`
1
+ # THIS IS GENERATED CODE from `$ rake sig`
2
2
 
3
3
  # Constantizable is an internal middleware
4
4
  # It's using on orthoses/outputable.rb
5
5
  class Orthoses::Outputable::ConstantizableFilter
6
+ @loader: untyped
6
7
  def initialize: (untyped loader) -> void
7
8
  def call: () -> untyped
8
9
  end
@@ -1,8 +1,9 @@
1
- # THIS IS GENERATED CODE from `$ rake generate_self_sig`
1
+ # THIS IS GENERATED CODE from `$ rake sig`
2
2
 
3
3
  # UniqContentBody is an internal middleware
4
4
  # It's using on orthoses/outputable.rb
5
5
  class Orthoses::Outputable::UniqContentBody
6
+ @loader: untyped
6
7
  def initialize: (untyped loader) -> void
7
8
  def call: () -> untyped
8
9
  end
@@ -1,5 +1,7 @@
1
- # THIS IS GENERATED CODE from `$ rake generate_self_sig`
1
+ # THIS IS GENERATED CODE from `$ rake sig`
2
2
 
3
3
  module Orthoses::Outputable
4
+ @loader: untyped
5
+
4
6
  def call: () -> untyped
5
7
  end
@@ -1,6 +1,8 @@
1
- # THIS IS GENERATED CODE from `$ rake generate_self_sig`
1
+ # THIS IS GENERATED CODE from `$ rake sig`
2
2
 
3
3
  class Orthoses::PathHelper
4
+ @current: untyped
5
+ @base_dir: untyped
4
6
  def self.best_version_paths: (untyped current, untyped base_dir) -> untyped
5
7
  def initialize: (untyped current, untyped base_dir) -> void
6
8
  def best_version_paths: () -> untyped
data/sig/orthoses/pp.rbs CHANGED
@@ -1,8 +1,9 @@
1
- # THIS IS GENERATED CODE from `$ rake generate_self_sig`
1
+ # THIS IS GENERATED CODE from `$ rake sig`
2
2
 
3
3
  # Debug current stored values
4
4
  # use Orthoses::PP
5
5
  class Orthoses::PP
6
+ @loader: untyped
6
7
  def initialize: (untyped loader) -> void
7
8
  def call: () -> untyped
8
9
  end
@@ -1,4 +1,4 @@
1
- # THIS IS GENERATED CODE from `$ rake generate_self_sig`
1
+ # THIS IS GENERATED CODE from `$ rake sig`
2
2
 
3
3
  # Call `rbs prototype rb` and add to store
4
4
  # use Orthoses::RBSPrototypeRB,
@@ -6,11 +6,13 @@
6
6
  # method_definition_filter: ->(member) { false },
7
7
  # alias_filter: ->(member) { false }
8
8
  class Orthoses::RBSPrototypeRB
9
- def initialize: (Orthoses::_Call loader, paths: Array[_ToS], ?constant_filter: Orthoses::Content::Environment::constant_filter?, ?mixin_filter: Orthoses::Content::Environment::mixin_filter?, ?attribute_filter: Orthoses::Content::Environment::attribute_filter?) -> void
10
- def call: () -> Orthoses::store
11
9
  @loader: Orthoses::_Call
12
10
  @paths: Array[_ToS]
11
+ @method_definition_filter: Orthoses::Content::Environment::method_definition_filter?
12
+ @alias_filter: Orthoses::Content::Environment::alias_filter?
13
13
  @constant_filter: Orthoses::Content::Environment::constant_filter?
14
14
  @mixin_filter: Orthoses::Content::Environment::mixin_filter?
15
- @attribute_filter: Orthoses::Content::Environment::mixin_filter?
15
+ @attribute_filter: Orthoses::Content::Environment::attribute_filter?
16
+ def initialize: (Orthoses::_Call loader, paths: Array[_ToS], ?method_definition_filter: Orthoses::Content::Environment::method_definition_filter?, ?alias_filter: Orthoses::Content::Environment::alias_filter?, ?constant_filter: Orthoses::Content::Environment::constant_filter?, ?mixin_filter: Orthoses::Content::Environment::mixin_filter?, ?attribute_filter: Orthoses::Content::Environment::attribute_filter?) -> void
17
+ def call: () -> Orthoses::store
16
18
  end
@@ -1,9 +1,16 @@
1
- # THIS IS GENERATED CODE from `$ rake generate_self_sig`
1
+ # THIS IS GENERATED CODE from `$ rake sig`
2
2
 
3
3
  # Call `rbs prototype runtime` and add to store
4
4
  # use Orthoses::RBSPrototypeRuntime,
5
5
  # patterns: ['Foo::*']
6
6
  class Orthoses::RBSPrototypeRuntime
7
- def initialize: (untyped loader, patterns: untyped) -> void
8
- def call: () -> untyped
7
+ @loader: Orthoses::_Call
8
+ @patterns: Array[_ToS]?
9
+ @method_definition_filter: Orthoses::Content::Environment::method_definition_filter?
10
+ @alias_filter: Orthoses::Content::Environment::alias_filter?
11
+ @constant_filter: Orthoses::Content::Environment::constant_filter?
12
+ @mixin_filter: Orthoses::Content::Environment::mixin_filter?
13
+ @attribute_filter: Orthoses::Content::Environment::attribute_filter?
14
+ def initialize: (Orthoses::_Call loader, ?patterns: Array[_ToS], ?method_definition_filter: Orthoses::Content::Environment::method_definition_filter?, ?alias_filter: Orthoses::Content::Environment::alias_filter?, ?constant_filter: Orthoses::Content::Environment::constant_filter?, ?mixin_filter: Orthoses::Content::Environment::mixin_filter?, ?attribute_filter: Orthoses::Content::Environment::attribute_filter?) -> void
15
+ def call: () -> Orthoses::store
9
16
  end
@@ -1,7 +1,8 @@
1
- # THIS IS GENERATED CODE from `$ rake generate_self_sig`
1
+ # THIS IS GENERATED CODE from `$ rake sig`
2
2
 
3
3
  # use Orthoses::Sort
4
4
  class Orthoses::Sort
5
+ @loader: untyped
5
6
  def initialize: (untyped loader) -> void
6
7
  def call: () -> untyped
7
8
  end
@@ -1,8 +1,9 @@
1
- # THIS IS GENERATED CODE from `$ rake generate_self_sig`
1
+ # THIS IS GENERATED CODE from `$ rake sig`
2
2
 
3
3
  # Internal middleware for return store object
4
4
  # Builder set this middleware on last stack by default
5
5
  class Orthoses::Store
6
+ @loader: untyped
6
7
  def initialize: (untyped loader) -> void
7
8
  def call: () -> untyped
8
9
  end
data/sig/orthoses/tap.rbs CHANGED
@@ -1,10 +1,11 @@
1
- # THIS IS GENERATED CODE from `$ rake generate_self_sig`
1
+ # THIS IS GENERATED CODE from `$ rake sig`
2
2
 
3
3
  # use Orthoses::Tap do |store|
4
4
  # store["Foo::Bar"] << "def baz: () -> void"
5
5
  # end
6
6
  class Orthoses::Tap
7
+ @loader: Orthoses::_Call
8
+ @block: untyped
7
9
  def initialize: (Orthoses::_Call loader) -> void
8
10
  def call: () -> Orthoses::store
9
- @loader: Orthoses::_Call
10
11
  end
@@ -0,0 +1,11 @@
1
+ # THIS IS GENERATED CODE from `$ rake sig`
2
+
3
+ module Orthoses::Trace::Attribute::Hook
4
+ def attr: (*untyped names) -> untyped
5
+
6
+ def attr_accessor: (*untyped names) -> untyped
7
+
8
+ def attr_reader: (*untyped names) -> untyped
9
+
10
+ def attr_writer: (*untyped names) -> untyped
11
+ end
@@ -1,6 +1,9 @@
1
- # THIS IS GENERATED CODE from `$ rake generate_self_sig`
1
+ # THIS IS GENERATED CODE from `$ rake sig`
2
2
 
3
3
  class Orthoses::Trace::Attribute
4
+ @loader: untyped
5
+ @patterns: untyped
6
+ @captured_dict: untyped
4
7
  def initialize: (untyped loader, patterns: untyped) -> void
5
8
  def call: () -> untyped
6
9
  private def build_trace_hook: () -> untyped
@@ -1,4 +1,4 @@
1
- # THIS IS GENERATED CODE from `$ rake generate_self_sig`
1
+ # THIS IS GENERATED CODE from `$ rake sig`
2
2
 
3
3
  class Orthoses::Trace::Method::Info < ::Struct[untyped]
4
4
  end
@@ -1,6 +1,11 @@
1
- # THIS IS GENERATED CODE from `$ rake generate_self_sig`
1
+ # THIS IS GENERATED CODE from `$ rake sig`
2
2
 
3
3
  class Orthoses::Trace::Method
4
+ @loader: untyped
5
+ @patterns: untyped
6
+ @stack: untyped
7
+ @args_return_map: untyped
8
+ @alias_map: untyped
4
9
  def initialize: (untyped loader, patterns: untyped) -> void
5
10
  def call: () -> untyped
6
11
  private def build_trace_point: () -> untyped
@@ -1,4 +1,4 @@
1
- # THIS IS GENERATED CODE from `$ rake generate_self_sig`
1
+ # THIS IS GENERATED CODE from `$ rake sig`
2
2
 
3
3
  module Orthoses::Trace::Targetable
4
4
  def target?: (untyped name) -> untyped
@@ -1,6 +1,8 @@
1
- # THIS IS GENERATED CODE from `$ rake generate_self_sig`
1
+ # THIS IS GENERATED CODE from `$ rake sig`
2
2
 
3
3
  class Orthoses::Trace
4
+ @loader: untyped
5
+ @patterns: untyped
4
6
  def initialize: (untyped loader, patterns: untyped) -> void
5
7
  def call: () -> untyped
6
8
  end
@@ -1,7 +1,8 @@
1
- # THIS IS GENERATED CODE from `$ rake generate_self_sig`
1
+ # THIS IS GENERATED CODE from `$ rake sig`
2
2
 
3
3
  # internal
4
4
  class Orthoses::Utils::TypeList
5
+ @types: untyped
5
6
  def initialize: (untyped types) -> void
6
7
  def inject: () -> untyped
7
8
  FALSE_TYPE: RBS::Types::Literal
@@ -1,4 +1,4 @@
1
- # THIS IS GENERATED CODE from `$ rake generate_self_sig`
1
+ # THIS IS GENERATED CODE from `$ rake sig`
2
2
 
3
3
  module Orthoses::Utils::Underscore
4
4
  end
@@ -1,9 +1,11 @@
1
- # THIS IS GENERATED CODE from `$ rake generate_self_sig`
1
+ # THIS IS GENERATED CODE from `$ rake sig`
2
2
 
3
3
  module Orthoses::Utils
4
+ self.@env_cache: untyped
5
+
4
6
  def self.unautoload!: () -> untyped
5
7
 
6
- def self.each_const_recursive: (Module root, ?cache: Hash[untyped, true], ?on_error: ^(Orthoses::ConstLoadError) -> void) ?{ (Module, Symbol, untyped) -> void } -> void
8
+ def self.each_const_recursive: (Module root, ?cache: Hash[untyped, true], ?on_error: nil | ^(Orthoses::ConstLoadError) -> void) ?{ (Module, Symbol, untyped) -> void } -> void
7
9
 
8
10
  def self.rbs_defined_const?: (String name, ?library: (String | Array[String])?, ?collection: boolish) -> bool
9
11
 
@@ -1,8 +1,8 @@
1
- # THIS IS GENERATED CODE from `$ rake generate_self_sig`
1
+ # THIS IS GENERATED CODE from `$ rake sig`
2
2
 
3
3
  class Orthoses::Walk
4
- def initialize: (Orthoses::_Call loader, root: Module | String) -> void
5
- def call: () -> Orthoses::store
6
4
  @loader: Orthoses::_Call
7
5
  @root: Module | String
6
+ def initialize: (Orthoses::_Call loader, root: Module | String) -> void
7
+ def call: () -> Orthoses::store
8
8
  end
@@ -1,7 +1,8 @@
1
- # THIS IS GENERATED CODE from `$ rake generate_self_sig`
1
+ # THIS IS GENERATED CODE from `$ rake sig`
2
2
 
3
3
  class Orthoses::Writer
4
+ @loader: Orthoses::_Call
5
+ @io: untyped
4
6
  def initialize: (Orthoses::_Call loader, io: _Writer) -> void
5
7
  def call: () -> Orthoses::store
6
- @loader: Orthoses::_Call
7
8
  end
data/sig/orthoses.rbs CHANGED
@@ -1,13 +1,13 @@
1
- # THIS IS GENERATED CODE from `$ rake generate_self_sig`
1
+ # THIS IS GENERATED CODE from `$ rake sig`
2
2
 
3
3
  module Orthoses
4
- VERSION: "1.7.0"
4
+ INSTANCE_METHOD_METHOD: UnboundMethod
5
5
 
6
- attr_accessor self.logger: ::Logger
6
+ METHOD_METHOD: UnboundMethod
7
7
 
8
- type store = Hash[String, Orthoses::Content]
8
+ VERSION: String
9
9
 
10
- INSTANCE_METHOD_METHOD: UnboundMethod
10
+ attr_accessor self.logger: ::Logger
11
11
 
12
- METHOD_METHOD: UnboundMethod
12
+ type store = Hash[String, Orthoses::Content]
13
13
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: orthoses
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.0
4
+ version: 1.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ksss
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-06-25 00:00:00.000000000 Z
11
+ date: 2023-08-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rbs
@@ -32,26 +32,8 @@ extensions: []
32
32
  extra_rdoc_files: []
33
33
  files:
34
34
  - CODE_OF_CONDUCT.md
35
- - Gemfile
36
- - Gemfile.lock
37
35
  - LICENSE.txt
38
36
  - README.md
39
- - examples/minitest/Rakefile
40
- - examples/rack-test/Gemfile
41
- - examples/rack-test/Gemfile.lock
42
- - examples/rack-test/Rakefile
43
- - examples/rack-test/generate.rb
44
- - examples/rack-test/out/rack/test.rbs
45
- - examples/rack-test/out/rack/test/cookie.rbs
46
- - examples/rack-test/out/rack/test/cookie_jar.rbs
47
- - examples/rack-test/out/rack/test/fake_app.rbs
48
- - examples/rack-test/out/rack/test/input_rewinder.rbs
49
- - examples/rack-test/out/rack/test/methods.rbs
50
- - examples/rack-test/out/rack/test/session.rbs
51
- - examples/rack-test/out/rack/test/uploaded_file.rbs
52
- - examples/rack-test/out/rack/test/utils.rbs
53
- - examples/simple_middleware.rb
54
- - examples/simple_middleware.rbs
55
37
  - lib/orthoses.rb
56
38
  - lib/orthoses/attribute.rb
57
39
  - lib/orthoses/autoload.rb
@@ -69,6 +51,7 @@ files:
69
51
  - lib/orthoses/filter.rb
70
52
  - lib/orthoses/lazy_trace_point.rb
71
53
  - lib/orthoses/load_rbs.rb
54
+ - lib/orthoses/missing_name.rb
72
55
  - lib/orthoses/mixin.rb
73
56
  - lib/orthoses/object_space_all.rb
74
57
  - lib/orthoses/outputable.rb
@@ -92,7 +75,6 @@ files:
92
75
  - lib/orthoses/version.rb
93
76
  - lib/orthoses/walk.rb
94
77
  - lib/orthoses/writer.rb
95
- - orthoses.gemspec
96
78
  - sig/orthoses.rbs
97
79
  - sig/orthoses/_call.rbs
98
80
  - sig/orthoses/_middle_ware.rbs
@@ -118,7 +100,12 @@ files:
118
100
  - sig/orthoses/delegate_class/hook.rbs
119
101
  - sig/orthoses/filter.rbs
120
102
  - sig/orthoses/lazy_trace_point.rbs
103
+ - sig/orthoses/lazy_trace_point/method_added_hook.rbs
104
+ - sig/orthoses/lazy_trace_point/signleton_method_added_hook.rbs
121
105
  - sig/orthoses/load_rbs.rbs
106
+ - sig/orthoses/missing_name.rbs
107
+ - sig/orthoses/missing_name/missing_class.rbs
108
+ - sig/orthoses/missing_name/missing_module.rbs
122
109
  - sig/orthoses/mixin.rbs
123
110
  - sig/orthoses/mixin/hook.rbs
124
111
  - sig/orthoses/name_space_error.rbs
@@ -136,6 +123,7 @@ files:
136
123
  - sig/orthoses/tap.rbs
137
124
  - sig/orthoses/trace.rbs
138
125
  - sig/orthoses/trace/attribute.rbs
126
+ - sig/orthoses/trace/attribute/hook.rbs
139
127
  - sig/orthoses/trace/method.rbs
140
128
  - sig/orthoses/trace/method/info.rbs
141
129
  - sig/orthoses/trace/targetable.rbs
data/Gemfile DELETED
@@ -1,16 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- source "https://rubygems.org"
4
-
5
- # Specify your gem's dependencies in orthoses.gemspec
6
- gemspec
7
-
8
- gem "rbs"
9
- gem "rake", "~> 13.0"
10
- gem "rgot", "~> 1.1"
11
- gem "activesupport"
12
- gem "debug"
13
-
14
- group :steep do
15
- gem "steep", "1.4.0.dev.2"
16
- end
data/Gemfile.lock DELETED
@@ -1,86 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- orthoses (1.7.0)
5
- rbs (~> 3.0)
6
-
7
- GEM
8
- remote: https://rubygems.org/
9
- specs:
10
- activesupport (7.0.4.3)
11
- concurrent-ruby (~> 1.0, >= 1.0.2)
12
- i18n (>= 1.6, < 2)
13
- minitest (>= 5.1)
14
- tzinfo (~> 2.0)
15
- ast (2.4.2)
16
- concurrent-ruby (1.2.2)
17
- csv (3.2.6)
18
- debug (1.8.0)
19
- irb (>= 1.5.0)
20
- reline (>= 0.3.1)
21
- ffi (1.15.5)
22
- fileutils (1.7.1)
23
- i18n (1.13.0)
24
- concurrent-ruby (~> 1.0)
25
- io-console (0.6.0)
26
- irb (1.6.4)
27
- reline (>= 0.3.0)
28
- json (2.6.3)
29
- language_server-protocol (3.17.0.3)
30
- listen (3.8.0)
31
- rb-fsevent (~> 0.10, >= 0.10.3)
32
- rb-inotify (~> 0.9, >= 0.9.10)
33
- logger (1.5.3)
34
- minitest (5.18.0)
35
- parallel (1.23.0)
36
- parser (3.2.2.1)
37
- ast (~> 2.4.1)
38
- pathname (0.2.1)
39
- rainbow (3.1.1)
40
- rake (13.0.6)
41
- rb-fsevent (0.11.2)
42
- rb-inotify (0.10.1)
43
- ffi (~> 1.0)
44
- rbs (3.1.0)
45
- reline (0.3.3)
46
- io-console (~> 0.5)
47
- rgot (1.3.0)
48
- securerandom (0.2.2)
49
- steep (1.4.0.dev.2)
50
- activesupport (>= 5.1)
51
- csv (>= 3.0.9)
52
- fileutils (>= 1.1.0)
53
- json (>= 2.1.0)
54
- language_server-protocol (>= 3.15, < 4.0)
55
- listen (~> 3.0)
56
- logger (>= 1.3.0)
57
- parallel (>= 1.0.0)
58
- parser (>= 3.1)
59
- pathname (>= 0.2.1)
60
- rainbow (>= 2.2.2, < 4.0)
61
- rbs (>= 2.8.0)
62
- securerandom (>= 0.1)
63
- strscan (>= 1.0.0)
64
- terminal-table (>= 2, < 4)
65
- strscan (3.0.6)
66
- terminal-table (3.0.2)
67
- unicode-display_width (>= 1.1.1, < 3)
68
- tzinfo (2.0.6)
69
- concurrent-ruby (~> 1.0)
70
- unicode-display_width (2.4.2)
71
-
72
- PLATFORMS
73
- x86_64-darwin-21
74
- x86_64-linux
75
-
76
- DEPENDENCIES
77
- activesupport
78
- debug
79
- orthoses!
80
- rake (~> 13.0)
81
- rbs
82
- rgot (~> 1.1)
83
- steep (= 1.4.0.dev.2)
84
-
85
- BUNDLED WITH
86
- 2.4.8
@@ -1,56 +0,0 @@
1
- file :src do
2
- sh "git clone https://github.com/minitest/minitest.git src"
3
- end
4
-
5
- desc "generate minitest"
6
- task :minitest => :src do
7
- $:.unshift(File.expand_path("src/lib"))
8
-
9
- out = Pathname('out')
10
- out.rmtree rescue nil
11
- require 'orthoses'
12
-
13
- Orthoses::Builder.new do
14
- use Orthoses::CreateFileByName,
15
- base_dir: out.to_s
16
- use Orthoses::Filter do |name, content|
17
- name.start_with?("Minitest") || name == "Kernel"
18
- end
19
- use Orthoses::Constant,
20
- strict: false,
21
- if: ->(current, const, val, rbs){
22
- !Orthoses::Utils.rbs_defined_const?("#{current}::#{const}")
23
- }
24
- use Orthoses::Mixin
25
- use Orthoses::Attribute
26
- use Orthoses::RBSPrototypeRB,
27
- paths: Dir.glob('src/lib/minitest{.rb,/*.rb}'),
28
- constant_filter: ->(_) { false },
29
- mixin_filter: ->(_) { false },
30
- attribute_filter: ->(_) { false }
31
- run ->(){
32
- require_relative 'src/lib/minitest'
33
- require_relative 'src/lib/minitest/test'
34
- require_relative 'src/lib/minitest/spec'
35
- require_relative 'src/lib/minitest/parallel'
36
- require_relative 'src/lib/minitest/mock'
37
- require_relative 'src/lib/minitest/benchmark'
38
-
39
- require_relative 'src/lib/minitest/pride_plugin'
40
- }
41
- end.call
42
-
43
- sh "rbs -r mutex_m -I #{out} validate --silent"
44
- out.join("manifest.yaml").write <<~YAML
45
- dependencies:
46
- - name: mutex_m
47
- YAML
48
- tmp = out.join("kernel.rbs").read
49
- out.join("kernel.rbs").open("w") do |f|
50
- f.puts "%a{annotate:rdoc:skip}"
51
- f.write tmp
52
- end
53
- sh "rbs annotate --gems out"
54
- end
55
-
56
- task default: :minitest
@@ -1,8 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- gem "rack"
4
- gem "rake"
5
- gem "cgi"
6
- gem "minitest"
7
- gem "minitest-global_expectations"
8
- gem "orthoses", path: "../../"
@@ -1,30 +0,0 @@
1
- PATH
2
- remote: ../..
3
- specs:
4
- orthoses (1.6.0)
5
- rbs (~> 3.0)
6
-
7
- GEM
8
- remote: https://rubygems.org/
9
- specs:
10
- cgi (0.3.6)
11
- minitest (5.16.3)
12
- minitest-global_expectations (1.0.1)
13
- minitest (> 5)
14
- rack (3.0.2)
15
- rake (13.0.6)
16
- rbs (3.0.4)
17
-
18
- PLATFORMS
19
- arm64-darwin-21
20
-
21
- DEPENDENCIES
22
- cgi
23
- minitest
24
- minitest-global_expectations
25
- orthoses!
26
- rack
27
- rake
28
-
29
- BUNDLED WITH
30
- 2.3.16
@@ -1,7 +0,0 @@
1
- file :src do
2
- sh "git clone --depth 1 https://github.com/rack/rack-test.git src"
3
- end
4
-
5
- task :generate => :src do
6
- load "generate.rb"
7
- end
@@ -1,31 +0,0 @@
1
- require 'pathname'
2
- require 'orthoses'
3
- require 'fileutils'
4
-
5
- include FileUtils
6
-
7
- out = Pathname('out')
8
- out.rmtree rescue nil
9
- Orthoses.logger.level = :warn
10
- Orthoses::Builder.new do
11
- use Orthoses::CreateFileByName,
12
- base_dir: out.to_s
13
- # use Orthoses::Sort
14
- use Orthoses::Filter do |name, content|
15
- name.start_with?("Rack::Test")
16
- end
17
- use Orthoses::Trace,
18
- patterns: ['Rack::Test*']
19
- run ->(){
20
- cd "src" do
21
- load "spec/all.rb"
22
- Minitest.run
23
- # avoid to run on at_exit
24
- module ::Minitest
25
- def self.run args = []
26
- 0
27
- end
28
- end
29
- end
30
- }
31
- end.call
@@ -1,28 +0,0 @@
1
- class Rack::Test::Cookie
2
- attr_reader name: String
3
- attr_reader value: String
4
- attr_reader raw: String
5
- private def initialize: (String raw, ?URI::Generic uri, ?String default_host) -> void
6
- | (String raw, ?nil uri, ?String default_host) -> void
7
- | (String raw, ?URI::HTTPS uri, ?String default_host) -> void
8
- | (String raw, ?URI::HTTP uri, ?String default_host) -> void
9
- def domain: () -> String
10
- def secure?: () -> bool
11
- def valid?: (URI::Generic uri) -> (bool | URI::RFC3986_Parser)
12
- | (URI::HTTPS uri) -> bool
13
- | (nil uri) -> nil
14
- | (URI::HTTP uri) -> bool
15
- private def default_uri: () -> Array[String?]
16
- def http_only?: () -> bool
17
- def empty?: () -> bool
18
- def to_h: () -> Hash[String, String | bool]
19
- def expires: () -> Time?
20
- def expired?: () -> Integer?
21
- def matches?: (URI::HTTPS uri) -> (Array[Integer] | bool)
22
- | (URI::Generic uri) -> (Array[Integer] | bool)
23
- | (URI::HTTP uri) -> (Array[Integer] | bool)
24
- def path: () -> String
25
- def replaces?: (Rack::Test::Cookie other) -> String
26
- def <=>: (Rack::Test::Cookie other) -> String
27
- alias to_hash to_h
28
- end