orthoses-rails 0.4.0 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (133) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +31 -39
  3. data/examples/rails/Gemfile +16 -0
  4. data/examples/rails/Gemfile.lock +178 -0
  5. data/examples/rails/Rakefile +149 -193
  6. data/examples/rails/config/database.yml +8 -0
  7. data/examples/rails/config/storage.yml +3 -0
  8. data/examples/rails/known_sig/actionpack/7.0/action_controller/metal.rbs +4 -0
  9. data/{lib/orthoses/active_model/known_sig/7.0 → examples/rails/known_sig/activemodel/7.0/active_model}/serialization.rbs +0 -0
  10. data/{lib/orthoses/active_model/known_sig/7.0 → examples/rails/known_sig/activemodel/7.0/active_model}/validations.rbs +0 -0
  11. data/examples/rails/known_sig/activerecord/6.0/_active_record_relation.rbs +49 -0
  12. data/examples/rails/known_sig/activerecord/6.0/_active_record_relation_class_methods.rbs +45 -0
  13. data/{lib/orthoses/active_record/known_sig/6.0 → examples/rails/known_sig/activerecord/6.0/active_record}/result.rbs +0 -0
  14. data/examples/rails/known_sig/activerecord/6.1/_active_record_relation.rbs +49 -0
  15. data/examples/rails/known_sig/activerecord/6.1/_active_record_relation_class_methods.rbs +45 -0
  16. data/{lib/orthoses/active_record/known_sig/6.1 → examples/rails/known_sig/activerecord/6.1/active_record}/result.rbs +0 -0
  17. data/examples/rails/known_sig/activerecord/7.0/_active_record_relation.rbs +49 -0
  18. data/examples/rails/known_sig/activerecord/7.0/_active_record_relation_class_methods.rbs +45 -0
  19. data/{lib/orthoses/active_record/known_sig/7.0 → examples/rails/known_sig/activerecord/7.0/active_record}/encryption/context.rbs +0 -0
  20. data/{lib/orthoses/active_record/known_sig/7.0 → examples/rails/known_sig/activerecord/7.0/active_record}/result.rbs +0 -0
  21. data/{lib/orthoses/active_support/known_sig → examples/rails/known_sig/activesupport}/7.0/active_support/callbacks/callback_chain.rbs +0 -0
  22. data/examples/rails/known_sig/activesupport/7.0/active_support/duration.rbs +4 -0
  23. data/{lib/orthoses/active_support/known_sig → examples/rails/known_sig/activesupport}/7.0/active_support/hash_with_indifferent_access.rbs +0 -0
  24. data/{lib/orthoses/active_support/known_sig → examples/rails/known_sig/activesupport}/7.0/active_support/multibyte/chars.rbs +0 -0
  25. data/examples/rails/known_sig/activesupport/7.0/active_support/time_with_zone.rbs +5 -0
  26. data/examples/rails/known_sig/activesupport/7.0/active_support/time_zone.rbs +3 -0
  27. data/examples/rails/known_sig/activesupport/7.0/date.rbs +6 -0
  28. data/examples/rails/known_sig/activesupport/7.0/date_and_time/zones.rbs +4 -0
  29. data/{lib/orthoses/active_support/known_sig → examples/rails/known_sig/activesupport}/7.0/hash_with_indifferent_access.rbs +0 -0
  30. data/examples/rails/known_sig/activesupport/7.0/integer.rbs +9 -0
  31. data/examples/rails/known_sig/activesupport/7.0/numeric.rbs +15 -0
  32. data/examples/rails/known_sig/activesupport/7.0/string.rbs +4 -0
  33. data/{lib/orthoses/active_support/known_sig → examples/rails/known_sig/activesupport}/7.0/time.rbs +8 -0
  34. data/examples/rails/tasks/action_pack.rake +141 -0
  35. data/examples/rails/tasks/action_view.rake +77 -0
  36. data/examples/rails/tasks/active_job.rake +99 -0
  37. data/examples/rails/tasks/active_model.rake +46 -0
  38. data/examples/rails/tasks/active_record.rake +88 -0
  39. data/examples/rails/tasks/active_storage.rake +94 -0
  40. data/examples/rails/tasks/active_support.rake +99 -0
  41. data/examples/rails/tasks/railties.rake +37 -0
  42. data/lib/orthoses/active_model/has_secure_password.rb +2 -10
  43. data/lib/orthoses/active_model.rb +0 -1
  44. data/lib/orthoses/active_record/delegated_type.rb +44 -0
  45. data/lib/orthoses/active_record/enum.rb +77 -0
  46. data/lib/orthoses/active_record/generated_attribute_methods.rb +1 -0
  47. data/lib/orthoses/active_record/scope.rb +63 -0
  48. data/lib/orthoses/active_record.rb +3 -1
  49. data/lib/orthoses/active_support/class_attribute.rb +3 -10
  50. data/lib/orthoses/active_support/configurable.rb +3 -2
  51. data/lib/orthoses/active_support/delegation.rb +11 -19
  52. data/lib/orthoses/active_support/mattr_accessor.rb +4 -12
  53. data/lib/orthoses/active_support/time_with_zone.rb +21 -3
  54. data/lib/orthoses/active_support.rb +0 -17
  55. data/lib/orthoses/rails/version.rb +1 -1
  56. data/lib/orthoses/rails.rb +1 -1
  57. data/lib/orthoses/railties/mixin.rb +107 -0
  58. data/lib/orthoses/railties.rb +3 -0
  59. data/orthoses-rails.gemspec +1 -1
  60. metadata +48 -89
  61. data/examples/rails/known_sig/action_cable/connection/test_cookie_jar.rbs +0 -2
  62. data/examples/rails/known_sig/action_controller/metal.rbs +0 -4
  63. data/examples/rails/known_sig/action_dispatch/cookies/cookie_jar.rbs +0 -3
  64. data/examples/rails/known_sig/action_dispatch/response.rbs +0 -4
  65. data/examples/rails/patch/drb/drb_undumped.rbs +0 -2
  66. data/examples/rails/patch/drb.rbs +0 -2
  67. data/examples/rails/patch/erubi/engine.rbs +0 -4
  68. data/examples/rails/patch/erubi.rbs +0 -2
  69. data/examples/rails/patch/minitest/kernel.rbs +0 -44
  70. data/examples/rails/patch/minitest/minitest/abstract_reporter.rbs +0 -49
  71. data/examples/rails/patch/minitest/minitest/assertion.rbs +0 -16
  72. data/examples/rails/patch/minitest/minitest/assertions.rbs +0 -545
  73. data/examples/rails/patch/minitest/minitest/backtrace_filter.rbs +0 -16
  74. data/examples/rails/patch/minitest/minitest/bench_spec.rbs +0 -101
  75. data/examples/rails/patch/minitest/minitest/benchmark.rbs +0 -258
  76. data/examples/rails/patch/minitest/minitest/composite_reporter.rbs +0 -25
  77. data/examples/rails/patch/minitest/minitest/expectations.rbs +0 -21
  78. data/examples/rails/patch/minitest/minitest/guard.rbs +0 -64
  79. data/examples/rails/patch/minitest/minitest/mock.rbs +0 -60
  80. data/examples/rails/patch/minitest/minitest/parallel/executor.rbs +0 -42
  81. data/examples/rails/patch/minitest/minitest/parallel/test/class_methods.rbs +0 -6
  82. data/examples/rails/patch/minitest/minitest/parallel/test.rbs +0 -3
  83. data/examples/rails/patch/minitest/minitest/parallel.rbs +0 -2
  84. data/examples/rails/patch/minitest/minitest/pride_io.rbs +0 -54
  85. data/examples/rails/patch/minitest/minitest/pride_lol.rbs +0 -17
  86. data/examples/rails/patch/minitest/minitest/progress_reporter.rbs +0 -11
  87. data/examples/rails/patch/minitest/minitest/reportable.rbs +0 -51
  88. data/examples/rails/patch/minitest/minitest/reporter.rbs +0 -5
  89. data/examples/rails/patch/minitest/minitest/result.rbs +0 -28
  90. data/examples/rails/patch/minitest/minitest/runnable.rbs +0 -131
  91. data/examples/rails/patch/minitest/minitest/skip.rbs +0 -6
  92. data/examples/rails/patch/minitest/minitest/spec/dsl/instance_methods.rbs +0 -48
  93. data/examples/rails/patch/minitest/minitest/spec/dsl.rbs +0 -125
  94. data/examples/rails/patch/minitest/minitest/spec.rbs +0 -10
  95. data/examples/rails/patch/minitest/minitest/statistics_reporter.rbs +0 -76
  96. data/examples/rails/patch/minitest/minitest/summary_reporter.rbs +0 -26
  97. data/examples/rails/patch/minitest/minitest/test/lifecycle_hooks.rbs +0 -92
  98. data/examples/rails/patch/minitest/minitest/test.rbs +0 -76
  99. data/examples/rails/patch/minitest/minitest/unexpected_error.rbs +0 -10
  100. data/examples/rails/patch/minitest/minitest/unit/test_case.rbs +0 -3
  101. data/examples/rails/patch/minitest/minitest/unit.rbs +0 -5
  102. data/examples/rails/patch/minitest/minitest.rbs +0 -966
  103. data/examples/rails/patch/pg/simple_decoder.rbs +0 -4
  104. data/examples/rails/patch/pg.rbs +0 -2
  105. data/examples/rails/patch/qc/queue.rbs +0 -2
  106. data/examples/rails/patch/qc.rbs +0 -2
  107. data/examples/rails/patch/que/job.rbs +0 -2
  108. data/examples/rails/patch/que.rbs +0 -2
  109. data/examples/rails/patch/rack/cache/entity_store.rbs +0 -2
  110. data/examples/rails/patch/rack/cache/meta_store.rbs +0 -2
  111. data/examples/rails/patch/rack/cache.rbs +0 -2
  112. data/examples/rails/patch/rack/session/dalli.rbs +0 -2
  113. data/examples/rails/patch/rack/session.rbs +0 -2
  114. data/examples/rails/patch/rboc.rbs +0 -2
  115. data/examples/rails/patch/rdoc/generator/sdoc.rbs +0 -3
  116. data/examples/rails/patch/rdoc/generator.rbs +0 -2
  117. data/examples/rails/patch/rdoc/task.rbs +0 -2
  118. data/examples/rails/patch/ripper.rbs +0 -2
  119. data/examples/rails/patch/sidekiq/worker.rbs +0 -2
  120. data/examples/rails/patch/sidekiq.rbs +0 -2
  121. data/examples/rails/patch/sneakers/worker.rbs +0 -2
  122. data/examples/rails/patch/sneakers.rbs +0 -2
  123. data/examples/rails/patch/sucker_punch/job.rbs +0 -2
  124. data/examples/rails/patch/sucker_punch.rbs +0 -2
  125. data/examples/rails/patch/thor/actions/create_file.rbs +0 -2
  126. data/examples/rails/patch/thor/actions.rbs +0 -2
  127. data/examples/rails/patch/thor/error.rbs +0 -2
  128. data/examples/rails/patch/thor/group.rbs +0 -2
  129. data/examples/rails/patch/thor.rbs +0 -2
  130. data/lib/orthoses/active_model/known_sig.rb +0 -21
  131. data/lib/orthoses/active_record/known_sig.rb +0 -21
  132. data/lib/orthoses/active_support/known_sig.rb +0 -21
  133. data/lib/orthoses/rails/known_sig_helper.rb +0 -22
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f98262e6c8d3c7f75039f41d1a14b991de17171702663d111b7dc6e9d8cac2bb
4
- data.tar.gz: 28db8b6a6bdee762946bb2c7287233804543a1e5f7f735e56ac1c2d8875dc457
3
+ metadata.gz: 721183c8c3c14666265aa24ecfe51ba9703afe1ed99bf5e320b6c57c2e995722
4
+ data.tar.gz: deabd621c4483c341b687dc5562c72aa52a49c4b983544244dc9e2b736cd056d
5
5
  SHA512:
6
- metadata.gz: 13f1a9891b7a526aeed309854ed14bf6ee3e2b712ede4e7d0c63c33f8358f641061b6e81ad12773eff3e91043051f7ab16bb8aa349fb0c3ff38e4a7ce6b2654c
7
- data.tar.gz: f3dd8dfea66c1b0477a9d17f736161e34b3a7a7c4fdaef3fc3948f84c60a6ac79fcfe1678392b8ca32746db4dc1b8f43a66e25b6d0dd4a6904440c1d0bc70cc0
6
+ metadata.gz: ed8956fbfd018c4dbd650c1c20c9d46172c1cabafd286de074dbcda62d5f898125d66b12a4b461097eb6134dd3dd9dac9546157a794152064201d12261bc3365
7
+ data.tar.gz: c4154bd4a83864ebf2f8a13fa7cffd4bb721374f9d05674a234565efc3676ac0a837aef866233ef9f256351b70022cc60bd07f199f588d57e6bba50f0edca819
data/README.md CHANGED
@@ -5,42 +5,36 @@ Orthoses::Rails automatically generates RBS for methods added by Rails.
5
5
 
6
6
  ## Features
7
7
 
8
- ### Orthoses::ActiveModel::HasSecurePassword
9
-
10
- Add signatures that generated form `ActiveModel::SecurePassword::ClassMethods#has_secure_password`.
11
-
12
- ### Orthoses::ActiveRecord::BelongsTo
13
-
14
- Add signatures that generated form `ActiveRecord::Associations::ClassMethods#belongs_to`.
15
-
16
- ### Orthoses::ActiveRecord::GeneratedAttributeMethods
17
-
18
- Add signatures that generated from DB schema columns.
19
-
20
- ### Orthoses::ActiveRecord::HasMany
21
-
22
- Add signatures that generated form `ActiveRecord::Associations::ClassMethods#has_many`.
23
-
24
- ### Orthoses::ActiveRecord::HasOne
25
-
26
- Add signatures that generated form `ActiveRecord::Associations::ClassMethods#has_one`.
27
-
28
- ### Orthoses::ActiveSupport::ClassAttribute
29
-
30
- Add signatures that generated form `Class#class_attribute`.
31
-
32
- ### Orthoses::ActiveSupport::Concern
33
-
34
- Add signature `extend ActiveSupport::Concern` only.
35
-
36
- ### Orthoses::ActiveSupport::MattrAccessor
37
-
38
- Add signatures that generated form `Module#mattr_accessor`, `Module#mattr_reader` and `Module#mattr_writer`.
39
-
40
- ### Orthoses::ActiveSupport::TimeWithZone
41
-
42
- Add signatures `Time` and `ActiveSupport::TimeWithZone`.
43
- Methods and mixin delegated from `Time` are added to `ActiveSupport::TimeWithZone`.
8
+ ### Orthoses::ActiveModel
9
+
10
+ - `HasSecurePassword`
11
+ - Add signatures that generated form `has_secure_password`.
12
+
13
+ ### Orthoses::ActiveRecord
14
+
15
+ - `BelongsTo`
16
+ - Add signatures that generated form `belongs_to`.
17
+ - `DelegatedType`
18
+ - Add signatures that generated from `delegated_type`
19
+ - `Enum`
20
+ - Add signatures that generated from `enum`
21
+ - `HasMany`
22
+ - Add signatures that generated form `has_many`.
23
+ - `HasOne`
24
+ - Add signatures that generated form `has_one`.
25
+ - `Scope`
26
+ - Add signatures that generated form `scope`.
27
+
28
+ ### Orthoses::ActiveSupport
29
+
30
+ - `ClassAttribute`
31
+ - Add signatures that generated form `class_attribute`.
32
+ - `Configurable`
33
+ - Add signatures that generated from `config_accessor`
34
+ - `Delegation`
35
+ - Add signatures that generated from `delegate`. The type definition of the method or instance variable specified by `to` is required.
36
+ - `MattrAccessor`
37
+ - Add signatures that generated form `mattr_accessor`, `cattr_accessor`, `mattr_reader`, `cattr_reader`, `mattr_writer` and `cattr_writer`.
44
38
 
