orthoses 1.6.0 → 1.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (80) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +10 -3
  3. data/lib/orthoses/builder.rb +7 -3
  4. data/lib/orthoses/content/duplication_checker.rb +54 -17
  5. data/lib/orthoses/content/environment.rb +14 -1
  6. data/lib/orthoses/content.rb +46 -44
  7. data/lib/orthoses/create_file_by_name.rb +38 -7
  8. data/lib/orthoses/filter.rb +2 -2
  9. data/lib/orthoses/missing_name.rb +81 -0
  10. data/lib/orthoses/mixin.rb +9 -4
  11. data/lib/orthoses/rbs_prototype_rb.rb +16 -2
  12. data/lib/orthoses/rbs_prototype_runtime.rb +21 -2
  13. data/lib/orthoses/utils.rb +1 -1
  14. data/lib/orthoses/version.rb +1 -1
  15. data/lib/orthoses.rb +1 -0
  16. data/sig/orthoses/_call.rbs +1 -1
  17. data/sig/orthoses/_middle_ware.rbs +1 -1
  18. data/sig/orthoses/attribute/hook.rbs +1 -1
  19. data/sig/orthoses/attribute.rbs +1 -1
  20. data/sig/orthoses/autoload/hook.rbs +1 -1
  21. data/sig/orthoses/autoload.rbs +1 -1
  22. data/sig/orthoses/builder/call_logable.rbs +1 -1
  23. data/sig/orthoses/builder.rbs +14 -4
  24. data/sig/orthoses/call_tracer/capturable.rbs +1 -1
  25. data/sig/orthoses/call_tracer/capture.rbs +1 -1
  26. data/sig/orthoses/call_tracer/lazy.rbs +14 -2
  27. data/sig/orthoses/call_tracer.rbs +1 -1
  28. data/sig/orthoses/const_load_error.rbs +1 -1
  29. data/sig/orthoses/constant.rbs +1 -1
  30. data/sig/orthoses/content/array_io.rbs +1 -1
  31. data/sig/orthoses/content/duplication_checker.rbs +7 -2
  32. data/sig/orthoses/content/environment.rbs +8 -3
  33. data/sig/orthoses/content/header_builder.rbs +1 -1
  34. data/sig/orthoses/content.rbs +3 -2
  35. data/sig/orthoses/create_file_by_name.rbs +2 -2
  36. data/sig/orthoses/delegate_class/hook.rbs +1 -1
  37. data/sig/orthoses/delegate_class.rbs +1 -1
  38. data/sig/orthoses/filter.rbs +6 -1
  39. data/sig/orthoses/lazy_trace_point.rbs +9 -1
  40. data/sig/orthoses/load_rbs.rbs +1 -1
  41. data/sig/orthoses/missing_name/missing_class.rbs +7 -0
  42. data/sig/orthoses/missing_name/missing_module.rbs +7 -0
  43. data/sig/orthoses/missing_name.rbs +6 -0
  44. data/sig/orthoses/mixin/hook.rbs +2 -2
  45. data/sig/orthoses/mixin.rbs +2 -2
  46. data/sig/orthoses/name_space_error.rbs +1 -1
  47. data/sig/orthoses/object_space_all.rbs +1 -1
  48. data/sig/orthoses/outputable/avoid_recursive_ancestor_error.rbs +3 -1
  49. data/sig/orthoses/outputable/constantizable_filter.rbs +3 -1
  50. data/sig/orthoses/outputable/uniq_content_body.rbs +3 -1
  51. data/sig/orthoses/outputable.rbs +1 -1
  52. data/sig/orthoses/path_helper.rbs +1 -1
  53. data/sig/orthoses/pp.rbs +3 -1
  54. data/sig/orthoses/rbs_prototype_rb.rbs +10 -3
  55. data/sig/orthoses/rbs_prototype_runtime.rbs +13 -3
  56. data/sig/orthoses/sort.rbs +2 -1
  57. data/sig/orthoses/store.rbs +3 -1
  58. data/sig/orthoses/tap.rbs +4 -1
  59. data/sig/orthoses/trace/attribute.rbs +1 -1
  60. data/sig/orthoses/trace/method/info.rbs +1 -1
  61. data/sig/orthoses/trace/method.rbs +1 -1
  62. data/sig/orthoses/trace/targetable.rbs +1 -1
  63. data/sig/orthoses/trace.rbs +1 -1
  64. data/sig/orthoses/utils/type_list.rbs +2 -1
  65. data/sig/orthoses/utils/underscore.rbs +1 -1
  66. data/sig/orthoses/utils.rbs +2 -2
  67. data/sig/orthoses/walk.rbs +1 -1
  68. data/sig/orthoses/writer.rbs +1 -1
  69. data/sig/orthoses.rbs +2 -2
  70. metadata +7 -13
  71. data/Gemfile +0 -15
  72. data/Gemfile.lock +0 -76
  73. data/examples/minitest/Rakefile +0 -56
  74. data/examples/rack-test/Gemfile +0 -8
  75. data/examples/rack-test/Gemfile.lock +0 -30
  76. data/examples/rack-test/Rakefile +0 -7
  77. data/examples/rack-test/generate.rb +0 -31
  78. data/examples/simple_middleware.rb +0 -11
  79. data/examples/simple_middleware.rbs +0 -7
  80. 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::Autoload
