sorbet-rails 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (86) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +77 -0
  3. data/Gemfile +6 -0
  4. data/Gemfile.lock +176 -0
  5. data/README.md +68 -45
  6. data/Rakefile +6 -0
  7. data/SECURITY.md +5 -0
  8. data/lib/sorbet-rails/model_rbi_formatter.rb +1 -1
  9. data/lib/sorbet-rails/tasks/rails_rbi.rake +60 -0
  10. data/rbis/activerecord.rbi +133 -0
  11. data/sorbet-rails.gemspec +31 -0
  12. data/spec/model_rbi_formatter_spec.rb +54 -0
  13. data/spec/rails_helper.rb +14 -0
  14. data/spec/routes_rbi_formatter_spec.rb +21 -0
  15. data/spec/spec_helper.rb +8 -0
  16. data/spec/support/rails_app/.ruby-version +1 -0
  17. data/spec/support/rails_app/Gemfile +45 -0
  18. data/spec/support/rails_app/Gemfile.lock +139 -0
  19. data/spec/support/rails_app/README.md +24 -0
  20. data/spec/support/rails_app/Rakefile +6 -0
  21. data/spec/support/rails_app/app/channels/application_cable/channel.rb +4 -0
  22. data/spec/support/rails_app/app/channels/application_cable/connection.rb +4 -0
  23. data/spec/support/rails_app/app/controllers/application_controller.rb +2 -0
  24. data/spec/support/rails_app/app/controllers/concerns/.keep +0 -0
  25. data/spec/support/rails_app/app/controllers/test_controller.rb +5 -0
  26. data/spec/support/rails_app/app/jobs/application_job.rb +2 -0
  27. data/spec/support/rails_app/app/mailers/application_mailer.rb +4 -0
  28. data/spec/support/rails_app/app/models/application_record.rb +3 -0
  29. data/spec/support/rails_app/app/models/concerns/.keep +0 -0
  30. data/spec/support/rails_app/app/models/spell_book.rb +6 -0
  31. data/spec/support/rails_app/app/models/wand.rb +15 -0
  32. data/spec/support/rails_app/app/models/wizard.rb +14 -0
  33. data/spec/support/rails_app/app/views/layouts/mailer.html.erb +13 -0
  34. data/spec/support/rails_app/app/views/layouts/mailer.text.erb +1 -0
  35. data/spec/support/rails_app/bin/bundle +3 -0
  36. data/spec/support/rails_app/bin/rails +9 -0
  37. data/spec/support/rails_app/bin/rake +9 -0
  38. data/spec/support/rails_app/bin/setup +33 -0
  39. data/spec/support/rails_app/bin/spring +17 -0
  40. data/spec/support/rails_app/bin/update +28 -0
  41. data/spec/support/rails_app/config.ru +5 -0
  42. data/spec/support/rails_app/config/application.rb +35 -0
  43. data/spec/support/rails_app/config/boot.rb +3 -0
  44. data/spec/support/rails_app/config/cable.yml +10 -0
  45. data/spec/support/rails_app/config/credentials.yml.enc +1 -0
  46. data/spec/support/rails_app/config/database.yml +25 -0
  47. data/spec/support/rails_app/config/environment.rb +5 -0
  48. data/spec/support/rails_app/config/environments/development.rb +54 -0
  49. data/spec/support/rails_app/config/environments/production.rb +85 -0
  50. data/spec/support/rails_app/config/environments/test.rb +46 -0
  51. data/spec/support/rails_app/config/initializers/application_controller_renderer.rb +8 -0
  52. data/spec/support/rails_app/config/initializers/backtrace_silencers.rb +7 -0
  53. data/spec/support/rails_app/config/initializers/cors.rb +16 -0
  54. data/spec/support/rails_app/config/initializers/filter_parameter_logging.rb +4 -0
  55. data/spec/support/rails_app/config/initializers/inflections.rb +16 -0
  56. data/spec/support/rails_app/config/initializers/mime_types.rb +4 -0
  57. data/spec/support/rails_app/config/initializers/wrap_parameters.rb +14 -0
  58. data/spec/support/rails_app/config/locales/en.yml +33 -0
  59. data/spec/support/rails_app/config/puma.rb +34 -0
  60. data/spec/support/rails_app/config/routes.rb +5 -0
  61. data/spec/support/rails_app/config/spring.rb +6 -0
  62. data/spec/support/rails_app/config/storage.yml +34 -0
  63. data/spec/support/rails_app/db/migrate/20190620001234_create_wizards.rb +12 -0
  64. data/spec/support/rails_app/db/migrate/20190620003037_create_wands.rb +11 -0
  65. data/spec/support/rails_app/db/migrate/20190620003739_create_spell_books.rb +8 -0
  66. data/spec/support/rails_app/db/schema.rb +39 -0
  67. data/spec/support/rails_app/db/seeds.rb +7 -0
  68. data/spec/support/rails_app/lib/tasks/.keep +0 -0
  69. data/spec/support/rails_app/log/.keep +0 -0
  70. data/spec/support/rails_app/public/robots.txt +1 -0
  71. data/spec/support/rails_app/storage/.keep +0 -0
  72. data/spec/support/rails_app/test/controllers/.keep +0 -0
  73. data/spec/support/rails_app/test/fixtures/.keep +0 -0
  74. data/spec/support/rails_app/test/fixtures/files/.keep +0 -0
  75. data/spec/support/rails_app/test/integration/.keep +0 -0
  76. data/spec/support/rails_app/test/mailers/.keep +0 -0
  77. data/spec/support/rails_app/test/models/.keep +0 -0
  78. data/spec/support/rails_app/test/test_helper.rb +10 -0
  79. data/spec/support/rails_app/tmp/.keep +0 -0
  80. data/spec/support/rails_app/vendor/.keep +0 -0
  81. data/spec/test_data/expected_routes.rbi +43 -0
  82. data/spec/test_data/expected_wizard_no_book.rbi +0 -0
  83. data/spec/test_data/models/expected_wand.rbi +174 -0
  84. data/spec/test_data/models/expected_wizard.rbi +189 -0
  85. data/spec/test_data/models/expected_wizard_wo_spellbook.rbi +189 -0
  86. metadata +338 -3
