sorbet 0.4.4560 → 0.4.4561
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 +4 -4
- data/lib/require_everything.rb +15 -3
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0d3f69e912babc5f3cbee29abc38a454701a5e49
|
|
4
|
+
data.tar.gz: 6caa38beadd9e991d68a597b49d28e1dee9baee6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d4708be53cab49168b6975d6625e54bf1c3b745cc37f68b9d70e239089c6ede4491fe05f8590b9ab5cd65f44fb0acc8e16d13b7bbf0cbde4136ab67672d581cc
|
|
7
|
+
data.tar.gz: 262d8992bdefe9bfaacc25c793281f2706a88150b701d64511745a7b800e1d2322d87e6c7c2453bd44eebef5c41464e8dc7ab2a9f8a476e3395fc863a1f548d2
|
data/lib/require_everything.rb
CHANGED
|
@@ -139,9 +139,7 @@ class Sorbet::Private::RequireEverything
|
|
|
139
139
|
excluded_paths = Set.new
|
|
140
140
|
|
|
141
141
|
# Exclude files that have already been loaded by rails
|
|
142
|
-
|
|
143
|
-
load_paths = rails.application.send(:_all_load_paths)
|
|
144
|
-
load_paths.each do |path|
|
|
142
|
+
self.rails_load_paths.each do |path|
|
|
145
143
|
excluded_paths += Dir.glob("#{path}/**/*.rb")
|
|
146
144
|
end
|
|
147
145
|
|
|
@@ -151,6 +149,20 @@ class Sorbet::Private::RequireEverything
|
|
|
151
149
|
excluded_paths += Dir.glob("#{Dir.pwd}/config/initializers/**/*.rb")
|
|
152
150
|
end
|
|
153
151
|
|
|
152
|
+
def self.rails_load_paths
|
|
153
|
+
rails = Object.const_get(:Rails)
|
|
154
|
+
|
|
155
|
+
# As per changes made to change the arity of this method:
|
|
156
|
+
# https://github.com/rails/rails/commit/b6e17b6a4b67ccc9fac5fe16741c3db720f00959
|
|
157
|
+
# This sets the `add_autoload_paths_to_load_path` parameter to `true` which will
|
|
158
|
+
# provide parity with older versions of Rails prior to the mentioned commit.
|
|
159
|
+
if Gem::Version.new(rails.version) >= Gem::Version.new('6.0.0.rc2')
|
|
160
|
+
rails.application.send(:_all_load_paths, true)
|
|
161
|
+
else
|
|
162
|
+
rails.application.send(:_all_load_paths)
|
|
163
|
+
end
|
|
164
|
+
end
|
|
165
|
+
|
|
154
166
|
def self.rails?
|
|
155
167
|
return false unless File.exist?('config/application.rb')
|
|
156
168
|
begin
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: sorbet
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.4.
|
|
4
|
+
version: 0.4.4561
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Stripe
|
|
@@ -16,14 +16,14 @@ dependencies:
|
|
|
16
16
|
requirements:
|
|
17
17
|
- - '='
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: 0.4.
|
|
19
|
+
version: 0.4.4561
|
|
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.4.
|
|
26
|
+
version: 0.4.4561
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
28
|
name: minitest
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|