4
4
  def initialize: (untyped loader) -> void
@@ -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::Builder::CallLogable
4
4
  def call: () -> untyped
@@ -1,9 +1,19 @@
1
- # THIS IS GENERATED CODE from `$ rake generate_self_sig`
1
+ # THIS IS GENERATED CODE from `$ rake sig`
2
2
 
3
+ # Middleware builder like the Rack
4
+ # Builder.new do
5
+ # use Orthoses::CreateFileByName
6
+ # use Orthoses::Constant
7
+ # use Orthoses::Mixin
8
+ # use Orthoses::Walk,
9
+ # root: "Foo"
10
+ # run ->() { require 'foo' }
11
+ # end
3
12
  class Orthoses::Builder
4
- def initialize: () ?{ () -> untyped } -> void
5
- def use: (untyped middleware, *untyped args, **untyped key) ?{ () -> untyped } -> untyped
13
+ def initialize: () ?{ () [self: Orthoses::Builder] -> untyped } -> void
14
+ def use: (untyped middleware, *untyped args, **untyped key) ?{ (*untyped, **untyped) -> untyped } -> untyped
6
15
  def run: (untyped loader) -> untyped
16
+ def reset_runner: (untyped loader) -> untyped
7
17
  def to_loader: () -> untyped
8
- def call: () { () -> void } -> Orthoses::store
18
+ def call: () -> Orthoses::store
9
19
  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
  module Orthoses::CallTracer::Capturable
4
4
  def build_capture: (untyped tp) -> 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::CallTracer::Capture < ::Struct[untyped]
4
4
  def method: () -> Method
@@ -1,7 +1,19 @@
1
- # THIS IS GENERATED CODE from `$ rake generate_self_sig`
1
+ # THIS IS GENERATED CODE from `$ rake sig`
2
2
 
3
+ # CallTracer::Lazy is possible to perform a trace
4
+ # equivalent to CallTracer before method is defined.
5
+ # scope = CallTracerLazy.new
6
+ # scope.trace("ActiveRecord::Base#scope") do
7
+ # require 'active_record/all'
8
+ # @loader.call
9
+ # end
10
+ # scope.captures.each do |capture|
11
+ # capture.argument[:name]
12
+ # capture.argument[:body]
13
+ # capture.argument[:block]
14
+ # end
3
15
  class Orthoses::CallTracer::Lazy
4
16
  def initialize: () -> void
5
17
  def trace: (String name) ?{ () -> untyped } -> untyped
6
- attr_reader captures: Array[untyped]
18
+ attr_reader captures: Array[Orthoses::CallTracer::Capture]
7
19
  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
  class Orthoses::CallTracer
4
4
  def initialize: () -> void
@@ -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::ConstLoadError < ::StandardError
4
4
  def initialize: (root: Module, const: Symbol, error: untyped) -> void
@@ -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::Constant
4
4
  def initialize: (Orthoses::_Call loader, ?strict: bool, ?if: ^(Module, Symbol, untyped) -> boolish | nil, ?on_error: ^(Orthoses::ConstLoadError) -> void | nil) -> void
