sorbet-rails 0.7.0 → 0.7.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (116) hide show
  1. checksums.yaml +4 -4
  2. data/.gitattributes +1 -2
  3. data/.gitignore +2 -1
  4. data/.travis.yml +1 -1
  5. data/README.md +51 -4
  6. data/Rakefile +3 -3
  7. data/lib/bundled_rbi/customizabel_rbi_formatter.rbi +29 -0
  8. data/lib/bundled_rbi/pluck_to_tstruct.rbi +2 -1
  9. data/lib/sorbet-rails.rb +1 -1
  10. data/lib/sorbet-rails/config.rb +11 -0
  11. data/lib/sorbet-rails/deprecation.rb +1 -0
  12. data/lib/sorbet-rails/gem_plugins/kaminari_plugin.rb +8 -0
  13. data/lib/sorbet-rails/job_rbi_formatter.rb +73 -62
  14. data/lib/sorbet-rails/mailer_rbi_formatter.rb +40 -27
  15. data/lib/sorbet-rails/model_column_utils.rb +129 -0
  16. data/lib/sorbet-rails/model_plugins/active_record_assoc.rb +28 -1
  17. data/lib/sorbet-rails/model_plugins/active_record_attribute.rb +0 -102
  18. data/lib/sorbet-rails/model_plugins/base.rb +0 -10
  19. data/lib/sorbet-rails/model_utils.rb +5 -2
  20. data/lib/sorbet-rails/rails_mixins/pluck_to_tstruct.rb +17 -7
  21. data/lib/sorbet-rails/sorbet_utils.rb +152 -150
  22. data/lib/sorbet-rails/tasks/rails_rbi.rake +3 -3
  23. data/sorbet-rails.gemspec +1 -1
  24. data/spec/job_rbi_formatter_spec.rb +1 -1
  25. data/spec/pluck_to_tstruct_spec.rb +74 -1
  26. data/spec/rails_helper.rb +2 -2
  27. data/spec/rake_rails_rbi_jobs_spec.rb +20 -0
  28. data/spec/rake_rails_rbi_mailers_spec.rb +21 -0
  29. data/spec/support/v5.0/Gemfile +1 -1
  30. data/spec/support/v5.0/Gemfile.lock +8 -8
  31. data/spec/support/v5.1/Gemfile.lock +6 -6
  32. data/spec/support/v5.2/Gemfile +1 -1
  33. data/spec/support/v5.2/Gemfile.lock +8 -8
  34. data/spec/support/v6.0/.gitignore +6 -0
  35. data/spec/support/v6.0/Gemfile +3 -3
  36. data/spec/support/v6.0/Gemfile.lock +76 -75
  37. data/spec/support/v6.0/bin/bundle +22 -13
  38. data/spec/support/v6.0/config/environments/test.rb +1 -1
  39. data/spec/support/v6.0/tmp/pids/.keep +0 -0
  40. data/spec/test_data/v5.0/expected_custom_application_job.rbi +21 -0
  41. data/spec/test_data/v5.0/expected_custom_application_mailer.rbi +6 -0
  42. data/spec/test_data/v5.0/expected_custom_award_house_point_hourglasses.rbi +21 -0
  43. data/spec/test_data/v5.0/expected_custom_daily_prophet_mailer.rbi +8 -0
  44. data/spec/test_data/v5.0/expected_custom_hogwarts_acceptance_mailer.rbi +21 -0
  45. data/spec/test_data/v5.0/expected_headmaster.rbi +18 -0
  46. data/spec/test_data/v5.0/expected_potion.rbi +9 -0
  47. data/spec/test_data/v5.0/expected_robe.rbi +9 -0
  48. data/spec/test_data/v5.0/expected_school.rbi +9 -0
  49. data/spec/test_data/v5.0/expected_spell/habtm_spell_books.rbi +18 -0
  50. data/spec/test_data/v5.0/expected_spell_book.rbi +9 -0
  51. data/spec/test_data/v5.0/expected_spell_book/habtm_spells.rbi +18 -0
  52. data/spec/test_data/v5.0/expected_squib.rbi +18 -0
  53. data/spec/test_data/v5.0/expected_subject/habtm_wizards.rbi +18 -0
  54. data/spec/test_data/v5.0/expected_wand.rbi +9 -0
  55. data/spec/test_data/v5.0/expected_wizard.rbi +18 -0
  56. data/spec/test_data/v5.0/expected_wizard/habtm_subjects.rbi +18 -0
  57. data/spec/test_data/v5.0/expected_wizard_wo_spellbook.rbi +18 -0
  58. data/spec/test_data/v5.1/expected_custom_application_job.rbi +21 -0
  59. data/spec/test_data/v5.1/expected_custom_application_mailer.rbi +6 -0
  60. data/spec/test_data/v5.1/expected_custom_award_house_point_hourglasses.rbi +21 -0
  61. data/spec/test_data/v5.1/expected_custom_daily_prophet_mailer.rbi +8 -0
  62. data/spec/test_data/v5.1/expected_custom_hogwarts_acceptance_mailer.rbi +21 -0
  63. data/spec/test_data/v5.1/expected_headmaster.rbi +18 -0
  64. data/spec/test_data/v5.1/expected_potion.rbi +9 -0
  65. data/spec/test_data/v5.1/expected_robe.rbi +9 -0
  66. data/spec/test_data/v5.1/expected_school.rbi +9 -0
  67. data/spec/test_data/v5.1/expected_spell/habtm_spell_books.rbi +18 -0
  68. data/spec/test_data/v5.1/expected_spell_book.rbi +9 -0
  69. data/spec/test_data/v5.1/expected_spell_book/habtm_spells.rbi +18 -0
  70. data/spec/test_data/v5.1/expected_squib.rbi +18 -0
  71. data/spec/test_data/v5.1/expected_subject/habtm_wizards.rbi +18 -0
  72. data/spec/test_data/v5.1/expected_wand.rbi +9 -0
  73. data/spec/test_data/v5.1/expected_wizard.rbi +18 -0
  74. data/spec/test_data/v5.1/expected_wizard/habtm_subjects.rbi +18 -0
  75. data/spec/test_data/v5.1/expected_wizard_wo_spellbook.rbi +18 -0
  76. data/spec/test_data/v5.2/expected_attachment.rbi +18 -0
  77. data/spec/test_data/v5.2/expected_blob.rbi +19 -1
  78. data/spec/test_data/v5.2/expected_custom_application_job.rbi +21 -0
  79. data/spec/test_data/v5.2/expected_custom_application_mailer.rbi +6 -0
  80. data/spec/test_data/v5.2/expected_custom_award_house_point_hourglasses.rbi +21 -0
  81. data/spec/test_data/v5.2/expected_custom_daily_prophet_mailer.rbi +8 -0
  82. data/spec/test_data/v5.2/expected_custom_hogwarts_acceptance_mailer.rbi +21 -0
  83. data/spec/test_data/v5.2/expected_headmaster.rbi +18 -0
  84. data/spec/test_data/v5.2/expected_potion.rbi +9 -0
  85. data/spec/test_data/v5.2/expected_robe.rbi +9 -0
  86. data/spec/test_data/v5.2/expected_school.rbi +9 -0
  87. data/spec/test_data/v5.2/expected_spell/habtm_spell_books.rbi +18 -0
  88. data/spec/test_data/v5.2/expected_spell_book.rbi +9 -0
  89. data/spec/test_data/v5.2/expected_spell_book/habtm_spells.rbi +18 -0
  90. data/spec/test_data/v5.2/expected_squib.rbi +38 -2
  91. data/spec/test_data/v5.2/expected_subject/habtm_wizards.rbi +18 -0
  92. data/spec/test_data/v5.2/expected_wand.rbi +9 -0
  93. data/spec/test_data/v5.2/expected_wizard.rbi +38 -2
  94. data/spec/test_data/v5.2/expected_wizard/habtm_subjects.rbi +18 -0
  95. data/spec/test_data/v5.2/expected_wizard_wo_spellbook.rbi +38 -2
  96. data/spec/test_data/v6.0/expected_attachment.rbi +18 -0
  97. data/spec/test_data/v6.0/expected_blob.rbi +19 -1
  98. data/spec/test_data/v6.0/expected_custom_application_job.rbi +21 -0
  99. data/spec/test_data/v6.0/expected_custom_application_mailer.rbi +6 -0
  100. data/spec/test_data/v6.0/expected_custom_award_house_point_hourglasses.rbi +21 -0
  101. data/spec/test_data/v6.0/expected_custom_daily_prophet_mailer.rbi +8 -0
  102. data/spec/test_data/v6.0/expected_custom_hogwarts_acceptance_mailer.rbi +21 -0
  103. data/spec/test_data/v6.0/expected_headmaster.rbi +18 -0
  104. data/spec/test_data/v6.0/expected_potion.rbi +9 -0
  105. data/spec/test_data/v6.0/expected_robe.rbi +9 -0
  106. data/spec/test_data/v6.0/expected_school.rbi +9 -0
  107. data/spec/test_data/v6.0/expected_spell/habtm_spell_books.rbi +18 -0
  108. data/spec/test_data/v6.0/expected_spell_book.rbi +9 -0
  109. data/spec/test_data/v6.0/expected_spell_book/habtm_spells.rbi +18 -0
  110. data/spec/test_data/v6.0/expected_squib.rbi +38 -2
  111. data/spec/test_data/v6.0/expected_subject/habtm_wizards.rbi +18 -0
  112. data/spec/test_data/v6.0/expected_wand.rbi +9 -0
  113. data/spec/test_data/v6.0/expected_wizard.rbi +38 -2
  114. data/spec/test_data/v6.0/expected_wizard/habtm_subjects.rbi +18 -0
  115. data/spec/test_data/v6.0/expected_wizard_wo_spellbook.rbi +38 -2
  116. metadata +45 -1
