tapioca 0.2.1 → 0.2.2
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/tapioca.rb +12 -5
- data/lib/tapioca/compilers/symbol_table/symbol_generator.rb +1 -0
- data/lib/tapioca/loader.rb +21 -8
- data/lib/tapioca/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f62f87030894b3082915e0252ed1d4fc8dc87ca65f788dbe746f87c16b019cd7
|
4
|
+
data.tar.gz: 524f3d6fbe67548aac80e83612313525ad97ef6d7974512ece8e9f26e7802b35
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1dd87e1e713fe4575ff45c51bd3321227add7488b91da7f1490e8f480b45fa9b763d116cb4f78c579681c5ff002d87d60a80d6aa1c1b9ac9d3fd3c884565ceba
|
7
|
+
data.tar.gz: 344a45b9cd7cd13a9b3cddfaaff2775ad1a5d27c8725b79008505a76dd92244292bf8ef5e610658eab9fce7f78e4286e5324bae7130345fde6c48b3c44155a73
|
data/lib/tapioca.rb
CHANGED
@@ -18,10 +18,17 @@ module Tapioca
|
|
18
18
|
class Error < StandardError; end
|
19
19
|
end
|
20
20
|
|
21
|
-
|
22
|
-
|
23
|
-
T
|
24
|
-
|
25
|
-
|
21
|
+
begin
|
22
|
+
T::Configuration.default_checked_level = :never
|
23
|
+
# Suppresses errors caused by T.cast, T.let, T.must, etc.
|
24
|
+
T::Configuration.inline_type_error_handler = ->(*) {}
|
25
|
+
# Suppresses errors caused by incorrect parameter ordering
|
26
|
+
T::Configuration.sig_validation_error_handler = ->(*) {}
|
27
|
+
rescue
|
28
|
+
# Need this rescue so that if another gem has
|
29
|
+
# already set the checked level by the time we
|
30
|
+
# get to it, we don't fail outright.
|
31
|
+
nil
|
32
|
+
end
|
26
33
|
|
27
34
|
loader.eager_load
|
@@ -517,6 +517,7 @@ module Tapioca
|
|
517
517
|
def public_module?(constant)
|
518
518
|
constant_name = name_of(constant)
|
519
519
|
return false unless constant_name
|
520
|
+
return false if constant_name.start_with?('T::Private')
|
520
521
|
|
521
522
|
begin
|
522
523
|
# can't use !! here because the constant might override ! and mess with us
|
data/lib/tapioca/loader.rb
CHANGED
@@ -12,14 +12,14 @@ module Tapioca
|
|
12
12
|
|
13
13
|
sig { params(initialize_file: T.nilable(String), require_file: T.nilable(String)).void }
|
14
14
|
def load_bundle(initialize_file, require_file)
|
15
|
-
|
15
|
+
require_helper(initialize_file)
|
16
16
|
|
17
17
|
load_rails
|
18
18
|
load_rake
|
19
19
|
|
20
20
|
require_bundle
|
21
21
|
|
22
|
-
|
22
|
+
require_helper(require_file)
|
23
23
|
|
24
24
|
load_rails_engines
|
25
25
|
end
|
@@ -29,6 +29,15 @@ module Tapioca
|
|
29
29
|
sig { returns(Tapioca::Gemfile) }
|
30
30
|
attr_reader :gemfile
|
31
31
|
|
32
|
+
sig { params(file: T.nilable(String)).void }
|
33
|
+
def require_helper(file)
|
34
|
+
return unless file
|
35
|
+
file = File.absolute_path(file)
|
36
|
+
return unless File.exist?(file)
|
37
|
+
|
38
|
+
require(file)
|
39
|
+
end
|
40
|
+
|
32
41
|
sig { void }
|
33
42
|
def require_bundle
|
34
43
|
gemfile.require
|
@@ -78,18 +87,22 @@ module Tapioca
|
|
78
87
|
|
79
88
|
engine.config.eager_load_paths.each do |load_path|
|
80
89
|
Dir.glob("#{load_path}/**/*.rb").sort.each do |file|
|
81
|
-
|
82
|
-
|
83
|
-
|
90
|
+
begin
|
91
|
+
require(file)
|
92
|
+
rescue LoadError, StandardError
|
93
|
+
errored_files << file
|
94
|
+
end
|
84
95
|
end
|
85
96
|
end
|
86
97
|
|
87
98
|
# Try files that have errored one more time
|
88
99
|
# It might have been a load order problem
|
89
100
|
errored_files.each do |file|
|
90
|
-
|
91
|
-
|
92
|
-
|
101
|
+
begin
|
102
|
+
require(file)
|
103
|
+
rescue LoadError, StandardError
|
104
|
+
nil
|
105
|
+
end
|
93
106
|
end
|
94
107
|
end
|
95
108
|
end
|
data/lib/tapioca/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tapioca
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ufuk Kayserilioglu
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: exe
|
13
13
|
cert_chain: []
|
14
|
-
date: 2019-09-
|
14
|
+
date: 2019-09-25 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: pry
|
@@ -201,7 +201,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
201
201
|
requirements:
|
202
202
|
- - ">="
|
203
203
|
- !ruby/object:Gem::Version
|
204
|
-
version:
|
204
|
+
version: 2.4.4
|
205
205
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
206
206
|
requirements:
|
207
207
|
- - ">="
|