-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
49 changed files
with
28,842 additions
and
275 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,5 @@ | |
.gitignore | ||
.rubocop.yml | ||
deployment/ | ||
sorbet/ | ||
state.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#!/usr/bin/env ruby | ||
# frozen_string_literal: true | ||
|
||
require "bundler" | ||
require "psych" | ||
|
||
RBI_ALLOWLIST = %w[ | ||
addressable | ||
faraday | ||
jwt | ||
octokit | ||
rack-session | ||
rack | ||
sinatra | ||
].freeze | ||
|
||
tapioca_config = Psych.safe_load_file("sorbet/tapioca/config.yml") | ||
tapioca_excludes = tapioca_config.dig("gem", "exclude") | ||
|
||
gem_names = Bundler.locked_gems.specs.map(&:name).uniq | ||
gem_names.reject! { |name| name.match?(/\Asorbet(?:-(?:static(?:-.*)?|runtime))?\z/) } # Implicitly excluded | ||
|
||
allowed_and_excluded = RBI_ALLOWLIST & tapioca_excludes | ||
unless allowed_and_excluded.empty? | ||
$stderr.puts "Tapioca excludes contains gems in the allowlist!" | ||
$stderr.puts "Gems affected: #{allowed_and_excluded.join(", ")}" | ||
exit(1) | ||
end | ||
|
||
new_gems = gem_names - tapioca_excludes - RBI_ALLOWLIST | ||
unless new_gems.empty? | ||
$stderr.puts "New gems were added that may need to be added to the Tapioca exclude list." | ||
$stderr.puts "Gems affected: #{new_gems.join(", ")}" | ||
exit(1) | ||
end | ||
|
||
extra_excludes = tapioca_excludes - gem_names | ||
unless new_gems.empty? | ||
$stderr.puts "Tapioca exclude list contains gems that are not in the Gemfile.lock" | ||
$stderr.puts "Gems affected: #{extra_excludes.join(", ")}" | ||
exit(1) | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--dir=. | ||
--allowed-extension=.rb,.rbi,.ru | ||
--ignore=tmp/,vendor/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
**/*.rbi linguist-vendored=true |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.