orthoses-rails 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (99) hide show
  1. checksums.yaml +4 -4
  2. data/examples/rails/Rakefile +244 -0
  3. data/examples/rails/known_sig/action_cable/connection/test_cookie_jar.rbs +2 -0
  4. data/examples/rails/known_sig/action_controller/metal.rbs +4 -0
  5. data/examples/rails/known_sig/action_dispatch/cookies/cookie_jar.rbs +3 -0
  6. data/examples/rails/known_sig/action_dispatch/response.rbs +4 -0
  7. data/examples/rails/patch/drb/drb_undumped.rbs +2 -0
  8. data/examples/rails/patch/drb.rbs +2 -0
  9. data/examples/rails/patch/erubi/engine.rbs +4 -0
  10. data/examples/rails/patch/erubi.rbs +2 -0
  11. data/examples/rails/patch/minitest/kernel.rbs +44 -0
  12. data/examples/rails/patch/minitest/minitest/abstract_reporter.rbs +49 -0
  13. data/examples/rails/patch/minitest/minitest/assertion.rbs +16 -0
  14. data/examples/rails/patch/minitest/minitest/assertions.rbs +545 -0
  15. data/examples/rails/patch/minitest/minitest/backtrace_filter.rbs +16 -0
  16. data/examples/rails/patch/minitest/minitest/bench_spec.rbs +101 -0
  17. data/examples/rails/patch/minitest/minitest/benchmark.rbs +258 -0
  18. data/examples/rails/patch/minitest/minitest/composite_reporter.rbs +25 -0
  19. data/examples/rails/patch/minitest/minitest/expectations.rbs +21 -0
  20. data/examples/rails/patch/minitest/minitest/guard.rbs +64 -0
  21. data/examples/rails/patch/minitest/minitest/mock.rbs +60 -0
  22. data/examples/rails/patch/minitest/minitest/parallel/executor.rbs +42 -0
  23. data/examples/rails/patch/minitest/minitest/parallel/test/class_methods.rbs +6 -0
  24. data/examples/rails/patch/minitest/minitest/parallel/test.rbs +3 -0
  25. data/examples/rails/patch/minitest/minitest/parallel.rbs +2 -0
  26. data/examples/rails/patch/minitest/minitest/pride_io.rbs +54 -0
  27. data/examples/rails/patch/minitest/minitest/pride_lol.rbs +17 -0
  28. data/examples/rails/patch/minitest/minitest/progress_reporter.rbs +11 -0
  29. data/examples/rails/patch/minitest/minitest/reportable.rbs +51 -0
  30. data/examples/rails/patch/minitest/minitest/reporter.rbs +5 -0
  31. data/examples/rails/patch/minitest/minitest/result.rbs +28 -0
  32. data/examples/rails/patch/minitest/minitest/runnable.rbs +131 -0
  33. data/examples/rails/patch/minitest/minitest/skip.rbs +6 -0
  34. data/examples/rails/patch/minitest/minitest/spec/dsl/instance_methods.rbs +48 -0
  35. data/examples/rails/patch/minitest/minitest/spec/dsl.rbs +125 -0
  36. data/examples/rails/patch/minitest/minitest/spec.rbs +10 -0
  37. data/examples/rails/patch/minitest/minitest/statistics_reporter.rbs +76 -0
  38. data/examples/rails/patch/minitest/minitest/summary_reporter.rbs +26 -0
  39. data/examples/rails/patch/minitest/minitest/test/lifecycle_hooks.rbs +92 -0
  40. data/examples/rails/patch/minitest/minitest/test.rbs +76 -0
  41. data/examples/rails/patch/minitest/minitest/unexpected_error.rbs +10 -0
  42. data/examples/rails/patch/minitest/minitest/unit/test_case.rbs +3 -0
  43. data/examples/rails/patch/minitest/minitest/unit.rbs +5 -0
  44. data/examples/rails/patch/minitest/minitest.rbs +966 -0
  45. data/examples/rails/patch/pg/simple_decoder.rbs +4 -0
  46. data/examples/rails/patch/pg.rbs +2 -0
  47. data/examples/rails/patch/qc/queue.rbs +2 -0
  48. data/examples/rails/patch/qc.rbs +2 -0
  49. data/examples/rails/patch/que/job.rbs +2 -0
  50. data/examples/rails/patch/que.rbs +2 -0
  51. data/examples/rails/patch/rack/cache/entity_store.rbs +2 -0
  52. data/examples/rails/patch/rack/cache/meta_store.rbs +2 -0
  53. data/examples/rails/patch/rack/cache.rbs +2 -0
  54. data/examples/rails/patch/rack/session/dalli.rbs +2 -0
  55. data/examples/rails/patch/rack/session.rbs +2 -0
  56. data/examples/rails/patch/rboc.rbs +2 -0
  57. data/examples/rails/patch/rdoc/generator/sdoc.rbs +3 -0
  58. data/examples/rails/patch/rdoc/generator.rbs +2 -0
  59. data/examples/rails/patch/rdoc/task.rbs +2 -0
  60. data/examples/rails/patch/ripper.rbs +2 -0
  61. data/examples/rails/patch/sidekiq/worker.rbs +2 -0
  62. data/examples/rails/patch/sidekiq.rbs +2 -0
  63. data/examples/rails/patch/sneakers/worker.rbs +2 -0
  64. data/examples/rails/patch/sneakers.rbs +2 -0
  65. data/examples/rails/patch/sucker_punch/job.rbs +2 -0
  66. data/examples/rails/patch/sucker_punch.rbs +2 -0
  67. data/examples/rails/patch/thor/actions/create_file.rbs +2 -0
  68. data/examples/rails/patch/thor/actions.rbs +2 -0
  69. data/examples/rails/patch/thor/error.rbs +2 -0
  70. data/examples/rails/patch/thor/group.rbs +2 -0
  71. data/examples/rails/patch/thor.rbs +2 -0
  72. data/lib/orthoses/active_model/has_secure_password.rb +8 -1
  73. data/lib/orthoses/active_model/known_sig/7.0/serialization.rbs +4 -0
  74. data/lib/orthoses/active_model/known_sig/7.0/validations.rbs +4 -0
  75. data/lib/orthoses/active_model/known_sig.rb +21 -0
  76. data/lib/orthoses/active_model.rb +4 -0
  77. data/lib/orthoses/active_record/known_sig/6.0/result.rbs +5 -0
  78. data/lib/orthoses/active_record/known_sig/6.1/result.rbs +5 -0
  79. data/lib/orthoses/active_record/known_sig/7.0/encryption/context.rbs +9 -0
  80. data/lib/orthoses/active_record/known_sig/7.0/result.rbs +5 -0
  81. data/lib/orthoses/active_record/known_sig.rb +21 -0
  82. data/lib/orthoses/active_record/query_methods.rb +32 -0
  83. data/lib/orthoses/active_record.rb +8 -0
  84. data/lib/orthoses/active_support/class_attribute.rb +14 -3
  85. data/lib/orthoses/active_support/concern.rb +9 -1
  86. data/lib/orthoses/active_support/delegation.rb +158 -0
  87. data/lib/orthoses/active_support/known_sig/7.0/active_support/callbacks/callback_chain.rbs +9 -0
  88. data/lib/orthoses/active_support/known_sig/7.0/active_support/hash_with_indifferent_access.rbs +6 -0
  89. data/lib/orthoses/active_support/known_sig/7.0/hash_with_indifferent_access.rbs +2 -0
  90. data/lib/orthoses/active_support/known_sig/{time.rbs → 7.0/time.rbs} +4 -0
  91. data/lib/orthoses/active_support/known_sig.rb +21 -0
  92. data/lib/orthoses/active_support/mattr_accessor.rb +10 -2
  93. data/lib/orthoses/active_support/time_with_zone.rb +13 -10
  94. data/lib/orthoses/active_support.rb +25 -0
  95. data/lib/orthoses/rails/known_sig_helper.rb +22 -0
  96. data/lib/orthoses/rails/version.rb +1 -1
  97. data/lib/orthoses/rails.rb +4 -11
  98. metadata +91 -4
  99. data/lib/orthoses/active_support/known_sig/active_support/time_with_zone.rbs +0 -4