@@ -0,0 +1,189 @@
1
+ # This is an autogenerated file for dynamic methods in Wizard
2
+ # Please rerun rake rails_rbi:models to regenerate.
3
+ # typed: strong
4
+
5
+ class Wizard::Relation < ActiveRecord::Relation
6
+ include Wizard::NamedScope
7
+ extend T::Generic
8
+ Elem = type_member(fixed: Wizard)
9
+ end
10
+
11
+ class Wizard < ApplicationRecord
12
+ extend T::Sig
13
+ extend T::Generic
14
+ extend Wizard::NamedScope
15
+ Elem = type_template(fixed: Wizard)
16
+
17
+ sig { returns(T::Boolean) }
18
+ def Gryffindor?(); end
19
+
20
+ sig { returns(T::Boolean) }
21
+ def Hufflepuff?(); end
22
+
23
+ sig { returns(T::Boolean) }
24
+ def Ravenclaw?(); end
25
+
26
+ sig { returns(T::Boolean) }
27
+ def Slytherin?(); end
28
+
29
+ sig { returns(DateTime) }
30
+ def created_at(); end
31
+
32
+ sig { params(value: DateTime).void }
33
+ def created_at=(value); end
34
+
35
+ sig { returns(String) }
36
+ def house(); end
37
+
38
+ sig { params(value: T.nilable(T.any(Integer, String, Symbol))).void }
39
+ def house=(value); end
40
+
41
+ sig { returns(Integer) }
42
+ def id(); end
43
+
44
+ sig { params(value: Integer).void }
45
+ def id=(value); end
46
+
47
+ sig { returns(T.nilable(String)) }
48
+ def name(); end
49
+
50
+ sig { params(value: T.nilable(String)).void }
51
+ def name=(value); end
52
+
53
+ sig { returns(T.nilable(String)) }
54
+ def notes(); end
55
+
56
+ sig { params(value: T.nilable(String)).void }
57
+ def notes=(value); end
58
+
59
+ sig { returns(T.nilable(String)) }
60
+ def parent_email(); end
61
+
62
+ sig { params(value: T.nilable(String)).void }
63
+ def parent_email=(value); end
64
+
65
+ sig { returns(SpellBook::Relation) }
66
+ def spell_books(); end
67
+
68
+ sig { params(value: T.any(T::Array[SpellBook], SpellBook::Relation)).void }
69
+ def spell_books=(value); end
70
+
71
+ sig { returns(DateTime) }
72
+ def updated_at(); end
73
+
74
+ sig { params(value: DateTime).void }
75
+ def updated_at=(value); end
76
+
77
+ sig { returns(T.nilable(Wand)) }
78
+ def wand(); end
79
+
80
+ sig { params(value: T.nilable(Wand)).void }
81
+ def wand=(value); end
82
+
83
+ sig { returns(T::Hash[T.any(String, Symbol), Integer]) }
84
+ def self.houses(); end
85
+
86
+ end
87
+
88
+
89
+ module Wizard::NamedScope
90
+ extend T::Sig
91
+
92
+ sig { returns(Wizard::Relation) }
93
+ def all(); end
94
+
95
+ sig { params(args: T.untyped).returns(Wizard::Relation) }
96
+ def Gryffindor(*args); end
97
+
98
+ sig { params(args: T.untyped).returns(Wizard::Relation) }
99
+ def Hufflepuff(*args); end
100
+
101
+ sig { params(args: T.untyped).returns(Wizard::Relation) }
102
+ def Ravenclaw(*args); end
103
+
104
+ sig { params(args: T.untyped).returns(Wizard::Relation) }
105
+ def Slytherin(*args); end
106
+
107
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::Relation) }
108
+ def select(*args, block); end
109
+
110
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::Relation) }
111
+ def order(*args, block); end
112
+
113
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::Relation) }
114
+ def reorder(*args, block); end
115
+
116
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::Relation) }
117
+ def group(*args, block); end
118
+
119
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::Relation) }
120
+ def limit(*args, block); end
121
+
122
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::Relation) }
123
+ def offset(*args, block); end
124
+
125
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::Relation) }
126
+ def joins(*args, block); end
127
+
128
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::Relation) }
129
+ def left_joins(*args, block); end
130
+
131
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::Relation) }
132
+ def left_outer_joins(*args, block); end
133
+
134
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::Relation) }
135
+ def where(*args, block); end
136
+
137
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::Relation) }
138
+ def rewhere(*args, block); end
139
+
140
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::Relation) }
141
+ def preload(*args, block); end
142
+
143
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::Relation) }
144
+ def eager_load(*args, block); end
145
+
146
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::Relation) }
147
+ def includes(*args, block); end
148
+
149
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::Relation) }
150
+ def from(*args, block); end
151
+
152
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::Relation) }
153
+ def lock(*args, block); end
154
+
155
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::Relation) }
156
+ def readonly(*args, block); end
157
+
158
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::Relation) }
159
+ def extending(*args, block); end
160
+
161
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::Relation) }
162
+ def or(*args, block); end
163
+
164
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::Relation) }
165
+ def having(*args, block); end
166
+
167
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::Relation) }
168
+ def create_with(*args, block); end
169
+
170
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::Relation) }
171
+ def distinct(*args, block); end
172
+
173
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::Relation) }
174
+ def references(*args, block); end
175
+
176
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::Relation) }
177
+ def none(*args, block); end
178
+
179
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::Relation) }
180
+ def unscope(*args, block); end
181
+
182
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::Relation) }
183
+ def merge(*args, block); end
184
+
185
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::Relation) }
186
+ def except(*args, block); end
187
+
188
+ end
189
+
@@ -0,0 +1,189 @@
1
+ # This is an autogenerated file for dynamic methods in Wizard
2
+ # Please rerun rake rails_rbi:models to regenerate.
3
+ # typed: strong
4
+
5
+ class Wizard::Relation < ActiveRecord::Relation
6
+ include Wizard::NamedScope
7
+ extend T::Generic
8
+ Elem = type_member(fixed: Wizard)
9
+ end
10
+
11
+ class Wizard < ApplicationRecord
12
+ extend T::Sig
13
+ extend T::Generic
14
+ extend Wizard::NamedScope
15
+ Elem = type_template(fixed: Wizard)
16
+
17
+ sig { returns(T::Boolean) }
18
+ def Gryffindor?(); end
19
+
20
+ sig { returns(T::Boolean) }
21
+ def Hufflepuff?(); end
22
+
23
+ sig { returns(T::Boolean) }
24
+ def Ravenclaw?(); end
25
+
26
+ sig { returns(T::Boolean) }
27
+ def Slytherin?(); end
28
+
29
+ sig { returns(DateTime) }
30
+ def created_at(); end
31
+
32
+ sig { params(value: DateTime).void }
33
+ def created_at=(value); end
34
+
35
+ sig { returns(String) }
36
+ def house(); end
37
+
38
+ sig { params(value: T.nilable(T.any(Integer, String, Symbol))).void }
39
+ def house=(value); end
40
+
41
+ sig { returns(Integer) }
42
+ def id(); end
43
+
44
+ sig { params(value: Integer).void }
45
+ def id=(value); end
46
+
47
+ sig { returns(T.nilable(String)) }
48
+ def name(); end
49
+
50
+ sig { params(value: T.nilable(String)).void }
51
+ def name=(value); end
52
+
53
+ sig { returns(T.nilable(String)) }
54
+ def notes(); end
55
+
56
+ sig { params(value: T.nilable(String)).void }
57
+ def notes=(value); end
58
+
59
+ sig { returns(T.nilable(String)) }
60
+ def parent_email(); end
61
+
62
+ sig { params(value: T.nilable(String)).void }
63
+ def parent_email=(value); end
64
+
65
+ sig { returns(ActiveRecord::Relation[T.untyped]) }
66
+ def spell_books(); end
67
+
68
+ sig { params(value: T.any(T::Array[SpellBook], ActiveRecord::Relation[T.untyped])).void }
69
+ def spell_books=(value); end
70
+
71
+ sig { returns(DateTime) }
72
+ def updated_at(); end
73
+
74
+ sig { params(value: DateTime).void }
75
+ def updated_at=(value); end
76
+
77
+ sig { returns(T.nilable(Wand)) }
78
+ def wand(); end
79
+
80
+ sig { params(value: T.nilable(Wand)).void }
81
+ def wand=(value); end
82
+
83
+ sig { returns(T::Hash[T.any(String, Symbol), Integer]) }
84
+ def self.houses(); end
85
+
86
+ end
87
+
88
+
89
+ module Wizard::NamedScope
90
+ extend T::Sig
91
+
92
+ sig { returns(Wizard::Relation) }
93
+ def all(); end
94
+
95
+ sig { params(args: T.untyped).returns(Wizard::Relation) }
96
+ def Gryffindor(*args); end
97
+
98
+ sig { params(args: T.untyped).returns(Wizard::Relation) }
99
+ def Hufflepuff(*args); end
100
+
101
+ sig { params(args: T.untyped).returns(Wizard::Relation) }
102
+ def Ravenclaw(*args); end
103
+
104
+ sig { params(args: T.untyped).returns(Wizard::Relation) }
105
+ def Slytherin(*args); end
106
+
107
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::Relation) }
108
+ def select(*args, block); end
109
+
110
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::Relation) }
111
+ def order(*args, block); end
112
+
113
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::Relation) }
114
+ def reorder(*args, block); end
115
+
116
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::Relation) }
117
+ def group(*args, block); end
118
+
119
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::Relation) }
120
+ def limit(*args, block); end
121
+
122
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::Relation) }
123
+ def offset(*args, block); end
124
+
125
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::Relation) }
126
+ def joins(*args, block); end
127
+
128
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::Relation) }
129
+ def left_joins(*args, block); end
130
+
131
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::Relation) }
132
+ def left_outer_joins(*args, block); end
133
+
134
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::Relation) }
135
+ def where(*args, block); end
136
+
137
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::Relation) }
138
+ def rewhere(*args, block); end
139
+
140
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::Relation) }
141
+ def preload(*args, block); end
142
+
143
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::Relation) }
144
+ def eager_load(*args, block); end
145
+
146
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::Relation) }
147
+ def includes(*args, block); end
148
+
149
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::Relation) }
150
+ def from(*args, block); end
151
+
152
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::Relation) }
153
+ def lock(*args, block); end
154
+
155
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::Relation) }
156
+ def readonly(*args, block); end
157
+
158
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::Relation) }
159
+ def extending(*args, block); end
160
+
161
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::Relation) }
162
+ def or(*args, block); end
163
+
164
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::Relation) }
165
+ def having(*args, block); end
166
+
167
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::Relation) }
168
+ def create_with(*args, block); end
169
+
170
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::Relation) }
171
+ def distinct(*args, block); end
172
+
173
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::Relation) }
174
+ def references(*args, block); end
175
+
176
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::Relation) }
177
+ def none(*args, block); end
178
+
179
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::Relation) }
180
+ def unscope(*args, block); end
181
+
182
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::Relation) }
183
+ def merge(*args, block); end
184
+
185
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::Relation) }
186
+ def except(*args, block); end
187
+
188
+ end
189
+
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sorbet-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chan Zuckerberg Initiative
@@ -9,21 +9,282 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
  date: 2019-04-18 00:00:00.000000000 Z