@@ -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::Content::ArrayIO
4
4
  def initialize: () -> void
@@ -1,8 +1,13 @@
1
- # THIS IS GENERATED CODE from `$ rake generate_self_sig`
1
+ # THIS IS GENERATED CODE from `$ rake sig`
2
2
 
3
+ # Check and drop duplication method, const etc...
3
4
  class Orthoses::Content::DuplicationChecker
4
5
  def initialize: (untyped decl, ?env: untyped?) -> void
5
6
  def update_decl: () -> (nil | untyped)
6
- private def drop_known_method_definition: (untyped uniq_map) -> untyped
7
+ private def uniq_members: () -> untyped
8
+ private def drop_set_method_definition: () -> untyped
9
+ private def drop_known_method_definition: () -> untyped
10
+ private def drop_known_method_definition_recur: (untyped d) -> untyped
11
+ private def drop_known_const_definition: () -> untyped
7
12
  private def member_key: (untyped member) -> untyped
8
13
  end
@@ -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::Content::Environment
4
4
  def self.load_from_paths: (untyped paths) -> untyped
5
- def initialize: (?constant_filter: constant_filter?, ?mixin_filter: mixin_filter?, ?attribute_filter: attribute_filter?) -> void
5
+ def initialize: (?method_definition_filter: method_definition_filter?, ?alias_filter: alias_filter?, ?constant_filter: constant_filter?, ?mixin_filter: mixin_filter?, ?attribute_filter: attribute_filter?) -> void
6
6
  def <<: (RBS::AST::Declarations::t decl) -> RBS::Environment
7
7
  def write_to: (store: Orthoses::store) -> void
8
8
  def each: () { (Orthoses::Content) -> void } -> void
@@ -11,10 +11,15 @@ class Orthoses::Content::Environment
11
11
  # end
12
12
  private def avoid_generic_parameter_mismatch_error: () -> untyped
13
13
  private def decls_to_lines: (untyped decls) -> untyped
14
+ type method_definition_filter = ^(RBS::AST::Members::MethodDefinition) -> boolish
15
+ type alias_filter = ^(RBS::AST::Members::Alias) -> boolish
14
16
  type constant_filter = ^(RBS::AST::Declarations::Constant) -> boolish
15
17
  type mixin_filter = ^(RBS::AST::Members::Mixin) -> boolish
16
18
  type attribute_filter = ^(RBS::AST::Members::Attribute) -> boolish
17
- @env: RBS::Environment
19
+ @load_env: RBS::Environment
20
+ @known_env: RBS::Environment
21
+ @method_definition_filter: method_definition_filter?
22
+ @alias_filter: alias_filter?
18
23
  @constant_filter: constant_filter?
19
24
  @mixin_filter: mixin_filter?
20
25
  @attribute_filter: attribute_filter?
@@ -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::Content::HeaderBuilder
4
4
  def initialize: (env: untyped) -> void
@@ -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::Content
4
4
  def initialize: (name: String) -> void
@@ -12,13 +12,14 @@ class Orthoses::Content
12
12
  def uniq!: () -> untyped
13
13
  def sort!: () -> untyped
14
14
  def original_rbs: () -> untyped
15
+ def auto_header: () -> (nil | untyped)
15
16
  private def decl_to_lines: (untyped decl) -> untyped
16
17
  private def uniqed_body_string: () -> String
17
18
  private def uniqed_body_decl: () -> RBS::AST::Declarations::t
18
- private def auto_header: () -> (nil | untyped)
19
19
  private def temporary_type_params: (untyped name) -> untyped
20
20
  private def type_params: (untyped name) -> untyped
21
21
  attr_reader name: String
22
22
  attr_reader body: Array[String]
23
23
  attr_accessor header: String?
24
+ attr_accessor comment: String?
24
25
  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::CreateFileByName
4
- def initialize: (Orthoses::_Call loader, base_dir: String, ?header: String?) -> void
4
+ def initialize: (Orthoses::_Call loader, to: String, ?header: String?, ?depth: Integer?, ?rmtree: boolish) -> void
5
5
  def call: () -> Orthoses::store
6
6
  @loader: Orthoses::_Call
7
7
  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
  module Orthoses::DelegateClass::Hook
