orthoses-rails 0.4.0 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (108) hide show
  1. checksums.yaml +4 -4
  2. data/examples/rails/Rakefile +125 -183
  3. data/examples/rails/config/database.yml +8 -0
  4. data/examples/rails/config/storage.yml +3 -0
  5. data/examples/rails/gemfiles/Gemfile_6_0 +16 -0
  6. data/examples/rails/gemfiles/Gemfile_6_0.lock +172 -0
  7. data/examples/rails/gemfiles/Gemfile_6_1 +15 -0
  8. data/examples/rails/gemfiles/Gemfile_6_1.lock +173 -0
  9. data/examples/rails/gemfiles/Gemfile_7_0 +15 -0
  10. data/examples/rails/gemfiles/Gemfile_7_0.lock +172 -0
  11. data/examples/rails/tasks/active_job.rake +95 -0
  12. data/examples/rails/tasks/active_model.rake +46 -0
  13. data/examples/rails/tasks/active_record.rake +83 -0
  14. data/examples/rails/tasks/active_storage.rake +94 -0
  15. data/examples/rails/tasks/active_support.rake +92 -0
  16. data/lib/orthoses/active_model.rb +0 -1
  17. data/lib/orthoses/active_record.rb +0 -1
  18. data/lib/orthoses/active_support/delegation.rb +6 -6
  19. data/lib/orthoses/active_support/time_with_zone.rb +21 -3
  20. data/lib/orthoses/active_support.rb +0 -2
  21. data/lib/orthoses/rails/version.rb +1 -1
  22. data/lib/orthoses/rails.rb +0 -1
  23. data/orthoses-rails.gemspec +1 -1
  24. metadata +18 -89
  25. data/examples/rails/known_sig/action_cable/connection/test_cookie_jar.rbs +0 -2
  26. data/examples/rails/known_sig/action_controller/metal.rbs +0 -4
  27. data/examples/rails/known_sig/action_dispatch/cookies/cookie_jar.rbs +0 -3
  28. data/examples/rails/known_sig/action_dispatch/response.rbs +0 -4
  29. data/examples/rails/patch/drb/drb_undumped.rbs +0 -2
  30. data/examples/rails/patch/drb.rbs +0 -2
  31. data/examples/rails/patch/erubi/engine.rbs +0 -4
  32. data/examples/rails/patch/erubi.rbs +0 -2
  33. data/examples/rails/patch/minitest/kernel.rbs +0 -44
  34. data/examples/rails/patch/minitest/minitest/abstract_reporter.rbs +0 -49
  35. data/examples/rails/patch/minitest/minitest/assertion.rbs +0 -16
  36. data/examples/rails/patch/minitest/minitest/assertions.rbs +0 -545
  37. data/examples/rails/patch/minitest/minitest/backtrace_filter.rbs +0 -16
  38. data/examples/rails/patch/minitest/minitest/bench_spec.rbs +0 -101
  39. data/examples/rails/patch/minitest/minitest/benchmark.rbs +0 -258
  40. data/examples/rails/patch/minitest/minitest/composite_reporter.rbs +0 -25
  41. data/examples/rails/patch/minitest/minitest/expectations.rbs +0 -21
  42. data/examples/rails/patch/minitest/minitest/guard.rbs +0 -64
  43. data/examples/rails/patch/minitest/minitest/mock.rbs +0 -60
  44. data/examples/rails/patch/minitest/minitest/parallel/executor.rbs +0 -42
  45. data/examples/rails/patch/minitest/minitest/parallel/test/class_methods.rbs +0 -6
  46. data/examples/rails/patch/minitest/minitest/parallel/test.rbs +0 -3
  47. data/examples/rails/patch/minitest/minitest/parallel.rbs +0 -2
  48. data/examples/rails/patch/minitest/minitest/pride_io.rbs +0 -54
  49. data/examples/rails/patch/minitest/minitest/pride_lol.rbs +0 -17
  50. data/examples/rails/patch/minitest/minitest/progress_reporter.rbs +0 -11
  51. data/examples/rails/patch/minitest/minitest/reportable.rbs +0 -51
  52. data/examples/rails/patch/minitest/minitest/reporter.rbs +0 -5
  53. data/examples/rails/patch/minitest/minitest/result.rbs +0 -28
  54. data/examples/rails/patch/minitest/minitest/runnable.rbs +0 -131
  55. data/examples/rails/patch/minitest/minitest/skip.rbs +0 -6
  56. data/examples/rails/patch/minitest/minitest/spec/dsl/instance_methods.rbs +0 -48
  57. data/examples/rails/patch/minitest/minitest/spec/dsl.rbs +0 -125
  58. data/examples/rails/patch/minitest/minitest/spec.rbs +0 -10
  59. data/examples/rails/patch/minitest/minitest/statistics_reporter.rbs +0 -76
  60. data/examples/rails/patch/minitest/minitest/summary_reporter.rbs +0 -26
  61. data/examples/rails/patch/minitest/minitest/test/lifecycle_hooks.rbs +0 -92
  62. data/examples/rails/patch/minitest/minitest/test.rbs +0 -76
  63. data/examples/rails/patch/minitest/minitest/unexpected_error.rbs +0 -10
  64. data/examples/rails/patch/minitest/minitest/unit/test_case.rbs +0 -3
  65. data/examples/rails/patch/minitest/minitest/unit.rbs +0 -5
  66. data/examples/rails/patch/minitest/minitest.rbs +0 -966
  67. data/examples/rails/patch/pg/simple_decoder.rbs +0 -4
  68. data/examples/rails/patch/pg.rbs +0 -2
  69. data/examples/rails/patch/qc/queue.rbs +0 -2
  70. data/examples/rails/patch/qc.rbs +0 -2
  71. data/examples/rails/patch/que/job.rbs +0 -2
  72. data/examples/rails/patch/que.rbs +0 -2
  73. data/examples/rails/patch/rack/cache/entity_store.rbs +0 -2
  74. data/examples/rails/patch/rack/cache/meta_store.rbs +0 -2
  75. data/examples/rails/patch/rack/cache.rbs +0 -2
  76. data/examples/rails/patch/rack/session/dalli.rbs +0 -2
  77. data/examples/rails/patch/rack/session.rbs +0 -2
  78. data/examples/rails/patch/rboc.rbs +0 -2
  79. data/examples/rails/patch/rdoc/generator/sdoc.rbs +0 -3
  80. data/examples/rails/patch/rdoc/generator.rbs +0 -2
  81. data/examples/rails/patch/rdoc/task.rbs +0 -2
  82. data/examples/rails/patch/ripper.rbs +0 -2
  83. data/examples/rails/patch/sidekiq/worker.rbs +0 -2
  84. data/examples/rails/patch/sidekiq.rbs +0 -2
  85. data/examples/rails/patch/sneakers/worker.rbs +0 -2
  86. data/examples/rails/patch/sneakers.rbs +0 -2
  87. data/examples/rails/patch/sucker_punch/job.rbs +0 -2
  88. data/examples/rails/patch/sucker_punch.rbs +0 -2
  89. data/examples/rails/patch/thor/actions/create_file.rbs +0 -2
  90. data/examples/rails/patch/thor/actions.rbs +0 -2
  91. data/examples/rails/patch/thor/error.rbs +0 -2
  92. data/examples/rails/patch/thor/group.rbs +0 -2
  93. data/examples/rails/patch/thor.rbs +0 -2
  94. data/lib/orthoses/active_model/known_sig/7.0/serialization.rbs +0 -4
  95. data/lib/orthoses/active_model/known_sig/7.0/validations.rbs +0 -4
  96. data/lib/orthoses/active_model/known_sig.rb +0 -21
  97. data/lib/orthoses/active_record/known_sig/6.0/result.rbs +0 -5
  98. data/lib/orthoses/active_record/known_sig/6.1/result.rbs +0 -5
  99. data/lib/orthoses/active_record/known_sig/7.0/encryption/context.rbs +0 -9
  100. data/lib/orthoses/active_record/known_sig/7.0/result.rbs +0 -5
  101. data/lib/orthoses/active_record/known_sig.rb +0 -21
  102. data/lib/orthoses/active_support/known_sig/7.0/active_support/callbacks/callback_chain.rbs +0 -9
  103. data/lib/orthoses/active_support/known_sig/7.0/active_support/hash_with_indifferent_access.rbs +0 -6
  104. data/lib/orthoses/active_support/known_sig/7.0/active_support/multibyte/chars.rbs +0 -7
  105. data/lib/orthoses/active_support/known_sig/7.0/hash_with_indifferent_access.rbs +0 -2
  106. data/lib/orthoses/active_support/known_sig/7.0/time.rbs +0 -68
  107. data/lib/orthoses/active_support/known_sig.rb +0 -21
  108. data/lib/orthoses/rails/known_sig_helper.rb +0 -22