@@ -47,7 +47,7 @@ namespace :rails_rbi do
47
47
  Rake::Task['rails_rbi:active_record'].invoke
48
48
  end
49
49
 
50
- desc "Generate rbis for rails mailers"
50
+ desc "Generate rbis for rails active_record base"
51
51
  task :active_record, [:root_dir] => :environment do |t, args|
52
52
  formatter = SorbetRails::ActiveRecordRbiFormatter.new
53
53
  FileUtils.mkdir_p(Rails.root.join("sorbet", "rails-rbi"))
@@ -129,7 +129,7 @@ namespace :rails_rbi do
129
129
  "mailers",
130
130
  "#{mailer_class.name.underscore}.rbi",
131
131
  )
132
- formatter = SorbetRails::MailerRbiFormatter.new(mailer_class)
132
+ formatter = ::SorbetRails.config.mailer_generator_class.new(mailer_class)
133
133
  FileUtils.mkdir_p(File.dirname(file_path))
134
134
  File.write(file_path, formatter.generate_rbi)
135
135
  end
@@ -147,7 +147,7 @@ namespace :rails_rbi do
147
147
  "jobs",
148
148
  "#{job_class.name.underscore}.rbi",
149
149
  )
150
- formatter = SorbetRails::JobRbiFormatter.new(job_class)
150
+ formatter = ::SorbetRails.config.job_generator_class.new(job_class)
151
151
  FileUtils.mkdir_p(File.dirname(file_path))