12
- dependencies: []
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rspec
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '3.8'
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: '3.8'
23
+ type: :development
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - "~>"
28
+ - !ruby/object:Gem::Version
29
+ version: '3.8'
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: '3.8'
33
+ - !ruby/object:Gem::Dependency
34
+ name: awesome_print
35
+ requirement: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - "~>"
38
+ - !ruby/object:Gem::Version
39
+ version: 1.8.0
40
+ - - ">="
41
+ - !ruby/object:Gem::Version
42
+ version: 1.8.0
43
+ type: :development
44
+ prerelease: false
45
+ version_requirements: !ruby/object:Gem::Requirement
46
+ requirements:
47
+ - - "~>"
48
+ - !ruby/object:Gem::Version
49
+ version: 1.8.0
50
+ - - ">="
51
+ - !ruby/object:Gem::Version
52
+ version: 1.8.0
53
+ - !ruby/object:Gem::Dependency
54
+ name: byebug
55
+ requirement: !ruby/object:Gem::Requirement
56
+ requirements:
57
+ - - "~>"
58
+ - !ruby/object:Gem::Version
59
+ version: 11.0.1
60
+ - - ">="
61
+ - !ruby/object:Gem::Version
62
+ version: 11.0.1
63
+ type: :development
64
+ prerelease: false
65
+ version_requirements: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - "~>"
68
+ - !ruby/object:Gem::Version
69
+ version: 11.0.1
70
+ - - ">="
71
+ - !ruby/object:Gem::Version
72
+ version: 11.0.1
73
+ - !ruby/object:Gem::Dependency
74
+ name: bundler
75
+ requirement: !ruby/object:Gem::Requirement
76
+ requirements:
77
+ - - "~>"
78
+ - !ruby/object:Gem::Version
79
+ version: 1.3.0
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: 1.3.0
83
+ type: :development
84
+ prerelease: false
85
+ version_requirements: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: 1.3.0
90
+ - - ">="
91
+ - !ruby/object:Gem::Version
92
+ version: 1.3.0
93
+ - !ruby/object:Gem::Dependency
94
+ name: rails
95
+ requirement: !ruby/object:Gem::Requirement
96
+ requirements:
97
+ - - "~>"
98
+ - !ruby/object:Gem::Version
99
+ version: 5.2.3
100
+ - - ">="
101
+ - !ruby/object:Gem::Version
102
+ version: 5.2.3
103
+ type: :development
104
+ prerelease: false
105
+ version_requirements: !ruby/object:Gem::Requirement
106
+ requirements:
107
+ - - "~>"
108
+ - !ruby/object:Gem::Version
109
+ version: 5.2.3
110
+ - - ">="
111
+ - !ruby/object:Gem::Version
112
+ version: 5.2.3
113
+ - !ruby/object:Gem::Dependency
114
+ name: rspec-rails
115
+ requirement: !ruby/object:Gem::Requirement
116
+ requirements:
117
+ - - "~>"
118
+ - !ruby/object:Gem::Version
119
+ version: 3.8.2
120
+ - - ">="
121
+ - !ruby/object:Gem::Version
122
+ version: 3.8.2
123
+ type: :development
124
+ prerelease: false
125
+ version_requirements: !ruby/object:Gem::Requirement
126
+ requirements:
127
+ - - "~>"
128
+ - !ruby/object:Gem::Version
129
+ version: 3.8.2
130
+ - - ">="
131
+ - !ruby/object:Gem::Version
132
+ version: 3.8.2
133
+ - !ruby/object:Gem::Dependency
134
+ name: sqlite3
135
+ requirement: !ruby/object:Gem::Requirement
136
+ requirements:
137
+ - - "~>"
138
+ - !ruby/object:Gem::Version
139
+ version: 1.4.1
140
+ - - ">="
141
+ - !ruby/object:Gem::Version
142
+ version: 1.4.1
143
+ type: :development
144
+ prerelease: false
145
+ version_requirements: !ruby/object:Gem::Requirement
146
+ requirements:
147
+ - - "~>"
148
+ - !ruby/object:Gem::Version
149
+ version: 1.4.1
150
+ - - ">="
151
+ - !ruby/object:Gem::Version
152
+ version: 1.4.1
153
+ - !ruby/object:Gem::Dependency
154
+ name: puma
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - "~>"
158
+ - !ruby/object:Gem::Version
159
+ version: 3.12.1
160
+ - - ">="
161
+ - !ruby/object:Gem::Version
162
+ version: 3.12.1
163
+ type: :development
164
+ prerelease: false
165
+ version_requirements: !ruby/object:Gem::Requirement
166
+ requirements:
167
+ - - "~>"
168
+ - !ruby/object:Gem::Version
169
+ version: 3.12.1
170
+ - - ">="
171
+ - !ruby/object:Gem::Version
172
+ version: 3.12.1
173
+ - !ruby/object:Gem::Dependency
174
+ name: listen
175
+ requirement: !ruby/object:Gem::Requirement
176
+ requirements:
177
+ - - "~>"
178
+ - !ruby/object:Gem::Version
179
+ version: 3.1.5
180
+ - - ">="
181
+ - !ruby/object:Gem::Version
182
+ version: 3.1.5
183
+ type: :development
184
+ prerelease: false
185
+ version_requirements: !ruby/object:Gem::Requirement
186
+ requirements:
187
+ - - "~>"
188
+ - !ruby/object:Gem::Version
189
+ version: 3.1.5
190
+ - - ">="
191
+ - !ruby/object:Gem::Version
192
+ version: 3.1.5
13
193
  description:
14
194
  email: opensource@chanzuckerberg.com
15
195
  executables: []
16
196
  extensions: []
17
197
  extra_rdoc_files: []
18
198
  files:
199
+ - ".gitignore"
19
200
  - Gemfile
201
+ - Gemfile.lock
20
202
  - LICENSE
21
203
  - README.md
204
+ - Rakefile
205
+ - SECURITY.md
22
206
  - lib/sorbet-rails.rb
23
207
  - lib/sorbet-rails/custom_finder_methods.rb
24
208
  - lib/sorbet-rails/model_rbi_formatter.rb
25
209
  - lib/sorbet-rails/railtie.rb
26
210
  - lib/sorbet-rails/routes_rbi_formatter.rb
211
+ - lib/sorbet-rails/tasks/rails_rbi.rake
212
+ - rbis/activerecord.rbi
213
+ - sorbet-rails.gemspec
214
+ - spec/model_rbi_formatter_spec.rb
215
+ - spec/rails_helper.rb
216
+ - spec/routes_rbi_formatter_spec.rb
217
+ - spec/spec_helper.rb
218
+ - spec/support/rails_app/.ruby-version
219
+ - spec/support/rails_app/Gemfile
220
+ - spec/support/rails_app/Gemfile.lock
221
+ - spec/support/rails_app/README.md
222
+ - spec/support/rails_app/Rakefile
223
+ - spec/support/rails_app/app/channels/application_cable/channel.rb
224
+ - spec/support/rails_app/app/channels/application_cable/connection.rb
225
+ - spec/support/rails_app/app/controllers/application_controller.rb
226
+ - spec/support/rails_app/app/controllers/concerns/.keep
227
+ - spec/support/rails_app/app/controllers/test_controller.rb
228
+ - spec/support/rails_app/app/jobs/application_job.rb
229
+ - spec/support/rails_app/app/mailers/application_mailer.rb
230
+ - spec/support/rails_app/app/models/application_record.rb
231
+ - spec/support/rails_app/app/models/concerns/.keep
232
+ - spec/support/rails_app/app/models/spell_book.rb
233
+ - spec/support/rails_app/app/models/wand.rb
234
+ - spec/support/rails_app/app/models/wizard.rb
235
+ - spec/support/rails_app/app/views/layouts/mailer.html.erb
236
+ - spec/support/rails_app/app/views/layouts/mailer.text.erb
237
+ - spec/support/rails_app/bin/bundle
238
+ - spec/support/rails_app/bin/rails
239
+ - spec/support/rails_app/bin/rake
240
+ - spec/support/rails_app/bin/setup
241
+ - spec/support/rails_app/bin/spring
242
+ - spec/support/rails_app/bin/update
243
+ - spec/support/rails_app/config.ru
244
+ - spec/support/rails_app/config/application.rb
245
+ - spec/support/rails_app/config/boot.rb
246
+ - spec/support/rails_app/config/cable.yml
247
+ - spec/support/rails_app/config/credentials.yml.enc
248
+ - spec/support/rails_app/config/database.yml
249
+ - spec/support/rails_app/config/environment.rb
250
+ - spec/support/rails_app/config/environments/development.rb
251
+ - spec/support/rails_app/config/environments/production.rb
252
+ - spec/support/rails_app/config/environments/test.rb
253
+ - spec/support/rails_app/config/initializers/application_controller_renderer.rb
254
+ - spec/support/rails_app/config/initializers/backtrace_silencers.rb
255
+ - spec/support/rails_app/config/initializers/cors.rb
256
+ - spec/support/rails_app/config/initializers/filter_parameter_logging.rb
257
+ - spec/support/rails_app/config/initializers/inflections.rb
258
+ - spec/support/rails_app/config/initializers/mime_types.rb
259
+ - spec/support/rails_app/config/initializers/wrap_parameters.rb
260
+ - spec/support/rails_app/config/locales/en.yml
261
+ - spec/support/rails_app/config/puma.rb
262
+ - spec/support/rails_app/config/routes.rb
263
+ - spec/support/rails_app/config/spring.rb
264
+ - spec/support/rails_app/config/storage.yml
265
+ - spec/support/rails_app/db/migrate/20190620001234_create_wizards.rb
266
+ - spec/support/rails_app/db/migrate/20190620003037_create_wands.rb
267
+ - spec/support/rails_app/db/migrate/20190620003739_create_spell_books.rb
268
+ - spec/support/rails_app/db/schema.rb
269
+ - spec/support/rails_app/db/seeds.rb
270
+ - spec/support/rails_app/lib/tasks/.keep
271
+ - spec/support/rails_app/log/.keep
272
+ - spec/support/rails_app/public/robots.txt
273
+ - spec/support/rails_app/storage/.keep
274
+ - spec/support/rails_app/test/controllers/.keep
275
+ - spec/support/rails_app/test/fixtures/.keep
276
+ - spec/support/rails_app/test/fixtures/files/.keep
277
+ - spec/support/rails_app/test/integration/.keep
278
+ - spec/support/rails_app/test/mailers/.keep
279
+ - spec/support/rails_app/test/models/.keep
280
+ - spec/support/rails_app/test/test_helper.rb
281
+ - spec/support/rails_app/tmp/.keep
282
+ - spec/support/rails_app/vendor/.keep
283
+ - spec/test_data/expected_routes.rbi
284
+ - spec/test_data/expected_wizard_no_book.rbi
285
+ - spec/test_data/models/expected_wand.rbi
286
+ - spec/test_data/models/expected_wizard.rbi
287
+ - spec/test_data/models/expected_wizard_wo_spellbook.rbi
27
288
  homepage: https://github.com/chanzuckerberg/sorbet-rails
