sorbet-rails 0.5.9 → 0.5.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/sorbet-rails/model_plugins/active_record_assoc.rb +1 -1
- data/sorbet-rails.gemspec +1 -1
- data/spec/generators/rails-template.rb +1 -0
- data/spec/model_rbi_formatter_spec.rb +1 -1
- data/spec/support/v5.0/Gemfile +1 -1
- data/spec/support/v5.0/Gemfile.lock +6 -6
- data/spec/support/v5.0/app/models/potion.rb +1 -0
- data/spec/support/v5.1/Gemfile +1 -1
- data/spec/support/v5.1/Gemfile.lock +6 -6
- data/spec/support/v5.1/app/models/potion.rb +1 -0
- data/spec/support/v5.2/Gemfile +1 -1
- data/spec/support/v5.2/Gemfile.lock +6 -6
- data/spec/support/v5.2/app/models/potion.rb +1 -0
- data/spec/support/v6.0/Gemfile +1 -1
- data/spec/support/v6.0/Gemfile.lock +6 -6
- data/spec/support/v6.0/app/models/potion.rb +1 -0
- data/spec/test_data/v5.0/expected_potion.rbi +11 -0
- data/spec/test_data/v5.1/expected_potion.rbi +11 -0
- data/spec/test_data/v5.2/expected_potion.rbi +11 -0
- data/spec/test_data/v6.0/expected_potion.rbi +11 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d1f0f0abf650a5deb1d7a365fc7feff0d07965c6aba43cdd5f8fc856351c9a54
|
4
|
+
data.tar.gz: 134c9924721309eda4b8a50c80bb97380e1d6628f7d4fbb6fb9447d7ec836b63
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1170b14c1c3b0d1f3751f88b3d5b85e48b61569432eb9941fd569acf4089e1f466ebcd27c4cb41815adc5b6203cd40759276b1f6210efc435f859a220f8b86af
|
7
|
+
data.tar.gz: 4fd1da4f8639130b3a281fd68196f7228eed591d0e0b8fb173e332e06899ab32363a7d2d5d14b69741f7c931a9320758b83bbb42875ae1ece4119e89ac33c223
|
@@ -66,7 +66,7 @@ class SorbetRails::ModelPlugins::ActiveRecordAssoc < SorbetRails::ModelPlugins::
|
|
66
66
|
end
|
67
67
|
|
68
68
|
column_def = @columns_hash[reflection.foreign_key.to_s]
|
69
|
-
db_required_config = column_def && !column_def.null
|
69
|
+
db_required_config = column_def.present? && !column_def.null
|
70
70
|
|
71
71
|
if rails_required_config && !db_required_config
|
72
72
|
puts "Warning: belongs_to association #{reflection.name} is required at the application
|
data/sorbet-rails.gemspec
CHANGED
@@ -7,7 +7,7 @@ RSpec.describe SorbetRails::ModelRbiFormatter do
|
|
7
7
|
end
|
8
8
|
|
9
9
|
it 'does not throw an error when given an abstract class' do
|
10
|
-
formatter = SorbetRails::ModelRbiFormatter.new(Potion, Set.new(['Potion']))
|
10
|
+
formatter = SorbetRails::ModelRbiFormatter.new(Potion, Set.new(['Potion', 'Wizard']))
|
11
11
|
expect_match_file(
|
12
12
|
formatter.generate_rbi,
|
13
13
|
'expected_potion.rbi',
|
data/spec/support/v5.0/Gemfile
CHANGED
@@ -11,7 +11,7 @@ gem 'rails', '~> 5.0.7'
|
|
11
11
|
# Use sqlite3 as the database for Active Record
|
12
12
|
gem 'sqlite3', '~> 1.3.6'
|
13
13
|
# Use Puma as the app server
|
14
|
-
gem 'puma', '~> 3.
|
14
|
+
gem 'puma', '~> 3.0'
|
15
15
|
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
|
16
16
|
gem 'jbuilder', '~> 2.5'
|
17
17
|
# Use ActiveModel has_secure_password
|
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: ../../..
|
3
3
|
specs:
|
4
|
-
sorbet-rails (0.5.9)
|
4
|
+
sorbet-rails (0.5.9.1)
|
5
5
|
parlour (~> 1.0)
|
6
6
|
|
7
7
|
GEM
|
@@ -104,10 +104,10 @@ GEM
|
|
104
104
|
thor (>= 0.18.1, < 2.0)
|
105
105
|
rainbow (3.0.0)
|
106
106
|
rake (13.0.1)
|
107
|
-
sorbet (0.4.
|
108
|
-
sorbet-static (= 0.4.
|
109
|
-
sorbet-runtime (0.4.
|
110
|
-
sorbet-static (0.4.
|
107
|
+
sorbet (0.4.5136)
|
108
|
+
sorbet-static (= 0.4.5136)
|
109
|
+
sorbet-runtime (0.4.5136)
|
110
|
+
sorbet-static (0.4.5136-universal-darwin-14)
|
111
111
|
sprockets (4.0.0)
|
112
112
|
concurrent-ruby (~> 1.0)
|
113
113
|
rack (> 1, < 3)
|
@@ -130,7 +130,7 @@ PLATFORMS
|
|
130
130
|
DEPENDENCIES
|
131
131
|
byebug
|
132
132
|
jbuilder (~> 2.5)
|
133
|
-
puma (~> 3.
|
133
|
+
puma (~> 3.0)
|
134
134
|
rails (~> 5.0.7)
|
135
135
|
sorbet
|
136
136
|
sorbet-rails!
|
data/spec/support/v5.1/Gemfile
CHANGED
@@ -11,7 +11,7 @@ gem 'rails', '~> 5.1.7'
|
|
11
11
|
# Use sqlite3 as the database for Active Record
|
12
12
|
gem 'sqlite3'
|
13
13
|
# Use Puma as the app server
|
14
|
-
gem 'puma', '~> 3.
|
14
|
+
gem 'puma', '~> 3.7'
|
15
15
|
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
|
16
16
|
gem 'jbuilder', '~> 2.5'
|
17
17
|
# Use ActiveModel has_secure_password
|
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: ../../..
|
3
3
|
specs:
|
4
|
-
sorbet-rails (0.5.9)
|
4
|
+
sorbet-rails (0.5.9.1)
|
5
5
|
parlour (~> 1.0)
|
6
6
|
|
7
7
|
GEM
|
@@ -105,10 +105,10 @@ GEM
|
|
105
105
|
thor (>= 0.18.1, < 2.0)
|
106
106
|
rainbow (3.0.0)
|
107
107
|
rake (13.0.1)
|
108
|
-
sorbet (0.4.
|
109
|
-
sorbet-static (= 0.4.
|
110
|
-
sorbet-runtime (0.4.
|
111
|
-
sorbet-static (0.4.
|
108
|
+
sorbet (0.4.5136)
|
109
|
+
sorbet-static (= 0.4.5136)
|
110
|
+
sorbet-runtime (0.4.5136)
|
111
|
+
sorbet-static (0.4.5136-universal-darwin-14)
|
112
112
|
sprockets (4.0.0)
|
113
113
|
concurrent-ruby (~> 1.0)
|
114
114
|
rack (> 1, < 3)
|
@@ -136,7 +136,7 @@ PLATFORMS
|
|
136
136
|
DEPENDENCIES
|
137
137
|
byebug
|
138
138
|
jbuilder (~> 2.5)
|
139
|
-
puma (~> 3.
|
139
|
+
puma (~> 3.7)
|
140
140
|
rails (~> 5.1.7)
|
141
141
|
sorbet
|
142
142
|
sorbet-rails!
|
data/spec/support/v5.2/Gemfile
CHANGED
@@ -8,7 +8,7 @@ gem 'rails', '~> 5.2.3'
|
|
8
8
|
# Use sqlite3 as the database for Active Record
|
9
9
|
gem 'sqlite3'
|
10
10
|
# Use Puma as the app server
|
11
|
-
gem 'puma', '~> 3.
|
11
|
+
gem 'puma', '~> 3.11'
|
12
12
|
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
|
13
13
|
gem 'jbuilder', '~> 2.5'
|
14
14
|
# Use ActiveModel has_secure_password
|
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: ../../..
|
3
3
|
specs:
|
4
|
-
sorbet-rails (0.5.9)
|
4
|
+
sorbet-rails (0.5.9.1)
|
5
5
|
parlour (~> 1.0)
|
6
6
|
|
7
7
|
GEM
|
@@ -113,10 +113,10 @@ GEM
|
|
113
113
|
thor (>= 0.19.0, < 2.0)
|
114
114
|
rainbow (3.0.0)
|
115
115
|
rake (13.0.1)
|
116
|
-
sorbet (0.4.
|
117
|
-
sorbet-static (= 0.4.
|
118
|
-
sorbet-runtime (0.4.
|
119
|
-
sorbet-static (0.4.
|
116
|
+
sorbet (0.4.5136)
|
117
|
+
sorbet-static (= 0.4.5136)
|
118
|
+
sorbet-runtime (0.4.5136)
|
119
|
+
sorbet-static (0.4.5136-universal-darwin-14)
|
120
120
|
sprockets (4.0.0)
|
121
121
|
concurrent-ruby (~> 1.0)
|
122
122
|
rack (> 1, < 3)
|
@@ -144,7 +144,7 @@ PLATFORMS
|
|
144
144
|
DEPENDENCIES
|
145
145
|
byebug
|
146
146
|
jbuilder (~> 2.5)
|
147
|
-
puma (~> 3.
|
147
|
+
puma (~> 3.11)
|
148
148
|
rails (~> 5.2.3)
|
149
149
|
sorbet
|
150
150
|
sorbet-rails!
|
data/spec/support/v6.0/Gemfile
CHANGED
@@ -8,7 +8,7 @@ gem 'rails', '~> 6.0.0'
|
|
8
8
|
# Use sqlite3 as the database for Active Record
|
9
9
|
gem 'sqlite3', '~> 1.4'
|
10
10
|
# Use Puma as the app server
|
11
|
-
gem 'puma', '~> 3.
|
11
|
+
gem 'puma', '~> 3.11'
|
12
12
|
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
|
13
13
|
gem 'jbuilder', '~> 2.7'
|
14
14
|
# Use Active Model has_secure_password
|
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: ../../..
|
3
3
|
specs:
|
4
|
-
sorbet-rails (0.5.9)
|
4
|
+
sorbet-rails (0.5.9.1)
|
5
5
|
parlour (~> 1.0)
|
6
6
|
|
7
7
|
GEM
|
@@ -128,10 +128,10 @@ GEM
|
|
128
128
|
thor (>= 0.20.3, < 2.0)
|
129
129
|
rainbow (3.0.0)
|
130
130
|
rake (13.0.1)
|
131
|
-
sorbet (0.4.
|
132
|
-
sorbet-static (= 0.4.
|
133
|
-
sorbet-runtime (0.4.
|
134
|
-
sorbet-static (0.4.
|
131
|
+
sorbet (0.4.5136)
|
132
|
+
sorbet-static (= 0.4.5136)
|
133
|
+
sorbet-runtime (0.4.5136)
|
134
|
+
sorbet-static (0.4.5136-universal-darwin-14)
|
135
135
|
sprockets (4.0.0)
|
136
136
|
concurrent-ruby (~> 1.0)
|
137
137
|
rack (> 1, < 3)
|
@@ -160,7 +160,7 @@ PLATFORMS
|
|
160
160
|
DEPENDENCIES
|
161
161
|
byebug
|
162
162
|
jbuilder (~> 2.7)
|
163
|
-
puma (~> 3.
|
163
|
+
puma (~> 3.11)
|
164
164
|
rails (~> 6.0.0)
|
165
165
|
sorbet
|
166
166
|
sorbet-rails!
|
@@ -7,6 +7,16 @@ module Potion::ActiveRelation_WhereNot
|
|
7
7
|
def not(opts, *rest); end
|
8
8
|
end
|
9
9
|
|
10
|
+
module Potion::GeneratedAssociationMethods
|
11
|
+
extend T::Sig
|
12
|
+
|
13
|
+
sig { returns(T.nilable(::Wizard)) }
|
14
|
+
def wizard; end
|
15
|
+
|
16
|
+
sig { params(value: T.nilable(::Wizard)).void }
|
17
|
+
def wizard=(value); end
|
18
|
+
end
|
19
|
+
|
10
20
|
module Potion::CustomFinderMethods
|
11
21
|
sig { params(limit: Integer).returns(T::Array[Potion]) }
|
12
22
|
def first_n(limit); end
|
@@ -25,6 +35,7 @@ module Potion::CustomFinderMethods
|
|
25
35
|
end
|
26
36
|
|
27
37
|
class Potion < ApplicationRecord
|
38
|
+
include Potion::GeneratedAssociationMethods
|
28
39
|
extend Potion::CustomFinderMethods
|
29
40
|
extend T::Sig
|
30
41
|
extend T::Generic
|
@@ -7,6 +7,16 @@ module Potion::ActiveRelation_WhereNot
|
|
7
7
|
def not(opts, *rest); end
|
8
8
|
end
|
9
9
|
|
10
|
+
module Potion::GeneratedAssociationMethods
|
11
|
+
extend T::Sig
|
12
|
+
|
13
|
+
sig { returns(T.nilable(::Wizard)) }
|
14
|
+
def wizard; end
|
15
|
+
|
16
|
+
sig { params(value: T.nilable(::Wizard)).void }
|
17
|
+
def wizard=(value); end
|
18
|
+
end
|
19
|
+
|
10
20
|
module Potion::CustomFinderMethods
|
11
21
|
sig { params(limit: Integer).returns(T::Array[Potion]) }
|
12
22
|
def first_n(limit); end
|
@@ -25,6 +35,7 @@ module Potion::CustomFinderMethods
|
|
25
35
|
end
|
26
36
|
|
27
37
|
class Potion < ApplicationRecord
|
38
|
+
include Potion::GeneratedAssociationMethods
|
28
39
|
extend Potion::CustomFinderMethods
|
29
40
|
extend T::Sig
|
30
41
|
extend T::Generic
|
@@ -7,6 +7,16 @@ module Potion::ActiveRelation_WhereNot
|
|
7
7
|
def not(opts, *rest); end
|
8
8
|
end
|
9
9
|
|
10
|
+
module Potion::GeneratedAssociationMethods
|
11
|
+
extend T::Sig
|
12
|
+
|
13
|
+
sig { returns(T.nilable(::Wizard)) }
|
14
|
+
def wizard; end
|
15
|
+
|
16
|
+
sig { params(value: T.nilable(::Wizard)).void }
|
17
|
+
def wizard=(value); end
|
18
|
+
end
|
19
|
+
|
10
20
|
module Potion::CustomFinderMethods
|
11
21
|
sig { params(limit: Integer).returns(T::Array[Potion]) }
|
12
22
|
def first_n(limit); end
|
@@ -25,6 +35,7 @@ module Potion::CustomFinderMethods
|
|
25
35
|
end
|
26
36
|
|
27
37
|
class Potion < ApplicationRecord
|
38
|
+
include Potion::GeneratedAssociationMethods
|
28
39
|
extend Potion::CustomFinderMethods
|
29
40
|
extend T::Sig
|
30
41
|
extend T::Generic
|
@@ -7,6 +7,16 @@ module Potion::ActiveRelation_WhereNot
|
|
7
7
|
def not(opts, *rest); end
|
8
8
|
end
|
9
9
|
|
10
|
+
module Potion::GeneratedAssociationMethods
|
11
|
+
extend T::Sig
|
12
|
+
|
13
|
+
sig { returns(T.nilable(::Wizard)) }
|
14
|
+
def wizard; end
|
15
|
+
|
16
|
+
sig { params(value: T.nilable(::Wizard)).void }
|
17
|
+
def wizard=(value); end
|
18
|
+
end
|
19
|
+
|
10
20
|
module Potion::CustomFinderMethods
|
11
21
|
sig { params(limit: Integer).returns(T::Array[Potion]) }
|
12
22
|
def first_n(limit); end
|
@@ -25,6 +35,7 @@ module Potion::CustomFinderMethods
|
|
25
35
|
end
|
26
36
|
|
27
37
|
class Potion < ApplicationRecord
|
38
|
+
include Potion::GeneratedAssociationMethods
|
28
39
|
extend Potion::CustomFinderMethods
|
29
40
|
extend T::Sig
|
30
41
|
extend T::Generic
|