4
4
  def inherited: (untyped subclass) -> 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::DelegateClass
4
4
  def initialize: (Orthoses::_Call loader) -> void
@@ -1,5 +1,10 @@
1
- # THIS IS GENERATED CODE from `$ rake generate_self_sig`
1
+ # THIS IS GENERATED CODE from `$ rake sig`
2
2
 
3
+ # Filter current store.
4
+ # filter stored key and value if proc return true
5
+ # use Orthoses::Filter do |name, content|
6
+ # Orthoses.rbs_defined_class?(name)
7
+ # end
3
8
  class Orthoses::Filter
4
9
  def initialize: (Orthoses::_Call loader) { (String, Orthoses::Content) -> boolish } -> void
5
10
  def call: () -> Orthoses::store
@@ -1,5 +1,13 @@
1
- # THIS IS GENERATED CODE from `$ rake generate_self_sig`
1
+ # THIS IS GENERATED CODE from `$ rake sig`
2
2
 
3
+ # TracePoint wrapper that allows setting hooks
4
+ # even if the target is undefined
5
+ # LazyTracePoint.new(:call) do |tp|
6
+ # ...
7
+ # end.enable(target: 'Class#class_attribute') do
8
+ # require 'active_support/core_ext/class/attribute'
9
+ # ...
10
+ # end
3
11
  class Orthoses::LazyTracePoint < ::TracePoint
4
12
  def method_added: (untyped id) -> untyped
5
13
  def singleton_method_added: (untyped id) -> 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::LoadRBS
4
4
  def initialize: (Orthoses::_Call loader, paths: paths) -> void
@@ -0,0 +1,7 @@
1
+ # THIS IS GENERATED CODE from `$ rake sig`
2
+
3
+ class Orthoses::MissingName::MissingClass
4
+ def initialize: (untyped store) -> void
5
+ def call: () -> untyped
6
+ private def recur: (untyped content) -> untyped
7
+ end
@@ -0,0 +1,7 @@
1
+ # THIS IS GENERATED CODE from `$ rake sig`
2
+
3
+ class Orthoses::MissingName::MissingModule
4
+ def initialize: (untyped store) -> void
5
+ def call: () -> untyped
6
+ private def split_name: (untyped key_name) -> untyped
7
+ end
@@ -0,0 +1,6 @@
1
+ # THIS IS GENERATED CODE from `$ rake sig`
2
+
3
+ class Orthoses::MissingName
4
+ def initialize: (untyped loader) -> void
5
+ def call: () -> untyped
6
+ end
@@ -1,6 +1,6 @@
1
- # THIS IS GENERATED CODE from `$ rake generate_self_sig`
1
+ # THIS IS GENERATED CODE from `$ rake sig`
2
2
 
3
- module Orthoses::Mixin::Hook
3
+ module Orthoses::Mixin::Hook : Module
4
4
  def include: (*untyped modules) -> untyped
5
5
 
6
6
  def extend: (*untyped modules) -> untyped
@@ -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::Mixin
4
- def initialize: (Orthoses::_Call loader) -> void
4
+ def initialize: (Orthoses::_Call loader, ?if: nil | ^(Module base_mod, :include | :extend | :prepend how, Module mod) -> boolish) -> void
5
5
  def call: () -> Orthoses::store
6
6
  private def collect_definitions: (Orthoses::store store, Orthoses::CallTracer call_tracer, :include | :extend | :prepend how) -> void
7
7
  @loader: Orthoses::_Call
@@ -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,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::ObjectSpaceAll
4
4
  def initialize: (Orthoses::_Call loader, ?if: ^(Module) -> boolish) -> void
@@ -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
+ # AvoidRecursiveAncestorError is an internal middleware
4
+ # It's using on orthoses/outputable.rb
3
5
  class Orthoses::Outputable::AvoidRecursiveAncestorError
4
6
  def initialize: (Orthoses::_Call loader) -> void
5
7
  def call: () -> Orthoses::store
@@ -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
+ # Constantizable is an internal middleware
4
+ # It's using on orthoses/outputable.rb
3
5
  class Orthoses::Outputable::ConstantizableFilter
4
6
  def initialize: (untyped loader) -> void
