sorbet 0.5.5417 → 0.5.5420
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/gem_loader.rb +14 -7
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 17b8d33c4accdfd1479095a6b586e4617923b019
|
4
|
+
data.tar.gz: 2e8eb2c61fc0b417861480e29c15c45bcb72adcf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c09bcad05664762e0ea4928d7dfee28d3c9a8caf4d883957b5117cd9202fc56fc85a677dab9ba682221ec2ab076218f53c33804f970baa271a175f990a1848df
|
7
|
+
data.tar.gz: c0dcfa343a5d6227fc2f1e74dfd82d386c180cc11777b8f5c35217dfbdf00f9302518a6d8a3fa18892b991edc9ead879af4b5894e8c8255d8f2249111cf6676f
|
data/lib/gem_loader.rb
CHANGED
@@ -950,16 +950,23 @@ class Sorbet::Private::GemLoader
|
|
950
950
|
|
951
951
|
def self.require_all_gems
|
952
952
|
require 'bundler/setup'
|
953
|
+
require 'bundler/lockfile_parser'
|
953
954
|
|
955
|
+
specs = []
|
956
|
+
lockfile_parser = Bundler::LockfileParser.new(File.read(Bundler.default_lockfile))
|
954
957
|
# Do not load gems in Gemfile where require is false
|
955
|
-
|
956
|
-
|
957
|
-
|
958
|
-
|
959
|
-
|
960
|
-
|
958
|
+
dependencies = lockfile_parser.dependencies.reject { |name, dep| dep.autorequire && dep.autorequire.empty? }
|
959
|
+
required_dependency_names = dependencies.values.map(&:name)
|
960
|
+
lockfile_parser.specs.each do |spec|
|
961
|
+
# Only include the spec for a gem and it's dependencies if it's autorequired.
|
962
|
+
if required_dependency_names.include?(spec.name)
|
963
|
+
specs << spec
|
964
|
+
specs << spec.dependencies
|
961
965
|
end
|
962
|
-
end
|
966
|
+
end
|
967
|
+
specs.flatten!
|
968
|
+
specs.uniq! { |spec| spec.name }
|
969
|
+
specs = specs.to_set
|
963
970
|
|
964
971
|
specs.sort_by(&:name).each do |gemspec|
|
965
972
|
begin
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sorbet
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.5420
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stripe
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-03-
|
11
|
+
date: 2020-03-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sorbet-static
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.5.
|
19
|
+
version: 0.5.5420
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.5.
|
26
|
+
version: 0.5.5420
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: minitest
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|