152
152
  File.write(file_path, formatter.generate_rbi)
153
153
  end
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = %q{sorbet-rails}
3
- s.version = "0.7.0"
3
+ s.version = "0.7.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"]
@@ -1,5 +1,5 @@
1
1
  require 'rails_helper'
2
- require 'sorbet-rails/mailer_rbi_formatter'
2
+ require 'sorbet-rails/job_rbi_formatter'
3
3
 
4
4
  RSpec.describe SorbetRails::MailerRbiFormatter do
5
5
 
@@ -9,6 +9,18 @@ RSpec.describe SorbetRails::PluckToTStruct do
9
9
  )
10
10
  end
11
11
 
12
+ let!(:harrys_wand) do
13
+ Wand.create!(
14
+ wizard: harry,
15
+ core_type: :phoenix_feather,
16
+ wood_type: "Holly",
17
+ chosen_at_date: Date.parse('2019-09-01'),
18
+ chosen_at_time: Time.parse('2019-09-01T09:00:00Z'),
19
+ broken: true,
20
+ broken_at: Time.parse('2019-09-05T15:30:00Z'),
21
+ )
22
+ end
23
+
12
24
  let!(:hermione) do
13
25
  Wizard.create!(
14
26
  name: 'Hermione Granger',
@@ -16,6 +28,18 @@ RSpec.describe SorbetRails::PluckToTStruct do
16
28
  )
17
29
  end
18
30
 
31
+ let!(:hermiones_wand) do
32
+ Wand.create!(
33
+ wizard: hermione,
34
+ core_type: :phoenix_feather,
35
+ wood_type: "Vine",
36
+ chosen_at_date: Date.parse('2019-09-01'),
37
+ chosen_at_time: Time.parse('2019-09-01T09:00:00Z'),
38
+ broken: true,
39
+ broken_at: Time.parse('2019-09-05T15:30:00Z'),
40
+ )
41
+ end
42
+
19
43
  class WizardName < T::Struct
20
44
  const :name, String
21
45
 
@@ -43,6 +67,21 @@ RSpec.describe SorbetRails::PluckToTStruct do
43
67
  end
44
68
  end
45
69
 
70
+ class WizardWithWandT < T::Struct
71
+ const :name, String
72
+ const :house, String
73
+ const :wand_wood_type, String
74
+
75
+ def ==(other)
76
+ return false unless other.is_a?(self.class)
77
+ name == other.name && house == other.house
78
+ end
79
+
80
+ def eql?(other)
81
+ self == other
82
+ end
83
+ end
84
+
46
85
  shared_examples 'pluck_to_tstruct' do |struct_type, expected_values|
47
86
  it 'plucks correctly from ActiveRecord model' do
48
87
  plucked = Wizard.pluck_to_tstruct(TA[struct_type].new)
@@ -55,6 +94,18 @@ RSpec.describe SorbetRails::PluckToTStruct do
55
94
  end
56
95
  end
57
96
 