5
7
  def call: () -> untyped
@@ -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
+ # UniqContentBody is an internal middleware
4
+ # It's using on orthoses/outputable.rb
3
5
  class Orthoses::Outputable::UniqContentBody
4
6
  def initialize: (untyped loader) -> void
5
7
  def call: () -> 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::Outputable
4
4
  def call: () -> 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::PathHelper
4
4
  def self.best_version_paths: (untyped current, untyped base_dir) -> untyped
data/sig/orthoses/pp.rbs CHANGED
@@ -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
+ # Debug current stored values
4
+ # use Orthoses::PP
3
5
  class Orthoses::PP
4
6
  def initialize: (untyped loader) -> void
5
7
  def call: () -> untyped
@@ -1,11 +1,18 @@
1
- # THIS IS GENERATED CODE from `$ rake generate_self_sig`
1
+ # THIS IS GENERATED CODE from `$ rake sig`
2
2
 
3
+ # Call `rbs prototype rb` and add to store
4
+ # use Orthoses::RBSPrototypeRB,
5
+ # paths: Dir.glob("lib/**/*.rb"),
6
+ # method_definition_filter: ->(member) { false },
7
+ # alias_filter: ->(member) { false }
3
8
  class Orthoses::RBSPrototypeRB
4
- 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
9
+ 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
5
10
  def call: () -> Orthoses::store
6
11
  @loader: Orthoses::_Call
7
12
  @paths: Array[_ToS]
13
+ @method_definition_filter: Orthoses::Content::Environment::method_definition_filter?
14
+ @alias_filter: Orthoses::Content::Environment::alias_filter?
8
15
  @constant_filter: Orthoses::Content::Environment::constant_filter?
9
16
  @mixin_filter: Orthoses::Content::Environment::mixin_filter?
10
- @attribute_filter: Orthoses::Content::Environment::mixin_filter?
17
+ @attribute_filter: Orthoses::Content::Environment::attribute_filter?
11
18
  end
@@ -1,6 +1,16 @@
1
- # THIS IS GENERATED CODE from `$ rake generate_self_sig`
1
+ # THIS IS GENERATED CODE from `$ rake sig`
2
2
 
3
+ # Call `rbs prototype runtime` and add to store
4
+ # use Orthoses::RBSPrototypeRuntime,
5
+ # patterns: ['Foo::*']
3
6
  class Orthoses::RBSPrototypeRuntime
4
- def initialize: (untyped loader, patterns: untyped) -> void
5
- def call: () -> untyped
7
+ 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
8
+ def call: () -> Orthoses::store
9
+ @loader: Orthoses::_Call
10
+ @patterns: Array[_ToS]
11
+ @method_definition_filter: Orthoses::Content::Environment::method_definition_filter?
12
+ @alias_filter: Orthoses::Content::Environment::alias_filter?
13
+ @constant_filter: Orthoses::Content::Environment::constant_filter?
14
+ @mixin_filter: Orthoses::Content::Environment::mixin_filter?
15
+ @attribute_filter: Orthoses::Content::Environment::attribute_filter?
6
16
  end
@@ -1,5 +1,6 @@
1
- # THIS IS GENERATED CODE from `$ rake generate_self_sig`
1
+ # THIS IS GENERATED CODE from `$ rake sig`
2
2
 
3
+ # use Orthoses::Sort
3
4
  class Orthoses::Sort
4
5
  def initialize: (untyped loader) -> void
5
6
  def call: () -> untyped
@@ -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
+ # Internal middleware for return store object
4
+ # Builder set this middleware on last stack by default
3
5
  class Orthoses::Store
4
6
  def initialize: (untyped loader) -> void
5
7
  def call: () -> untyped
data/sig/orthoses/tap.rbs CHANGED
@@ -1,5 +1,8 @@
1
- # THIS IS GENERATED CODE from `$ rake generate_self_sig`
1
+ # THIS IS GENERATED CODE from `$ rake sig`
2
2
 
3
+ # use Orthoses::Tap do |store|
4
+ # store["Foo::Bar"] << "def baz: () -> void"
5
+ # end
3
6
  class Orthoses::Tap
4
7
  def initialize: (Orthoses::_Call loader) -> void