@@ -0,0 +1,22 @@
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
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Orthoses
4
4
  module Rails
5
- VERSION = "0.2.0"
5
+ VERSION = "0.3.0"
6
6
  end
7
7
  end
@@ -3,15 +3,8 @@
3
3
  require 'orthoses'
4
4
 
5
5
  require_relative "rails/version"
6
+ require_relative "rails/known_sig_helper"
6
7
 
7
- require_relative 'active_model/has_secure_password'
8
-
9
- require_relative 'active_record/generated_attribute_methods'
10
- require_relative 'active_record/has_many'
11
- require_relative 'active_record/has_one'
12
- require_relative 'active_record/belongs_to'
13
-
14
- require_relative 'active_support/class_attribute'
15
- require_relative 'active_support/concern'
16
- require_relative 'active_support/mattr_accessor'
17
- require_relative 'active_support/time_with_zone'
8
+ require_relative 'active_model'
9
+ require_relative 'active_record'
10
+ require_relative 'active_support'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: orthoses-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ksss
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-05-12 00:00:00.000000000 Z
11
+ date: 2022-06-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: orthoses
@@ -34,19 +34,106 @@ files:
34
34
  - CODE_OF_CONDUCT.md
35
35
  - LICENSE.txt
36
36
  - README.md
37
+ - examples/rails/Rakefile
38
+ - examples/rails/known_sig/action_cable/connection/test_cookie_jar.rbs
39
+ - examples/rails/known_sig/action_controller/metal.rbs
40
+ - examples/rails/known_sig/action_dispatch/cookies/cookie_jar.rbs
41
+ - examples/rails/known_sig/action_dispatch/response.rbs
42
+ - examples/rails/patch/drb.rbs
43
+ - examples/rails/patch/drb/drb_undumped.rbs
44
+ - examples/rails/patch/erubi.rbs
45
+ - examples/rails/patch/erubi/engine.rbs
46
+ - examples/rails/patch/minitest/kernel.rbs
47
+ - examples/rails/patch/minitest/minitest.rbs
48
+ - examples/rails/patch/minitest/minitest/abstract_reporter.rbs
49
+ - examples/rails/patch/minitest/minitest/assertion.rbs
50
+ - examples/rails/patch/minitest/minitest/assertions.rbs
51
+ - examples/rails/patch/minitest/minitest/backtrace_filter.rbs
52
+ - examples/rails/patch/minitest/minitest/bench_spec.rbs
53
+ - examples/rails/patch/minitest/minitest/benchmark.rbs
54
+ - examples/rails/patch/minitest/minitest/composite_reporter.rbs
55
+ - examples/rails/patch/minitest/minitest/expectations.rbs
56
+ - examples/rails/patch/minitest/minitest/guard.rbs
57
+ - examples/rails/patch/minitest/minitest/mock.rbs
58
+ - examples/rails/patch/minitest/minitest/parallel.rbs
59
+ - examples/rails/patch/minitest/minitest/parallel/executor.rbs
60
+ - examples/rails/patch/minitest/minitest/parallel/test.rbs
61
+ - examples/rails/patch/minitest/minitest/parallel/test/class_methods.rbs
62
+ - examples/rails/patch/minitest/minitest/pride_io.rbs
63
+ - examples/rails/patch/minitest/minitest/pride_lol.rbs
64
+ - examples/rails/patch/minitest/minitest/progress_reporter.rbs
65
+ - examples/rails/patch/minitest/minitest/reportable.rbs
66
+ - examples/rails/patch/minitest/minitest/reporter.rbs
67
+ - examples/rails/patch/minitest/minitest/result.rbs
68
+ - examples/rails/patch/minitest/minitest/runnable.rbs
69
+ - examples/rails/patch/minitest/minitest/skip.rbs
70
+ - examples/rails/patch/minitest/minitest/spec.rbs
71
+ - examples/rails/patch/minitest/minitest/spec/dsl.rbs
72
+ - examples/rails/patch/minitest/minitest/spec/dsl/instance_methods.rbs
73
+ - examples/rails/patch/minitest/minitest/statistics_reporter.rbs
74
+ - examples/rails/patch/minitest/minitest/summary_reporter.rbs
75
+ - examples/rails/patch/minitest/minitest/test.rbs
76
+ - examples/rails/patch/minitest/minitest/test/lifecycle_hooks.rbs
77
+ - examples/rails/patch/minitest/minitest/unexpected_error.rbs
78
+ - examples/rails/patch/minitest/minitest/unit.rbs
79
+ - examples/rails/patch/minitest/minitest/unit/test_case.rbs
80
+ - examples/rails/patch/pg.rbs
81
+ - examples/rails/patch/pg/simple_decoder.rbs
82
+ - examples/rails/patch/qc.rbs
83
+ - examples/rails/patch/qc/queue.rbs
84
+ - examples/rails/patch/que.rbs
85
+ - examples/rails/patch/que/job.rbs
86
+ - examples/rails/patch/rack/cache.rbs
87
+ - examples/rails/patch/rack/cache/entity_store.rbs
88
+ - examples/rails/patch/rack/cache/meta_store.rbs
89
+ - examples/rails/patch/rack/session.rbs
90
+ - examples/rails/patch/rack/session/dalli.rbs
91
+ - examples/rails/patch/rboc.rbs
92
+ - examples/rails/patch/rdoc/generator.rbs
93
+ - examples/rails/patch/rdoc/generator/sdoc.rbs
94
+ - examples/rails/patch/rdoc/task.rbs
95
+ - examples/rails/patch/ripper.rbs
96
+ - examples/rails/patch/sidekiq.rbs
97
+ - examples/rails/patch/sidekiq/worker.rbs
98
+ - examples/rails/patch/sneakers.rbs
99
+ - examples/rails/patch/sneakers/worker.rbs
100
+ - examples/rails/patch/sucker_punch.rbs
101
+ - examples/rails/patch/sucker_punch/job.rbs
102
+ - examples/rails/patch/thor.rbs
103
+ - examples/rails/patch/thor/actions.rbs
104
+ - examples/rails/patch/thor/actions/create_file.rbs
105
+ - examples/rails/patch/thor/error.rbs
106
+ - examples/rails/patch/thor/group.rbs
37
107
  - lib/orthoses-rails.rb