97
+ shared_examples 'pluck_to_tstruct with associations' do |struct_type, associations, expected_values|
98
+ it 'plucks correctly from ActiveRecord model with associations' do
99
+ plucked = Wizard.joins(:wand).pluck_to_tstruct(TA[struct_type].new, associations: associations)
100
+ expect(plucked).to match_array(expected_values)
101
+ end
102
+
103
+ it 'plucks correctly from ActiveRecord relation with associations' do
104
+ plucked = Wizard.all.joins(:wand).pluck_to_tstruct(TA[struct_type].new, associations: associations)
105
+ expect(plucked).to match_array(expected_values)
106
+ end
107
+ end
108
+
58
109
  context 'pluck 1 attribute' do
59
110
  it_should_behave_like 'pluck_to_tstruct', WizardName, [
60
111
  WizardName.new(name: "Harry Potter"),
@@ -72,8 +123,30 @@ RSpec.describe SorbetRails::PluckToTStruct do
72
123
  context 'given a wrong type' do
73
124
  it 'should raise error' do
74
125
  expect {
75
- plucked = Wizard.pluck_to_tstruct(TA[String].new)
126
+ Wizard.pluck_to_tstruct(TA[String].new)
76
127
  }.to raise_error(SorbetRails::PluckToTStruct::UnexpectedType)
77
128
  end
78
129
  end
130
+
131
+ context "given associations mappings that don't exist in T::Struct" do
132
+ it 'should raise error' do
133
+ expect {
134
+ Wizard.pluck_to_tstruct(
135
+ TA[WizardWithWandT].new,
136
+ associations: { wood_type: "wands.wood_type" }
137
+ )
138
+ }.to raise_error(SorbetRails::PluckToTStruct::UnexpectedAssociations)
139
+ end
140
+ end
141
+
142
+ context 'pluck with associations' do
143
+ associations = { wand_wood_type: "wands.wood_type" }
144
+
145
+ expected = [
146
+ WizardWithWandT.new(name: "Harry Potter", house: "Gryffindor", wand_wood_type: "Holly"),
147
+ WizardWithWandT.new(name: "Hermione Granger", house: "Gryffindor", wand_wood_type: "Vine"),
148
+ ]
149
+
150
+ it_should_behave_like 'pluck_to_tstruct with associations', WizardWithWandT, associations, expected
151
+ end
79
152
  end
@@ -70,7 +70,7 @@ end
70
70
  # File uses File::SEPARATOR by default but will also use File::ALT_SEPARATOR if it's not nil
71
71
  FILE_SEPARATOR_RE = Regexp.union(*[File::SEPARATOR, File::ALT_SEPARATOR].compact).freeze
72
72
 
73
- def expect_files(base_dir:, files:)
73
+ def expect_files(base_dir:, files:, expected_file_prefix: "expected")
74
74
  dirs = Set.new([base_dir])
75
75
  # if any files contain file separators then include those paths in our globbing as well
76
76
  files.each do |f|
@@ -92,7 +92,7 @@ def expect_files(base_dir:, files:)
92
92
  generated = File.read(file_path)
93
93
  # expect there is the same file in test_data folder
94
94
  path_from_dir = pathname.relative_path_from(base_dir).to_path
95
- expect_match_file(generated, "expected_#{path_from_dir}")
95
+ expect_match_file(generated, "#{expected_file_prefix}_#{path_from_dir}")
96
96
  path_from_dir
97
97
  end
98
98
 
@@ -3,6 +3,13 @@ require 'rails_helper'
3
3
  RSpec.describe 'rake rails_rbi:jobs', type: :task do
4
4
  let!(:generated_dir_path) { Rails.root.join("sorbet", "rails-rbi", "jobs") }
5
5
 
6
+ class CustomJobRbiGenerator < SorbetRails::JobRbiFormatter
7
+ def populate_rbi
8
+ rbi_generator.root.add_comment("== Custom Generator ==")
9
+ super
10
+ end
11
+ end
12
+
6
13
  it "preloads the Rails environment" do
7
14
  expect(task.prerequisites).to include("environment")
8
15
  end
@@ -17,4 +24,17 @@ RSpec.describe 'rake rails_rbi:jobs', type: :task do
17
24
  ],
18
25
  )
19
26
  end
27
+
28
+ it "generates custom jobs rbi correctly" do
29
+ ::SorbetRails.config.job_generator_class = CustomJobRbiGenerator
30
+ task.invoke
31
+ expect_files(
32
+ base_dir: generated_dir_path,
33
+ files: [
34
+ "application_job.rbi",
35
+ "award_house_point_hourglasses.rbi",
36
+ ],
37
+ expected_file_prefix: "expected_custom",
38
+ )
39
+ end
20
40
  end
@@ -3,6 +3,13 @@ require 'rails_helper'
3
3
  RSpec.describe 'rake rails_rbi:mailers', type: :task do
4
4
  let!(:generated_dir_path) { Rails.root.join("sorbet", "rails-rbi", "mailers") }
5
5
 