5
8
  def call: () -> Orthoses::store
@@ -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::Attribute
4
4
  def initialize: (untyped loader, patterns: untyped) -> void
@@ -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,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
4
4
  def initialize: (untyped loader, patterns: untyped) -> void
@@ -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,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
4
4
  def initialize: (untyped loader, patterns: untyped) -> void
@@ -1,5 +1,6 @@
1
- # THIS IS GENERATED CODE from `$ rake generate_self_sig`
1
+ # THIS IS GENERATED CODE from `$ rake sig`
2
2
 
3
+ # internal
3
4
  class Orthoses::Utils::TypeList
4
5
  def initialize: (untyped types) -> void
5
6
  def inject: () -> 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::Utils::Underscore
4
4
  end
@@ -1,9 +1,9 @@
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
4
  def self.unautoload!: () -> untyped
5
5
 
6
- def self.each_const_recursive: (Module root, ?cache: Hash[untyped, true], ?on_error: ^(Orthoses::ConstLoadError) -> void) ?{ (Module, Symbol, untyped) -> void } -> void
6
+ def self.each_const_recursive: (Module root, ?cache: Hash[untyped, true], ?on_error: nil | ^(Orthoses::ConstLoadError) -> void) ?{ (Module, Symbol, untyped) -> void } -> void
7
7
 
8
8
  def self.rbs_defined_const?: (String name, ?library: (String | Array[String])?, ?collection: boolish) -> bool
9
9
 
@@ -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::Walk
4
4
  def initialize: (Orthoses::_Call loader, root: Module | String) -> void
@@ -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::Writer
4
4
  def initialize: (Orthoses::_Call loader, io: _Writer) -> void
data/sig/orthoses.rbs CHANGED
@@ -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
  module Orthoses
4
- VERSION: "1.6.0"
4
+ VERSION: "1.8.0"
5
5
 
6
6
  attr_accessor self.logger: ::Logger
7
7
 
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.6.0
4
+ version: 1.8.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-03-15 00:00:00.000000000 Z
11
+ date: 2023-07-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rbs
@@ -32,17 +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/simple_middleware.rb
45
- - examples/simple_middleware.rbs
46
37
  - lib/orthoses.rb
47
38
  - lib/orthoses/attribute.rb
48
39
  - lib/orthoses/autoload.rb
@@ -60,6 +51,7 @@ files:
60
51
  - lib/orthoses/filter.rb
61
52
  - lib/orthoses/lazy_trace_point.rb
62
53
  - lib/orthoses/load_rbs.rb
54
+ - lib/orthoses/missing_name.rb
63
55
  - lib/orthoses/mixin.rb
64
56
  - lib/orthoses/object_space_all.rb
65
57
  - lib/orthoses/outputable.rb
@@ -83,7 +75,6 @@ files:
83
75
  - lib/orthoses/version.rb
84
76
  - lib/orthoses/walk.rb
85
77
  - lib/orthoses/writer.rb
86
- - orthoses.gemspec
87
78
  - sig/orthoses.rbs
88
79
  - sig/orthoses/_call.rbs
89
80
  - sig/orthoses/_middle_ware.rbs
@@ -110,6 +101,9 @@ files:
110
101
  - sig/orthoses/filter.rbs
111
102
  - sig/orthoses/lazy_trace_point.rbs
112
103
  - sig/orthoses/load_rbs.rbs
104
+ - sig/orthoses/missing_name.rbs
105
+ - sig/orthoses/missing_name/missing_class.rbs
106
+ - sig/orthoses/missing_name/missing_module.rbs
113
107
  - sig/orthoses/mixin.rbs
114
108
  - sig/orthoses/mixin/hook.rbs
115
109
  - sig/orthoses/name_space_error.rbs
@@ -156,7 +150,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
156
150
  - !ruby/object:Gem::Version
157
151
  version: '0'
158
152
  requirements: []
159
- rubygems_version: 3.4.8
153
+ rubygems_version: 3.4.10
160
154
  signing_key:
161
155
  specification_version: 4
162
156
  summary: Framework for Generate RBS
data/Gemfile DELETED
@@ -1,15 +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
-
13
- group :steep do
14
- gem "steep", "1.4.0.dev.2"
15
- end