108
+ - lib/orthoses/active_model.rb
38
109
  - lib/orthoses/active_model/has_secure_password.rb
110
+ - lib/orthoses/active_model/known_sig.rb
111
+ - lib/orthoses/active_model/known_sig/7.0/serialization.rbs
112
+ - lib/orthoses/active_model/known_sig/7.0/validations.rbs
113
+ - lib/orthoses/active_record.rb
39
114
  - lib/orthoses/active_record/belongs_to.rb
40
115
  - lib/orthoses/active_record/generated_attribute_methods.rb
41
116
  - lib/orthoses/active_record/has_many.rb
42
117
  - lib/orthoses/active_record/has_one.rb
118
+ - lib/orthoses/active_record/known_sig.rb
119
+ - lib/orthoses/active_record/known_sig/6.0/result.rbs
120
+ - lib/orthoses/active_record/known_sig/6.1/result.rbs
121
+ - lib/orthoses/active_record/known_sig/7.0/encryption/context.rbs
122
+ - lib/orthoses/active_record/known_sig/7.0/result.rbs
123
+ - lib/orthoses/active_record/query_methods.rb
124
+ - lib/orthoses/active_support.rb
43
125
  - lib/orthoses/active_support/class_attribute.rb
44
126
  - lib/orthoses/active_support/concern.rb
45
- - lib/orthoses/active_support/known_sig/active_support/time_with_zone.rbs
46
- - lib/orthoses/active_support/known_sig/time.rbs
127
+ - lib/orthoses/active_support/delegation.rb
128
+ - lib/orthoses/active_support/known_sig.rb
129
+ - lib/orthoses/active_support/known_sig/7.0/active_support/callbacks/callback_chain.rbs
130
+ - lib/orthoses/active_support/known_sig/7.0/active_support/hash_with_indifferent_access.rbs
131
+ - lib/orthoses/active_support/known_sig/7.0/hash_with_indifferent_access.rbs
132
+ - lib/orthoses/active_support/known_sig/7.0/time.rbs
47
133
  - lib/orthoses/active_support/mattr_accessor.rb
48
134
  - lib/orthoses/active_support/time_with_zone.rb
49
135
  - lib/orthoses/rails.rb
136
+ - lib/orthoses/rails/known_sig_helper.rb
50
137
  - lib/orthoses/rails/version.rb
51
138
  - orthoses-rails.gemspec
52
139
  - sig/orthoses/rails.rbs
@@ -1,4 +0,0 @@
1
- module ActiveSupport
2
- class TimeWithZone
3
- end
4
- end