Skip to content

Commit

Permalink
Don't serialize bundler.rbi
Browse files Browse the repository at this point in the history
Also don't create sorbet/gems/ folder if would be empty.
  • Loading branch information
jez-stripe committed May 21, 2019
1 parent 6634b56 commit 476ae23
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ def initialize(files:, delegate_classes:)
def serialize(output_dir)
gem_class_defs = preprocess(@files)

FileUtils.mkdir_p(output_dir)
if !gem_class_defs.empty?
FileUtils.mkdir_p(output_dir)
end

gem_class_defs.each do |gem, klass_ids|
File.open("#{File.join(output_dir, gem[:gem])}.rbi", 'w') do |f|
Expand Down Expand Up @@ -102,6 +104,10 @@ def files_to_gem_class_defs(files)
next
end
next if gem[:gem] == 'ruby'
# We're currently ignoring bundler, because we can't easily pin
# everyone to the same version of bundler in tests and in CI.
# There is an RBI for bundler in sorbet-typed.
next if gem[:gem] == 'bundler'

gem_class_defs[gem] ||= {}
defined.each do |item|
Expand Down

This file was deleted.

0 comments on commit 476ae23

Please sign in to comment.