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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bebc32701fb31995a1cf7f25ae7c2c7a9088347e8665dad3f182474483f03cc8
4
- data.tar.gz: 8ae391dbadcc26831eebfef0969834969fe7c77ca8dd203f9ef05a7be26c19e0
3
+ metadata.gz: d1f0f0abf650a5deb1d7a365fc7feff0d07965c6aba43cdd5f8fc856351c9a54
4
+ data.tar.gz: 134c9924721309eda4b8a50c80bb97380e1d6628f7d4fbb6fb9447d7ec836b63
5
5
  SHA512:
6
- metadata.gz: 79759ed27498ebdced14582be0acfd6eef70c088a0eacf31335c9043cd43c22f5dc3b7f7638ea2c5ca1ba73e7209bc5cea3780abcae7ba427572050ee7414c39
7
- data.tar.gz: a99f4c32fd69d120cbad6efc954c11fa8ad9cfbc6adb4c7e6e72422129984e25904134d725dfc8aec96b47dab9193085352a4fd55858124a5906ae41c8b42498
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
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = %q{sorbet-rails}
3
- s.version = "0.5.9"
3
+ s.version = "0.5.9.1"
4
4
  s.date = %q{2019-04-18}
5
5
  s.summary = %q{Set of tools to make Sorbet work with Rails seamlessly.}
6
6
  s.authors = ["Chan Zuckerberg Initiative"]
@@ -95,6 +95,7 @@ def create_models
95
95
  # an abstract class that has no table
96
96
  class Potion < ApplicationRecord
97
97
  self.abstract_class = true
98
+ belongs_to :wizard, required: false
98
99
  end
99
100
  RUBY
100
101
 
@@ -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',
@@ -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.12'
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.5135)
108
- sorbet-static (= 0.4.5135)
109
- sorbet-runtime (0.4.5135)
110
- sorbet-static (0.4.5135-universal-darwin-14)
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.12)
133
+ puma (~> 3.0)
134
134
  rails (~> 5.0.7)
135
135
  sorbet
136
136
  sorbet-rails!
@@ -2,4 +2,5 @@
2
2
  # an abstract class that has no table
3
3
  class Potion < ApplicationRecord
4
4
  self.abstract_class = true
5
+ belongs_to :wizard, required: false
5
6
  end
@@ -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.12'
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.5135)
109
- sorbet-static (= 0.4.5135)
110
- sorbet-runtime (0.4.5135)
111
- sorbet-static (0.4.5135-universal-darwin-14)
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.12)
139
+ puma (~> 3.7)
140
140
  rails (~> 5.1.7)
141
141
  sorbet
142
142
  sorbet-rails!
@@ -2,4 +2,5 @@
2
2
  # an abstract class that has no table
3
3
  class Potion < ApplicationRecord
4
4
  self.abstract_class = true
5
+ belongs_to :wizard, required: false
5
6
  end
@@ -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.12'
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.5135)
117
- sorbet-static (= 0.4.5135)
118
- sorbet-runtime (0.4.5135)
119
- sorbet-static (0.4.5135-universal-darwin-14)
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.12)
147
+ puma (~> 3.11)
148
148
  rails (~> 5.2.3)
149
149
  sorbet
150
150
  sorbet-rails!
@@ -2,4 +2,5 @@
2
2
  # an abstract class that has no table
3
3
  class Potion < ApplicationRecord
4
4
  self.abstract_class = true
5
+ belongs_to :wizard, required: false
5
6
  end
@@ -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.12'
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.5135)
132
- sorbet-static (= 0.4.5135)
133
- sorbet-runtime (0.4.5135)
134
- sorbet-static (0.4.5135-universal-darwin-14)
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.12)
163
+ puma (~> 3.11)
164
164
  rails (~> 6.0.0)
165
165
  sorbet
166
166
  sorbet-rails!
@@ -2,4 +2,5 @@
2
2
  # an abstract class that has no table
3
3
  class Potion < ApplicationRecord
4
4
  self.abstract_class = true
5
+ belongs_to :wizard, required: false
5
6
  end
@@ -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
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.5.9
4
+ version: 0.5.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chan Zuckerberg Initiative