45
39
  ## Installation
46
40
 
@@ -68,16 +62,14 @@ Orthoses::Builder.new do
68
62
  use YourCustom::Middleware
69
63
  use Orthoses::ActiveModel::HasSecurePassword
70
64
  use Orthoses::ActiveRecord::BelongsTo
71
- use Orthoses::ActiveRecord::GeneratedAttributeMethods
72
65
  use Orthoses::ActiveRecord::HasMany
73
66
  use Orthoses::ActiveRecord::HasOne
74
- use Orthoses::ActiveSupport::Concern
75
67
  use Orthoses::ActiveSupport::ClassAttribute
76
68
  use Orthoses::ActiveSupport::MattrAccessor
77
- use Orthoses::ActiveSupport::TimeWithZone
78
69
  use Orthoses::Mixin
79
70
  use Orthoses::Constant, strict: false
80
71
  use Orthoses::ObjectSpaceAll
72
+ use Orthoses::Autoload
81
73
  run -> () {
82
74
  Rake::Task[:environment].invoke
83
75
  Rails.application.eager_load!
@@ -0,0 +1,16 @@
1
+ source "https://rubygems.org"
2
+
3
+ ruby ">= 3.1.0"
4
+
5
+ gemspec path: '../../'
6
+
7
+ gem "rails", path: "_src"
8
+ gem "sqlite3"
9
+ # gem "orthoses", path: "../../../orthoses"
10
+
11
+ if RUBY_VERSION >= "3.1"
12
+ gem "net-smtp", require: false
13
+ gem "net-imap", require: false
14
+ gem "net-pop", require: false
15
+ gem "psych", "~> 3"
16
+ end
@@ -0,0 +1,178 @@
1
+ PATH
2
+ remote: ../..
3
+ specs:
4
+ orthoses-rails (0.6.0)
5
+ orthoses (>= 0.10)
6
+
7
+ PATH
8
+ remote: _src
9
+ specs:
10
+ actioncable (7.0.3.1)
11
+ actionpack (= 7.0.3.1)
12
+ activesupport (= 7.0.3.1)
13
+ nio4r (~> 2.0)
14
+ websocket-driver (>= 0.6.1)
15
+ actionmailbox (7.0.3.1)
16
+ actionpack (= 7.0.3.1)
17
+ activejob (= 7.0.3.1)
18
+ activerecord (= 7.0.3.1)
19
+ activestorage (= 7.0.3.1)
20
+ activesupport (= 7.0.3.1)
21
+ mail (>= 2.7.1)
22
+ net-imap
23
+ net-pop
24
+ net-smtp
25
+ actionmailer (7.0.3.1)
26
+ actionpack (= 7.0.3.1)
27
+ actionview (= 7.0.3.1)
28
+ activejob (= 7.0.3.1)
29
+ activesupport (= 7.0.3.1)
30
+ mail (~> 2.5, >= 2.5.4)
31
+ net-imap
32
+ net-pop
33
+ net-smtp
34
+ rails-dom-testing (~> 2.0)
35
+ actionpack (7.0.3.1)
36
+ actionview (= 7.0.3.1)
37
+ activesupport (= 7.0.3.1)
38
+ rack (~> 2.0, >= 2.2.0)
39
+ rack-test (>= 0.6.3)
40
+ rails-dom-testing (~> 2.0)
41
+ rails-html-sanitizer (~> 1.0, >= 1.2.0)
42
+ actiontext (7.0.3.1)
43
+ actionpack (= 7.0.3.1)
44
+ activerecord (= 7.0.3.1)
45
+ activestorage (= 7.0.3.1)
46
+ activesupport (= 7.0.3.1)
47
+ globalid (>= 0.6.0)
48
+ nokogiri (>= 1.8.5)
49
+ actionview (7.0.3.1)
50
+ activesupport (= 7.0.3.1)
51
+ builder (~> 3.1)
52
+ erubi (~> 1.4)
53
+ rails-dom-testing (~> 2.0)
54
+ rails-html-sanitizer (~> 1.1, >= 1.2.0)
55
+ activejob (7.0.3.1)
56
+ activesupport (= 7.0.3.1)
57
+ globalid (>= 0.3.6)
58
+ activemodel (7.0.3.1)
59
+ activesupport (= 7.0.3.1)
60
+ activerecord (7.0.3.1)
61
+ activemodel (= 7.0.3.1)
62
+ activesupport (= 7.0.3.1)
63
+ activestorage (7.0.3.1)
64
+ actionpack (= 7.0.3.1)
65
+ activejob (= 7.0.3.1)
66
+ activerecord (= 7.0.3.1)
67
+ activesupport (= 7.0.3.1)
68
+ marcel (~> 1.0)
69
+ mini_mime (>= 1.1.0)
70
+ activesupport (7.0.3.1)
71
+ concurrent-ruby (~> 1.0, >= 1.0.2)
72
+ i18n (>= 1.6, < 2)
73
+ minitest (>= 5.1)
74
+ tzinfo (~> 2.0)
75
+ rails (7.0.3.1)
76
+ actioncable (= 7.0.3.1)
77
+ actionmailbox (= 7.0.3.1)
78
+ actionmailer (= 7.0.3.1)
79
+ actionpack (= 7.0.3.1)
80
+ actiontext (= 7.0.3.1)
81
+ actionview (= 7.0.3.1)
82
+ activejob (= 7.0.3.1)
83
+ activemodel (= 7.0.3.1)
84
+ activerecord (= 7.0.3.1)
85
+ activestorage (= 7.0.3.1)
86
+ activesupport (= 7.0.3.1)
87
+ bundler (>= 1.15.0)
88
+ railties (= 7.0.3.1)
89
+ railties (7.0.3.1)
90
+ actionpack (= 7.0.3.1)
91
+ activesupport (= 7.0.3.1)
92
+ method_source
93
+ rake (>= 12.2)
94
+ thor (~> 1.0)
95
+ zeitwerk (~> 2.5)
96
+
97
+ GEM
98
+ remote: https://rubygems.org/
99
+ specs:
100
+ builder (3.2.4)
101
+ concurrent-ruby (1.1.10)
102
+ crass (1.0.6)
103
+ digest (3.1.0)
104
+ erubi (1.11.0)
105
+ globalid (1.0.0)
106
+ activesupport (>= 5.0)
107
+ i18n (1.12.0)
108
+ concurrent-ruby (~> 1.0)
109
+ loofah (2.18.0)
110
+ crass (~> 1.0.2)
111
+ nokogiri (>= 1.5.9)
112
+ mail (2.7.1)
113
+ mini_mime (>= 0.1.1)
114
+ marcel (1.0.2)
115
+ method_source (1.0.0)
116
+ mini_mime (1.1.2)
117
+ mini_portile2 (2.8.0)
118
+ minitest (5.16.3)
119
+ net-imap (0.2.3)
120
+ digest
121
+ net-protocol
122
+ strscan
123
+ net-pop (0.1.1)
124
+ digest
125
+ net-protocol
126
+ timeout
127
+ net-protocol (0.1.3)
128
+ timeout
129
+ net-smtp (0.3.1)
130
+ digest
131
+ net-protocol
132
+ timeout
133
+ nio4r (2.5.8)
134
+ nokogiri (1.13.8)
135
+ mini_portile2 (~> 2.8.0)
136
+ racc (~> 1.4)
137
+ orthoses (0.11.0)
138
+ rbs (~> 2.0)
139
+ psych (3.3.2)
140
+ racc (1.6.0)
141
+ rack (2.2.4)
142
+ rack-test (2.0.2)
143
+ rack (>= 1.3)
144
+ rails-dom-testing (2.0.3)
145
+ activesupport (>= 4.2.0)
146
+ nokogiri (>= 1.6)
147
+ rails-html-sanitizer (1.4.3)
148
+ loofah (~> 2.3)
149
+ rake (13.0.6)
150
+ rbs (2.6.0)
151
+ sqlite3 (1.4.4)
152
+ strscan (3.0.4)
153
+ thor (1.2.1)
154
+ timeout (0.3.0)
155
+ tzinfo (2.0.5)
156
+ concurrent-ruby (~> 1.0)
157
+ websocket-driver (0.7.5)
158
+ websocket-extensions (>= 0.1.0)
159
+ websocket-extensions (0.1.5)
160
+ zeitwerk (2.6.0)
161
+
162
+ PLATFORMS
163
+ arm64-darwin-21
164
+
165
+ DEPENDENCIES
166
+ net-imap
167
+ net-pop
168
+ net-smtp
169
+ orthoses-rails!
170
+ psych (~> 3)
171
+ rails!
172
+ sqlite3
173
+
174
+ RUBY VERSION
175
+ ruby 3.1.1p18
176
+
177
+ BUNDLED WITH
178
+ 2.3.16