@@ -1,4 +0,0 @@
1
- module PG
2
- class SimpleDecoder
3
- end
4
- end
@@ -1,2 +0,0 @@
1
- module PG
2
- end
@@ -1,2 +0,0 @@
1
- class QC::Queue
2
- end
@@ -1,2 +0,0 @@
1
- class QC
2
- end
@@ -1,2 +0,0 @@
1
- class Que::Job
2
- end
@@ -1,2 +0,0 @@
1
- module Que
2
- end
@@ -1,2 +0,0 @@
1
- class Rack::Cache::EntityStore
2
- end
@@ -1,2 +0,0 @@
1
- class Rack::Cache::MetaStore
2
- end
@@ -1,2 +0,0 @@
1
- module Rack::Cache
2
- end
@@ -1,2 +0,0 @@
1
- class Rack::Session::Dalli
2
- end
@@ -1,2 +0,0 @@
1
- module Rack::Session
2
- end
@@ -1,2 +0,0 @@
1
- module RDoc
2
- end
@@ -1,3 +0,0 @@
1
- # defined in sdoc gem
2
- class RDoc::Generator::SDoc
3
- end
@@ -1,2 +0,0 @@
1
- module RDoc::Generator
2
- end
@@ -1,2 +0,0 @@
1
- class RDoc::Task
2
- end
@@ -1,2 +0,0 @@
1
- class Ripper
2
- end
@@ -1,2 +0,0 @@
1
- module Sidekiq::Worker
2
- end
@@ -1,2 +0,0 @@
1
- module Sidekiq
2
- end
@@ -1,2 +0,0 @@
1
- module Sneakers::Worker
2
- end
@@ -1,2 +0,0 @@
1
- module Sneakers
2
- end
@@ -1,2 +0,0 @@
1
- module SuckerPunch::Job
2
- end
@@ -1,2 +0,0 @@
1
- module SuckerPunch
2
- end
@@ -1,2 +0,0 @@
1
- class Thor::Actions::CreateFile
2
- end
@@ -1,2 +0,0 @@
1
- module Thor::Actions
2
- end
@@ -1,2 +0,0 @@
1
- class Thor::Error < ::StandardError
2
- end
@@ -1,2 +0,0 @@
1
- class Thor::Group
2
- end
@@ -1,2 +0,0 @@
1
- class Thor
2
- end
@@ -1,4 +0,0 @@
1
- module ActiveModel::Serialization
2
- # https://github.com/ruby/rbs/issues/1008
3
- def send: (Object::name name, *untyped args) ?{ (*untyped) -> untyped } -> untyped
4
- end
@@ -1,4 +0,0 @@
1
- module ActiveModel::Validations
2
- # https://github.com/ruby/rbs/issues/1008
3
- def send: (Object::name name, *untyped args) ?{ (*untyped) -> untyped } -> untyped
4
- end
@@ -1,21 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Orthoses
4
- module ActiveModel
5
- class KnownSig
6
- include Orthoses::Rails::KnownSigHelper
7
-
8
- def initialize(loader)
9
- @loader = loader
10
- end
11
-
12
- def call
13
- @loader.call.tap do |store|
14
- paths = best_version_paths(::ActiveModel::VERSION::STRING, __dir__)
15
- env = Content::Environment.load_from_paths(paths)
16
- env.write_to(store: store)
17
- end
18
- end
19
- end
20
- end
21
- end
@@ -1,5 +0,0 @@
1
- class ActiveRecord::Result
2
- include Enumerable[Hash[String, untyped]]
3
- def each: () -> Enumerator[Hash[String, untyped], Array[Hash[String, untyped]]]
4
- | () { (Hash[String, untyped]) -> void } -> Array[Hash[String, untyped]]
5
- end
@@ -1,5 +0,0 @@
1
- class ActiveRecord::Result
2
- include Enumerable[Hash[String, untyped]]
3
- def each: () -> Enumerator[Hash[String, untyped], Array[Hash[String, untyped]]]
4
- | () { (Hash[String, untyped]) -> void } -> Array[Hash[String, untyped]]
5
- end
@@ -1,9 +0,0 @@
1
- # attr_accessor in #each
2
- class ActiveRecord::Encryption::Context
3
- attr_accessor key_provider: untyped
4
- attr_accessor key_generator: untyped
5
- attr_accessor cipher: untyped
6
- attr_accessor message_serializer: untyped
7
- attr_accessor encryptor: untyped
8
- attr_accessor frozen_encryption: untyped
9
- end
@@ -1,5 +0,0 @@
1
- class ActiveRecord::Result
2
- include Enumerable[Hash[String, untyped]]
3
- def each: () -> Enumerator[Hash[String, untyped], Array[Hash[String, untyped]]]
4
- | () { (Hash[String, untyped]) -> void } -> Array[Hash[String, untyped]]
5
- end
@@ -1,21 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Orthoses
4
- module ActiveRecord
5
- class KnownSig
6
- include Orthoses::Rails::KnownSigHelper
7
-
8
- def initialize(loader)
9
- @loader = loader
10
- end
11
-
12
- def call
13
- @loader.call.tap do |store|
14
- paths = best_version_paths(::ActiveRecord::VERSION::STRING, __dir__)
15
- env = Content::Environment.load_from_paths(paths)
16
- env.write_to(store: store)
17
- end
18
- end
19
- end
20
- end
21
- end
@@ -1,9 +0,0 @@
1
- module ActiveSupport
2
- module Callbacks
3
- class CallbackChain
4
- include Enumerable[::ActiveSupport::Callbacks::Callback]
5
- def each: () -> Enumerator[::ActiveSupport::Callbacks::Callback, Array[::ActiveSupport::Callbacks::Callback]]
6
- | () { (::ActiveSupport::Callbacks::Callback) -> void } -> Array[::ActiveSupport::Callbacks::Callback]
7
- end
8
- end
9
- end
@@ -1,6 +0,0 @@
1
- module ActiveSupport
2
- class HashWithIndifferentAccess[K, V] < ::Hash[K, V]
3
- def []=: (K key, V value) -> untyped
4
- def []: (K key) -> V
5
- end
6
- end
@@ -1,7 +0,0 @@
1
- module ActiveSupport
2
- module Multibyte
3
- class Chars
4
- attr_reader wrapped_string: ::String
5
- end
6
- end
7
- end
@@ -1,2 +0,0 @@
1
- class HashWithIndifferentAccess[K, V] < ActiveSupport::HashWithIndifferentAccess[K, V]
2
- end
@@ -1,68 +0,0 @@
1
- module DateAndTime
2
- module Calculations
3
- end
4
- module Zones
5
- end
6
- module Compatibility
7
- end
8
- end
9
- module ActiveSupport
10
- class TimeZone
11
- end
12
- class Duration
13
- end
14
- end
15
-
16
- class Time
17
- include DateAndTime::Calculations
18
- def in_time_zone: (?(ActiveSupport::TimeZone | String) new_zone) -> ::ActiveSupport::TimeWithZone
19
- | (false? zone) -> ::Time
20
- def +: (ActiveSupport::Duration other) -> self
21
- | ...
22
- def -: (ActiveSupport::Duration other) -> self
23
- | ...
24
- alias at_beginning_of_day beginning_of_day
25
- alias at_beginning_of_hour beginning_of_hour
26
- alias at_beginning_of_minute beginning_of_minute
27
- alias at_end_of_day end_of_day
28
- alias at_end_of_hour end_of_hour
29
- alias at_end_of_minute end_of_minute
30
- alias at_midday middle_of_day
31
- alias at_middle_of_day middle_of_day
32
- alias at_midnight beginning_of_day
33
- alias at_noon middle_of_day
34
- def beginning_of_day: () -> self
35
- def beginning_of_hour: () -> self
36
- def beginning_of_minute: () -> self
37
- def compare_with_coercion: (untyped other) -> (-1 | 0 | 1 | nil)
38
- def compare_without_coercion: (untyped other) -> (-1 | 0 | 1 | nil)
39
- def end_of_day: () -> self
40
- def end_of_hour: () -> self
41
- def end_of_minute: () -> self
42
- def eql_with_coercion: (untyped other) -> bool
43
- def eql_without_coercion: (untyped other) -> bool
44
- alias midday middle_of_day
45
- def middle_of_day: () -> self
46
- alias midnight beginning_of_day
47
- def minus_with_coercion: (Time | self arg0) -> Float
48
- | (Numeric arg0) -> self
49
- def minus_with_duration: (Time | self arg0) -> Float
50
- | (Numeric arg0) -> self
51
- def minus_without_coercion: (Time | self arg0) -> Float
52
- | (Numeric arg0) -> self
53
- def minus_without_duration: (Time | self arg0) -> Float
54
- | (Numeric arg0) -> self
55
- def next_day: () -> self
56
- def next_month: () -> self
57
- def next_year: () -> self
58
- alias noon middle_of_day
59
- def plus_without_duration: (Time | self arg0) -> Float
60
- | (Numeric arg0) -> self
61
- def prev_day: () -> self
62
- def prev_month: () -> self
63
- def prev_year: () -> self
64
- def seconds_since_midnight: () -> Float
65
- def seconds_until_end_of_day: () -> Integer
66
- def sec_fraction: () -> (Integer | Rational)
67
- def to_default_s: () -> String
68
- end
@@ -1,21 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Orthoses
4
- module ActiveSupport
5
- class KnownSig
6
- include Orthoses::Rails::KnownSigHelper
7
-
8
- def initialize(loader)
9
- @loader = loader
10
- end
11
-
12
- def call
13
- @loader.call.tap do |store|
14
- paths = best_version_paths(::ActiveSupport::VERSION::STRING, __dir__)
15
- env = Content::Environment.load_from_paths(paths)
16
- env.write_to(store: store)
17
- end
18
- end
19
- end
20
- end
21
- end
@@ -1,22 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Orthoses
4
- module Rails
5
- module KnownSigHelper
6
- def best_version_paths(current, base_dir)
7
- best_version = find_best_version(current, base_dir)
8
- Dir.glob("#{File.expand_path("known_sig", base_dir)}/#{best_version}/**/*.rbs")
9
- end
10
-
11
- def find_best_version(current, base_dir)
12
- current_v = Gem::Version.new(current)
13
- versions = version_dir(base_dir)
14
- versions.reverse.bsearch { |v| v <= current_v } || versions.first
15
- end
16
-
17
- def version_dir(base_dir)
18
- Dir.glob("#{File.expand_path("known_sig", base_dir)}/*").map(&File.method(:basename)).sort
19
- end
20
- end
21
- end
22
- end