6
+ class CustomMailerRbiGenerator < SorbetRails::MailerRbiFormatter
7
+ def populate_rbi
8
+ rbi_generator.root.add_comment("== Custom Generator ==")
9
+ super
10
+ end
11
+ end
12
+
6
13
  it "preloads the Rails environment" do
7
14
  expect(task.prerequisites).to include("environment")
8
15
  end
@@ -18,4 +25,18 @@ RSpec.describe 'rake rails_rbi:mailers', type: :task do
18
25
  ],
19
26
  )
20
27
  end
28
+
29
+ it "generates custom mailers rbi correctly" do
30
+ ::SorbetRails.config.mailer_generator_class = CustomMailerRbiGenerator
31
+ task.invoke
32
+ expect_files(
33
+ base_dir: generated_dir_path,
34
+ files: [
35
+ "application_mailer.rbi",
36
+ "daily_prophet_mailer.rbi",
37
+ "hogwarts_acceptance_mailer.rbi",
38
+ ],
39
+ expected_file_prefix: "expected_custom",
40
+ )
41
+ end
21
42
  end
@@ -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.0'
14
+ gem 'puma', '~> 3.12'
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.7.0)
4
+ sorbet-rails (0.7.1)
5
5
  method_source (>= 0.9.2)
6
6
  parlour (~> 2.0)
7
7
  parser (>= 2.7)
@@ -49,7 +49,7 @@ GEM
49
49
  minitest (~> 5.1)
50
50
  tzinfo (~> 1.1)
51
51
  arel (7.1.4)
52
- ast (2.4.0)
52
+ ast (2.4.1)
53
53
  builder (3.2.4)
54
54
  byebug (11.1.1)
55
55
  commander (4.5.2)
@@ -81,11 +81,11 @@ GEM
81
81
  parser
82
82
  rainbow (~> 3.0)
83
83
  sorbet-runtime (>= 0.5)
84
- parser (2.7.1.2)
85
- ast (~> 2.4.0)
84
+ parser (2.7.1.4)
85
+ ast (~> 2.4.1)
86
86
  polyfill (1.8.0)
87
- puma (3.12.4)
88
- rack (2.2.2)
87
+ puma (3.12.6)
88
+ rack (2.2.3)
89
89
  rack-test (0.6.3)
90
90
  rack (>= 1.0)
91
91
  rails (5.0.7.2)
@@ -137,7 +137,7 @@ GEM
137
137
  thread_safe (~> 0.1)
138
138
  websocket-driver (0.6.5)
139
139
  websocket-extensions (>= 0.1.0)
140
- websocket-extensions (0.1.4)
140
+ websocket-extensions (0.1.5)
141
141
 
142
142
  PLATFORMS
143
143
  ruby
@@ -145,7 +145,7 @@ PLATFORMS
145
145
  DEPENDENCIES
146
146
  byebug
147
147
  jbuilder (~> 2.5)
148
- puma (~> 3.0)
148
+ puma (~> 3.12)
149
149
  rails (~> 5.0.7)
150
150
  sorbet
151
151
  sorbet-rails!
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ../../..
3
3
  specs:
4
- sorbet-rails (0.7.0)
4
+ sorbet-rails (0.7.1)
5
5
  method_source (>= 0.9.2)
6
6
  parlour (~> 2.0)
7
7
  parser (>= 2.7)
@@ -49,7 +49,7 @@ GEM
49
49
  minitest (~> 5.1)
50
50
  tzinfo (~> 1.1)
51
51
  arel (8.0.0)
52
- ast (2.4.0)
52
+ ast (2.4.1)
53
53
  bindex (0.8.1)
54
54
  builder (3.2.4)
55
55
  byebug (11.1.1)
@@ -82,11 +82,11 @@ GEM
82
82
  parser
83
83
  rainbow (~> 3.0)
84
84
  sorbet-runtime (>= 0.5)
85
- parser (2.7.1.2)
86
- ast (~> 2.4.0)
85
+ parser (2.7.1.4)
86
+ ast (~> 2.4.1)
87
87
  polyfill (1.8.0)
88
88
  puma (3.12.4)
89
- rack (2.2.2)
89
+ rack (2.2.3)
90
90
  rack-test (1.1.0)
91
91
  rack (>= 1.0, < 3)
92
92
  rails (5.1.7)
@@ -143,7 +143,7 @@ GEM
143
143
  railties (>= 5.0)
144
144
  websocket-driver (0.6.5)
145
145
  websocket-extensions (>= 0.1.0)
146
- websocket-extensions (0.1.4)
146
+ websocket-extensions (0.1.5)
147
147
 
148
148
  PLATFORMS
149
149
  ruby
@@ -8,7 +8,7 @@ gem 'rails', '~> 5.2.4', '>= 5.2.4.2'
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'
11
+ gem 'puma', '~> 3.12'
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.7.0)
4
+ sorbet-rails (0.7.1)
5
5
  method_source (>= 0.9.2)
6
6
  parlour (~> 2.0)
7
7
  parser (>= 2.7)