28
289
  licenses:
29
290
  - MIT
@@ -48,4 +309,78 @@ rubygems_version: 2.6.14
48
309
  signing_key:
49
310
  specification_version: 4
50
311
  summary: Set of tools to make Sorbet work with Rails seamlessly.
51
- test_files: []
312
+ test_files:
313
+ - spec/model_rbi_formatter_spec.rb
314
+ - spec/rails_helper.rb
315
+ - spec/routes_rbi_formatter_spec.rb
316
+ - spec/spec_helper.rb
317
+ - spec/support/rails_app/.ruby-version
318
+ - spec/support/rails_app/Gemfile
319
+ - spec/support/rails_app/Gemfile.lock
320
+ - spec/support/rails_app/README.md
321
+ - spec/support/rails_app/Rakefile
322
+ - spec/support/rails_app/app/channels/application_cable/channel.rb
323
+ - spec/support/rails_app/app/channels/application_cable/connection.rb
324
+ - spec/support/rails_app/app/controllers/application_controller.rb
325
+ - spec/support/rails_app/app/controllers/concerns/.keep
326
+ - spec/support/rails_app/app/controllers/test_controller.rb
327
+ - spec/support/rails_app/app/jobs/application_job.rb
328
+ - spec/support/rails_app/app/mailers/application_mailer.rb
329
+ - spec/support/rails_app/app/models/application_record.rb
330
+ - spec/support/rails_app/app/models/concerns/.keep
331
+ - spec/support/rails_app/app/models/spell_book.rb
332
+ - spec/support/rails_app/app/models/wand.rb
333
+ - spec/support/rails_app/app/models/wizard.rb
334
+ - spec/support/rails_app/app/views/layouts/mailer.html.erb
335
+ - spec/support/rails_app/app/views/layouts/mailer.text.erb
336
+ - spec/support/rails_app/bin/bundle
337
+ - spec/support/rails_app/bin/rails
338
+ - spec/support/rails_app/bin/rake
339
+ - spec/support/rails_app/bin/setup
340
+ - spec/support/rails_app/bin/spring
341
+ - spec/support/rails_app/bin/update
342
+ - spec/support/rails_app/config.ru
343
+ - spec/support/rails_app/config/application.rb
344
+ - spec/support/rails_app/config/boot.rb
345
+ - spec/support/rails_app/config/cable.yml
346
+ - spec/support/rails_app/config/credentials.yml.enc
347
+ - spec/support/rails_app/config/database.yml
348
+ - spec/support/rails_app/config/environment.rb
349
+ - spec/support/rails_app/config/environments/development.rb
350
+ - spec/support/rails_app/config/environments/production.rb
351
+ - spec/support/rails_app/config/environments/test.rb
352
+ - spec/support/rails_app/config/initializers/application_controller_renderer.rb
353
+ - spec/support/rails_app/config/initializers/backtrace_silencers.rb
354
+ - spec/support/rails_app/config/initializers/cors.rb
355
+ - spec/support/rails_app/config/initializers/filter_parameter_logging.rb
356
+ - spec/support/rails_app/config/initializers/inflections.rb
357
+ - spec/support/rails_app/config/initializers/mime_types.rb
358
+ - spec/support/rails_app/config/initializers/wrap_parameters.rb
359
+ - spec/support/rails_app/config/locales/en.yml
360
+ - spec/support/rails_app/config/puma.rb
361
+ - spec/support/rails_app/config/routes.rb
362
+ - spec/support/rails_app/config/spring.rb
363
+ - spec/support/rails_app/config/storage.yml
364
+ - spec/support/rails_app/db/migrate/20190620001234_create_wizards.rb
365
+ - spec/support/rails_app/db/migrate/20190620003037_create_wands.rb
366
+ - spec/support/rails_app/db/migrate/20190620003739_create_spell_books.rb
367
+ - spec/support/rails_app/db/schema.rb
368
+ - spec/support/rails_app/db/seeds.rb
369
+ - spec/support/rails_app/lib/tasks/.keep
370
+ - spec/support/rails_app/log/.keep
371
+ - spec/support/rails_app/public/robots.txt
372
+ - spec/support/rails_app/storage/.keep
373
+ - spec/support/rails_app/test/controllers/.keep
374
+ - spec/support/rails_app/test/fixtures/.keep
375
+ - spec/support/rails_app/test/fixtures/files/.keep
376
+ - spec/support/rails_app/test/integration/.keep
377
+ - spec/support/rails_app/test/mailers/.keep
378
+ - spec/support/rails_app/test/models/.keep
379
+ - spec/support/rails_app/test/test_helper.rb
380
+ - spec/support/rails_app/tmp/.keep
381
+ - spec/support/rails_app/vendor/.keep
382
+ - spec/test_data/expected_routes.rbi
383
+ - spec/test_data/expected_wizard_no_book.rbi
384
+ - spec/test_data/models/expected_wand.rbi
385
+ - spec/test_data/models/expected_wizard.rbi
386
+ - spec/test_data/models/expected_wizard_wo_spellbook.rbi