orthoses 1.5.0 → 1.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +6 -1
  3. data/Gemfile.lock +35 -22
  4. data/examples/rack-test/Gemfile.lock +3 -3
  5. data/examples/rack-test/out/rack/test/cookie.rbs +28 -0
  6. data/examples/rack-test/out/rack/test/cookie_jar.rbs +28 -0
  7. data/examples/rack-test/out/rack/test/fake_app.rbs +13 -0
  8. data/examples/rack-test/out/rack/test/input_rewinder.rbs +8 -0
  9. data/examples/rack-test/out/rack/test/methods.rbs +98 -0
  10. data/examples/rack-test/out/rack/test/session.rbs +186 -0
  11. data/examples/rack-test/out/rack/test/uploaded_file.rbs +18 -0
  12. data/examples/rack-test/out/rack/test/utils.rbs +112 -0
  13. data/examples/rack-test/out/rack/test.rbs +3 -0
  14. data/lib/orthoses/call_tracer/lazy.rb +12 -0
  15. data/lib/orthoses/content/duplication_checker.rb +40 -18
  16. data/lib/orthoses/content/environment.rb +17 -3
  17. data/lib/orthoses/content/header_builder.rb +4 -5
  18. data/lib/orthoses/content.rb +47 -45
  19. data/lib/orthoses/filter.rb +2 -2
  20. data/lib/orthoses/rbs_prototype_rb.rb +16 -2
  21. data/lib/orthoses/trace/method.rb +7 -2
  22. data/lib/orthoses/utils.rb +9 -25
  23. data/lib/orthoses/version.rb +1 -1
  24. data/orthoses.gemspec +1 -1
  25. data/sig/orthoses/builder.rbs +9 -0
  26. data/sig/orthoses/call_tracer/capture.rbs +1 -1
  27. data/sig/orthoses/call_tracer/lazy.rbs +14 -1
  28. data/sig/orthoses/call_tracer.rbs +1 -1
  29. data/sig/orthoses/content/duplication_checker.rbs +3 -0
  30. data/sig/orthoses/content/header_builder.rbs +1 -0
  31. data/sig/orthoses/content.rbs +1 -1
  32. data/sig/orthoses/filter.rbs +5 -0
  33. data/sig/orthoses/lazy_trace_point.rbs +9 -1
  34. data/sig/orthoses/outputable/avoid_recursive_ancestor_error.rbs +2 -0
  35. data/sig/orthoses/outputable/constantizable_filter.rbs +2 -0
  36. data/sig/orthoses/outputable/uniq_content_body.rbs +2 -0
  37. data/sig/orthoses/pp.rbs +2 -0
  38. data/sig/orthoses/rbs_prototype_rb.rbs +5 -0
  39. data/sig/orthoses/rbs_prototype_runtime.rbs +3 -0
  40. data/sig/orthoses/sort.rbs +1 -0
  41. data/sig/orthoses/store.rbs +2 -0
  42. data/sig/orthoses/tap.rbs +3 -0
  43. data/sig/orthoses/utils/type_list.rbs +1 -0
  44. data/sig/orthoses/utils.rbs +0 -2
  45. data/sig/orthoses.rbs +1 -1
  46. metadata +14 -5
@@ -1,9 +1,17 @@
1
1
  # THIS IS GENERATED CODE from `$ rake generate_self_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
6
- def initialize: (*untyped events) ?{ () -> untyped } -> void
14
+ def initialize: (*untyped events) { () -> untyped } -> void
7
15
  def enable: (?target: untyped?, ?target_line: untyped?, ?target_thread: untyped?) ?{ () -> untyped } -> untyped
8
16
  private def trace_instance_method: () ?{ () -> untyped } -> untyped
9
17
  private def trace_singleton_method: () ?{ () -> untyped } -> untyped
@@ -1,5 +1,7 @@
1
1
  # THIS IS GENERATED CODE from `$ rake generate_self_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
1
  # THIS IS GENERATED CODE from `$ rake generate_self_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
1
  # THIS IS GENERATED CODE from `$ rake generate_self_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
data/sig/orthoses/pp.rbs CHANGED
@@ -1,5 +1,7 @@
1
1
  # THIS IS GENERATED CODE from `$ rake generate_self_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,5 +1,10 @@
1
1
  # THIS IS GENERATED CODE from `$ rake generate_self_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
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
5
10
  def call: () -> Orthoses::store
@@ -1,5 +1,8 @@
1
1
  # THIS IS GENERATED CODE from `$ rake generate_self_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
7
  def initialize: (untyped loader, patterns: untyped) -> void
5
8
  def call: () -> untyped
@@ -1,5 +1,6 @@
1
1
  # THIS IS GENERATED CODE from `$ rake generate_self_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
1
  # THIS IS GENERATED CODE from `$ rake generate_self_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
1
  # THIS IS GENERATED CODE from `$ rake generate_self_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,5 +1,6 @@
1
1
  # THIS IS GENERATED CODE from `$ rake generate_self_sig`
2
2
 
3
+ # internal
3
4
  class Orthoses::Utils::TypeList
4
5
  def initialize: (untyped types) -> void
5
6
  def inject: () -> untyped
@@ -24,6 +24,4 @@ module Orthoses::Utils
24
24
  def self.new_store: () -> Orthoses::store
25
25
 
26
26
  UNBOUND_NAME_METHOD: UnboundMethod
27
-
28
- attr_accessor self.rbs_collection_pathname: Pathname
29
27
  end
data/sig/orthoses.rbs CHANGED
@@ -1,7 +1,7 @@
1
1
  # THIS IS GENERATED CODE from `$ rake generate_self_sig`
2
2
 
3
3
  module Orthoses
4
- VERSION: "1.5.0"
4
+ VERSION: "1.7.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.5.0
4
+ version: 1.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: 2023-03-13 00:00:00.000000000 Z
11
+ date: 2023-06-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rbs
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '2.0'
19
+ version: '3.0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '2.0'
26
+ version: '3.0'
27
27
  description: Build RBS by Rack base architecture
28
28
  email:
29
29
  - co000ri@gmail.com
@@ -41,6 +41,15 @@ files:
41
41
  - examples/rack-test/Gemfile.lock
42
42
  - examples/rack-test/Rakefile
43
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
44
53
  - examples/simple_middleware.rb
45
54
  - examples/simple_middleware.rbs
46
55
  - lib/orthoses.rb
@@ -156,7 +165,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
156
165
  - !ruby/object:Gem::Version
157
166
  version: '0'
158
167
  requirements: []
159
- rubygems_version: 3.4.3
168
+ rubygems_version: 3.4.10
160
169
  signing_key:
161
170
  specification_version: 4
162
171
  summary: Framework for Generate RBS