@@ -53,7 +53,7 @@ GEM
53
53
  minitest (~> 5.1)
54
54
  tzinfo (~> 1.1)
55
55
  arel (9.0.0)
56
- ast (2.4.0)
56
+ ast (2.4.1)
57
57
  bindex (0.8.1)
58
58
  builder (3.2.4)
59
59
  byebug (11.1.1)
@@ -89,11 +89,11 @@ GEM
89
89
  parser
90
90
  rainbow (~> 3.0)
91
91
  sorbet-runtime (>= 0.5)
92
- parser (2.7.1.2)
93
- ast (~> 2.4.0)
92
+ parser (2.7.1.4)
93
+ ast (~> 2.4.1)
94
94
  polyfill (1.8.0)
95
- puma (3.12.4)
96
- rack (2.2.2)
95
+ puma (3.12.6)
96
+ rack (2.2.3)
97
97
  rack-test (1.1.0)
98
98
  rack (>= 1.0, < 3)
99
99
  rails (5.2.4.2)
@@ -151,7 +151,7 @@ GEM
151
151
  railties (>= 5.0)
152
152
  websocket-driver (0.7.1)
153
153
  websocket-extensions (>= 0.1.0)
154
- websocket-extensions (0.1.4)
154
+ websocket-extensions (0.1.5)
155
155
 
156
156
  PLATFORMS
157
157
  ruby
@@ -159,7 +159,7 @@ PLATFORMS
159
159
  DEPENDENCIES
160
160
  byebug
161
161
  jbuilder (~> 2.5)
162
- puma (~> 3.11)
162
+ puma (~> 3.12)
163
163
  rails (~> 5.2.4, >= 5.2.4.2)
164
164
  sorbet
165
165
  sorbet-rails!
@@ -10,6 +10,7 @@
10
10
  # Ignore the default SQLite database.
11
11
  /db/*.sqlite3
12
12
  /db/*.sqlite3-journal
13
+ /db/*.sqlite3-*
13
14
 
14
15
  # Ignore all logfiles and tempfiles.
15
16
  /log/*
@@ -17,6 +18,11 @@
17
18
  !/log/.keep
18
19
  !/tmp/.keep
19
20
 
21
+ # Ignore pidfiles, but keep the directory.
22
+ /tmp/pids/*
23
+ !/tmp/pids/
24
+ !/tmp/pids/.keep
25
+
20
26
  # Ignore uploaded files in development.
21
27
  /storage/*
22
28
  !/storage/.keep
@@ -4,11 +4,11 @@ git_source(:github) { |repo| "https://github.com/#{repo}.git" }
4
4
  ruby '2.5.5'
5
5
 
6
6
  # Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
7
- gem 'rails', '~> 6.0.0'
7
+ gem 'rails', '~> 6.0.3'
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'
11
+ gem 'puma', '~> 4.1'
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
@@ -32,4 +32,4 @@ gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
32
32
 
33
33
  gem 'sorbet-rails', path: '../../../.'
34
34
  gem 'sorbet'
35
- gem 'sorbet-runtime'
35
+ gem 'sorbet-runtime'
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ../../..
3
3
  specs:
4
- sorbet-rails (0.7.0)
4
+ sorbet-rails (0.7.1)
5
5
  method_source (>= 0.9.2)
6
6
  parlour (~> 2.0)
7
7
  parser (>= 2.7)
@@ -11,65 +11,65 @@ PATH
11
11
  GEM
12
12
  remote: https://rubygems.org/
13
13
  specs:
14
- actioncable (6.0.2.2)
15
- actionpack (= 6.0.2.2)
14
+ actioncable (6.0.3.2)
15
+ actionpack (= 6.0.3.2)
16
16
  nio4r (~> 2.0)
17
17
  websocket-driver (>= 0.6.1)
18
- actionmailbox (6.0.2.2)
19
- actionpack (= 6.0.2.2)
20
- activejob (= 6.0.2.2)
21
- activerecord (= 6.0.2.2)
22
- activestorage (= 6.0.2.2)
23
- activesupport (= 6.0.2.2)
18
+ actionmailbox (6.0.3.2)
19
+ actionpack (= 6.0.3.2)
20
+ activejob (= 6.0.3.2)
21
+ activerecord (= 6.0.3.2)
22
+ activestorage (= 6.0.3.2)
23
+ activesupport (= 6.0.3.2)
24
24
  mail (>= 2.7.1)
25
- actionmailer (6.0.2.2)
26
- actionpack (= 6.0.2.2)
27
- actionview (= 6.0.2.2)
28
- activejob (= 6.0.2.2)
25
+ actionmailer (6.0.3.2)
26
+ actionpack (= 6.0.3.2)
27
+ actionview (= 6.0.3.2)
28
+ activejob (= 6.0.3.2)
29
29
  mail (~> 2.5, >= 2.5.4)
30
30
  rails-dom-testing (~> 2.0)
31
- actionpack (6.0.2.2)
32
- actionview (= 6.0.2.2)
33
- activesupport (= 6.0.2.2)
31
+ actionpack (6.0.3.2)
32
+ actionview (= 6.0.3.2)
33
+ activesupport (= 6.0.3.2)
34
34
  rack (~> 2.0, >= 2.0.8)
35
35
  rack-test (>= 0.6.3)
36
36
  rails-dom-testing (~> 2.0)
37
37
  rails-html-sanitizer (~> 1.0, >= 1.2.0)
38
- actiontext (6.0.2.2)
39
- actionpack (= 6.0.2.2)
40
- activerecord (= 6.0.2.2)
41
- activestorage (= 6.0.2.2)
42
- activesupport (= 6.0.2.2)
38
+ actiontext (6.0.3.2)
39
+ actionpack (= 6.0.3.2)
40
+ activerecord (= 6.0.3.2)
41
+ activestorage (= 6.0.3.2)
42
+ activesupport (= 6.0.3.2)
43
43
  nokogiri (>= 1.8.5)
44
- actionview (6.0.2.2)
45
- activesupport (= 6.0.2.2)
44
+ actionview (6.0.3.2)
45
+ activesupport (= 6.0.3.2)
46
46
  builder (~> 3.1)
47
47
  erubi (~> 1.4)
48
48
  rails-dom-testing (~> 2.0)
49
49
  rails-html-sanitizer (~> 1.1, >= 1.2.0)
50
- activejob (6.0.2.2)
51
- activesupport (= 6.0.2.2)
50
+ activejob (6.0.3.2)
51
+ activesupport (= 6.0.3.2)
52
52
  globalid (>= 0.3.6)
53
- activemodel (6.0.2.2)
54
- activesupport (= 6.0.2.2)
55
- activerecord (6.0.2.2)
56
- activemodel (= 6.0.2.2)
57
- activesupport (= 6.0.2.2)
58
- activestorage (6.0.2.2)
59
- actionpack (= 6.0.2.2)
60
- activejob (= 6.0.2.2)
61
- activerecord (= 6.0.2.2)
53
+ activemodel (6.0.3.2)
54
+ activesupport (= 6.0.3.2)
55
+ activerecord (6.0.3.2)
56
+ activemodel (= 6.0.3.2)
57
+ activesupport (= 6.0.3.2)
58
+ activestorage (6.0.3.2)
59
+ actionpack (= 6.0.3.2)
60
+ activejob (= 6.0.3.2)
61
+ activerecord (= 6.0.3.2)
62
62
  marcel (~> 0.3.1)
63
- activesupport (6.0.2.2)
63
+ activesupport (6.0.3.2)
64
64
  concurrent-ruby (~> 1.0, >= 1.0.2)
65
65
  i18n (>= 0.7, < 2)
66
66
  minitest (~> 5.1)
67
67
  tzinfo (~> 1.1)
68
- zeitwerk (~> 2.2)
69
- ast (2.4.0)
68
+ zeitwerk (~> 2.2, >= 2.2.2)
69
+ ast (2.4.1)
70
70
  bindex (0.8.1)
71
71
  builder (3.2.4)
72
- byebug (11.1.1)
72
+ byebug (11.1.3)
73
73
  commander (4.5.2)
74
74
  highline (~> 2.0.0)
75
75
  concurrent-ruby (1.1.6)
@@ -78,11 +78,11 @@ GEM
78
78
  globalid (0.4.2)
79
79
  activesupport (>= 4.2.0)
80
80
  highline (2.0.3)
81
- i18n (1.8.2)
81
+ i18n (1.8.3)
82
82
  concurrent-ruby (~> 1.0)
83
83
  jbuilder (2.10.0)
84
84
  activesupport (>= 5.0.0)
85
- loofah (2.4.0)
85
+ loofah (2.6.0)
86
86
  crass (~> 1.0.2)
87
87
  nokogiri (>= 1.5.9)
88
88
  mail (2.7.1)
@@ -90,64 +90,65 @@ GEM
90
90
  marcel (0.3.3)
91
91
  mimemagic (~> 0.3.2)
92
92
  method_source (1.0.0)
93
- mimemagic (0.3.4)
93
+ mimemagic (0.3.5)
94
94
  mini_mime (1.0.2)
95
95
  mini_portile2 (2.4.0)
96
- minitest (5.14.0)
96
+ minitest (5.14.1)
97
97
  nio4r (2.5.2)
98
- nokogiri (1.10.9)
98
+ nokogiri (1.10.10)
99
99
  mini_portile2 (~> 2.4.0)
100
100
  parlour (2.1.0)
101
101
  commander (~> 4.5)
102
102
  parser
103
103
  rainbow (~> 3.0)
104
104
  sorbet-runtime (>= 0.5)
105
- parser (2.7.1.2)
106
- ast (~> 2.4.0)
105
+ parser (2.7.1.4)
106
+ ast (~> 2.4.1)
107
107
  polyfill (1.8.0)
108
- puma (3.12.4)
109
- rack (2.2.2)
108
+ puma (4.3.5)
109
+ nio4r (~> 2.0)
110
+ rack (2.2.3)
110
111
  rack-test (1.1.0)
111
112
  rack (>= 1.0, < 3)
112
- rails (6.0.2.2)
113
- actioncable (= 6.0.2.2)
114
- actionmailbox (= 6.0.2.2)
115
- actionmailer (= 6.0.2.2)
116
- actionpack (= 6.0.2.2)
117
- actiontext (= 6.0.2.2)
118
- actionview (= 6.0.2.2)
119
- activejob (= 6.0.2.2)
120
- activemodel (= 6.0.2.2)
121
- activerecord (= 6.0.2.2)
122
- activestorage (= 6.0.2.2)
123
- activesupport (= 6.0.2.2)
113
+ rails (6.0.3.2)
114
+ actioncable (= 6.0.3.2)
115
+ actionmailbox (= 6.0.3.2)
116
+ actionmailer (= 6.0.3.2)
117
+ actionpack (= 6.0.3.2)
118
+ actiontext (= 6.0.3.2)
119
+ actionview (= 6.0.3.2)
120
+ activejob (= 6.0.3.2)
121
+ activemodel (= 6.0.3.2)
122
+ activerecord (= 6.0.3.2)
123
+ activestorage (= 6.0.3.2)
124
+ activesupport (= 6.0.3.2)
124
125
  bundler (>= 1.3.0)
125
- railties (= 6.0.2.2)
126
+ railties (= 6.0.3.2)
126
127
  sprockets-rails (>= 2.0.0)
127
128
  rails-dom-testing (2.0.3)
128
129
  activesupport (>= 4.2.0)
129
130
  nokogiri (>= 1.6)
130
131
  rails-html-sanitizer (1.3.0)
131
132
  loofah (~> 2.3)
132
- railties (6.0.2.2)
133
- actionpack (= 6.0.2.2)
134
- activesupport (= 6.0.2.2)
133
+ railties (6.0.3.2)
134
+ actionpack (= 6.0.3.2)
135
+ activesupport (= 6.0.3.2)
135
136
  method_source
136
137
  rake (>= 0.8.7)
137
138
  thor (>= 0.20.3, < 2.0)
138
139
  rainbow (3.0.0)
139
140
  rake (13.0.1)
140
141
  safe_type (1.1.1)
141
- sorbet (0.5.5480)
142
- sorbet-static (= 0.5.5480)
142
+ sorbet (0.5.5815)
143
+ sorbet-static (= 0.5.5815)
143
144
  sorbet-coerce (0.2.7)
144
145
  polyfill (~> 1.8)
145
146
  safe_type (~> 1.1, >= 1.1.1)
146
147
  sorbet (>= 0.4.4704)
147
148
  sorbet-runtime (>= 0.4.4704)
148
- sorbet-runtime (0.5.5480)
149
- sorbet-static (0.5.5480-universal-darwin-14)
150
- sprockets (4.0.0)
149
+ sorbet-runtime (0.5.5815)
150
+ sorbet-static (0.5.5815-universal-darwin-14)
151
+ sprockets (4.0.2)
151
152
  concurrent-ruby (~> 1.0)
152
153
  rack (> 1, < 3)
153
154
  sprockets-rails (3.2.1)
@@ -157,17 +158,17 @@ GEM
157
158
  sqlite3 (1.4.2)
158
159
  thor (1.0.1)
159
160
  thread_safe (0.3.6)
160
- tzinfo (1.2.6)
161
+ tzinfo (1.2.7)
161
162
  thread_safe (~> 0.1)
162
- web-console (4.0.1)
163
+ web-console (4.0.4)
163
164
  actionview (>= 6.0.0)
164
165
  activemodel (>= 6.0.0)
165
166
  bindex (>= 0.4.0)
166
167
  railties (>= 6.0.0)
167
- websocket-driver (0.7.1)
168
+ websocket-driver (0.7.3)
168
169
  websocket-extensions (>= 0.1.0)
169
- websocket-extensions (0.1.4)
170
- zeitwerk (2.3.0)
170
+ websocket-extensions (0.1.5)
171
+ zeitwerk (2.3.1)
171
172
 
172
173
  PLATFORMS
173
174
  ruby
@@ -175,8 +176,8 @@ PLATFORMS
175
176
  DEPENDENCIES
176
177
  byebug
177
178
  jbuilder (~> 2.7)
178
- puma (~> 3.11)
179
- rails (~> 6.0.0)
179
+ puma (~> 4.1)
180
+ rails (~> 6.0.3)
180
181
  sorbet
181
182
  sorbet-rails!
182
183
  sorbet-runtime